merge main

This commit is contained in:
Ben McCann
2026-03-29 09:33:19 -07:00
2621 changed files with 246878 additions and 69315 deletions
+66 -10
View File
@@ -34,21 +34,24 @@ part 'api/api_keys_api.dart';
part 'api/activities_api.dart';
part 'api/albums_api.dart';
part 'api/assets_api.dart';
part 'api/auth_admin_api.dart';
part 'api/authentication_api.dart';
part 'api/authentication_admin_api.dart';
part 'api/database_backups_admin_api.dart';
part 'api/deprecated_api.dart';
part 'api/download_api.dart';
part 'api/duplicates_api.dart';
part 'api/faces_api.dart';
part 'api/jobs_api.dart';
part 'api/libraries_api.dart';
part 'api/maintenance_admin_api.dart';
part 'api/map_api.dart';
part 'api/memories_api.dart';
part 'api/notifications_api.dart';
part 'api/notifications_admin_api.dart';
part 'api/o_auth_api.dart';
part 'api/partners_api.dart';
part 'api/people_api.dart';
part 'api/plugins_api.dart';
part 'api/queues_api.dart';
part 'api/search_api.dart';
part 'api/server_api.dart';
part 'api/sessions_api.dart';
@@ -63,7 +66,8 @@ part 'api/trash_api.dart';
part 'api/upload_api.dart';
part 'api/users_api.dart';
part 'api/users_admin_api.dart';
part 'api/view_api.dart';
part 'api/views_api.dart';
part 'api/workflows_api.dart';
part 'model/api_key_create_dto.dart';
part 'model/api_key_create_response_dto.dart';
@@ -84,7 +88,6 @@ part 'model/albums_add_assets_dto.dart';
part 'model/albums_add_assets_response_dto.dart';
part 'model/albums_response.dart';
part 'model/albums_update.dart';
part 'model/all_job_status_response_dto.dart';
part 'model/asset_bulk_delete_dto.dart';
part 'model/asset_bulk_update_dto.dart';
part 'model/asset_bulk_upload_check_dto.dart';
@@ -94,6 +97,12 @@ part 'model/asset_bulk_upload_check_result.dart';
part 'model/asset_copy_dto.dart';
part 'model/asset_delta_sync_dto.dart';
part 'model/asset_delta_sync_response_dto.dart';
part 'model/asset_edit_action.dart';
part 'model/asset_edit_action_item_dto.dart';
part 'model/asset_edit_action_item_dto_parameters.dart';
part 'model/asset_edit_action_item_response_dto.dart';
part 'model/asset_edits_create_dto.dart';
part 'model/asset_edits_response_dto.dart';
part 'model/asset_face_create_dto.dart';
part 'model/asset_face_delete_dto.dart';
part 'model/asset_face_response_dto.dart';
@@ -108,7 +117,11 @@ part 'model/asset_jobs_dto.dart';
part 'model/asset_media_response_dto.dart';
part 'model/asset_media_size.dart';
part 'model/asset_media_status.dart';
part 'model/asset_metadata_key.dart';
part 'model/asset_metadata_bulk_delete_dto.dart';
part 'model/asset_metadata_bulk_delete_item_dto.dart';
part 'model/asset_metadata_bulk_response_dto.dart';
part 'model/asset_metadata_bulk_upsert_dto.dart';
part 'model/asset_metadata_bulk_upsert_item_dto.dart';
part 'model/asset_metadata_response_dto.dart';
part 'model/asset_metadata_upsert_dto.dart';
part 'model/asset_metadata_upsert_item_dto.dart';
@@ -137,13 +150,20 @@ part 'model/contributor_count_response_dto.dart';
part 'model/create_album_dto.dart';
part 'model/create_library_dto.dart';
part 'model/create_profile_image_response_dto.dart';
part 'model/crop_parameters.dart';
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/download_archive_dto.dart';
part 'model/download_archive_info.dart';
part 'model/download_info_dto.dart';
part 'model/download_response.dart';
part 'model/download_response_dto.dart';
part 'model/download_update.dart';
part 'model/duplicate_detection_config.dart';
part 'model/duplicate_resolve_dto.dart';
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';
@@ -153,13 +173,9 @@ part 'model/facial_recognition_config.dart';
part 'model/folders_response.dart';
part 'model/folders_update.dart';
part 'model/image_format.dart';
part 'model/job_command.dart';
part 'model/job_command_dto.dart';
part 'model/job_counts_dto.dart';
part 'model/job_create_dto.dart';
part 'model/job_name.dart';
part 'model/job_settings_dto.dart';
part 'model/job_status_dto.dart';
part 'model/library_response_dto.dart';
part 'model/library_stats_response_dto.dart';
part 'model/license_key_dto.dart';
@@ -169,6 +185,12 @@ part 'model/login_credential_dto.dart';
part 'model/login_response_dto.dart';
part 'model/logout_response_dto.dart';
part 'model/machine_learning_availability_checks_dto.dart';
part 'model/maintenance_action.dart';
part 'model/maintenance_auth_dto.dart';
part 'model/maintenance_detect_install_response_dto.dart';
part 'model/maintenance_detect_install_storage_folder_dto.dart';
part 'model/maintenance_login_dto.dart';
part 'model/maintenance_status_response_dto.dart';
part 'model/manual_job_name.dart';
part 'model/map_marker_response_dto.dart';
part 'model/map_reverse_geocode_response_dto.dart';
@@ -176,11 +198,14 @@ part 'model/memories_response.dart';
part 'model/memories_update.dart';
part 'model/memory_create_dto.dart';
part 'model/memory_response_dto.dart';
part 'model/memory_search_order.dart';
part 'model/memory_statistics_response_dto.dart';
part 'model/memory_type.dart';
part 'model/memory_update_dto.dart';
part 'model/merge_person_dto.dart';
part 'model/metadata_search_dto.dart';
part 'model/mirror_axis.dart';
part 'model/mirror_parameters.dart';
part 'model/notification_create_dto.dart';
part 'model/notification_delete_all_dto.dart';
part 'model/notification_dto.dart';
@@ -215,15 +240,33 @@ part 'model/pin_code_change_dto.dart';
part 'model/pin_code_reset_dto.dart';
part 'model/pin_code_setup_dto.dart';
part 'model/places_response_dto.dart';
part 'model/plugin_action_response_dto.dart';
part 'model/plugin_context_type.dart';
part 'model/plugin_filter_response_dto.dart';
part 'model/plugin_response_dto.dart';
part 'model/plugin_trigger_response_dto.dart';
part 'model/plugin_trigger_type.dart';
part 'model/purchase_response.dart';
part 'model/purchase_update.dart';
part 'model/queue_status_dto.dart';
part 'model/queue_command.dart';
part 'model/queue_command_dto.dart';
part 'model/queue_delete_dto.dart';
part 'model/queue_job_response_dto.dart';
part 'model/queue_job_status.dart';
part 'model/queue_name.dart';
part 'model/queue_response_dto.dart';
part 'model/queue_response_legacy_dto.dart';
part 'model/queue_statistics_dto.dart';
part 'model/queue_status_legacy_dto.dart';
part 'model/queue_update_dto.dart';
part 'model/queues_response_legacy_dto.dart';
part 'model/random_search_dto.dart';
part 'model/ratings_response.dart';
part 'model/ratings_update.dart';
part 'model/reaction_level.dart';
part 'model/reaction_type.dart';
part 'model/reverse_geocoding_state_response_dto.dart';
part 'model/rotate_parameters.dart';
part 'model/search_album_response_dto.dart';
part 'model/search_asset_response_dto.dart';
part 'model/search_explore_item.dart';
@@ -249,8 +292,10 @@ part 'model/session_create_response_dto.dart';
part 'model/session_response_dto.dart';
part 'model/session_unlock_dto.dart';
part 'model/session_update_dto.dart';
part 'model/set_maintenance_mode_dto.dart';
part 'model/shared_link_create_dto.dart';
part 'model/shared_link_edit_dto.dart';
part 'model/shared_link_login_dto.dart';
part 'model/shared_link_response_dto.dart';
part 'model/shared_link_type.dart';
part 'model/shared_links_response.dart';
@@ -262,6 +307,7 @@ part 'model/stack_create_dto.dart';
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/sync_ack_delete_dto.dart';
part 'model/sync_ack_dto.dart';
part 'model/sync_ack_set_dto.dart';
@@ -272,9 +318,12 @@ part 'model/sync_album_user_delete_v1.dart';
part 'model/sync_album_user_v1.dart';
part 'model/sync_album_v1.dart';
part 'model/sync_asset_delete_v1.dart';
part 'model/sync_asset_edit_delete_v1.dart';
part 'model/sync_asset_edit_v1.dart';
part 'model/sync_asset_exif_v1.dart';
part 'model/sync_asset_face_delete_v1.dart';
part 'model/sync_asset_face_v1.dart';
part 'model/sync_asset_face_v2.dart';
part 'model/sync_asset_metadata_delete_v1.dart';
part 'model/sync_asset_metadata_v1.dart';
part 'model/sync_asset_v1.dart';
@@ -370,6 +419,13 @@ part 'model/validate_library_response_dto.dart';
part 'model/version_check_state_response_dto.dart';
part 'model/video_codec.dart';
part 'model/video_container.dart';
part 'model/workflow_action_item_dto.dart';
part 'model/workflow_action_response_dto.dart';
part 'model/workflow_create_dto.dart';
part 'model/workflow_filter_item_dto.dart';
part 'model/workflow_filter_response_dto.dart';
part 'model/workflow_response_dto.dart';
part 'model/workflow_update_dto.dart';
/// An [ApiClient] instance that uses the default values obtained from
+38 -8
View File
@@ -16,7 +16,9 @@ class ActivitiesApi {
final ApiClient apiClient;
/// This endpoint requires the `activity.create` permission.
/// Create an activity
///
/// Create a like or a comment for an album, or an asset in an album.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class ActivitiesApi {
);
}
/// This endpoint requires the `activity.create` permission.
/// Create an activity
///
/// Create a like or a comment for an album, or an asset in an album.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class ActivitiesApi {
return null;
}
/// This endpoint requires the `activity.delete` permission.
/// Delete an activity
///
/// Removes a like or comment from a given album or asset in an album.
///
/// Note: This method returns the HTTP [Response].
///
@@ -101,7 +107,9 @@ class ActivitiesApi {
);
}
/// This endpoint requires the `activity.delete` permission.
/// Delete an activity
///
/// Removes a like or comment from a given album or asset in an album.
///
/// Parameters:
///
@@ -113,21 +121,28 @@ class ActivitiesApi {
}
}
/// This endpoint requires the `activity.read` permission.
/// List all activities
///
/// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] albumId (required):
/// Album ID
///
/// * [String] assetId:
/// Asset ID (if activity is for an asset)
///
/// * [ReactionLevel] level:
/// Filter by activity level
///
/// * [ReactionType] type:
/// Filter by activity type
///
/// * [String] userId:
/// Filter by user ID
Future<Response> getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/activities';
@@ -167,19 +182,26 @@ class ActivitiesApi {
);
}
/// This endpoint requires the `activity.read` permission.
/// List all activities
///
/// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.
///
/// Parameters:
///
/// * [String] albumId (required):
/// Album ID
///
/// * [String] assetId:
/// Asset ID (if activity is for an asset)
///
/// * [ReactionLevel] level:
/// Filter by activity level
///
/// * [ReactionType] type:
/// Filter by activity type
///
/// * [String] userId:
/// Filter by user ID
Future<List<ActivityResponseDto>?> getActivities(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, }) async {
final response = await getActivitiesWithHttpInfo(albumId, assetId: assetId, level: level, type: type, userId: userId, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -198,15 +220,19 @@ class ActivitiesApi {
return null;
}
/// This endpoint requires the `activity.statistics` permission.
/// Retrieve activity statistics
///
/// Returns the number of likes and comments for a given album or asset in an album.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] albumId (required):
/// Album ID
///
/// * [String] assetId:
/// Asset ID (if activity is for an asset)
Future<Response> getActivityStatisticsWithHttpInfo(String albumId, { String? assetId, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/activities/statistics';
@@ -237,13 +263,17 @@ class ActivitiesApi {
);
}
/// This endpoint requires the `activity.statistics` permission.
/// Retrieve activity statistics
///
/// Returns the number of likes and comments for a given album or asset in an album.
///
/// Parameters:
///
/// * [String] albumId (required):
/// Album ID
///
/// * [String] assetId:
/// Asset ID (if activity is for an asset)
Future<ActivityStatisticsResponseDto?> getActivityStatistics(String albumId, { String? assetId, }) async {
final response = await getActivityStatisticsWithHttpInfo(albumId, assetId: assetId, );
if (response.statusCode >= HttpStatus.badRequest) {
+78 -26
View File
@@ -16,7 +16,9 @@ class AlbumsApi {
final ApiClient apiClient;
/// This endpoint requires the `albumAsset.create` permission.
/// Add assets to an album
///
/// Add multiple assets to a specific album by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -62,7 +64,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `albumAsset.create` permission.
/// Add assets to an album
///
/// Add multiple assets to a specific album by its ID.
///
/// Parameters:
///
@@ -91,7 +95,9 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `albumAsset.create` permission.
/// Add assets to albums
///
/// Send a list of asset IDs and album IDs to add each asset to each album.
///
/// Note: This method returns the HTTP [Response].
///
@@ -134,7 +140,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `albumAsset.create` permission.
/// Add assets to albums
///
/// Send a list of asset IDs and album IDs to add each asset to each album.
///
/// Parameters:
///
@@ -158,7 +166,9 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `albumUser.create` permission.
/// Share album with users
///
/// Share an album with multiple users. Each user can be given a specific role in the album.
///
/// Note: This method returns the HTTP [Response].
///
@@ -193,7 +203,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `albumUser.create` permission.
/// Share album with users
///
/// Share an album with multiple users. Each user can be given a specific role in the album.
///
/// Parameters:
///
@@ -215,7 +227,9 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `album.create` permission.
/// Create an album
///
/// Create a new album. The album can also be created with initial users and assets.
///
/// Note: This method returns the HTTP [Response].
///
@@ -247,7 +261,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `album.create` permission.
/// Create an album
///
/// Create a new album. The album can also be created with initial users and assets.
///
/// Parameters:
///
@@ -267,7 +283,9 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `album.delete` permission.
/// Delete an album
///
/// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.
///
/// Note: This method returns the HTTP [Response].
///
@@ -300,7 +318,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `album.delete` permission.
/// Delete an album
///
/// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.
///
/// Parameters:
///
@@ -312,7 +332,9 @@ class AlbumsApi {
}
}
/// This endpoint requires the `album.read` permission.
/// Retrieve an album
///
/// Retrieve information about a specific album by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -325,6 +347,7 @@ class AlbumsApi {
/// * [String] slug:
///
/// * [bool] withoutAssets:
/// Exclude assets from response
Future<Response> getAlbumInfoWithHttpInfo(String id, { String? key, String? slug, bool? withoutAssets, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/albums/{id}'
@@ -361,7 +384,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `album.read` permission.
/// Retrieve an album
///
/// Retrieve information about a specific album by its ID.
///
/// Parameters:
///
@@ -372,6 +397,7 @@ class AlbumsApi {
/// * [String] slug:
///
/// * [bool] withoutAssets:
/// Exclude assets from response
Future<AlbumResponseDto?> getAlbumInfo(String id, { String? key, String? slug, bool? withoutAssets, }) async {
final response = await getAlbumInfoWithHttpInfo(id, key: key, slug: slug, withoutAssets: withoutAssets, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -387,7 +413,9 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `album.statistics` permission.
/// Retrieve album statistics
///
/// Returns statistics about the albums available to the authenticated user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAlbumStatisticsWithHttpInfo() async {
@@ -415,7 +443,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `album.statistics` permission.
/// Retrieve album statistics
///
/// Returns statistics about the albums available to the authenticated user.
Future<AlbumStatisticsResponseDto?> getAlbumStatistics() async {
final response = await getAlbumStatisticsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -431,16 +461,19 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `album.read` permission.
/// List all albums
///
/// Retrieve a list of albums available to the authenticated user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] assetId:
/// Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
/// Filter albums containing this asset ID (ignores shared parameter)
///
/// * [bool] shared:
/// Filter by shared status: true = only shared, false = not shared, undefined = all owned albums
Future<Response> getAllAlbumsWithHttpInfo({ String? assetId, bool? shared, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/albums';
@@ -473,14 +506,17 @@ class AlbumsApi {
);
}
/// This endpoint requires the `album.read` permission.
/// List all albums
///
/// Retrieve a list of albums available to the authenticated user.
///
/// Parameters:
///
/// * [String] assetId:
/// Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
/// Filter albums containing this asset ID (ignores shared parameter)
///
/// * [bool] shared:
/// Filter by shared status: true = only shared, false = not shared, undefined = all owned albums
Future<List<AlbumResponseDto>?> getAllAlbums({ String? assetId, bool? shared, }) async {
final response = await getAllAlbumsWithHttpInfo( assetId: assetId, shared: shared, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -499,7 +535,9 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `albumAsset.delete` permission.
/// Remove assets from an album
///
/// Remove multiple assets from a specific album by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -534,7 +572,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `albumAsset.delete` permission.
/// Remove assets from an album
///
/// Remove multiple assets from a specific album by its ID.
///
/// Parameters:
///
@@ -559,7 +599,9 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `albumUser.delete` permission.
/// Remove user from album
///
/// Remove a user from an album. Use an ID of \"me\" to leave a shared album.
///
/// Note: This method returns the HTTP [Response].
///
@@ -595,7 +637,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `albumUser.delete` permission.
/// Remove user from album
///
/// Remove a user from an album. Use an ID of \"me\" to leave a shared album.
///
/// Parameters:
///
@@ -609,7 +653,9 @@ class AlbumsApi {
}
}
/// This endpoint requires the `album.update` permission.
/// Update an album
///
/// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.
///
/// Note: This method returns the HTTP [Response].
///
@@ -644,7 +690,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `album.update` permission.
/// Update an album
///
/// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.
///
/// Parameters:
///
@@ -666,7 +714,9 @@ class AlbumsApi {
return null;
}
/// This endpoint requires the `albumUser.update` permission.
/// Update user role
///
/// Change the role for a specific user in a specific album.
///
/// Note: This method returns the HTTP [Response].
///
@@ -704,7 +754,9 @@ class AlbumsApi {
);
}
/// This endpoint requires the `albumUser.update` permission.
/// Update user role
///
/// Change the role for a specific user in a specific album.
///
/// Parameters:
///
+38 -11
View File
@@ -16,7 +16,9 @@ class APIKeysApi {
final ApiClient apiClient;
/// This endpoint requires the `apiKey.create` permission.
/// Create an API key
///
/// Creates a new API key. It will be limited to the permissions specified.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class APIKeysApi {
);
}
/// This endpoint requires the `apiKey.create` permission.
/// Create an API key
///
/// Creates a new API key. It will be limited to the permissions specified.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class APIKeysApi {
return null;
}
/// This endpoint requires the `apiKey.delete` permission.
/// Delete an API key
///
/// Deletes an API key identified by its ID. The current user must own this API key.
///
/// Note: This method returns the HTTP [Response].
///
@@ -101,7 +107,9 @@ class APIKeysApi {
);
}
/// This endpoint requires the `apiKey.delete` permission.
/// Delete an API key
///
/// Deletes an API key identified by its ID. The current user must own this API key.
///
/// Parameters:
///
@@ -113,7 +121,9 @@ class APIKeysApi {
}
}
/// This endpoint requires the `apiKey.read` permission.
/// Retrieve an API key
///
/// Retrieve an API key by its ID. The current user must own this API key.
///
/// Note: This method returns the HTTP [Response].
///
@@ -146,7 +156,9 @@ class APIKeysApi {
);
}
/// This endpoint requires the `apiKey.read` permission.
/// Retrieve an API key
///
/// Retrieve an API key by its ID. The current user must own this API key.
///
/// Parameters:
///
@@ -166,7 +178,9 @@ class APIKeysApi {
return null;
}
/// This endpoint requires the `apiKey.read` permission.
/// List all API keys
///
/// Retrieve all API keys of the current user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getApiKeysWithHttpInfo() async {
@@ -194,7 +208,9 @@ class APIKeysApi {
);
}
/// This endpoint requires the `apiKey.read` permission.
/// List all API keys
///
/// Retrieve all API keys of the current user.
Future<List<APIKeyResponseDto>?> getApiKeys() async {
final response = await getApiKeysWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -213,7 +229,11 @@ class APIKeysApi {
return null;
}
/// Performs an HTTP 'GET /api-keys/me' operation and returns the [Response].
/// Retrieve the current API key
///
/// Retrieve the API key that is used to access this endpoint.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getMyApiKeyWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/api-keys/me';
@@ -239,6 +259,9 @@ class APIKeysApi {
);
}
/// Retrieve the current API key
///
/// Retrieve the API key that is used to access this endpoint.
Future<APIKeyResponseDto?> getMyApiKey() async {
final response = await getMyApiKeyWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -254,7 +277,9 @@ class APIKeysApi {
return null;
}
/// This endpoint requires the `apiKey.update` permission.
/// Update an API key
///
/// Updates the name and permissions of an API key by its ID. The current user must own this API key.
///
/// Note: This method returns the HTTP [Response].
///
@@ -289,7 +314,9 @@ class APIKeysApi {
);
}
/// This endpoint requires the `apiKey.update` permission.
/// Update an API key
///
/// Updates the name and permissions of an API key by its ID. The current user must own this API key.
///
/// Parameters:
///
+491 -68
View File
File diff suppressed because it is too large Load Diff
@@ -11,12 +11,14 @@
part of openapi.api;
class AuthAdminApi {
AuthAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
class AuthenticationAdminApi {
AuthenticationAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission.
/// Unlink all OAuth accounts
///
/// Unlinks all OAuth accounts associated with user accounts in the system.
///
/// Note: This method returns the HTTP [Response].
Future<Response> unlinkAllOAuthAccountsAdminWithHttpInfo() async {
@@ -44,7 +46,9 @@ class AuthAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission.
/// Unlink all OAuth accounts
///
/// Unlinks all OAuth accounts associated with user accounts in the system.
Future<void> unlinkAllOAuthAccountsAdmin() async {
final response = await unlinkAllOAuthAccountsAdminWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
+342 -15
View File
@@ -16,7 +16,9 @@ class AuthenticationApi {
final ApiClient apiClient;
/// This endpoint requires the `auth.changePassword` permission.
/// Change password
///
/// Change the password of the current user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class AuthenticationApi {
);
}
/// This endpoint requires the `auth.changePassword` permission.
/// Change password
///
/// Change the password of the current user.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class AuthenticationApi {
return null;
}
/// This endpoint requires the `pinCode.update` permission.
/// Change pin code
///
/// Change the pin code for the current user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -100,7 +106,9 @@ class AuthenticationApi {
);
}
/// This endpoint requires the `pinCode.update` permission.
/// Change pin code
///
/// Change the pin code for the current user.
///
/// Parameters:
///
@@ -112,7 +120,67 @@ class AuthenticationApi {
}
}
/// Performs an HTTP 'GET /auth/status' operation and returns the [Response].
/// Finish OAuth
///
/// Complete the OAuth authorization process by exchanging the authorization code for a session token.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
Future<Response> finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/callback';
// ignore: prefer_final_locals
Object? postBody = oAuthCallbackDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Finish OAuth
///
/// Complete the OAuth authorization process by exchanging the authorization code for a session token.
///
/// Parameters:
///
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
Future<LoginResponseDto?> finishOAuth(OAuthCallbackDto oAuthCallbackDto,) async {
final response = await finishOAuthWithHttpInfo(oAuthCallbackDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto;
}
return null;
}
/// Retrieve auth status
///
/// Get information about the current session, including whether the user has a password, and if the session can access locked assets.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAuthStatusWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/auth/status';
@@ -138,6 +206,9 @@ class AuthenticationApi {
);
}
/// Retrieve auth status
///
/// Get information about the current session, including whether the user has a password, and if the session can access locked assets.
Future<AuthStatusResponseDto?> getAuthStatus() async {
final response = await getAuthStatusWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -153,7 +224,67 @@ class AuthenticationApi {
return null;
}
/// Performs an HTTP 'POST /auth/session/lock' operation and returns the [Response].
/// Link OAuth account
///
/// Link an OAuth account to the authenticated user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
Future<Response> linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/link';
// ignore: prefer_final_locals
Object? postBody = oAuthCallbackDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Link OAuth account
///
/// Link an OAuth account to the authenticated user.
///
/// Parameters:
///
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
Future<UserAdminResponseDto?> linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto,) async {
final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
}
return null;
}
/// Lock auth session
///
/// Remove elevated access to locked assets from the current session.
///
/// Note: This method returns the HTTP [Response].
Future<Response> lockAuthSessionWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/auth/session/lock';
@@ -179,6 +310,9 @@ class AuthenticationApi {
);
}
/// Lock auth session
///
/// Remove elevated access to locked assets from the current session.
Future<void> lockAuthSession() async {
final response = await lockAuthSessionWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -186,7 +320,12 @@ class AuthenticationApi {
}
}
/// Performs an HTTP 'POST /auth/login' operation and returns the [Response].
/// Login
///
/// Login with username and password and receive a session token.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [LoginCredentialDto] loginCredentialDto (required):
@@ -215,6 +354,10 @@ class AuthenticationApi {
);
}
/// Login
///
/// Login with username and password and receive a session token.
///
/// Parameters:
///
/// * [LoginCredentialDto] loginCredentialDto (required):
@@ -233,7 +376,11 @@ class AuthenticationApi {
return null;
}
/// Performs an HTTP 'POST /auth/logout' operation and returns the [Response].
/// Logout
///
/// Logout the current user and invalidate the session token.
///
/// Note: This method returns the HTTP [Response].
Future<Response> logoutWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/auth/logout';
@@ -259,6 +406,9 @@ class AuthenticationApi {
);
}
/// Logout
///
/// Logout the current user and invalidate the session token.
Future<LogoutResponseDto?> logout() async {
final response = await logoutWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -274,7 +424,49 @@ class AuthenticationApi {
return null;
}
/// This endpoint requires the `pinCode.delete` permission.
/// Redirect OAuth to mobile
///
/// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.
///
/// Note: This method returns the HTTP [Response].
Future<Response> redirectOAuthToMobileWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/mobile-redirect';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Redirect OAuth to mobile
///
/// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.
Future<void> redirectOAuthToMobile() async {
final response = await redirectOAuthToMobileWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Reset pin code
///
/// Reset the pin code for the current user by providing the account password
///
/// Note: This method returns the HTTP [Response].
///
@@ -306,7 +498,9 @@ class AuthenticationApi {
);
}
/// This endpoint requires the `pinCode.delete` permission.
/// Reset pin code
///
/// Reset the pin code for the current user by providing the account password
///
/// Parameters:
///
@@ -318,7 +512,9 @@ class AuthenticationApi {
}
}
/// This endpoint requires the `pinCode.create` permission.
/// Setup pin code
///
/// Setup a new pin code for the current user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -350,7 +546,9 @@ class AuthenticationApi {
);
}
/// This endpoint requires the `pinCode.create` permission.
/// Setup pin code
///
/// Setup a new pin code for the current user.
///
/// Parameters:
///
@@ -362,7 +560,12 @@ class AuthenticationApi {
}
}
/// Performs an HTTP 'POST /auth/admin-sign-up' operation and returns the [Response].
/// Register admin
///
/// Create the first admin user in the system.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [SignUpDto] signUpDto (required):
@@ -391,6 +594,10 @@ class AuthenticationApi {
);
}
/// Register admin
///
/// Create the first admin user in the system.
///
/// Parameters:
///
/// * [SignUpDto] signUpDto (required):
@@ -409,7 +616,116 @@ class AuthenticationApi {
return null;
}
/// Performs an HTTP 'POST /auth/session/unlock' operation and returns the [Response].
/// Start OAuth
///
/// Initiate the OAuth authorization process.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [OAuthConfigDto] oAuthConfigDto (required):
Future<Response> startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/authorize';
// ignore: prefer_final_locals
Object? postBody = oAuthConfigDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Start OAuth
///
/// Initiate the OAuth authorization process.
///
/// Parameters:
///
/// * [OAuthConfigDto] oAuthConfigDto (required):
Future<OAuthAuthorizeResponseDto?> startOAuth(OAuthConfigDto oAuthConfigDto,) async {
final response = await startOAuthWithHttpInfo(oAuthConfigDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthAuthorizeResponseDto',) as OAuthAuthorizeResponseDto;
}
return null;
}
/// Unlink OAuth account
///
/// Unlink the OAuth account from the authenticated user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> unlinkOAuthAccountWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/unlink';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Unlink OAuth account
///
/// Unlink the OAuth account from the authenticated user.
Future<UserAdminResponseDto?> unlinkOAuthAccount() async {
final response = await unlinkOAuthAccountWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
}
return null;
}
/// Unlock auth session
///
/// Temporarily grant the session elevated access to locked assets by providing the correct PIN code.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [SessionUnlockDto] sessionUnlockDto (required):
@@ -438,6 +754,10 @@ class AuthenticationApi {
);
}
/// Unlock auth session
///
/// Temporarily grant the session elevated access to locked assets by providing the correct PIN code.
///
/// Parameters:
///
/// * [SessionUnlockDto] sessionUnlockDto (required):
@@ -448,7 +768,11 @@ class AuthenticationApi {
}
}
/// Performs an HTTP 'POST /auth/validateToken' operation and returns the [Response].
/// Validate access token
///
/// Validate the current authorization method is still valid.
///
/// Note: This method returns the HTTP [Response].
Future<Response> validateAccessTokenWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/auth/validateToken';
@@ -474,6 +798,9 @@ class AuthenticationApi {
);
}
/// Validate access token
///
/// Validate the current authorization method is still valid.
Future<ValidateAccessTokenResponseDto?> validateAccessToken() async {
final response = await validateAccessTokenWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
+269
View File
@@ -0,0 +1,269 @@
//
// 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 DatabaseBackupsAdminApi {
DatabaseBackupsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Delete database backup
///
/// Delete a backup by its filename
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required):
Future<Response> deleteDatabaseBackupWithHttpInfo(DatabaseBackupDeleteDto databaseBackupDeleteDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/database-backups';
// ignore: prefer_final_locals
Object? postBody = databaseBackupDeleteDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Delete database backup
///
/// Delete a backup by its filename
///
/// Parameters:
///
/// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required):
Future<void> deleteDatabaseBackup(DatabaseBackupDeleteDto databaseBackupDeleteDto,) async {
final response = await deleteDatabaseBackupWithHttpInfo(databaseBackupDeleteDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Download database backup
///
/// Downloads the database backup file
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] filename (required):
Future<Response> downloadDatabaseBackupWithHttpInfo(String filename,) async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/database-backups/{filename}'
.replaceAll('{filename}', filename);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Download database backup
///
/// Downloads the database backup file
///
/// Parameters:
///
/// * [String] filename (required):
Future<MultipartFile?> downloadDatabaseBackup(String filename,) async {
final response = await downloadDatabaseBackupWithHttpInfo(filename,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile;
}
return null;
}
/// List database backups
///
/// Get the list of the successful and failed backups
///
/// Note: This method returns the HTTP [Response].
Future<Response> listDatabaseBackupsWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/database-backups';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// List database backups
///
/// Get the list of the successful and failed backups
Future<DatabaseBackupListResponseDto?> listDatabaseBackups() async {
final response = await listDatabaseBackupsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DatabaseBackupListResponseDto',) as DatabaseBackupListResponseDto;
}
return null;
}
/// Start database backup restore flow
///
/// Put Immich into maintenance mode to restore a backup (Immich must not be configured)
///
/// Note: This method returns the HTTP [Response].
Future<Response> startDatabaseRestoreFlowWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/database-backups/start-restore';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Start database backup restore flow
///
/// Put Immich into maintenance mode to restore a backup (Immich must not be configured)
Future<void> startDatabaseRestoreFlow() async {
final response = await startDatabaseRestoreFlowWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Upload database backup
///
/// Uploads .sql/.sql.gz file to restore backup from
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [MultipartFile] file:
Future<Response> uploadDatabaseBackupWithHttpInfo({ MultipartFile? file, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/database-backups/upload';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['multipart/form-data'];
bool hasFields = false;
final mp = MultipartRequest('POST', Uri.parse(apiPath));
if (file != null) {
hasFields = true;
mp.fields[r'file'] = file.field;
mp.files.add(file);
}
if (hasFields) {
postBody = mp;
}
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Upload database backup
///
/// Uploads .sql/.sql.gz file to restore backup from
///
/// Parameters:
///
/// * [MultipartFile] file:
Future<void> uploadDatabaseBackup({ MultipartFile? file, }) async {
final response = await uploadDatabaseBackupWithHttpInfo( file: file, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+320 -8
View File
@@ -16,7 +16,9 @@ class DeprecatedApi {
final ApiClient apiClient;
/// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission.
/// Create a partner
///
/// Create a new partner to share assets with.
///
/// Note: This method returns the HTTP [Response].
///
@@ -49,7 +51,9 @@ class DeprecatedApi {
);
}
/// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission.
/// Create a partner
///
/// Create a new partner to share assets with.
///
/// Parameters:
///
@@ -69,13 +73,241 @@ class DeprecatedApi {
return null;
}
/// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission.
/// Retrieve assets by device ID
///
/// Get all asset of a device that are in the database, ID only.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] deviceId (required):
/// Device ID
Future<Response> getAllUserAssetsByDeviceIdWithHttpInfo(String deviceId,) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets/device/{deviceId}'
.replaceAll('{deviceId}', deviceId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Retrieve assets by device ID
///
/// Get all asset of a device that are in the database, ID only.
///
/// Parameters:
///
/// * [String] deviceId (required):
/// Device ID
Future<List<String>?> getAllUserAssetsByDeviceId(String deviceId,) async {
final response = await getAllUserAssetsByDeviceIdWithHttpInfo(deviceId,);
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<String>') as List)
.cast<String>()
.toList(growable: false);
}
return null;
}
/// Get delta sync for user
///
/// Retrieve changed assets since the last sync for the authenticated user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [AssetDeltaSyncDto] assetDeltaSyncDto (required):
Future<Response> getDeltaSyncWithHttpInfo(AssetDeltaSyncDto assetDeltaSyncDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/sync/delta-sync';
// ignore: prefer_final_locals
Object? postBody = assetDeltaSyncDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Get delta sync for user
///
/// Retrieve changed assets since the last sync for the authenticated user.
///
/// Parameters:
///
/// * [AssetDeltaSyncDto] assetDeltaSyncDto (required):
Future<AssetDeltaSyncResponseDto?> getDeltaSync(AssetDeltaSyncDto assetDeltaSyncDto,) async {
final response = await getDeltaSyncWithHttpInfo(assetDeltaSyncDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetDeltaSyncResponseDto',) as AssetDeltaSyncResponseDto;
}
return null;
}
/// Get full sync for user
///
/// Retrieve all assets for a full synchronization for the authenticated user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [AssetFullSyncDto] assetFullSyncDto (required):
Future<Response> getFullSyncForUserWithHttpInfo(AssetFullSyncDto assetFullSyncDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/sync/full-sync';
// ignore: prefer_final_locals
Object? postBody = assetFullSyncDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Get full sync for user
///
/// Retrieve all assets for a full synchronization for the authenticated user.
///
/// Parameters:
///
/// * [AssetFullSyncDto] assetFullSyncDto (required):
Future<List<AssetResponseDto>?> getFullSyncForUser(AssetFullSyncDto assetFullSyncDto,) async {
final response = await getFullSyncForUserWithHttpInfo(assetFullSyncDto,);
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<AssetResponseDto>') as List)
.cast<AssetResponseDto>()
.toList(growable: false);
}
return null;
}
/// Retrieve queue counts and status
///
/// Retrieve the counts of the current queue, as well as the current status.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getQueuesLegacyWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/jobs';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Retrieve queue counts and status
///
/// Retrieve the counts of the current queue, as well as the current status.
Future<QueuesResponseLegacyDto?> getQueuesLegacy() async {
final response = await getQueuesLegacyWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto;
}
return null;
}
/// Get random assets
///
/// Retrieve a specified number of random assets for the authenticated user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [num] count:
/// Number of random assets to return
Future<Response> getRandomWithHttpInfo({ num? count, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets/random';
@@ -105,11 +337,14 @@ class DeprecatedApi {
);
}
/// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission.
/// Get random assets
///
/// Retrieve a specified number of random assets for the authenticated user.
///
/// Parameters:
///
/// * [num] count:
/// Number of random assets to return
Future<List<AssetResponseDto>?> getRandom({ num? count, }) async {
final response = await getRandomWithHttpInfo( count: count, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -128,9 +363,9 @@ class DeprecatedApi {
return null;
}
/// Replace the asset with new file, without changing its id
/// Replace asset
///
/// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission.
/// Replace the asset with new file, without changing its id.
///
/// Note: This method returns the HTTP [Response].
///
@@ -139,22 +374,29 @@ class DeprecatedApi {
/// * [String] id (required):
///
/// * [MultipartFile] assetData (required):
/// Asset file data
///
/// * [String] deviceAssetId (required):
/// Device asset ID
///
/// * [String] deviceId (required):
/// Device ID
///
/// * [DateTime] fileCreatedAt (required):
/// File creation date
///
/// * [DateTime] fileModifiedAt (required):
/// File modification date
///
/// * [String] key:
///
/// * [String] slug:
///
/// * [String] duration:
/// Duration (for videos)
///
/// * [String] filename:
/// Filename
Future<Response> replaceAssetWithHttpInfo(String id, MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? duration, String? filename, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets/{id}/original'
@@ -222,31 +464,38 @@ class DeprecatedApi {
);
}
/// Replace the asset with new file, without changing its id
/// Replace asset
///
/// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission.
/// Replace the asset with new file, without changing its id.
///
/// Parameters:
///
/// * [String] id (required):
///
/// * [MultipartFile] assetData (required):
/// Asset file data
///
/// * [String] deviceAssetId (required):
/// Device asset ID
///
/// * [String] deviceId (required):
/// Device ID
///
/// * [DateTime] fileCreatedAt (required):
/// File creation date
///
/// * [DateTime] fileModifiedAt (required):
/// File modification date
///
/// * [String] key:
///
/// * [String] slug:
///
/// * [String] duration:
/// Duration (for videos)
///
/// * [String] filename:
/// Filename
Future<AssetMediaResponseDto?> replaceAsset(String id, MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? duration, String? filename, }) async {
final response = await replaceAssetWithHttpInfo(id, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, key: key, slug: slug, duration: duration, filename: filename, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -261,4 +510,67 @@ class DeprecatedApi {
}
return null;
}
/// Run jobs
///
/// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
///
/// * [QueueCommandDto] queueCommandDto (required):
Future<Response> runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/jobs/{name}'
.replaceAll('{name}', name.toString());
// ignore: prefer_final_locals
Object? postBody = queueCommandDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Run jobs
///
/// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
///
/// * [QueueCommandDto] queueCommandDto (required):
Future<QueueResponseLegacyDto?> runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto,) async {
final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto;
}
return null;
}
}
+18 -10
View File
@@ -16,23 +16,25 @@ class DownloadApi {
final ApiClient apiClient;
/// This endpoint requires the `asset.download` permission.
/// Download asset archive
///
/// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [AssetIdsDto] assetIdsDto (required):
/// * [DownloadArchiveDto] downloadArchiveDto (required):
///
/// * [String] key:
///
/// * [String] slug:
Future<Response> downloadArchiveWithHttpInfo(AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
Future<Response> downloadArchiveWithHttpInfo(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/download/archive';
// ignore: prefer_final_locals
Object? postBody = assetIdsDto;
Object? postBody = downloadArchiveDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@@ -59,17 +61,19 @@ class DownloadApi {
);
}
/// This endpoint requires the `asset.download` permission.
/// Download asset archive
///
/// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.
///
/// Parameters:
///
/// * [AssetIdsDto] assetIdsDto (required):
/// * [DownloadArchiveDto] downloadArchiveDto (required):
///
/// * [String] key:
///
/// * [String] slug:
Future<MultipartFile?> downloadArchive(AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
final response = await downloadArchiveWithHttpInfo(assetIdsDto, key: key, slug: slug, );
Future<MultipartFile?> downloadArchive(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, }) async {
final response = await downloadArchiveWithHttpInfo(downloadArchiveDto, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -83,7 +87,9 @@ class DownloadApi {
return null;
}
/// This endpoint requires the `asset.download` permission.
/// Retrieve download information
///
/// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.
///
/// Note: This method returns the HTTP [Response].
///
@@ -126,7 +132,9 @@ class DownloadApi {
);
}
/// This endpoint requires the `asset.download` permission.
/// Retrieve download information
///
/// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.
///
/// Parameters:
///
+77 -6
View File
@@ -16,7 +16,9 @@ class DuplicatesApi {
final ApiClient apiClient;
/// This endpoint requires the `duplicate.delete` permission.
/// Delete a duplicate
///
/// Delete a single duplicate asset specified by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -49,7 +51,9 @@ class DuplicatesApi {
);
}
/// This endpoint requires the `duplicate.delete` permission.
/// Delete a duplicate
///
/// Delete a single duplicate asset specified by its ID.
///
/// Parameters:
///
@@ -61,7 +65,9 @@ class DuplicatesApi {
}
}
/// This endpoint requires the `duplicate.delete` permission.
/// Delete duplicates
///
/// Delete multiple duplicate assets specified by their IDs.
///
/// Note: This method returns the HTTP [Response].
///
@@ -93,7 +99,9 @@ class DuplicatesApi {
);
}
/// This endpoint requires the `duplicate.delete` permission.
/// Delete duplicates
///
/// Delete multiple duplicate assets specified by their IDs.
///
/// Parameters:
///
@@ -105,7 +113,9 @@ class DuplicatesApi {
}
}
/// This endpoint requires the `duplicate.read` permission.
/// Retrieve duplicates
///
/// Retrieve a list of duplicate assets available to the authenticated user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAssetDuplicatesWithHttpInfo() async {
@@ -133,7 +143,9 @@ class DuplicatesApi {
);
}
/// This endpoint requires the `duplicate.read` permission.
/// Retrieve duplicates
///
/// Retrieve a list of duplicate assets available to the authenticated user.
Future<List<DuplicateResponseDto>?> getAssetDuplicates() async {
final response = await getAssetDuplicatesWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -151,4 +163,63 @@ class DuplicatesApi {
}
return null;
}
/// Resolve duplicate groups
///
/// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [DuplicateResolveDto] duplicateResolveDto (required):
Future<Response> resolveDuplicatesWithHttpInfo(DuplicateResolveDto duplicateResolveDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/duplicates/resolve';
// ignore: prefer_final_locals
Object? postBody = duplicateResolveDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Resolve duplicate groups
///
/// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.
///
/// Parameters:
///
/// * [DuplicateResolveDto] duplicateResolveDto (required):
Future<List<BulkIdResponseDto>?> resolveDuplicates(DuplicateResolveDto duplicateResolveDto,) async {
final response = await resolveDuplicatesWithHttpInfo(duplicateResolveDto,);
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<BulkIdResponseDto>') as List)
.cast<BulkIdResponseDto>()
.toList(growable: false);
}
return null;
}
}
+26 -8
View File
@@ -16,7 +16,9 @@ class FacesApi {
final ApiClient apiClient;
/// This endpoint requires the `face.create` permission.
/// Create a face
///
/// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class FacesApi {
);
}
/// This endpoint requires the `face.create` permission.
/// Create a face
///
/// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.
///
/// Parameters:
///
@@ -60,7 +64,9 @@ class FacesApi {
}
}
/// This endpoint requires the `face.delete` permission.
/// Delete a face
///
/// Delete a face identified by the id. Optionally can be force deleted.
///
/// Note: This method returns the HTTP [Response].
///
@@ -95,7 +101,9 @@ class FacesApi {
);
}
/// This endpoint requires the `face.delete` permission.
/// Delete a face
///
/// Delete a face identified by the id. Optionally can be force deleted.
///
/// Parameters:
///
@@ -109,13 +117,16 @@ class FacesApi {
}
}
/// This endpoint requires the `face.read` permission.
/// Retrieve faces for asset
///
/// Retrieve all faces belonging to an asset.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id (required):
/// Face ID
Future<Response> getFacesWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/faces';
@@ -143,11 +154,14 @@ class FacesApi {
);
}
/// This endpoint requires the `face.read` permission.
/// Retrieve faces for asset
///
/// Retrieve all faces belonging to an asset.
///
/// Parameters:
///
/// * [String] id (required):
/// Face ID
Future<List<AssetFaceResponseDto>?> getFaces(String id,) async {
final response = await getFacesWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
@@ -166,7 +180,9 @@ class FacesApi {
return null;
}
/// This endpoint requires the `face.update` permission.
/// Re-assign a face to another person
///
/// Re-assign the face provided in the body to the person identified by the id in the path parameter.
///
/// Note: This method returns the HTTP [Response].
///
@@ -201,7 +217,9 @@ class FacesApi {
);
}
/// This endpoint requires the `face.update` permission.
/// Re-assign a face to another person
///
/// Re-assign the face provided in the body to the person identified by the id in the path parameter.
///
/// Parameters:
///
+35 -21
View File
@@ -16,7 +16,9 @@ class JobsApi {
final ApiClient apiClient;
/// This endpoint is an admin-only route, and requires the `job.create` permission.
/// Create a manual job
///
/// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class JobsApi {
);
}
/// This endpoint is an admin-only route, and requires the `job.create` permission.
/// Create a manual job
///
/// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
///
/// Parameters:
///
@@ -60,10 +64,12 @@ class JobsApi {
}
}
/// This endpoint is an admin-only route, and requires the `job.read` permission.
/// Retrieve queue counts and status
///
/// Retrieve the counts of the current queue, as well as the current status.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAllJobsStatusWithHttpInfo() async {
Future<Response> getQueuesLegacyWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/jobs';
@@ -88,9 +94,11 @@ class JobsApi {
);
}
/// This endpoint is an admin-only route, and requires the `job.read` permission.
Future<AllJobStatusResponseDto?> getAllJobsStatus() async {
final response = await getAllJobsStatusWithHttpInfo();
/// Retrieve queue counts and status
///
/// Retrieve the counts of the current queue, as well as the current status.
Future<QueuesResponseLegacyDto?> getQueuesLegacy() async {
final response = await getQueuesLegacyWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -98,28 +106,31 @@ class JobsApi {
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AllJobStatusResponseDto',) as AllJobStatusResponseDto;
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto;
}
return null;
}
/// This endpoint is an admin-only route, and requires the `job.create` permission.
/// Run jobs
///
/// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [JobName] id (required):
/// * [QueueName] name (required):
/// Queue name
///
/// * [JobCommandDto] jobCommandDto (required):
Future<Response> sendJobCommandWithHttpInfo(JobName id, JobCommandDto jobCommandDto,) async {
/// * [QueueCommandDto] queueCommandDto (required):
Future<Response> runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/jobs/{id}'
.replaceAll('{id}', id.toString());
final apiPath = r'/jobs/{name}'
.replaceAll('{name}', name.toString());
// ignore: prefer_final_locals
Object? postBody = jobCommandDto;
Object? postBody = queueCommandDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@@ -139,15 +150,18 @@ class JobsApi {
);
}
/// This endpoint is an admin-only route, and requires the `job.create` permission.
/// Run jobs
///
/// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
///
/// Parameters:
///
/// * [JobName] id (required):
/// * [QueueName] name (required):
/// Queue name
///
/// * [JobCommandDto] jobCommandDto (required):
Future<JobStatusDto?> sendJobCommand(JobName id, JobCommandDto jobCommandDto,) async {
final response = await sendJobCommandWithHttpInfo(id, jobCommandDto,);
/// * [QueueCommandDto] queueCommandDto (required):
Future<QueueResponseLegacyDto?> runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto,) async {
final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -155,7 +169,7 @@ class JobsApi {
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'JobStatusDto',) as JobStatusDto;
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto;
}
return null;
+52 -15
View File
@@ -16,7 +16,9 @@ class LibrariesApi {
final ApiClient apiClient;
/// This endpoint is an admin-only route, and requires the `library.create` permission.
/// Create a library
///
/// Create a new external library.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class LibrariesApi {
);
}
/// This endpoint is an admin-only route, and requires the `library.create` permission.
/// Create a library
///
/// Create a new external library.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class LibrariesApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `library.delete` permission.
/// Delete a library
///
/// Delete an external library by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -101,7 +107,9 @@ class LibrariesApi {
);
}
/// This endpoint is an admin-only route, and requires the `library.delete` permission.
/// Delete a library
///
/// Delete an external library by its ID.
///
/// Parameters:
///
@@ -113,7 +121,9 @@ class LibrariesApi {
}
}
/// This endpoint is an admin-only route, and requires the `library.read` permission.
/// Retrieve libraries
///
/// Retrieve a list of external libraries.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAllLibrariesWithHttpInfo() async {
@@ -141,7 +151,9 @@ class LibrariesApi {
);
}
/// This endpoint is an admin-only route, and requires the `library.read` permission.
/// Retrieve libraries
///
/// Retrieve a list of external libraries.
Future<List<LibraryResponseDto>?> getAllLibraries() async {
final response = await getAllLibrariesWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -160,7 +172,9 @@ class LibrariesApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `library.read` permission.
/// Retrieve a library
///
/// Retrieve an external library by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -193,7 +207,9 @@ class LibrariesApi {
);
}
/// This endpoint is an admin-only route, and requires the `library.read` permission.
/// Retrieve a library
///
/// Retrieve an external library by its ID.
///
/// Parameters:
///
@@ -213,7 +229,9 @@ class LibrariesApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `library.statistics` permission.
/// Retrieve library statistics
///
/// Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
///
/// Note: This method returns the HTTP [Response].
///
@@ -246,7 +264,9 @@ class LibrariesApi {
);
}
/// This endpoint is an admin-only route, and requires the `library.statistics` permission.
/// Retrieve library statistics
///
/// Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
///
/// Parameters:
///
@@ -266,7 +286,9 @@ class LibrariesApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `library.update` permission.
/// Scan a library
///
/// Queue a scan for the external library to find and import new assets.
///
/// Note: This method returns the HTTP [Response].
///
@@ -299,7 +321,9 @@ class LibrariesApi {
);
}
/// This endpoint is an admin-only route, and requires the `library.update` permission.
/// Scan a library
///
/// Queue a scan for the external library to find and import new assets.
///
/// Parameters:
///
@@ -311,7 +335,9 @@ class LibrariesApi {
}
}
/// This endpoint is an admin-only route, and requires the `library.update` permission.
/// Update a library
///
/// Update an existing external library.
///
/// Note: This method returns the HTTP [Response].
///
@@ -346,7 +372,9 @@ class LibrariesApi {
);
}
/// This endpoint is an admin-only route, and requires the `library.update` permission.
/// Update a library
///
/// Update an existing external library.
///
/// Parameters:
///
@@ -368,7 +396,12 @@ class LibrariesApi {
return null;
}
/// Performs an HTTP 'POST /libraries/{id}/validate' operation and returns the [Response].
/// Validate library settings
///
/// Validate the settings of an external library.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id (required):
@@ -400,6 +433,10 @@ class LibrariesApi {
);
}
/// Validate library settings
///
/// Validate the settings of an external library.
///
/// Parameters:
///
/// * [String] id (required):
+218
View File
@@ -0,0 +1,218 @@
//
// 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 MaintenanceAdminApi {
MaintenanceAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Detect existing install
///
/// Collect integrity checks and other heuristics about local data.
///
/// Note: This method returns the HTTP [Response].
Future<Response> detectPriorInstallWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/maintenance/detect-install';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Detect existing install
///
/// Collect integrity checks and other heuristics about local data.
Future<MaintenanceDetectInstallResponseDto?> detectPriorInstall() async {
final response = await detectPriorInstallWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceDetectInstallResponseDto',) as MaintenanceDetectInstallResponseDto;
}
return null;
}
/// Get maintenance mode status
///
/// Fetch information about the currently running maintenance action.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getMaintenanceStatusWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/maintenance/status';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Get maintenance mode status
///
/// Fetch information about the currently running maintenance action.
Future<MaintenanceStatusResponseDto?> getMaintenanceStatus() async {
final response = await getMaintenanceStatusWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceStatusResponseDto',) as MaintenanceStatusResponseDto;
}
return null;
}
/// Log into maintenance mode
///
/// Login with maintenance token or cookie to receive current information and perform further actions.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [MaintenanceLoginDto] maintenanceLoginDto (required):
Future<Response> maintenanceLoginWithHttpInfo(MaintenanceLoginDto maintenanceLoginDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/maintenance/login';
// ignore: prefer_final_locals
Object? postBody = maintenanceLoginDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Log into maintenance mode
///
/// Login with maintenance token or cookie to receive current information and perform further actions.
///
/// Parameters:
///
/// * [MaintenanceLoginDto] maintenanceLoginDto (required):
Future<MaintenanceAuthDto?> maintenanceLogin(MaintenanceLoginDto maintenanceLoginDto,) async {
final response = await maintenanceLoginWithHttpInfo(maintenanceLoginDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceAuthDto',) as MaintenanceAuthDto;
}
return null;
}
/// Set maintenance mode
///
/// Put Immich into or take it out of maintenance mode
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [SetMaintenanceModeDto] setMaintenanceModeDto (required):
Future<Response> setMaintenanceModeWithHttpInfo(SetMaintenanceModeDto setMaintenanceModeDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/maintenance';
// ignore: prefer_final_locals
Object? postBody = setMaintenanceModeDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Set maintenance mode
///
/// Put Immich into or take it out of maintenance mode
///
/// Parameters:
///
/// * [SetMaintenanceModeDto] setMaintenanceModeDto (required):
Future<void> setMaintenanceMode(SetMaintenanceModeDto setMaintenanceModeDto,) async {
final response = await setMaintenanceModeWithHttpInfo(setMaintenanceModeDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+53 -19
View File
@@ -16,21 +16,32 @@ class MapApi {
final ApiClient apiClient;
/// Performs an HTTP 'GET /map/markers' operation and returns the [Response].
/// Retrieve map markers
///
/// Retrieve a list of latitude and longitude coordinates for every asset with location data.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [bool] isArchived:
///
/// * [bool] isFavorite:
///
/// * [DateTime] fileCreatedAfter:
/// Filter assets created after this date
///
/// * [DateTime] fileCreatedBefore:
/// Filter assets created before this date
///
/// * [bool] isArchived:
/// Filter by archived status
///
/// * [bool] isFavorite:
/// Filter by favorite status
///
/// * [bool] withPartners:
/// Include partner assets
///
/// * [bool] withSharedAlbums:
Future<Response> getMapMarkersWithHttpInfo({ bool? isArchived, bool? isFavorite, DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? withPartners, bool? withSharedAlbums, }) async {
/// Include shared album assets
Future<Response> getMapMarkersWithHttpInfo({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/map/markers';
@@ -41,18 +52,18 @@ class MapApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (isArchived != null) {
queryParams.addAll(_queryParams('', 'isArchived', isArchived));
}
if (isFavorite != null) {
queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
}
if (fileCreatedAfter != null) {
queryParams.addAll(_queryParams('', 'fileCreatedAfter', fileCreatedAfter));
}
if (fileCreatedBefore != null) {
queryParams.addAll(_queryParams('', 'fileCreatedBefore', fileCreatedBefore));
}
if (isArchived != null) {
queryParams.addAll(_queryParams('', 'isArchived', isArchived));
}
if (isFavorite != null) {
queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
}
if (withPartners != null) {
queryParams.addAll(_queryParams('', 'withPartners', withPartners));
}
@@ -74,21 +85,31 @@ class MapApi {
);
}
/// Retrieve map markers
///
/// Retrieve a list of latitude and longitude coordinates for every asset with location data.
///
/// Parameters:
///
/// * [bool] isArchived:
///
/// * [bool] isFavorite:
///
/// * [DateTime] fileCreatedAfter:
/// Filter assets created after this date
///
/// * [DateTime] fileCreatedBefore:
/// Filter assets created before this date
///
/// * [bool] isArchived:
/// Filter by archived status
///
/// * [bool] isFavorite:
/// Filter by favorite status
///
/// * [bool] withPartners:
/// Include partner assets
///
/// * [bool] withSharedAlbums:
Future<List<MapMarkerResponseDto>?> getMapMarkers({ bool? isArchived, bool? isFavorite, DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? withPartners, bool? withSharedAlbums, }) async {
final response = await getMapMarkersWithHttpInfo( isArchived: isArchived, isFavorite: isFavorite, fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, withPartners: withPartners, withSharedAlbums: withSharedAlbums, );
/// Include shared album assets
Future<List<MapMarkerResponseDto>?> getMapMarkers({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, }) async {
final response = await getMapMarkersWithHttpInfo( fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, isArchived: isArchived, isFavorite: isFavorite, withPartners: withPartners, withSharedAlbums: withSharedAlbums, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -105,12 +126,19 @@ class MapApi {
return null;
}
/// Performs an HTTP 'GET /map/reverse-geocode' operation and returns the [Response].
/// Reverse geocode coordinates
///
/// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [double] lat (required):
/// Latitude (-90 to 90)
///
/// * [double] lon (required):
/// Longitude (-180 to 180)
Future<Response> reverseGeocodeWithHttpInfo(double lat, double lon,) async {
// ignore: prefer_const_declarations
final apiPath = r'/map/reverse-geocode';
@@ -139,11 +167,17 @@ class MapApi {
);
}
/// Reverse geocode coordinates
///
/// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.
///
/// Parameters:
///
/// * [double] lat (required):
/// Latitude (-90 to 90)
///
/// * [double] lon (required):
/// Longitude (-180 to 180)
Future<List<MapReverseGeocodeResponseDto>?> reverseGeocode(double lat, double lon,) async {
final response = await reverseGeocodeWithHttpInfo(lat, lon,);
if (response.statusCode >= HttpStatus.badRequest) {
+106 -22
View File
@@ -16,7 +16,9 @@ class MemoriesApi {
final ApiClient apiClient;
/// This endpoint requires the `memoryAsset.create` permission.
/// Add assets to a memory
///
/// Add a list of asset IDs to a specific memory.
///
/// Note: This method returns the HTTP [Response].
///
@@ -51,7 +53,9 @@ class MemoriesApi {
);
}
/// This endpoint requires the `memoryAsset.create` permission.
/// Add assets to a memory
///
/// Add a list of asset IDs to a specific memory.
///
/// Parameters:
///
@@ -76,7 +80,9 @@ class MemoriesApi {
return null;
}
/// This endpoint requires the `memory.create` permission.
/// Create a memory
///
/// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
///
/// Note: This method returns the HTTP [Response].
///
@@ -108,7 +114,9 @@ class MemoriesApi {
);
}
/// This endpoint requires the `memory.create` permission.
/// Create a memory
///
/// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
///
/// Parameters:
///
@@ -128,7 +136,9 @@ class MemoriesApi {
return null;
}
/// This endpoint requires the `memory.delete` permission.
/// Delete a memory
///
/// Delete a specific memory by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -161,7 +171,9 @@ class MemoriesApi {
);
}
/// This endpoint requires the `memory.delete` permission.
/// Delete a memory
///
/// Delete a specific memory by its ID.
///
/// Parameters:
///
@@ -173,7 +185,9 @@ class MemoriesApi {
}
}
/// This endpoint requires the `memory.read` permission.
/// Retrieve a memory
///
/// Retrieve a specific memory by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -206,7 +220,9 @@ class MemoriesApi {
);
}
/// This endpoint requires the `memory.read` permission.
/// Retrieve a memory
///
/// Retrieve a specific memory by its ID.
///
/// Parameters:
///
@@ -226,20 +242,32 @@ class MemoriesApi {
return null;
}
/// This endpoint requires the `memory.statistics` permission.
/// Retrieve memories statistics
///
/// Retrieve statistics about memories, such as total count and other relevant metrics.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [DateTime] for_:
/// Filter by date
///
/// * [bool] isSaved:
/// Filter by saved status
///
/// * [bool] isTrashed:
/// Include trashed memories
///
/// * [MemorySearchOrder] order:
/// Sort order
///
/// * [int] size:
/// Number of memories to return
///
/// * [MemoryType] type:
Future<Response> memoriesStatisticsWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async {
/// Memory type
Future<Response> memoriesStatisticsWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/memories/statistics';
@@ -259,6 +287,12 @@ class MemoriesApi {
if (isTrashed != null) {
queryParams.addAll(_queryParams('', 'isTrashed', isTrashed));
}
if (order != null) {
queryParams.addAll(_queryParams('', 'order', order));
}
if (size != null) {
queryParams.addAll(_queryParams('', 'size', size));
}
if (type != null) {
queryParams.addAll(_queryParams('', 'type', type));
}
@@ -277,19 +311,31 @@ class MemoriesApi {
);
}
/// This endpoint requires the `memory.statistics` permission.
/// Retrieve memories statistics
///
/// Retrieve statistics about memories, such as total count and other relevant metrics.
///
/// Parameters:
///
/// * [DateTime] for_:
/// Filter by date
///
/// * [bool] isSaved:
/// Filter by saved status
///
/// * [bool] isTrashed:
/// Include trashed memories
///
/// * [MemorySearchOrder] order:
/// Sort order
///
/// * [int] size:
/// Number of memories to return
///
/// * [MemoryType] type:
Future<MemoryStatisticsResponseDto?> memoriesStatistics({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async {
final response = await memoriesStatisticsWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, type: type, );
/// Memory type
Future<MemoryStatisticsResponseDto?> memoriesStatistics({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async {
final response = await memoriesStatisticsWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -303,7 +349,9 @@ class MemoriesApi {
return null;
}
/// This endpoint requires the `memoryAsset.delete` permission.
/// Remove assets from a memory
///
/// Remove a list of asset IDs from a specific memory.
///
/// Note: This method returns the HTTP [Response].
///
@@ -338,7 +386,9 @@ class MemoriesApi {
);
}
/// This endpoint requires the `memoryAsset.delete` permission.
/// Remove assets from a memory
///
/// Remove a list of asset IDs from a specific memory.
///
/// Parameters:
///
@@ -363,20 +413,32 @@ class MemoriesApi {
return null;
}
/// This endpoint requires the `memory.read` permission.
/// Retrieve memories
///
/// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [DateTime] for_:
/// Filter by date
///
/// * [bool] isSaved:
/// Filter by saved status
///
/// * [bool] isTrashed:
/// Include trashed memories
///
/// * [MemorySearchOrder] order:
/// Sort order
///
/// * [int] size:
/// Number of memories to return
///
/// * [MemoryType] type:
Future<Response> searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async {
/// Memory type
Future<Response> searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/memories';
@@ -396,6 +458,12 @@ class MemoriesApi {
if (isTrashed != null) {
queryParams.addAll(_queryParams('', 'isTrashed', isTrashed));
}
if (order != null) {
queryParams.addAll(_queryParams('', 'order', order));
}
if (size != null) {
queryParams.addAll(_queryParams('', 'size', size));
}
if (type != null) {
queryParams.addAll(_queryParams('', 'type', type));
}
@@ -414,19 +482,31 @@ class MemoriesApi {
);
}
/// This endpoint requires the `memory.read` permission.
/// Retrieve memories
///
/// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
///
/// Parameters:
///
/// * [DateTime] for_:
/// Filter by date
///
/// * [bool] isSaved:
/// Filter by saved status
///
/// * [bool] isTrashed:
/// Include trashed memories
///
/// * [MemorySearchOrder] order:
/// Sort order
///
/// * [int] size:
/// Number of memories to return
///
/// * [MemoryType] type:
Future<List<MemoryResponseDto>?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async {
final response = await searchMemoriesWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, type: type, );
/// Memory type
Future<List<MemoryResponseDto>?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async {
final response = await searchMemoriesWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -443,7 +523,9 @@ class MemoriesApi {
return null;
}
/// This endpoint requires the `memory.update` permission.
/// Update a memory
///
/// Update an existing memory by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -478,7 +560,9 @@ class MemoriesApi {
);
}
/// This endpoint requires the `memory.update` permission.
/// Update a memory
///
/// Update an existing memory by its ID.
///
/// Parameters:
///
+30 -3
View File
@@ -16,7 +16,12 @@ class NotificationsAdminApi {
final ApiClient apiClient;
/// Performs an HTTP 'POST /admin/notifications' operation and returns the [Response].
/// Create a notification
///
/// Create a new notification for a specific user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [NotificationCreateDto] notificationCreateDto (required):
@@ -45,6 +50,10 @@ class NotificationsAdminApi {
);
}
/// Create a notification
///
/// Create a new notification for a specific user.
///
/// Parameters:
///
/// * [NotificationCreateDto] notificationCreateDto (required):
@@ -63,7 +72,12 @@ class NotificationsAdminApi {
return null;
}
/// Performs an HTTP 'POST /admin/notifications/templates/{name}' operation and returns the [Response].
/// Render email template
///
/// Retrieve a preview of the provided email template.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] name (required):
@@ -95,6 +109,10 @@ class NotificationsAdminApi {
);
}
/// Render email template
///
/// Retrieve a preview of the provided email template.
///
/// Parameters:
///
/// * [String] name (required):
@@ -115,7 +133,12 @@ class NotificationsAdminApi {
return null;
}
/// Performs an HTTP 'POST /admin/notifications/test-email' operation and returns the [Response].
/// Send test email
///
/// Send a test email using the provided SMTP configuration.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [SystemConfigSmtpDto] systemConfigSmtpDto (required):
@@ -144,6 +167,10 @@ class NotificationsAdminApi {
);
}
/// Send test email
///
/// Send a test email using the provided SMTP configuration.
///
/// Parameters:
///
/// * [SystemConfigSmtpDto] systemConfigSmtpDto (required):
+44 -12
View File
@@ -16,7 +16,9 @@ class NotificationsApi {
final ApiClient apiClient;
/// This endpoint requires the `notification.delete` permission.
/// Delete a notification
///
/// Delete a specific notification.
///
/// Note: This method returns the HTTP [Response].
///
@@ -49,7 +51,9 @@ class NotificationsApi {
);
}
/// This endpoint requires the `notification.delete` permission.
/// Delete a notification
///
/// Delete a specific notification.
///
/// Parameters:
///
@@ -61,7 +65,9 @@ class NotificationsApi {
}
}
/// This endpoint requires the `notification.delete` permission.
/// Delete notifications
///
/// Delete a list of notifications at once.
///
/// Note: This method returns the HTTP [Response].
///
@@ -93,7 +99,9 @@ class NotificationsApi {
);
}
/// This endpoint requires the `notification.delete` permission.
/// Delete notifications
///
/// Delete a list of notifications at once.
///
/// Parameters:
///
@@ -105,7 +113,9 @@ class NotificationsApi {
}
}
/// This endpoint requires the `notification.read` permission.
/// Get a notification
///
/// Retrieve a specific notification identified by id.
///
/// Note: This method returns the HTTP [Response].
///
@@ -138,7 +148,9 @@ class NotificationsApi {
);
}
/// This endpoint requires the `notification.read` permission.
/// Get a notification
///
/// Retrieve a specific notification identified by id.
///
/// Parameters:
///
@@ -158,19 +170,25 @@ class NotificationsApi {
return null;
}
/// This endpoint requires the `notification.read` permission.
/// Retrieve notifications
///
/// Retrieve a list of notifications.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id:
/// Filter by notification ID
///
/// * [NotificationLevel] level:
/// Filter by notification level
///
/// * [NotificationType] type:
/// Filter by notification type
///
/// * [bool] unread:
/// Filter by unread status
Future<Response> getNotificationsWithHttpInfo({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/notifications';
@@ -209,17 +227,23 @@ class NotificationsApi {
);
}
/// This endpoint requires the `notification.read` permission.
/// Retrieve notifications
///
/// Retrieve a list of notifications.
///
/// Parameters:
///
/// * [String] id:
/// Filter by notification ID
///
/// * [NotificationLevel] level:
/// Filter by notification level
///
/// * [NotificationType] type:
/// Filter by notification type
///
/// * [bool] unread:
/// Filter by unread status
Future<List<NotificationDto>?> getNotifications({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, }) async {
final response = await getNotificationsWithHttpInfo( id: id, level: level, type: type, unread: unread, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -238,7 +262,9 @@ class NotificationsApi {
return null;
}
/// This endpoint requires the `notification.update` permission.
/// Update a notification
///
/// Update a specific notification to set its read status.
///
/// Note: This method returns the HTTP [Response].
///
@@ -273,7 +299,9 @@ class NotificationsApi {
);
}
/// This endpoint requires the `notification.update` permission.
/// Update a notification
///
/// Update a specific notification to set its read status.
///
/// Parameters:
///
@@ -295,7 +323,9 @@ class NotificationsApi {
return null;
}
/// This endpoint requires the `notification.update` permission.
/// Update notifications
///
/// Update a list of notifications. Allows to bulk-set the read status of notifications.
///
/// Note: This method returns the HTTP [Response].
///
@@ -327,7 +357,9 @@ class NotificationsApi {
);
}
/// This endpoint requires the `notification.update` permission.
/// Update notifications
///
/// Update a list of notifications. Allows to bulk-set the read status of notifications.
///
/// Parameters:
///
+32 -10
View File
@@ -16,7 +16,9 @@ class PartnersApi {
final ApiClient apiClient;
/// This endpoint requires the `partner.create` permission.
/// Create a partner
///
/// Create a new partner to share assets with.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class PartnersApi {
);
}
/// This endpoint requires the `partner.create` permission.
/// Create a partner
///
/// Create a new partner to share assets with.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class PartnersApi {
return null;
}
/// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission.
/// Create a partner
///
/// Create a new partner to share assets with.
///
/// Note: This method returns the HTTP [Response].
///
@@ -101,7 +107,9 @@ class PartnersApi {
);
}
/// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission.
/// Create a partner
///
/// Create a new partner to share assets with.
///
/// Parameters:
///
@@ -121,13 +129,16 @@ class PartnersApi {
return null;
}
/// This endpoint requires the `partner.read` permission.
/// Retrieve partners
///
/// Retrieve a list of partners with whom assets are shared.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [PartnerDirection] direction (required):
/// Partner direction
Future<Response> getPartnersWithHttpInfo(PartnerDirection direction,) async {
// ignore: prefer_const_declarations
final apiPath = r'/partners';
@@ -155,11 +166,14 @@ class PartnersApi {
);
}
/// This endpoint requires the `partner.read` permission.
/// Retrieve partners
///
/// Retrieve a list of partners with whom assets are shared.
///
/// Parameters:
///
/// * [PartnerDirection] direction (required):
/// Partner direction
Future<List<PartnerResponseDto>?> getPartners(PartnerDirection direction,) async {
final response = await getPartnersWithHttpInfo(direction,);
if (response.statusCode >= HttpStatus.badRequest) {
@@ -178,7 +192,9 @@ class PartnersApi {
return null;
}
/// This endpoint requires the `partner.delete` permission.
/// Remove a partner
///
/// Stop sharing assets with a partner.
///
/// Note: This method returns the HTTP [Response].
///
@@ -211,7 +227,9 @@ class PartnersApi {
);
}
/// This endpoint requires the `partner.delete` permission.
/// Remove a partner
///
/// Stop sharing assets with a partner.
///
/// Parameters:
///
@@ -223,7 +241,9 @@ class PartnersApi {
}
}
/// This endpoint requires the `partner.update` permission.
/// Update a partner
///
/// Specify whether a partner's assets should appear in the user's timeline.
///
/// Note: This method returns the HTTP [Response].
///
@@ -258,7 +278,9 @@ class PartnersApi {
);
}
/// This endpoint requires the `partner.update` permission.
/// Update a partner
///
/// Specify whether a partner's assets should appear in the user's timeline.
///
/// Parameters:
///
+72 -22
View File
@@ -16,7 +16,9 @@ class PeopleApi {
final ApiClient apiClient;
/// This endpoint requires the `person.create` permission.
/// Create a person
///
/// Create a new person that can have multiple faces assigned to them.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.create` permission.
/// Create a person
///
/// Create a new person that can have multiple faces assigned to them.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class PeopleApi {
return null;
}
/// This endpoint requires the `person.delete` permission.
/// Delete people
///
/// Bulk delete a list of people at once.
///
/// Note: This method returns the HTTP [Response].
///
@@ -100,7 +106,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.delete` permission.
/// Delete people
///
/// Bulk delete a list of people at once.
///
/// Parameters:
///
@@ -112,7 +120,9 @@ class PeopleApi {
}
}
/// This endpoint requires the `person.delete` permission.
/// Delete person
///
/// Delete an individual person.
///
/// Note: This method returns the HTTP [Response].
///
@@ -145,7 +155,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.delete` permission.
/// Delete person
///
/// Delete an individual person.
///
/// Parameters:
///
@@ -157,15 +169,19 @@ class PeopleApi {
}
}
/// This endpoint requires the `person.read` permission.
/// Get all people
///
/// Retrieve a list of all people.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] closestAssetId:
/// Closest asset ID for similarity search
///
/// * [String] closestPersonId:
/// Closest person ID for similarity search
///
/// * [num] page:
/// Page number for pagination
@@ -174,6 +190,7 @@ class PeopleApi {
/// Number of items per page
///
/// * [bool] withHidden:
/// Include hidden people
Future<Response> getAllPeopleWithHttpInfo({ String? closestAssetId, String? closestPersonId, num? page, num? size, bool? withHidden, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/people';
@@ -215,13 +232,17 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.read` permission.
/// Get all people
///
/// Retrieve a list of all people.
///
/// Parameters:
///
/// * [String] closestAssetId:
/// Closest asset ID for similarity search
///
/// * [String] closestPersonId:
/// Closest person ID for similarity search
///
/// * [num] page:
/// Page number for pagination
@@ -230,6 +251,7 @@ class PeopleApi {
/// Number of items per page
///
/// * [bool] withHidden:
/// Include hidden people
Future<PeopleResponseDto?> getAllPeople({ String? closestAssetId, String? closestPersonId, num? page, num? size, bool? withHidden, }) async {
final response = await getAllPeopleWithHttpInfo( closestAssetId: closestAssetId, closestPersonId: closestPersonId, page: page, size: size, withHidden: withHidden, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -245,7 +267,9 @@ class PeopleApi {
return null;
}
/// This endpoint requires the `person.read` permission.
/// Get a person
///
/// Retrieve a person by id.
///
/// Note: This method returns the HTTP [Response].
///
@@ -278,7 +302,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.read` permission.
/// Get a person
///
/// Retrieve a person by id.
///
/// Parameters:
///
@@ -298,7 +324,9 @@ class PeopleApi {
return null;
}
/// This endpoint requires the `person.statistics` permission.
/// Get person statistics
///
/// Retrieve statistics about a specific person.
///
/// Note: This method returns the HTTP [Response].
///
@@ -331,7 +359,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.statistics` permission.
/// Get person statistics
///
/// Retrieve statistics about a specific person.
///
/// Parameters:
///
@@ -351,7 +381,9 @@ class PeopleApi {
return null;
}
/// This endpoint requires the `person.read` permission.
/// Get person thumbnail
///
/// Retrieve the thumbnail file for a person.
///
/// Note: This method returns the HTTP [Response].
///
@@ -384,7 +416,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.read` permission.
/// Get person thumbnail
///
/// Retrieve the thumbnail file for a person.
///
/// Parameters:
///
@@ -404,7 +438,9 @@ class PeopleApi {
return null;
}
/// This endpoint requires the `person.merge` permission.
/// Merge people
///
/// Merge a list of people into the person specified in the path parameter.
///
/// Note: This method returns the HTTP [Response].
///
@@ -439,7 +475,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.merge` permission.
/// Merge people
///
/// Merge a list of people into the person specified in the path parameter.
///
/// Parameters:
///
@@ -464,7 +502,9 @@ class PeopleApi {
return null;
}
/// This endpoint requires the `person.reassign` permission.
/// Reassign faces
///
/// Bulk reassign a list of faces to a different person.
///
/// Note: This method returns the HTTP [Response].
///
@@ -499,7 +539,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.reassign` permission.
/// Reassign faces
///
/// Bulk reassign a list of faces to a different person.
///
/// Parameters:
///
@@ -524,7 +566,9 @@ class PeopleApi {
return null;
}
/// This endpoint requires the `person.update` permission.
/// Update people
///
/// Bulk update multiple people at once.
///
/// Note: This method returns the HTTP [Response].
///
@@ -556,7 +600,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.update` permission.
/// Update people
///
/// Bulk update multiple people at once.
///
/// Parameters:
///
@@ -579,7 +625,9 @@ class PeopleApi {
return null;
}
/// This endpoint requires the `person.update` permission.
/// Update person
///
/// Update an individual person.
///
/// Note: This method returns the HTTP [Response].
///
@@ -614,7 +662,9 @@ class PeopleApi {
);
}
/// This endpoint requires the `person.update` permission.
/// Update person
///
/// Update an individual person.
///
/// Parameters:
///
+177
View File
@@ -0,0 +1,177 @@
//
// 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 PluginsApi {
PluginsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Retrieve a plugin
///
/// Retrieve information about a specific plugin by its ID.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id (required):
Future<Response> getPluginWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/plugins/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Retrieve a plugin
///
/// Retrieve information about a specific plugin by its ID.
///
/// Parameters:
///
/// * [String] id (required):
Future<PluginResponseDto?> getPlugin(String id,) async {
final response = await getPluginWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PluginResponseDto',) as PluginResponseDto;
}
return null;
}
/// List all plugin triggers
///
/// Retrieve a list of all available plugin triggers.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getPluginTriggersWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/plugins/triggers';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// List all plugin triggers
///
/// Retrieve a list of all available plugin triggers.
Future<List<PluginTriggerResponseDto>?> getPluginTriggers() async {
final response = await getPluginTriggersWithHttpInfo();
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<PluginTriggerResponseDto>') as List)
.cast<PluginTriggerResponseDto>()
.toList(growable: false);
}
return null;
}
/// List all plugins
///
/// Retrieve a list of plugins available to the authenticated user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getPluginsWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/plugins';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// List all plugins
///
/// Retrieve a list of plugins available to the authenticated user.
Future<List<PluginResponseDto>?> getPlugins() async {
final response = await getPluginsWithHttpInfo();
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<PluginResponseDto>') as List)
.cast<PluginResponseDto>()
.toList(growable: false);
}
return null;
}
}
+318
View File
@@ -0,0 +1,318 @@
//
// 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 QueuesApi {
QueuesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Empty a queue
///
/// Removes all jobs from the specified queue.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
///
/// * [QueueDeleteDto] queueDeleteDto (required):
Future<Response> emptyQueueWithHttpInfo(QueueName name, QueueDeleteDto queueDeleteDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/queues/{name}/jobs'
.replaceAll('{name}', name.toString());
// ignore: prefer_final_locals
Object? postBody = queueDeleteDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Empty a queue
///
/// Removes all jobs from the specified queue.
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
///
/// * [QueueDeleteDto] queueDeleteDto (required):
Future<void> emptyQueue(QueueName name, QueueDeleteDto queueDeleteDto,) async {
final response = await emptyQueueWithHttpInfo(name, queueDeleteDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Retrieve a queue
///
/// Retrieves a specific queue by its name.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
Future<Response> getQueueWithHttpInfo(QueueName name,) async {
// ignore: prefer_const_declarations
final apiPath = r'/queues/{name}'
.replaceAll('{name}', name.toString());
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Retrieve a queue
///
/// Retrieves a specific queue by its name.
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
Future<QueueResponseDto?> getQueue(QueueName name,) async {
final response = await getQueueWithHttpInfo(name,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseDto',) as QueueResponseDto;
}
return null;
}
/// Retrieve queue jobs
///
/// Retrieves a list of queue jobs from the specified queue.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
///
/// * [List<QueueJobStatus>] status:
/// Filter jobs by status
Future<Response> getQueueJobsWithHttpInfo(QueueName name, { List<QueueJobStatus>? status, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/queues/{name}/jobs'
.replaceAll('{name}', name.toString());
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (status != null) {
queryParams.addAll(_queryParams('multi', 'status', status));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Retrieve queue jobs
///
/// Retrieves a list of queue jobs from the specified queue.
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
///
/// * [List<QueueJobStatus>] status:
/// Filter jobs by status
Future<List<QueueJobResponseDto>?> getQueueJobs(QueueName name, { List<QueueJobStatus>? status, }) async {
final response = await getQueueJobsWithHttpInfo(name, status: status, );
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<QueueJobResponseDto>') as List)
.cast<QueueJobResponseDto>()
.toList(growable: false);
}
return null;
}
/// List all queues
///
/// Retrieves a list of queues.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getQueuesWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/queues';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// List all queues
///
/// Retrieves a list of queues.
Future<List<QueueResponseDto>?> getQueues() async {
final response = await getQueuesWithHttpInfo();
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<QueueResponseDto>') as List)
.cast<QueueResponseDto>()
.toList(growable: false);
}
return null;
}
/// Update a queue
///
/// Change the paused status of a specific queue.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
///
/// * [QueueUpdateDto] queueUpdateDto (required):
Future<Response> updateQueueWithHttpInfo(QueueName name, QueueUpdateDto queueUpdateDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/queues/{name}'
.replaceAll('{name}', name.toString());
// ignore: prefer_final_locals
Object? postBody = queueUpdateDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Update a queue
///
/// Change the paused status of a specific queue.
///
/// Parameters:
///
/// * [QueueName] name (required):
/// Queue name
///
/// * [QueueUpdateDto] queueUpdateDto (required):
Future<QueueResponseDto?> updateQueue(QueueName name, QueueUpdateDto queueUpdateDto,) async {
final response = await updateQueueWithHttpInfo(name, queueUpdateDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseDto',) as QueueResponseDto;
}
return null;
}
}
+144 -22
View File
@@ -16,7 +16,9 @@ class SearchApi {
final ApiClient apiClient;
/// This endpoint requires the `asset.read` permission.
/// Retrieve assets by city
///
/// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAssetsByCityWithHttpInfo() async {
@@ -44,7 +46,9 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Retrieve assets by city
///
/// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.
Future<List<AssetResponseDto>?> getAssetsByCity() async {
final response = await getAssetsByCityWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -63,7 +67,9 @@ class SearchApi {
return null;
}
/// This endpoint requires the `asset.read` permission.
/// Retrieve explore data
///
/// Retrieve data for the explore section, such as popular people and places.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getExploreDataWithHttpInfo() async {
@@ -91,7 +97,9 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Retrieve explore data
///
/// Retrieve data for the explore section, such as popular people and places.
Future<List<SearchExploreResponseDto>?> getExploreData() async {
final response = await getExploreDataWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -110,26 +118,34 @@ class SearchApi {
return null;
}
/// This endpoint requires the `asset.read` permission.
/// Retrieve search suggestions
///
/// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [SearchSuggestionType] type (required):
/// Suggestion type
///
/// * [String] country:
/// Filter by country
///
/// * [bool] includeNull:
/// This property was added in v111.0.0
/// Include null values in suggestions
///
/// * [String] lensModel:
/// Filter by lens model
///
/// * [String] make:
/// Filter by camera make
///
/// * [String] model:
/// Filter by camera model
///
/// * [String] state:
/// Filter by state/province
Future<Response> getSearchSuggestionsWithHttpInfo(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/search/suggestions';
@@ -175,24 +191,32 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Retrieve search suggestions
///
/// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.
///
/// Parameters:
///
/// * [SearchSuggestionType] type (required):
/// Suggestion type
///
/// * [String] country:
/// Filter by country
///
/// * [bool] includeNull:
/// This property was added in v111.0.0
/// Include null values in suggestions
///
/// * [String] lensModel:
/// Filter by lens model
///
/// * [String] make:
/// Filter by camera make
///
/// * [String] model:
/// Filter by camera model
///
/// * [String] state:
/// Filter by state/province
Future<List<String>?> getSearchSuggestions(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, }) async {
final response = await getSearchSuggestionsWithHttpInfo(type, country: country, includeNull: includeNull, lensModel: lensModel, make: make, model: model, state: state, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -211,7 +235,9 @@ class SearchApi {
return null;
}
/// This endpoint requires the `asset.statistics` permission.
/// Search asset statistics
///
/// Retrieve statistical data about assets based on search criteria, such as the total matching count.
///
/// Note: This method returns the HTTP [Response].
///
@@ -243,7 +269,9 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.statistics` permission.
/// Search asset statistics
///
/// Retrieve statistical data about assets based on search criteria, such as the total matching count.
///
/// Parameters:
///
@@ -263,7 +291,9 @@ class SearchApi {
return null;
}
/// This endpoint requires the `asset.read` permission.
/// Search assets by metadata
///
/// Search for assets based on various metadata criteria.
///
/// Note: This method returns the HTTP [Response].
///
@@ -295,7 +325,9 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Search assets by metadata
///
/// Search for assets based on various metadata criteria.
///
/// Parameters:
///
@@ -315,75 +347,109 @@ class SearchApi {
return null;
}
/// This endpoint requires the `asset.read` permission.
/// Search large assets
///
/// Search for assets that are considered large based on specified criteria.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [List<String>] 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)
///
/// * [String] deviceId:
/// Device ID to filter by
///
/// * [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<String>] personIds:
/// Filter by person IDs
///
/// * [num] rating:
/// Filter by rating [1-5], or null for unrated
///
/// * [num] size:
/// Number of results to return
///
/// * [String] state:
/// Filter by state/province name
///
/// * [List<String>] 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:
/// Asset type filter
///
/// * [DateTime] updatedAfter:
/// Filter by update date (after)
///
/// * [DateTime] updatedBefore:
/// Filter by update date (before)
///
/// * [AssetVisibility] visibility:
/// Filter by visibility
///
/// * [bool] withDeleted:
/// Include deleted assets
///
/// * [bool] withExif:
/// Include EXIF data in response
Future<Response> searchLargeAssetsWithHttpInfo({ List<String>? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceId, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List<String>? personIds, num? rating, num? size, String? state, List<String>? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/search/large-assets';
@@ -506,73 +572,107 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Search large assets
///
/// Search for assets that are considered large based on specified criteria.
///
/// Parameters:
///
/// * [List<String>] 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)
///
/// * [String] deviceId:
/// Device ID to filter by
///
/// * [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<String>] personIds:
/// Filter by person IDs
///
/// * [num] rating:
/// Filter by rating [1-5], or null for unrated
///
/// * [num] size:
/// Number of results to return
///
/// * [String] state:
/// Filter by state/province name
///
/// * [List<String>] 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:
/// Asset type filter
///
/// * [DateTime] updatedAfter:
/// Filter by update date (after)
///
/// * [DateTime] updatedBefore:
/// Filter by update date (before)
///
/// * [AssetVisibility] visibility:
/// Filter by visibility
///
/// * [bool] withDeleted:
/// Include deleted assets
///
/// * [bool] withExif:
/// Include EXIF data in response
Future<List<AssetResponseDto>?> searchLargeAssets({ List<String>? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, String? deviceId, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List<String>? personIds, num? rating, num? size, String? state, List<String>? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, }) async {
final response = await searchLargeAssetsWithHttpInfo( albumIds: albumIds, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, deviceId: deviceId, 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, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -591,15 +691,19 @@ class SearchApi {
return null;
}
/// This endpoint requires the `person.read` permission.
/// Search people
///
/// Search for people by name.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] name (required):
/// Person name to search for
///
/// * [bool] withHidden:
/// Include hidden people
Future<Response> searchPersonWithHttpInfo(String name, { bool? withHidden, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/search/person';
@@ -630,13 +734,17 @@ class SearchApi {
);
}
/// This endpoint requires the `person.read` permission.
/// Search people
///
/// Search for people by name.
///
/// Parameters:
///
/// * [String] name (required):
/// Person name to search for
///
/// * [bool] withHidden:
/// Include hidden people
Future<List<PersonResponseDto>?> searchPerson(String name, { bool? withHidden, }) async {
final response = await searchPersonWithHttpInfo(name, withHidden: withHidden, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -655,13 +763,16 @@ class SearchApi {
return null;
}
/// This endpoint requires the `asset.read` permission.
/// Search places
///
/// Search for places by name.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] name (required):
/// Place name to search for
Future<Response> searchPlacesWithHttpInfo(String name,) async {
// ignore: prefer_const_declarations
final apiPath = r'/search/places';
@@ -689,11 +800,14 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Search places
///
/// Search for places by name.
///
/// Parameters:
///
/// * [String] name (required):
/// Place name to search for
Future<List<PlacesResponseDto>?> searchPlaces(String name,) async {
final response = await searchPlacesWithHttpInfo(name,);
if (response.statusCode >= HttpStatus.badRequest) {
@@ -712,7 +826,9 @@ class SearchApi {
return null;
}
/// This endpoint requires the `asset.read` permission.
/// Search random assets
///
/// Retrieve a random selection of assets based on the provided criteria.
///
/// Note: This method returns the HTTP [Response].
///
@@ -744,7 +860,9 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Search random assets
///
/// Retrieve a random selection of assets based on the provided criteria.
///
/// Parameters:
///
@@ -767,7 +885,9 @@ class SearchApi {
return null;
}
/// This endpoint requires the `asset.read` permission.
/// Smart asset search
///
/// Perform a smart search for assets by using machine learning vectors to determine relevance.
///
/// Note: This method returns the HTTP [Response].
///
@@ -799,7 +919,9 @@ class SearchApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Smart asset search
///
/// Perform a smart search for assets by using machine learning vectors to determine relevance.
///
/// Parameters:
///
+104 -23
View File
@@ -16,7 +16,9 @@ class ServerApi {
final ApiClient apiClient;
/// This endpoint is an admin-only route, and requires the `serverLicense.delete` permission.
/// Delete server product key
///
/// Delete the currently set server product key.
///
/// Note: This method returns the HTTP [Response].
Future<Response> deleteServerLicenseWithHttpInfo() async {
@@ -44,7 +46,9 @@ class ServerApi {
);
}
/// This endpoint is an admin-only route, and requires the `serverLicense.delete` permission.
/// Delete server product key
///
/// Delete the currently set server product key.
Future<void> deleteServerLicense() async {
final response = await deleteServerLicenseWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -52,7 +56,9 @@ class ServerApi {
}
}
/// This endpoint requires the `server.about` permission.
/// Get server information
///
/// Retrieve a list of information about the server.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAboutInfoWithHttpInfo() async {
@@ -80,7 +86,9 @@ class ServerApi {
);
}
/// This endpoint requires the `server.about` permission.
/// Get server information
///
/// Retrieve a list of information about the server.
Future<ServerAboutResponseDto?> getAboutInfo() async {
final response = await getAboutInfoWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -96,7 +104,9 @@ class ServerApi {
return null;
}
/// This endpoint requires the `server.apkLinks` permission.
/// Get APK links
///
/// Retrieve links to the APKs for the current server version.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getApkLinksWithHttpInfo() async {
@@ -124,7 +134,9 @@ class ServerApi {
);
}
/// This endpoint requires the `server.apkLinks` permission.
/// Get APK links
///
/// Retrieve links to the APKs for the current server version.
Future<ServerApkLinksDto?> getApkLinks() async {
final response = await getApkLinksWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -140,7 +152,11 @@ class ServerApi {
return null;
}
/// Performs an HTTP 'GET /server/config' operation and returns the [Response].
/// Get config
///
/// Retrieve the current server configuration.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getServerConfigWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/server/config';
@@ -166,6 +182,9 @@ class ServerApi {
);
}
/// Get config
///
/// Retrieve the current server configuration.
Future<ServerConfigDto?> getServerConfig() async {
final response = await getServerConfigWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -181,7 +200,11 @@ class ServerApi {
return null;
}
/// Performs an HTTP 'GET /server/features' operation and returns the [Response].
/// Get features
///
/// Retrieve available features supported by this server.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getServerFeaturesWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/server/features';
@@ -207,6 +230,9 @@ class ServerApi {
);
}
/// Get features
///
/// Retrieve available features supported by this server.
Future<ServerFeaturesDto?> getServerFeatures() async {
final response = await getServerFeaturesWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -222,7 +248,9 @@ class ServerApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `serverLicense.read` permission.
/// Get product key
///
/// Retrieve information about whether the server currently has a product key registered.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getServerLicenseWithHttpInfo() async {
@@ -250,7 +278,9 @@ class ServerApi {
);
}
/// This endpoint is an admin-only route, and requires the `serverLicense.read` permission.
/// Get product key
///
/// Retrieve information about whether the server currently has a product key registered.
Future<LicenseResponseDto?> getServerLicense() async {
final response = await getServerLicenseWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -266,7 +296,9 @@ class ServerApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `server.statistics` permission.
/// Get statistics
///
/// Retrieve statistics about the entire Immich instance such as asset counts.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getServerStatisticsWithHttpInfo() async {
@@ -294,7 +326,9 @@ class ServerApi {
);
}
/// This endpoint is an admin-only route, and requires the `server.statistics` permission.
/// Get statistics
///
/// Retrieve statistics about the entire Immich instance such as asset counts.
Future<ServerStatsResponseDto?> getServerStatistics() async {
final response = await getServerStatisticsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -310,7 +344,11 @@ class ServerApi {
return null;
}
/// Performs an HTTP 'GET /server/version' operation and returns the [Response].
/// Get server version
///
/// Retrieve the current server version in semantic versioning (semver) format.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getServerVersionWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/server/version';
@@ -336,6 +374,9 @@ class ServerApi {
);
}
/// Get server version
///
/// Retrieve the current server version in semantic versioning (semver) format.
Future<ServerVersionResponseDto?> getServerVersion() async {
final response = await getServerVersionWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -351,7 +392,9 @@ class ServerApi {
return null;
}
/// This endpoint requires the `server.storage` permission.
/// Get storage
///
/// Retrieve the current storage utilization information of the server.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getStorageWithHttpInfo() async {
@@ -379,7 +422,9 @@ class ServerApi {
);
}
/// This endpoint requires the `server.storage` permission.
/// Get storage
///
/// Retrieve the current storage utilization information of the server.
Future<ServerStorageResponseDto?> getStorage() async {
final response = await getStorageWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -395,7 +440,11 @@ class ServerApi {
return null;
}
/// Performs an HTTP 'GET /server/media-types' operation and returns the [Response].
/// Get supported media types
///
/// Retrieve all media types supported by the server.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getSupportedMediaTypesWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/server/media-types';
@@ -421,6 +470,9 @@ class ServerApi {
);
}
/// Get supported media types
///
/// Retrieve all media types supported by the server.
Future<ServerMediaTypesResponseDto?> getSupportedMediaTypes() async {
final response = await getSupportedMediaTypesWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -436,7 +488,11 @@ class ServerApi {
return null;
}
/// Performs an HTTP 'GET /server/theme' operation and returns the [Response].
/// Get theme
///
/// Retrieve the custom CSS, if existent.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getThemeWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/server/theme';
@@ -462,6 +518,9 @@ class ServerApi {
);
}
/// Get theme
///
/// Retrieve the custom CSS, if existent.
Future<ServerThemeDto?> getTheme() async {
final response = await getThemeWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -477,7 +536,9 @@ class ServerApi {
return null;
}
/// This endpoint requires the `server.versionCheck` permission.
/// Get version check status
///
/// Retrieve information about the last time the version check ran.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getVersionCheckWithHttpInfo() async {
@@ -505,7 +566,9 @@ class ServerApi {
);
}
/// This endpoint requires the `server.versionCheck` permission.
/// Get version check status
///
/// Retrieve information about the last time the version check ran.
Future<VersionCheckStateResponseDto?> getVersionCheck() async {
final response = await getVersionCheckWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -521,7 +584,11 @@ class ServerApi {
return null;
}
/// Performs an HTTP 'GET /server/version-history' operation and returns the [Response].
/// Get version history
///
/// Retrieve a list of past versions the server has been on.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getVersionHistoryWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/server/version-history';
@@ -547,6 +614,9 @@ class ServerApi {
);
}
/// Get version history
///
/// Retrieve a list of past versions the server has been on.
Future<List<ServerVersionHistoryResponseDto>?> getVersionHistory() async {
final response = await getVersionHistoryWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -565,7 +635,11 @@ class ServerApi {
return null;
}
/// Performs an HTTP 'GET /server/ping' operation and returns the [Response].
/// Ping
///
/// Pong
///
/// Note: This method returns the HTTP [Response].
Future<Response> pingServerWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/server/ping';
@@ -591,6 +665,9 @@ class ServerApi {
);
}
/// Ping
///
/// Pong
Future<ServerPingResponse?> pingServer() async {
final response = await pingServerWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -606,7 +683,9 @@ class ServerApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `serverLicense.update` permission.
/// Set server product key
///
/// Validate and set the server product key if successful.
///
/// Note: This method returns the HTTP [Response].
///
@@ -638,7 +717,9 @@ class ServerApi {
);
}
/// This endpoint is an admin-only route, and requires the `serverLicense.update` permission.
/// Set server product key
///
/// Validate and set the server product key if successful.
///
/// Parameters:
///
+36 -12
View File
@@ -16,7 +16,9 @@ class SessionsApi {
final ApiClient apiClient;
/// This endpoint requires the `session.create` permission.
/// Create a session
///
/// Create a session as a child to the current session. This endpoint is used for casting.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class SessionsApi {
);
}
/// This endpoint requires the `session.create` permission.
/// Create a session
///
/// Create a session as a child to the current session. This endpoint is used for casting.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class SessionsApi {
return null;
}
/// This endpoint requires the `session.delete` permission.
/// Delete all sessions
///
/// Delete all sessions for the user. This will not delete the current session.
///
/// Note: This method returns the HTTP [Response].
Future<Response> deleteAllSessionsWithHttpInfo() async {
@@ -96,7 +102,9 @@ class SessionsApi {
);
}
/// This endpoint requires the `session.delete` permission.
/// Delete all sessions
///
/// Delete all sessions for the user. This will not delete the current session.
Future<void> deleteAllSessions() async {
final response = await deleteAllSessionsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -104,7 +112,9 @@ class SessionsApi {
}
}
/// This endpoint requires the `session.delete` permission.
/// Delete a session
///
/// Delete a specific session by id.
///
/// Note: This method returns the HTTP [Response].
///
@@ -137,7 +147,9 @@ class SessionsApi {
);
}
/// This endpoint requires the `session.delete` permission.
/// Delete a session
///
/// Delete a specific session by id.
///
/// Parameters:
///
@@ -149,7 +161,9 @@ class SessionsApi {
}
}
/// This endpoint requires the `session.read` permission.
/// Retrieve sessions
///
/// Retrieve a list of sessions for the user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getSessionsWithHttpInfo() async {
@@ -177,7 +191,9 @@ class SessionsApi {
);
}
/// This endpoint requires the `session.read` permission.
/// Retrieve sessions
///
/// Retrieve a list of sessions for the user.
Future<List<SessionResponseDto>?> getSessions() async {
final response = await getSessionsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -196,7 +212,9 @@ class SessionsApi {
return null;
}
/// This endpoint requires the `session.lock` permission.
/// Lock a session
///
/// Lock a specific session by id.
///
/// Note: This method returns the HTTP [Response].
///
@@ -229,7 +247,9 @@ class SessionsApi {
);
}
/// This endpoint requires the `session.lock` permission.
/// Lock a session
///
/// Lock a specific session by id.
///
/// Parameters:
///
@@ -241,7 +261,9 @@ class SessionsApi {
}
}
/// This endpoint requires the `session.update` permission.
/// Update a session
///
/// Update a specific session identified by id.
///
/// Note: This method returns the HTTP [Response].
///
@@ -276,7 +298,9 @@ class SessionsApi {
);
}
/// This endpoint requires the `session.update` permission.
/// Update a session
///
/// Update a specific session identified by id.
///
/// Parameters:
///
+167 -49
View File
@@ -16,7 +16,12 @@ class SharedLinksApi {
final ApiClient apiClient;
/// Performs an HTTP 'PUT /shared-links/{id}/assets' operation and returns the [Response].
/// Add assets to a shared link
///
/// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id (required):
@@ -59,6 +64,10 @@ class SharedLinksApi {
);
}
/// Add assets to a shared link
///
/// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
///
/// Parameters:
///
/// * [String] id (required):
@@ -86,7 +95,9 @@ class SharedLinksApi {
return null;
}
/// This endpoint requires the `sharedLink.create` permission.
/// Create a shared link
///
/// Create a new shared link.
///
/// Note: This method returns the HTTP [Response].
///
@@ -118,7 +129,9 @@ class SharedLinksApi {
);
}
/// This endpoint requires the `sharedLink.create` permission.
/// Create a shared link
///
/// Create a new shared link.
///
/// Parameters:
///
@@ -138,14 +151,20 @@ class SharedLinksApi {
return null;
}
/// This endpoint requires the `sharedLink.read` permission.
/// Retrieve all shared links
///
/// Retrieve a list of all shared links.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] albumId:
Future<Response> getAllSharedLinksWithHttpInfo({ String? albumId, }) async {
/// Filter by album ID
///
/// * [String] id:
/// Filter by shared link ID
Future<Response> getAllSharedLinksWithHttpInfo({ String? albumId, String? id, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/shared-links';
@@ -159,6 +178,9 @@ class SharedLinksApi {
if (albumId != null) {
queryParams.addAll(_queryParams('', 'albumId', albumId));
}
if (id != null) {
queryParams.addAll(_queryParams('', 'id', id));
}
const contentTypes = <String>[];
@@ -174,13 +196,19 @@ class SharedLinksApi {
);
}
/// This endpoint requires the `sharedLink.read` permission.
/// Retrieve all shared links
///
/// Retrieve a list of all shared links.
///
/// Parameters:
///
/// * [String] albumId:
Future<List<SharedLinkResponseDto>?> getAllSharedLinks({ String? albumId, }) async {
final response = await getAllSharedLinksWithHttpInfo( albumId: albumId, );
/// Filter by album ID
///
/// * [String] id:
/// Filter by shared link ID
Future<List<SharedLinkResponseDto>?> getAllSharedLinks({ String? albumId, String? id, }) async {
final response = await getAllSharedLinksWithHttpInfo( albumId: albumId, id: id, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -197,17 +225,24 @@ class SharedLinksApi {
return null;
}
/// Performs an HTTP 'GET /shared-links/me' operation and returns the [Response].
/// Retrieve current shared link
///
/// Retrieve the current shared link associated with authentication method.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] password:
///
/// * [String] token:
///
/// * [String] key:
///
/// * [String] password:
/// Link password
///
/// * [String] slug:
Future<Response> getMySharedLinkWithHttpInfo({ String? password, String? token, String? key, String? slug, }) async {
///
/// * [String] token:
/// Access token
Future<Response> getMySharedLinkWithHttpInfo({ String? key, String? password, String? slug, String? token, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/shared-links/me';
@@ -218,18 +253,18 @@ class SharedLinksApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (password != null) {
queryParams.addAll(_queryParams('', 'password', password));
}
if (token != null) {
queryParams.addAll(_queryParams('', 'token', token));
}
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (password != null) {
queryParams.addAll(_queryParams('', 'password', password));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
if (token != null) {
queryParams.addAll(_queryParams('', 'token', token));
}
const contentTypes = <String>[];
@@ -245,17 +280,23 @@ class SharedLinksApi {
);
}
/// Retrieve current shared link
///
/// Retrieve the current shared link associated with authentication method.
///
/// Parameters:
///
/// * [String] password:
///
/// * [String] token:
///
/// * [String] key:
///
/// * [String] password:
/// Link password
///
/// * [String] slug:
Future<SharedLinkResponseDto?> getMySharedLink({ String? password, String? token, String? key, String? slug, }) async {
final response = await getMySharedLinkWithHttpInfo( password: password, token: token, key: key, slug: slug, );
///
/// * [String] token:
/// Access token
Future<SharedLinkResponseDto?> getMySharedLink({ String? key, String? password, String? slug, String? token, }) async {
final response = await getMySharedLinkWithHttpInfo( key: key, password: password, slug: slug, token: token, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -269,7 +310,9 @@ class SharedLinksApi {
return null;
}
/// This endpoint requires the `sharedLink.read` permission.
/// Retrieve a shared link
///
/// Retrieve a specific shared link by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -302,7 +345,9 @@ class SharedLinksApi {
);
}
/// This endpoint requires the `sharedLink.read` permission.
/// Retrieve a shared link
///
/// Retrieve a specific shared link by its ID.
///
/// Parameters:
///
@@ -322,7 +367,9 @@ class SharedLinksApi {
return null;
}
/// This endpoint requires the `sharedLink.delete` permission.
/// Delete a shared link
///
/// Delete a specific shared link by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -355,7 +402,9 @@ class SharedLinksApi {
);
}
/// This endpoint requires the `sharedLink.delete` permission.
/// Delete a shared link
///
/// Delete a specific shared link by its ID.
///
/// Parameters:
///
@@ -367,17 +416,18 @@ class SharedLinksApi {
}
}
/// Performs an HTTP 'DELETE /shared-links/{id}/assets' operation and returns the [Response].
/// Remove assets from a shared link
///
/// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id (required):
///
/// * [AssetIdsDto] assetIdsDto (required):
///
/// * [String] key:
///
/// * [String] slug:
Future<Response> removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
Future<Response> removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/shared-links/{id}/assets'
.replaceAll('{id}', id);
@@ -389,6 +439,71 @@ class SharedLinksApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Remove assets from a shared link
///
/// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
///
/// Parameters:
///
/// * [String] id (required):
///
/// * [AssetIdsDto] assetIdsDto (required):
Future<List<AssetIdsResponseDto>?> removeSharedLinkAssets(String id, AssetIdsDto assetIdsDto,) async {
final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto,);
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<AssetIdsResponseDto>') as List)
.cast<AssetIdsResponseDto>()
.toList(growable: false);
}
return null;
}
/// Shared link login
///
/// Login to a password protected shared link
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [SharedLinkLoginDto] sharedLinkLoginDto (required):
///
/// * [String] key:
///
/// * [String] slug:
Future<Response> sharedLinkLoginWithHttpInfo(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/shared-links/login';
// ignore: prefer_final_locals
Object? postBody = sharedLinkLoginDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
@@ -401,7 +516,7 @@ class SharedLinksApi {
return apiClient.invokeAPI(
apiPath,
'DELETE',
'POST',
queryParams,
postBody,
headerParams,
@@ -410,17 +525,19 @@ class SharedLinksApi {
);
}
/// Shared link login
///
/// Login to a password protected shared link
///
/// Parameters:
///
/// * [String] id (required):
///
/// * [AssetIdsDto] assetIdsDto (required):
/// * [SharedLinkLoginDto] sharedLinkLoginDto (required):
///
/// * [String] key:
///
/// * [String] slug:
Future<List<AssetIdsResponseDto>?> removeSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto, key: key, slug: slug, );
Future<SharedLinkResponseDto?> sharedLinkLogin(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, }) async {
final response = await sharedLinkLoginWithHttpInfo(sharedLinkLoginDto, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -428,16 +545,15 @@ class SharedLinksApi {
// 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<AssetIdsResponseDto>') as List)
.cast<AssetIdsResponseDto>()
.toList(growable: false);
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto;
}
return null;
}
/// This endpoint requires the `sharedLink.update` permission.
/// Update a shared link
///
/// Update an existing shared link by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -472,7 +588,9 @@ class SharedLinksApi {
);
}
/// This endpoint requires the `sharedLink.update` permission.
/// Update a shared link
///
/// Update an existing shared link by its ID.
///
/// Parameters:
///
+44 -14
View File
@@ -16,7 +16,9 @@ class StacksApi {
final ApiClient apiClient;
/// This endpoint requires the `stack.create` permission.
/// Create a stack
///
/// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class StacksApi {
);
}
/// This endpoint requires the `stack.create` permission.
/// Create a stack
///
/// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class StacksApi {
return null;
}
/// This endpoint requires the `stack.delete` permission.
/// Delete a stack
///
/// Delete a specific stack by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -101,7 +107,9 @@ class StacksApi {
);
}
/// This endpoint requires the `stack.delete` permission.
/// Delete a stack
///
/// Delete a specific stack by its ID.
///
/// Parameters:
///
@@ -113,7 +121,9 @@ class StacksApi {
}
}
/// This endpoint requires the `stack.delete` permission.
/// Delete stacks
///
/// Delete multiple stacks by providing a list of stack IDs.
///
/// Note: This method returns the HTTP [Response].
///
@@ -145,7 +155,9 @@ class StacksApi {
);
}
/// This endpoint requires the `stack.delete` permission.
/// Delete stacks
///
/// Delete multiple stacks by providing a list of stack IDs.
///
/// Parameters:
///
@@ -157,7 +169,9 @@ class StacksApi {
}
}
/// This endpoint requires the `stack.read` permission.
/// Retrieve a stack
///
/// Retrieve a specific stack by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -190,7 +204,9 @@ class StacksApi {
);
}
/// This endpoint requires the `stack.read` permission.
/// Retrieve a stack
///
/// Retrieve a specific stack by its ID.
///
/// Parameters:
///
@@ -210,7 +226,9 @@ class StacksApi {
return null;
}
/// This endpoint requires the `stack.update` permission.
/// Remove an asset from a stack
///
/// Remove a specific asset from a stack by providing the stack ID and asset ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -246,7 +264,9 @@ class StacksApi {
);
}
/// This endpoint requires the `stack.update` permission.
/// Remove an asset from a stack
///
/// Remove a specific asset from a stack by providing the stack ID and asset ID.
///
/// Parameters:
///
@@ -260,13 +280,16 @@ class StacksApi {
}
}
/// This endpoint requires the `stack.read` permission.
/// Retrieve stacks
///
/// Retrieve a list of stacks.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] primaryAssetId:
/// Filter by primary asset ID
Future<Response> searchStacksWithHttpInfo({ String? primaryAssetId, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/stacks';
@@ -296,11 +319,14 @@ class StacksApi {
);
}
/// This endpoint requires the `stack.read` permission.
/// Retrieve stacks
///
/// Retrieve a list of stacks.
///
/// Parameters:
///
/// * [String] primaryAssetId:
/// Filter by primary asset ID
Future<List<StackResponseDto>?> searchStacks({ String? primaryAssetId, }) async {
final response = await searchStacksWithHttpInfo( primaryAssetId: primaryAssetId, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -319,7 +345,9 @@ class StacksApi {
return null;
}
/// This endpoint requires the `stack.update` permission.
/// Update a stack
///
/// Update an existing stack by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -354,7 +382,9 @@ class StacksApi {
);
}
/// This endpoint requires the `stack.update` permission.
/// Update a stack
///
/// Update an existing stack by its ID.
///
/// Parameters:
///
+44 -10
View File
@@ -16,7 +16,9 @@ class SyncApi {
final ApiClient apiClient;
/// This endpoint requires the `syncCheckpoint.delete` permission.
/// Delete acknowledgements
///
/// Delete specific synchronization acknowledgments.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class SyncApi {
);
}
/// This endpoint requires the `syncCheckpoint.delete` permission.
/// Delete acknowledgements
///
/// Delete specific synchronization acknowledgments.
///
/// Parameters:
///
@@ -60,7 +64,12 @@ class SyncApi {
}
}
/// Performs an HTTP 'POST /sync/delta-sync' operation and returns the [Response].
/// Get delta sync for user
///
/// Retrieve changed assets since the last sync for the authenticated user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [AssetDeltaSyncDto] assetDeltaSyncDto (required):
@@ -89,6 +98,10 @@ class SyncApi {
);
}
/// Get delta sync for user
///
/// Retrieve changed assets since the last sync for the authenticated user.
///
/// Parameters:
///
/// * [AssetDeltaSyncDto] assetDeltaSyncDto (required):
@@ -107,7 +120,12 @@ class SyncApi {
return null;
}
/// Performs an HTTP 'POST /sync/full-sync' operation and returns the [Response].
/// Get full sync for user
///
/// Retrieve all assets for a full synchronization for the authenticated user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [AssetFullSyncDto] assetFullSyncDto (required):
@@ -136,6 +154,10 @@ class SyncApi {
);
}
/// Get full sync for user
///
/// Retrieve all assets for a full synchronization for the authenticated user.
///
/// Parameters:
///
/// * [AssetFullSyncDto] assetFullSyncDto (required):
@@ -157,7 +179,9 @@ class SyncApi {
return null;
}
/// This endpoint requires the `syncCheckpoint.read` permission.
/// Retrieve acknowledgements
///
/// Retrieve the synchronization acknowledgments for the current session.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getSyncAckWithHttpInfo() async {
@@ -185,7 +209,9 @@ class SyncApi {
);
}
/// This endpoint requires the `syncCheckpoint.read` permission.
/// Retrieve acknowledgements
///
/// Retrieve the synchronization acknowledgments for the current session.
Future<List<SyncAckDto>?> getSyncAck() async {
final response = await getSyncAckWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -204,7 +230,9 @@ class SyncApi {
return null;
}
/// This endpoint requires the `sync.stream` permission.
/// Stream sync changes
///
/// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.
///
/// Note: This method returns the HTTP [Response].
///
@@ -236,7 +264,9 @@ class SyncApi {
);
}
/// This endpoint requires the `sync.stream` permission.
/// Stream sync changes
///
/// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.
///
/// Parameters:
///
@@ -248,7 +278,9 @@ class SyncApi {
}
}
/// This endpoint requires the `syncCheckpoint.update` permission.
/// Acknowledge changes
///
/// Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
///
/// Note: This method returns the HTTP [Response].
///
@@ -280,7 +312,9 @@ class SyncApi {
);
}
/// This endpoint requires the `syncCheckpoint.update` permission.
/// Acknowledge changes
///
/// Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
///
/// Parameters:
///
+24 -8
View File
@@ -16,7 +16,9 @@ class SystemConfigApi {
final ApiClient apiClient;
/// This endpoint is an admin-only route, and requires the `systemConfig.read` permission.
/// Get system configuration
///
/// Retrieve the current system configuration.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getConfigWithHttpInfo() async {
@@ -44,7 +46,9 @@ class SystemConfigApi {
);
}
/// This endpoint is an admin-only route, and requires the `systemConfig.read` permission.
/// Get system configuration
///
/// Retrieve the current system configuration.
Future<SystemConfigDto?> getConfig() async {
final response = await getConfigWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -60,7 +64,9 @@ class SystemConfigApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `systemConfig.read` permission.
/// Get system configuration defaults
///
/// Retrieve the default values for the system configuration.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getConfigDefaultsWithHttpInfo() async {
@@ -88,7 +94,9 @@ class SystemConfigApi {
);
}
/// This endpoint is an admin-only route, and requires the `systemConfig.read` permission.
/// Get system configuration defaults
///
/// Retrieve the default values for the system configuration.
Future<SystemConfigDto?> getConfigDefaults() async {
final response = await getConfigDefaultsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -104,7 +112,9 @@ class SystemConfigApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `systemConfig.read` permission.
/// Get storage template options
///
/// Retrieve exemplary storage template options.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getStorageTemplateOptionsWithHttpInfo() async {
@@ -132,7 +142,9 @@ class SystemConfigApi {
);
}
/// This endpoint is an admin-only route, and requires the `systemConfig.read` permission.
/// Get storage template options
///
/// Retrieve exemplary storage template options.
Future<SystemConfigTemplateStorageOptionDto?> getStorageTemplateOptions() async {
final response = await getStorageTemplateOptionsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -148,7 +160,9 @@ class SystemConfigApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `systemConfig.update` permission.
/// Update system configuration
///
/// Update the system configuration with a new system configuration.
///
/// Note: This method returns the HTTP [Response].
///
@@ -180,7 +194,9 @@ class SystemConfigApi {
);
}
/// This endpoint is an admin-only route, and requires the `systemConfig.update` permission.
/// Update system configuration
///
/// Update the system configuration with a new system configuration.
///
/// Parameters:
///
+24 -8
View File
@@ -16,7 +16,9 @@ class SystemMetadataApi {
final ApiClient apiClient;
/// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission.
/// Retrieve admin onboarding
///
/// Retrieve the current admin onboarding status.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAdminOnboardingWithHttpInfo() async {
@@ -44,7 +46,9 @@ class SystemMetadataApi {
);
}
/// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission.
/// Retrieve admin onboarding
///
/// Retrieve the current admin onboarding status.
Future<AdminOnboardingUpdateDto?> getAdminOnboarding() async {
final response = await getAdminOnboardingWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -60,7 +64,9 @@ class SystemMetadataApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission.
/// Retrieve reverse geocoding state
///
/// Retrieve the current state of the reverse geocoding import.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getReverseGeocodingStateWithHttpInfo() async {
@@ -88,7 +94,9 @@ class SystemMetadataApi {
);
}
/// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission.
/// Retrieve reverse geocoding state
///
/// Retrieve the current state of the reverse geocoding import.
Future<ReverseGeocodingStateResponseDto?> getReverseGeocodingState() async {
final response = await getReverseGeocodingStateWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -104,7 +112,9 @@ class SystemMetadataApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission.
/// Retrieve version check state
///
/// Retrieve the current state of the version check process.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getVersionCheckStateWithHttpInfo() async {
@@ -132,7 +142,9 @@ class SystemMetadataApi {
);
}
/// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission.
/// Retrieve version check state
///
/// Retrieve the current state of the version check process.
Future<VersionCheckStateResponseDto?> getVersionCheckState() async {
final response = await getVersionCheckStateWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -148,7 +160,9 @@ class SystemMetadataApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `systemMetadata.update` permission.
/// Update admin onboarding
///
/// Update the admin onboarding status.
///
/// Note: This method returns the HTTP [Response].
///
@@ -180,7 +194,9 @@ class SystemMetadataApi {
);
}
/// This endpoint is an admin-only route, and requires the `systemMetadata.update` permission.
/// Update admin onboarding
///
/// Update the admin onboarding status.
///
/// Parameters:
///
+54 -18
View File
@@ -16,7 +16,9 @@ class TagsApi {
final ApiClient apiClient;
/// This endpoint requires the `tag.asset` permission.
/// Tag assets
///
/// Add multiple tags to multiple assets in a single request.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.asset` permission.
/// Tag assets
///
/// Add multiple tags to multiple assets in a single request.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class TagsApi {
return null;
}
/// This endpoint requires the `tag.create` permission.
/// Create a tag
///
/// Create a new tag by providing a name and optional color.
///
/// Note: This method returns the HTTP [Response].
///
@@ -100,7 +106,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.create` permission.
/// Create a tag
///
/// Create a new tag by providing a name and optional color.
///
/// Parameters:
///
@@ -120,7 +128,9 @@ class TagsApi {
return null;
}
/// This endpoint requires the `tag.delete` permission.
/// Delete a tag
///
/// Delete a specific tag by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -153,7 +163,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.delete` permission.
/// Delete a tag
///
/// Delete a specific tag by its ID.
///
/// Parameters:
///
@@ -165,7 +177,9 @@ class TagsApi {
}
}
/// This endpoint requires the `tag.read` permission.
/// Retrieve tags
///
/// Retrieve a list of all tags.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAllTagsWithHttpInfo() async {
@@ -193,7 +207,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.read` permission.
/// Retrieve tags
///
/// Retrieve a list of all tags.
Future<List<TagResponseDto>?> getAllTags() async {
final response = await getAllTagsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -212,7 +228,9 @@ class TagsApi {
return null;
}
/// This endpoint requires the `tag.read` permission.
/// Retrieve a tag
///
/// Retrieve a specific tag by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -245,7 +263,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.read` permission.
/// Retrieve a tag
///
/// Retrieve a specific tag by its ID.
///
/// Parameters:
///
@@ -265,7 +285,9 @@ class TagsApi {
return null;
}
/// This endpoint requires the `tag.asset` permission.
/// Tag assets
///
/// Add a tag to all the specified assets.
///
/// Note: This method returns the HTTP [Response].
///
@@ -300,7 +322,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.asset` permission.
/// Tag assets
///
/// Add a tag to all the specified assets.
///
/// Parameters:
///
@@ -325,7 +349,9 @@ class TagsApi {
return null;
}
/// This endpoint requires the `tag.asset` permission.
/// Untag assets
///
/// Remove a tag from all the specified assets.
///
/// Note: This method returns the HTTP [Response].
///
@@ -360,7 +386,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.asset` permission.
/// Untag assets
///
/// Remove a tag from all the specified assets.
///
/// Parameters:
///
@@ -385,7 +413,9 @@ class TagsApi {
return null;
}
/// This endpoint requires the `tag.update` permission.
/// Update a tag
///
/// Update an existing tag identified by its ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -420,7 +450,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.update` permission.
/// Update a tag
///
/// Update an existing tag identified by its ID.
///
/// Parameters:
///
@@ -442,7 +474,9 @@ class TagsApi {
return null;
}
/// This endpoint requires the `tag.create` permission.
/// Upsert tags
///
/// Create or update multiple tags in a single request.
///
/// Note: This method returns the HTTP [Response].
///
@@ -474,7 +508,9 @@ class TagsApi {
);
}
/// This endpoint requires the `tag.create` permission.
/// Upsert tags
///
/// Create or update multiple tags in a single request.
///
/// Parameters:
///
+36 -10
View File
@@ -16,7 +16,9 @@ class TimelineApi {
final ApiClient apiClient;
/// This endpoint requires the `asset.read` permission.
/// Get time bucket
///
/// Retrieve a string of all asset ids in a given time bucket.
///
/// Note: This method returns the HTTP [Response].
///
@@ -28,6 +30,9 @@ class TimelineApi {
/// * [String] albumId:
/// Filter assets belonging to a specific album
///
/// * [String] bbox:
/// Bounding box coordinates as west,south,east,north (WGS84)
///
/// * [bool] isFavorite:
/// Filter by favorite status (true for favorites only, false for non-favorites only)
///
@@ -61,7 +66,7 @@ class TimelineApi {
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<Response> getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
Future<Response> getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/timeline/bucket';
@@ -75,6 +80,9 @@ class TimelineApi {
if (albumId != null) {
queryParams.addAll(_queryParams('', 'albumId', albumId));
}
if (bbox != null) {
queryParams.addAll(_queryParams('', 'bbox', bbox));
}
if (isFavorite != null) {
queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
}
@@ -127,7 +135,9 @@ class TimelineApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Get time bucket
///
/// Retrieve a string of all asset ids in a given time bucket.
///
/// Parameters:
///
@@ -137,6 +147,9 @@ class TimelineApi {
/// * [String] albumId:
/// Filter assets belonging to a specific album
///
/// * [String] bbox:
/// Bounding box coordinates as west,south,east,north (WGS84)
///
/// * [bool] isFavorite:
/// Filter by favorite status (true for favorites only, false for non-favorites only)
///
@@ -170,8 +183,8 @@ class TimelineApi {
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<TimeBucketAssetResponseDto?> getTimeBucket(String timeBucket, { String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, );
Future<TimeBucketAssetResponseDto?> getTimeBucket(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -185,7 +198,9 @@ class TimelineApi {
return null;
}
/// This endpoint requires the `asset.read` permission.
/// Get time buckets
///
/// Retrieve a list of all minimal time buckets.
///
/// Note: This method returns the HTTP [Response].
///
@@ -194,6 +209,9 @@ class TimelineApi {
/// * [String] albumId:
/// Filter assets belonging to a specific album
///
/// * [String] bbox:
/// Bounding box coordinates as west,south,east,north (WGS84)
///
/// * [bool] isFavorite:
/// Filter by favorite status (true for favorites only, false for non-favorites only)
///
@@ -227,7 +245,7 @@ class TimelineApi {
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<Response> getTimeBucketsWithHttpInfo({ String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
Future<Response> getTimeBucketsWithHttpInfo({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/timeline/buckets';
@@ -241,6 +259,9 @@ class TimelineApi {
if (albumId != null) {
queryParams.addAll(_queryParams('', 'albumId', albumId));
}
if (bbox != null) {
queryParams.addAll(_queryParams('', 'bbox', bbox));
}
if (isFavorite != null) {
queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
}
@@ -292,13 +313,18 @@ class TimelineApi {
);
}
/// This endpoint requires the `asset.read` permission.
/// Get time buckets
///
/// Retrieve a list of all minimal time buckets.
///
/// Parameters:
///
/// * [String] albumId:
/// Filter assets belonging to a specific album
///
/// * [String] bbox:
/// Bounding box coordinates as west,south,east,north (WGS84)
///
/// * [bool] isFavorite:
/// Filter by favorite status (true for favorites only, false for non-favorites only)
///
@@ -332,8 +358,8 @@ class TimelineApi {
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<List<TimeBucketsResponseDto>?> getTimeBuckets({ String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketsWithHttpInfo( albumId: albumId, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, );
Future<List<TimeBucketsResponseDto>?> getTimeBuckets({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketsWithHttpInfo( albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
+18 -6
View File
@@ -16,7 +16,9 @@ class TrashApi {
final ApiClient apiClient;
/// This endpoint requires the `asset.delete` permission.
/// Empty trash
///
/// Permanently delete all items in the trash.
///
/// Note: This method returns the HTTP [Response].
Future<Response> emptyTrashWithHttpInfo() async {
@@ -44,7 +46,9 @@ class TrashApi {
);
}
/// This endpoint requires the `asset.delete` permission.
/// Empty trash
///
/// Permanently delete all items in the trash.
Future<TrashResponseDto?> emptyTrash() async {
final response = await emptyTrashWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -60,7 +64,9 @@ class TrashApi {
return null;
}
/// This endpoint requires the `asset.delete` permission.
/// Restore assets
///
/// Restore specific assets from the trash.
///
/// Note: This method returns the HTTP [Response].
///
@@ -92,7 +98,9 @@ class TrashApi {
);
}
/// This endpoint requires the `asset.delete` permission.
/// Restore assets
///
/// Restore specific assets from the trash.
///
/// Parameters:
///
@@ -112,7 +120,9 @@ class TrashApi {
return null;
}
/// This endpoint requires the `asset.delete` permission.
/// Restore trash
///
/// Restore all items in the trash.
///
/// Note: This method returns the HTTP [Response].
Future<Response> restoreTrashWithHttpInfo() async {
@@ -140,7 +150,9 @@ class TrashApi {
);
}
/// This endpoint requires the `asset.delete` permission.
/// Restore trash
///
/// Restore all items in the trash.
Future<TrashResponseDto?> restoreTrash() async {
final response = await restoreTrashWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
+4 -24
View File
@@ -16,10 +16,7 @@ class UploadApi {
final ApiClient apiClient;
/// This endpoint requires the `asset.upload` permission.
///
/// Note: This method returns the HTTP [Response].
///
/// Performs an HTTP 'DELETE /upload/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@@ -60,8 +57,6 @@ class UploadApi {
);
}
/// This endpoint requires the `asset.upload` permission.
///
/// Parameters:
///
/// * [String] id (required):
@@ -109,10 +104,7 @@ class UploadApi {
}
}
/// This endpoint requires the `asset.upload` permission.
///
/// Note: This method returns the HTTP [Response].
///
/// Performs an HTTP 'HEAD /upload/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
@@ -158,8 +150,6 @@ class UploadApi {
);
}
/// This endpoint requires the `asset.upload` permission.
///
/// Parameters:
///
/// * [String] id (required):
@@ -177,10 +167,7 @@ class UploadApi {
}
}
/// This endpoint requires the `asset.upload` permission.
///
/// Note: This method returns the HTTP [Response].
///
/// Performs an HTTP 'PATCH /upload/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] contentLength (required):
@@ -238,8 +225,6 @@ class UploadApi {
);
}
/// This endpoint requires the `asset.upload` permission.
///
/// Parameters:
///
/// * [String] contentLength (required):
@@ -274,10 +259,7 @@ class UploadApi {
return null;
}
/// This endpoint requires the `asset.upload` permission.
///
/// Note: This method returns the HTTP [Response].
///
/// Performs an HTTP 'POST /upload' operation and returns the [Response].
/// Parameters:
///
/// * [String] contentLength (required):
@@ -340,8 +322,6 @@ class UploadApi {
);
}
/// This endpoint requires the `asset.upload` permission.
///
/// Parameters:
///
/// * [String] contentLength (required):
+70 -20
View File
@@ -16,7 +16,9 @@ class UsersAdminApi {
final ApiClient apiClient;
/// This endpoint is an admin-only route, and requires the `adminUser.create` permission.
/// Create a user
///
/// Create a new user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -48,7 +50,9 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.create` permission.
/// Create a user
///
/// Create a new user.
///
/// Parameters:
///
@@ -68,7 +72,9 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminUser.delete` permission.
/// Delete a user
///
/// Delete a user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -103,7 +109,9 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.delete` permission.
/// Delete a user
///
/// Delete a user.
///
/// Parameters:
///
@@ -125,7 +133,9 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminUser.read` permission.
/// Retrieve a user
///
/// Retrieve a specific user by their ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -158,7 +168,9 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.read` permission.
/// Retrieve a user
///
/// Retrieve a specific user by their ID.
///
/// Parameters:
///
@@ -178,7 +190,9 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminUser.read` permission.
/// Retrieve user preferences
///
/// Retrieve the preferences of a specific user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -211,7 +225,9 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.read` permission.
/// Retrieve user preferences
///
/// Retrieve the preferences of a specific user.
///
/// Parameters:
///
@@ -231,7 +247,9 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminSession.read` permission.
/// Retrieve user sessions
///
/// Retrieve all sessions for a specific user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -264,7 +282,9 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminSession.read` permission.
/// Retrieve user sessions
///
/// Retrieve all sessions for a specific user.
///
/// Parameters:
///
@@ -287,7 +307,9 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminUser.read` permission.
/// Retrieve user statistics
///
/// Retrieve asset statistics for a specific user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -296,10 +318,13 @@ class UsersAdminApi {
/// * [String] id (required):
///
/// * [bool] isFavorite:
/// Filter by favorite status
///
/// * [bool] isTrashed:
/// Filter by trash status
///
/// * [AssetVisibility] visibility:
/// Filter by visibility
Future<Response> getUserStatisticsAdminWithHttpInfo(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/users/{id}/statistics'
@@ -336,17 +361,22 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.read` permission.
/// Retrieve user statistics
///
/// Retrieve asset statistics for a specific user.
///
/// Parameters:
///
/// * [String] id (required):
///
/// * [bool] isFavorite:
/// Filter by favorite status
///
/// * [bool] isTrashed:
/// Filter by trash status
///
/// * [AssetVisibility] visibility:
/// Filter by visibility
Future<AssetStatsResponseDto?> getUserStatisticsAdmin(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, }) async {
final response = await getUserStatisticsAdminWithHttpInfo(id, isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -362,7 +392,9 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminUser.delete` permission.
/// Restore a deleted user
///
/// Restore a previously deleted user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -395,7 +427,9 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.delete` permission.
/// Restore a deleted user
///
/// Restore a previously deleted user.
///
/// Parameters:
///
@@ -415,15 +449,19 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminUser.read` permission.
/// Search users
///
/// Search for users.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id:
/// User ID filter
///
/// * [bool] withDeleted:
/// Include deleted users
Future<Response> searchUsersAdminWithHttpInfo({ String? id, bool? withDeleted, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/admin/users';
@@ -456,13 +494,17 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.read` permission.
/// Search users
///
/// Search for users.
///
/// Parameters:
///
/// * [String] id:
/// User ID filter
///
/// * [bool] withDeleted:
/// Include deleted users
Future<List<UserAdminResponseDto>?> searchUsersAdmin({ String? id, bool? withDeleted, }) async {
final response = await searchUsersAdminWithHttpInfo( id: id, withDeleted: withDeleted, );
if (response.statusCode >= HttpStatus.badRequest) {
@@ -481,7 +523,9 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminUser.update` permission.
/// Update a user
///
/// Update an existing user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -516,7 +560,9 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.update` permission.
/// Update a user
///
/// Update an existing user.
///
/// Parameters:
///
@@ -538,7 +584,9 @@ class UsersAdminApi {
return null;
}
/// This endpoint is an admin-only route, and requires the `adminUser.update` permission.
/// Update user preferences
///
/// Update the preferences of a specific user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -573,7 +621,9 @@ class UsersAdminApi {
);
}
/// This endpoint is an admin-only route, and requires the `adminUser.update` permission.
/// Update user preferences
///
/// Update the preferences of a specific user.
///
/// Parameters:
///
+92 -30
View File
@@ -16,13 +16,16 @@ class UsersApi {
final ApiClient apiClient;
/// This endpoint requires the `userProfileImage.update` permission.
/// Create user profile image
///
/// Upload and set a new profile image for the current user.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [MultipartFile] file (required):
/// Profile image file
Future<Response> createProfileImageWithHttpInfo(MultipartFile file,) async {
// ignore: prefer_const_declarations
final apiPath = r'/users/profile-image';
@@ -58,11 +61,14 @@ class UsersApi {
);
}
/// This endpoint requires the `userProfileImage.update` permission.
/// Create user profile image
///
/// Upload and set a new profile image for the current user.
///
/// Parameters:
///
/// * [MultipartFile] file (required):
/// Profile image file
Future<CreateProfileImageResponseDto?> createProfileImage(MultipartFile file,) async {
final response = await createProfileImageWithHttpInfo(file,);
if (response.statusCode >= HttpStatus.badRequest) {
@@ -78,7 +84,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `userProfileImage.delete` permission.
/// Delete user profile image
///
/// Delete the profile image of the current user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> deleteProfileImageWithHttpInfo() async {
@@ -106,7 +114,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userProfileImage.delete` permission.
/// Delete user profile image
///
/// Delete the profile image of the current user.
Future<void> deleteProfileImage() async {
final response = await deleteProfileImageWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -114,7 +124,9 @@ class UsersApi {
}
}
/// This endpoint requires the `userLicense.delete` permission.
/// Delete user product key
///
/// Delete the registered product key for the current user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> deleteUserLicenseWithHttpInfo() async {
@@ -142,7 +154,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userLicense.delete` permission.
/// Delete user product key
///
/// Delete the registered product key for the current user.
Future<void> deleteUserLicense() async {
final response = await deleteUserLicenseWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -150,7 +164,9 @@ class UsersApi {
}
}
/// This endpoint requires the `userOnboarding.delete` permission.
/// Delete user onboarding
///
/// Delete the onboarding status of the current user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> deleteUserOnboardingWithHttpInfo() async {
@@ -178,7 +194,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userOnboarding.delete` permission.
/// Delete user onboarding
///
/// Delete the onboarding status of the current user.
Future<void> deleteUserOnboarding() async {
final response = await deleteUserOnboardingWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -186,7 +204,9 @@ class UsersApi {
}
}
/// This endpoint requires the `userPreference.read` permission.
/// Get my preferences
///
/// Retrieve the preferences for the current user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getMyPreferencesWithHttpInfo() async {
@@ -214,7 +234,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userPreference.read` permission.
/// Get my preferences
///
/// Retrieve the preferences for the current user.
Future<UserPreferencesResponseDto?> getMyPreferences() async {
final response = await getMyPreferencesWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -230,7 +252,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `user.read` permission.
/// Get current user
///
/// Retrieve information about the user making the API request.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getMyUserWithHttpInfo() async {
@@ -258,7 +282,9 @@ class UsersApi {
);
}
/// This endpoint requires the `user.read` permission.
/// Get current user
///
/// Retrieve information about the user making the API request.
Future<UserAdminResponseDto?> getMyUser() async {
final response = await getMyUserWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -274,7 +300,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `userProfileImage.read` permission.
/// Retrieve user profile image
///
/// Retrieve the profile image file for a user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -307,7 +335,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userProfileImage.read` permission.
/// Retrieve user profile image
///
/// Retrieve the profile image file for a user.
///
/// Parameters:
///
@@ -327,7 +357,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `user.read` permission.
/// Retrieve a user
///
/// Retrieve a specific user by their ID.
///
/// Note: This method returns the HTTP [Response].
///
@@ -360,7 +392,9 @@ class UsersApi {
);
}
/// This endpoint requires the `user.read` permission.
/// Retrieve a user
///
/// Retrieve a specific user by their ID.
///
/// Parameters:
///
@@ -380,7 +414,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `userLicense.read` permission.
/// Retrieve user product key
///
/// Retrieve information about whether the current user has a registered product key.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getUserLicenseWithHttpInfo() async {
@@ -408,7 +444,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userLicense.read` permission.
/// Retrieve user product key
///
/// Retrieve information about whether the current user has a registered product key.
Future<LicenseResponseDto?> getUserLicense() async {
final response = await getUserLicenseWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -424,7 +462,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `userOnboarding.read` permission.
/// Retrieve user onboarding
///
/// Retrieve the onboarding status of the current user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getUserOnboardingWithHttpInfo() async {
@@ -452,7 +492,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userOnboarding.read` permission.
/// Retrieve user onboarding
///
/// Retrieve the onboarding status of the current user.
Future<OnboardingResponseDto?> getUserOnboarding() async {
final response = await getUserOnboardingWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -468,7 +510,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `user.read` permission.
/// Get all users
///
/// Retrieve a list of all users on the server.
///
/// Note: This method returns the HTTP [Response].
Future<Response> searchUsersWithHttpInfo() async {
@@ -496,7 +540,9 @@ class UsersApi {
);
}
/// This endpoint requires the `user.read` permission.
/// Get all users
///
/// Retrieve a list of all users on the server.
Future<List<UserResponseDto>?> searchUsers() async {
final response = await searchUsersWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -515,7 +561,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `userLicense.update` permission.
/// Set user product key
///
/// Register a product key for the current user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -547,7 +595,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userLicense.update` permission.
/// Set user product key
///
/// Register a product key for the current user.
///
/// Parameters:
///
@@ -567,7 +617,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `userOnboarding.update` permission.
/// Update user onboarding
///
/// Update the onboarding status of the current user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -599,7 +651,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userOnboarding.update` permission.
/// Update user onboarding
///
/// Update the onboarding status of the current user.
///
/// Parameters:
///
@@ -619,7 +673,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `userPreference.update` permission.
/// Update my preferences
///
/// Update the preferences of the current user.
///
/// Note: This method returns the HTTP [Response].
///
@@ -651,7 +707,9 @@ class UsersApi {
);
}
/// This endpoint requires the `userPreference.update` permission.
/// Update my preferences
///
/// Update the preferences of the current user.
///
/// Parameters:
///
@@ -671,7 +729,9 @@ class UsersApi {
return null;
}
/// This endpoint requires the `user.update` permission.
/// Update current user
///
/// Update the current user making teh API request.
///
/// Note: This method returns the HTTP [Response].
///
@@ -703,7 +763,9 @@ class UsersApi {
);
}
/// This endpoint requires the `user.update` permission.
/// Update current user
///
/// Update the current user making teh API request.
///
/// Parameters:
///
@@ -11,12 +11,17 @@
part of openapi.api;
class ViewApi {
ViewApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
class ViewsApi {
ViewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'GET /view/folder' operation and returns the [Response].
/// Retrieve assets by original path
///
/// Retrieve assets that are children of a specific folder.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] path (required):
@@ -47,6 +52,10 @@ class ViewApi {
);
}
/// Retrieve assets by original path
///
/// Retrieve assets that are children of a specific folder.
///
/// Parameters:
///
/// * [String] path (required):
@@ -68,7 +77,11 @@ class ViewApi {
return null;
}
/// Performs an HTTP 'GET /view/folder/unique-paths' operation and returns the [Response].
/// Retrieve unique paths
///
/// Retrieve a list of unique folder paths from asset original paths.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getUniqueOriginalPathsWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/view/folder/unique-paths';
@@ -94,6 +107,9 @@ class ViewApi {
);
}
/// Retrieve unique paths
///
/// Retrieve a list of unique folder paths from asset original paths.
Future<List<String>?> getUniqueOriginalPaths() async {
final response = await getUniqueOriginalPathsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
@@ -11,21 +11,26 @@
part of openapi.api;
class OAuthApi {
OAuthApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
class WorkflowsApi {
WorkflowsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /oauth/callback' operation and returns the [Response].
/// Create a workflow
///
/// Create a new workflow, the workflow can also be created with empty filters and actions.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
Future<Response> finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async {
/// * [WorkflowCreateDto] workflowCreateDto (required):
Future<Response> createWorkflowWithHttpInfo(WorkflowCreateDto workflowCreateDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/callback';
final apiPath = r'/workflows';
// ignore: prefer_final_locals
Object? postBody = oAuthCallbackDto;
Object? postBody = workflowCreateDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@@ -45,11 +50,15 @@ class OAuthApi {
);
}
/// Create a workflow
///
/// Create a new workflow, the workflow can also be created with empty filters and actions.
///
/// Parameters:
///
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
Future<LoginResponseDto?> finishOAuth(OAuthCallbackDto oAuthCallbackDto,) async {
final response = await finishOAuthWithHttpInfo(oAuthCallbackDto,);
/// * [WorkflowCreateDto] workflowCreateDto (required):
Future<WorkflowResponseDto?> createWorkflow(WorkflowCreateDto workflowCreateDto,) async {
final response = await createWorkflowWithHttpInfo(workflowCreateDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -57,33 +66,39 @@ class OAuthApi {
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto;
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /oauth/link' operation and returns the [Response].
/// Delete a workflow
///
/// Delete a workflow by its ID.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
Future<Response> linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async {
/// * [String] id (required):
Future<Response> deleteWorkflowWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/link';
final apiPath = r'/workflows/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody = oAuthCallbackDto;
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'POST',
'DELETE',
queryParams,
postBody,
headerParams,
@@ -92,28 +107,33 @@ class OAuthApi {
);
}
/// Delete a workflow
///
/// Delete a workflow by its ID.
///
/// Parameters:
///
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
Future<UserAdminResponseDto?> linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto,) async {
final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto,);
/// * [String] id (required):
Future<void> deleteWorkflow(String id,) async {
final response = await deleteWorkflowWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /oauth/mobile-redirect' operation and returns the [Response].
Future<Response> redirectOAuthToMobileWithHttpInfo() async {
/// Retrieve a workflow
///
/// Retrieve information about a specific workflow by its ID.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id (required):
Future<Response> getWorkflowWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/mobile-redirect';
final apiPath = r'/workflows/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@@ -136,47 +156,15 @@ class OAuthApi {
);
}
Future<void> redirectOAuthToMobile() async {
final response = await redirectOAuthToMobileWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'POST /oauth/authorize' operation and returns the [Response].
/// Retrieve a workflow
///
/// Retrieve information about a specific workflow by its ID.
///
/// Parameters:
///
/// * [OAuthConfigDto] oAuthConfigDto (required):
Future<Response> startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/authorize';
// ignore: prefer_final_locals
Object? postBody = oAuthConfigDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [OAuthConfigDto] oAuthConfigDto (required):
Future<OAuthAuthorizeResponseDto?> startOAuth(OAuthConfigDto oAuthConfigDto,) async {
final response = await startOAuthWithHttpInfo(oAuthConfigDto,);
/// * [String] id (required):
Future<WorkflowResponseDto?> getWorkflow(String id,) async {
final response = await getWorkflowWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -184,16 +172,20 @@ class OAuthApi {
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthAuthorizeResponseDto',) as OAuthAuthorizeResponseDto;
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /oauth/unlink' operation and returns the [Response].
Future<Response> unlinkOAuthAccountWithHttpInfo() async {
/// List all workflows
///
/// Retrieve a list of workflows available to the authenticated user.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getWorkflowsWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/oauth/unlink';
final apiPath = r'/workflows';
// ignore: prefer_final_locals
Object? postBody;
@@ -207,7 +199,7 @@ class OAuthApi {
return apiClient.invokeAPI(
apiPath,
'POST',
'GET',
queryParams,
postBody,
headerParams,
@@ -216,8 +208,11 @@ class OAuthApi {
);
}
Future<UserAdminResponseDto?> unlinkOAuthAccount() async {
final response = await unlinkOAuthAccountWithHttpInfo();
/// List all workflows
///
/// Retrieve a list of workflows available to the authenticated user.
Future<List<WorkflowResponseDto>?> getWorkflows() async {
final response = await getWorkflowsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@@ -225,7 +220,71 @@ class OAuthApi {
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<WorkflowResponseDto>') as List)
.cast<WorkflowResponseDto>()
.toList(growable: false);
}
return null;
}
/// Update a workflow
///
/// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] id (required):
///
/// * [WorkflowUpdateDto] workflowUpdateDto (required):
Future<Response> updateWorkflowWithHttpInfo(String id, WorkflowUpdateDto workflowUpdateDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/workflows/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody = workflowUpdateDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Update a workflow
///
/// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc.
///
/// Parameters:
///
/// * [String] id (required):
///
/// * [WorkflowUpdateDto] workflowUpdateDto (required):
Future<WorkflowResponseDto?> updateWorkflow(String id, WorkflowUpdateDto workflowUpdateDto,) async {
final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto;
}
return null;
+118 -14
View File
@@ -220,8 +220,6 @@ class ApiClient {
return AlbumsResponse.fromJson(value);
case 'AlbumsUpdate':
return AlbumsUpdate.fromJson(value);
case 'AllJobStatusResponseDto':
return AllJobStatusResponseDto.fromJson(value);
case 'AssetBulkDeleteDto':
return AssetBulkDeleteDto.fromJson(value);
case 'AssetBulkUpdateDto':
@@ -240,6 +238,18 @@ class ApiClient {
return AssetDeltaSyncDto.fromJson(value);
case 'AssetDeltaSyncResponseDto':
return AssetDeltaSyncResponseDto.fromJson(value);
case 'AssetEditAction':
return AssetEditActionTypeTransformer().decode(value);
case 'AssetEditActionItemDto':
return AssetEditActionItemDto.fromJson(value);
case 'AssetEditActionItemDtoParameters':
return AssetEditActionItemDtoParameters.fromJson(value);
case 'AssetEditActionItemResponseDto':
return AssetEditActionItemResponseDto.fromJson(value);
case 'AssetEditsCreateDto':
return AssetEditsCreateDto.fromJson(value);
case 'AssetEditsResponseDto':
return AssetEditsResponseDto.fromJson(value);
case 'AssetFaceCreateDto':
return AssetFaceCreateDto.fromJson(value);
case 'AssetFaceDeleteDto':
@@ -268,8 +278,16 @@ class ApiClient {
return AssetMediaSizeTypeTransformer().decode(value);
case 'AssetMediaStatus':
return AssetMediaStatusTypeTransformer().decode(value);
case 'AssetMetadataKey':
return AssetMetadataKeyTypeTransformer().decode(value);
case 'AssetMetadataBulkDeleteDto':
return AssetMetadataBulkDeleteDto.fromJson(value);
case 'AssetMetadataBulkDeleteItemDto':
return AssetMetadataBulkDeleteItemDto.fromJson(value);
case 'AssetMetadataBulkResponseDto':
return AssetMetadataBulkResponseDto.fromJson(value);
case 'AssetMetadataBulkUpsertDto':
return AssetMetadataBulkUpsertDto.fromJson(value);
case 'AssetMetadataBulkUpsertItemDto':
return AssetMetadataBulkUpsertItemDto.fromJson(value);
case 'AssetMetadataResponseDto':
return AssetMetadataResponseDto.fromJson(value);
case 'AssetMetadataUpsertDto':
@@ -326,8 +344,18 @@ class ApiClient {
return CreateLibraryDto.fromJson(value);
case 'CreateProfileImageResponseDto':
return CreateProfileImageResponseDto.fromJson(value);
case 'CropParameters':
return CropParameters.fromJson(value);
case 'DatabaseBackupConfig':
return DatabaseBackupConfig.fromJson(value);
case 'DatabaseBackupDeleteDto':
return DatabaseBackupDeleteDto.fromJson(value);
case 'DatabaseBackupDto':
return DatabaseBackupDto.fromJson(value);
case 'DatabaseBackupListResponseDto':
return DatabaseBackupListResponseDto.fromJson(value);
case 'DownloadArchiveDto':
return DownloadArchiveDto.fromJson(value);
case 'DownloadArchiveInfo':
return DownloadArchiveInfo.fromJson(value);
case 'DownloadInfoDto':
@@ -340,6 +368,10 @@ class ApiClient {
return DownloadUpdate.fromJson(value);
case 'DuplicateDetectionConfig':
return DuplicateDetectionConfig.fromJson(value);
case 'DuplicateResolveDto':
return DuplicateResolveDto.fromJson(value);
case 'DuplicateResolveGroupDto':
return DuplicateResolveGroupDto.fromJson(value);
case 'DuplicateResponseDto':
return DuplicateResponseDto.fromJson(value);
case 'EmailNotificationsResponse':
@@ -358,20 +390,12 @@ class ApiClient {
return FoldersUpdate.fromJson(value);
case 'ImageFormat':
return ImageFormatTypeTransformer().decode(value);
case 'JobCommand':
return JobCommandTypeTransformer().decode(value);
case 'JobCommandDto':
return JobCommandDto.fromJson(value);
case 'JobCountsDto':
return JobCountsDto.fromJson(value);
case 'JobCreateDto':
return JobCreateDto.fromJson(value);
case 'JobName':
return JobNameTypeTransformer().decode(value);
case 'JobSettingsDto':
return JobSettingsDto.fromJson(value);
case 'JobStatusDto':
return JobStatusDto.fromJson(value);
case 'LibraryResponseDto':
return LibraryResponseDto.fromJson(value);
case 'LibraryStatsResponseDto':
@@ -390,6 +414,18 @@ class ApiClient {
return LogoutResponseDto.fromJson(value);
case 'MachineLearningAvailabilityChecksDto':
return MachineLearningAvailabilityChecksDto.fromJson(value);
case 'MaintenanceAction':
return MaintenanceActionTypeTransformer().decode(value);
case 'MaintenanceAuthDto':
return MaintenanceAuthDto.fromJson(value);
case 'MaintenanceDetectInstallResponseDto':
return MaintenanceDetectInstallResponseDto.fromJson(value);
case 'MaintenanceDetectInstallStorageFolderDto':
return MaintenanceDetectInstallStorageFolderDto.fromJson(value);
case 'MaintenanceLoginDto':
return MaintenanceLoginDto.fromJson(value);
case 'MaintenanceStatusResponseDto':
return MaintenanceStatusResponseDto.fromJson(value);
case 'ManualJobName':
return ManualJobNameTypeTransformer().decode(value);
case 'MapMarkerResponseDto':
@@ -404,6 +440,8 @@ class ApiClient {
return MemoryCreateDto.fromJson(value);
case 'MemoryResponseDto':
return MemoryResponseDto.fromJson(value);
case 'MemorySearchOrder':
return MemorySearchOrderTypeTransformer().decode(value);
case 'MemoryStatisticsResponseDto':
return MemoryStatisticsResponseDto.fromJson(value);
case 'MemoryType':
@@ -414,6 +452,10 @@ class ApiClient {
return MergePersonDto.fromJson(value);
case 'MetadataSearchDto':
return MetadataSearchDto.fromJson(value);
case 'MirrorAxis':
return MirrorAxisTypeTransformer().decode(value);
case 'MirrorParameters':
return MirrorParameters.fromJson(value);
case 'NotificationCreateDto':
return NotificationCreateDto.fromJson(value);
case 'NotificationDeleteAllDto':
@@ -482,12 +524,46 @@ class ApiClient {
return PinCodeSetupDto.fromJson(value);
case 'PlacesResponseDto':
return PlacesResponseDto.fromJson(value);
case 'PluginActionResponseDto':
return PluginActionResponseDto.fromJson(value);
case 'PluginContextType':
return PluginContextTypeTypeTransformer().decode(value);
case 'PluginFilterResponseDto':
return PluginFilterResponseDto.fromJson(value);
case 'PluginResponseDto':
return PluginResponseDto.fromJson(value);
case 'PluginTriggerResponseDto':
return PluginTriggerResponseDto.fromJson(value);
case 'PluginTriggerType':
return PluginTriggerTypeTypeTransformer().decode(value);
case 'PurchaseResponse':
return PurchaseResponse.fromJson(value);
case 'PurchaseUpdate':
return PurchaseUpdate.fromJson(value);
case 'QueueStatusDto':
return QueueStatusDto.fromJson(value);
case 'QueueCommand':
return QueueCommandTypeTransformer().decode(value);
case 'QueueCommandDto':
return QueueCommandDto.fromJson(value);
case 'QueueDeleteDto':
return QueueDeleteDto.fromJson(value);
case 'QueueJobResponseDto':
return QueueJobResponseDto.fromJson(value);
case 'QueueJobStatus':
return QueueJobStatusTypeTransformer().decode(value);
case 'QueueName':
return QueueNameTypeTransformer().decode(value);
case 'QueueResponseDto':
return QueueResponseDto.fromJson(value);
case 'QueueResponseLegacyDto':
return QueueResponseLegacyDto.fromJson(value);
case 'QueueStatisticsDto':
return QueueStatisticsDto.fromJson(value);
case 'QueueStatusLegacyDto':
return QueueStatusLegacyDto.fromJson(value);
case 'QueueUpdateDto':
return QueueUpdateDto.fromJson(value);
case 'QueuesResponseLegacyDto':
return QueuesResponseLegacyDto.fromJson(value);
case 'RandomSearchDto':
return RandomSearchDto.fromJson(value);
case 'RatingsResponse':
@@ -500,6 +576,8 @@ class ApiClient {
return ReactionTypeTypeTransformer().decode(value);
case 'ReverseGeocodingStateResponseDto':
return ReverseGeocodingStateResponseDto.fromJson(value);
case 'RotateParameters':
return RotateParameters.fromJson(value);
case 'SearchAlbumResponseDto':
return SearchAlbumResponseDto.fromJson(value);
case 'SearchAssetResponseDto':
@@ -550,10 +628,14 @@ class ApiClient {
return SessionUnlockDto.fromJson(value);
case 'SessionUpdateDto':
return SessionUpdateDto.fromJson(value);
case 'SetMaintenanceModeDto':
return SetMaintenanceModeDto.fromJson(value);
case 'SharedLinkCreateDto':
return SharedLinkCreateDto.fromJson(value);
case 'SharedLinkEditDto':
return SharedLinkEditDto.fromJson(value);
case 'SharedLinkLoginDto':
return SharedLinkLoginDto.fromJson(value);
case 'SharedLinkResponseDto':
return SharedLinkResponseDto.fromJson(value);
case 'SharedLinkType':
@@ -576,6 +658,8 @@ class ApiClient {
return StackUpdateDto.fromJson(value);
case 'StatisticsSearchDto':
return StatisticsSearchDto.fromJson(value);
case 'StorageFolder':
return StorageFolderTypeTransformer().decode(value);
case 'SyncAckDeleteDto':
return SyncAckDeleteDto.fromJson(value);
case 'SyncAckDto':
@@ -596,12 +680,18 @@ class ApiClient {
return SyncAlbumV1.fromJson(value);
case 'SyncAssetDeleteV1':
return SyncAssetDeleteV1.fromJson(value);
case 'SyncAssetEditDeleteV1':
return SyncAssetEditDeleteV1.fromJson(value);
case 'SyncAssetEditV1':
return SyncAssetEditV1.fromJson(value);
case 'SyncAssetExifV1':
return SyncAssetExifV1.fromJson(value);
case 'SyncAssetFaceDeleteV1':
return SyncAssetFaceDeleteV1.fromJson(value);
case 'SyncAssetFaceV1':
return SyncAssetFaceV1.fromJson(value);
case 'SyncAssetFaceV2':
return SyncAssetFaceV2.fromJson(value);
case 'SyncAssetMetadataDeleteV1':
return SyncAssetMetadataDeleteV1.fromJson(value);
case 'SyncAssetMetadataV1':
@@ -792,6 +882,20 @@ class ApiClient {
return VideoCodecTypeTransformer().decode(value);
case 'VideoContainer':
return VideoContainerTypeTransformer().decode(value);
case 'WorkflowActionItemDto':
return WorkflowActionItemDto.fromJson(value);
case 'WorkflowActionResponseDto':
return WorkflowActionResponseDto.fromJson(value);
case 'WorkflowCreateDto':
return WorkflowCreateDto.fromJson(value);
case 'WorkflowFilterItemDto':
return WorkflowFilterItemDto.fromJson(value);
case 'WorkflowFilterResponseDto':
return WorkflowFilterResponseDto.fromJson(value);
case 'WorkflowResponseDto':
return WorkflowResponseDto.fromJson(value);
case 'WorkflowUpdateDto':
return WorkflowUpdateDto.fromJson(value);
default:
dynamic match;
if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) {
+30 -6
View File
@@ -58,6 +58,9 @@ String parameterToString(dynamic value) {
if (value is AlbumUserRole) {
return AlbumUserRoleTypeTransformer().encode(value).toString();
}
if (value is AssetEditAction) {
return AssetEditActionTypeTransformer().encode(value).toString();
}
if (value is AssetJobName) {
return AssetJobNameTypeTransformer().encode(value).toString();
}
@@ -67,9 +70,6 @@ String parameterToString(dynamic value) {
if (value is AssetMediaStatus) {
return AssetMediaStatusTypeTransformer().encode(value).toString();
}
if (value is AssetMetadataKey) {
return AssetMetadataKeyTypeTransformer().encode(value).toString();
}
if (value is AssetOrder) {
return AssetOrderTypeTransformer().encode(value).toString();
}
@@ -94,21 +94,27 @@ String parameterToString(dynamic value) {
if (value is ImageFormat) {
return ImageFormatTypeTransformer().encode(value).toString();
}
if (value is JobCommand) {
return JobCommandTypeTransformer().encode(value).toString();
}
if (value is JobName) {
return JobNameTypeTransformer().encode(value).toString();
}
if (value is LogLevel) {
return LogLevelTypeTransformer().encode(value).toString();
}
if (value is MaintenanceAction) {
return MaintenanceActionTypeTransformer().encode(value).toString();
}
if (value is ManualJobName) {
return ManualJobNameTypeTransformer().encode(value).toString();
}
if (value is MemorySearchOrder) {
return MemorySearchOrderTypeTransformer().encode(value).toString();
}
if (value is MemoryType) {
return MemoryTypeTypeTransformer().encode(value).toString();
}
if (value is MirrorAxis) {
return MirrorAxisTypeTransformer().encode(value).toString();
}
if (value is NotificationLevel) {
return NotificationLevelTypeTransformer().encode(value).toString();
}
@@ -124,6 +130,21 @@ String parameterToString(dynamic value) {
if (value is Permission) {
return PermissionTypeTransformer().encode(value).toString();
}
if (value is PluginContextType) {
return PluginContextTypeTypeTransformer().encode(value).toString();
}
if (value is PluginTriggerType) {
return PluginTriggerTypeTypeTransformer().encode(value).toString();
}
if (value is QueueCommand) {
return QueueCommandTypeTransformer().encode(value).toString();
}
if (value is QueueJobStatus) {
return QueueJobStatusTypeTransformer().encode(value).toString();
}
if (value is QueueName) {
return QueueNameTypeTransformer().encode(value).toString();
}
if (value is ReactionLevel) {
return ReactionLevelTypeTransformer().encode(value).toString();
}
@@ -139,6 +160,9 @@ String parameterToString(dynamic value) {
if (value is SourceType) {
return SourceTypeTypeTransformer().encode(value).toString();
}
if (value is StorageFolder) {
return StorageFolderTypeTransformer().encode(value).toString();
}
if (value is SyncEntityType) {
return SyncEntityTypeTypeTransformer().encode(value).toString();
}
+4
View File
@@ -19,8 +19,10 @@ class ActivityCreateDto {
required this.type,
});
/// Album ID
String albumId;
/// Asset ID (if activity is for an asset)
///
/// 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
@@ -29,6 +31,7 @@ class ActivityCreateDto {
///
String? assetId;
/// Comment text (required if type is comment)
///
/// 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
@@ -37,6 +40,7 @@ class ActivityCreateDto {
///
String? comment;
/// Activity type (like or comment)
ReactionType type;
@override
+5
View File
@@ -21,14 +21,19 @@ class ActivityResponseDto {
required this.user,
});
/// Asset ID (if activity is for an asset)
String? assetId;
/// Comment text (for comment activities)
String? comment;
/// Creation date
DateTime createdAt;
/// Activity ID
String id;
/// Activity type
ReactionType type;
UserResponseDto user;
@@ -17,8 +17,10 @@ class ActivityStatisticsResponseDto {
required this.likes,
});
/// Number of comments
int comments;
/// Number of likes
int likes;
@override
+1
View File
@@ -16,6 +16,7 @@ class AddUsersDto {
this.albumUsers = const [],
});
/// Album users to add
List<AlbumUserAddDto> albumUsers;
@override
@@ -16,6 +16,7 @@ class AdminOnboardingUpdateDto {
required this.isOnboarded,
});
/// Is admin onboarded
bool isOnboarded;
@override
+15
View File
@@ -34,22 +34,28 @@ class AlbumResponseDto {
required this.updatedAt,
});
/// Album name
String albumName;
/// Thumbnail asset ID
String? albumThumbnailAssetId;
List<AlbumUserResponseDto> albumUsers;
/// Number of assets
int assetCount;
List<AssetResponseDto> assets;
List<ContributorCountResponseDto> contributorCounts;
/// Creation date
DateTime createdAt;
/// Album description
String description;
/// End date (latest asset)
///
/// 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
@@ -58,12 +64,16 @@ class AlbumResponseDto {
///
DateTime? endDate;
/// Has shared link
bool hasSharedLink;
/// Album ID
String id;
/// Activity feed enabled
bool isActivityEnabled;
/// Last modified asset timestamp
///
/// 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
@@ -72,6 +82,7 @@ class AlbumResponseDto {
///
DateTime? lastModifiedAssetTimestamp;
/// Asset sort 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
@@ -82,10 +93,13 @@ class AlbumResponseDto {
UserResponseDto owner;
/// Owner user ID
String ownerId;
/// Is shared album
bool shared;
/// Start date (earliest asset)
///
/// 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
@@ -94,6 +108,7 @@ class AlbumResponseDto {
///
DateTime? startDate;
/// Last update date
DateTime updatedAt;
@override
@@ -18,10 +18,13 @@ class AlbumStatisticsResponseDto {
required this.shared,
});
/// Number of non-shared albums
int notShared;
/// Number of owned albums
int owned;
/// Number of shared albums
int shared;
@override
+2
View File
@@ -17,8 +17,10 @@ class AlbumUserAddDto {
required this.userId,
});
/// Album user role
AlbumUserRole role;
/// User ID
String userId;
@override
+2
View File
@@ -17,8 +17,10 @@ class AlbumUserCreateDto {
required this.userId,
});
/// Album user role
AlbumUserRole role;
/// User ID
String userId;
@override
+1
View File
@@ -17,6 +17,7 @@ class AlbumUserResponseDto {
required this.user,
});
/// Album user role
AlbumUserRole role;
UserResponseDto user;
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Album user role
class AlbumUserRole {
/// Instantiate a new enum with the provided [value].
const AlbumUserRole._(this.value);
+2
View File
@@ -17,8 +17,10 @@ class AlbumsAddAssetsDto {
this.assetIds = const [],
});
/// Album IDs
List<String> albumIds;
/// Asset IDs
List<String> assetIds;
@override
@@ -17,6 +17,7 @@ class AlbumsAddAssetsResponseDto {
required this.success,
});
/// Error reason
///
/// 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
@@ -25,6 +26,7 @@ class AlbumsAddAssetsResponseDto {
///
BulkIdErrorReason? error;
/// Operation success
bool success;
@override
+1
View File
@@ -16,6 +16,7 @@ class AlbumsResponse {
this.defaultAssetOrder = AssetOrder.desc,
});
/// Default asset order for albums
AssetOrder defaultAssetOrder;
@override
+1
View File
@@ -16,6 +16,7 @@ class AlbumsUpdate {
this.defaultAssetOrder,
});
/// Default asset order for albums
///
/// 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
+2
View File
@@ -17,6 +17,7 @@ class APIKeyCreateDto {
this.permissions = const [],
});
/// API key name
///
/// 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
@@ -25,6 +26,7 @@ class APIKeyCreateDto {
///
String? name;
/// List of permissions
List<Permission> permissions;
@override
@@ -19,6 +19,7 @@ class APIKeyCreateResponseDto {
APIKeyResponseDto apiKey;
/// API key secret (only shown once)
String secret;
@override
+5
View File
@@ -20,14 +20,19 @@ class APIKeyResponseDto {
required this.updatedAt,
});
/// Creation date
DateTime createdAt;
/// API key ID
String id;
/// API key name
String name;
/// List of permissions
List<Permission> permissions;
/// Last update date
DateTime updatedAt;
@override
+2
View File
@@ -17,6 +17,7 @@ class APIKeyUpdateDto {
this.permissions = const [],
});
/// API key name
///
/// 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
@@ -25,6 +26,7 @@ class APIKeyUpdateDto {
///
String? name;
/// List of permissions
List<Permission> permissions;
@override
+2
View File
@@ -17,6 +17,7 @@ class AssetBulkDeleteDto {
this.ids = const [],
});
/// Force delete even if in use
///
/// 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
@@ -25,6 +26,7 @@ class AssetBulkDeleteDto {
///
bool? force;
/// IDs to process
List<String> ids;
@override
+15 -7
View File
@@ -26,6 +26,7 @@ class AssetBulkUpdateDto {
this.visibility,
});
/// Original date and time
///
/// 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
@@ -34,6 +35,7 @@ class AssetBulkUpdateDto {
///
String? dateTimeOriginal;
/// Relative time offset in seconds
///
/// 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
@@ -42,6 +44,7 @@ class AssetBulkUpdateDto {
///
num? dateTimeRelative;
/// Asset 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
@@ -50,10 +53,13 @@ class AssetBulkUpdateDto {
///
String? description;
/// Duplicate ID
String? duplicateId;
/// Asset IDs to update
List<String> ids;
/// Mark as favorite
///
/// 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
@@ -62,6 +68,7 @@ class AssetBulkUpdateDto {
///
bool? isFavorite;
/// Latitude coordinate
///
/// 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
@@ -70,6 +77,7 @@ class AssetBulkUpdateDto {
///
num? latitude;
/// Longitude coordinate
///
/// 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
@@ -78,16 +86,13 @@ class AssetBulkUpdateDto {
///
num? longitude;
/// Rating in range [1-5], or null for unrated
///
/// Minimum value: -1
/// Maximum value: 5
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
num? rating;
/// Time zone (IANA timezone)
///
/// 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
@@ -96,6 +101,7 @@ class AssetBulkUpdateDto {
///
String? timeZone;
/// Asset visibility
///
/// 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
@@ -211,7 +217,9 @@ class AssetBulkUpdateDto {
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
latitude: num.parse('${json[r'latitude']}'),
longitude: num.parse('${json[r'longitude']}'),
rating: num.parse('${json[r'rating']}'),
rating: json[r'rating'] == null
? null
: num.parse('${json[r'rating']}'),
timeZone: mapValueOfType<String>(json, r'timeZone'),
visibility: AssetVisibility.fromJson(json[r'visibility']),
);
@@ -16,6 +16,7 @@ class AssetBulkUploadCheckDto {
this.assets = const [],
});
/// Assets to check
List<AssetBulkUploadCheckItem> assets;
@override
+2 -1
View File
@@ -17,9 +17,10 @@ class AssetBulkUploadCheckItem {
required this.id,
});
/// base64 or hex encoded sha1 hash
/// Base64 or hex encoded SHA1 hash
String checksum;
/// Asset ID
String id;
@override
@@ -16,6 +16,7 @@ class AssetBulkUploadCheckResponseDto {
this.results = const [],
});
/// Upload check results
List<AssetBulkUploadCheckResult> results;
@override
@@ -20,8 +20,10 @@ class AssetBulkUploadCheckResult {
this.reason,
});
/// Upload action
AssetBulkUploadCheckResultActionEnum action;
/// Existing asset ID if duplicate
///
/// 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
@@ -30,8 +32,10 @@ class AssetBulkUploadCheckResult {
///
String? assetId;
/// Asset ID
String id;
/// Whether existing asset is trashed
///
/// 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
@@ -40,6 +44,7 @@ class AssetBulkUploadCheckResult {
///
bool? isTrashed;
/// Rejection reason if rejected
AssetBulkUploadCheckResultReasonEnum? reason;
@override
@@ -150,7 +155,7 @@ class AssetBulkUploadCheckResult {
};
}
/// Upload action
class AssetBulkUploadCheckResultActionEnum {
/// Instantiate a new enum with the provided [value].
const AssetBulkUploadCheckResultActionEnum._(this.value);
@@ -224,7 +229,7 @@ class AssetBulkUploadCheckResultActionEnumTypeTransformer {
}
/// Rejection reason if rejected
class AssetBulkUploadCheckResultReasonEnum {
/// Instantiate a new enum with the provided [value].
const AssetBulkUploadCheckResultReasonEnum._(this.value);
+7
View File
@@ -22,18 +22,25 @@ class AssetCopyDto {
required this.targetId,
});
/// Copy album associations
bool albums;
/// Copy favorite status
bool favorite;
/// Copy shared links
bool sharedLinks;
/// Copy sidecar file
bool sidecar;
/// Source asset ID
String sourceId;
/// Copy stack association
bool stack;
/// Target asset ID
String targetId;
@override
+2
View File
@@ -17,8 +17,10 @@ class AssetDeltaSyncDto {
this.userIds = const [],
});
/// Sync assets updated after this date
DateTime updatedAfter;
/// User IDs to sync
List<String> userIds;
@override
@@ -18,10 +18,13 @@ class AssetDeltaSyncResponseDto {
this.upserted = const [],
});
/// Deleted asset IDs
List<String> deleted;
/// Whether full sync is needed
bool needsFullSync;
/// Upserted assets
List<AssetResponseDto> upserted;
@override
+88
View File
@@ -0,0 +1,88 @@
//
// 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;
/// Type of edit action to perform
class AssetEditAction {
/// Instantiate a new enum with the provided [value].
const AssetEditAction._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const crop = AssetEditAction._(r'crop');
static const rotate = AssetEditAction._(r'rotate');
static const mirror = AssetEditAction._(r'mirror');
/// List of all possible values in this [enum][AssetEditAction].
static const values = <AssetEditAction>[
crop,
rotate,
mirror,
];
static AssetEditAction? fromJson(dynamic value) => AssetEditActionTypeTransformer().decode(value);
static List<AssetEditAction> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditAction>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditAction.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [AssetEditAction] to String,
/// and [decode] dynamic data back to [AssetEditAction].
class AssetEditActionTypeTransformer {
factory AssetEditActionTypeTransformer() => _instance ??= const AssetEditActionTypeTransformer._();
const AssetEditActionTypeTransformer._();
String encode(AssetEditAction data) => data.value;
/// Decodes a [dynamic value][data] to a AssetEditAction.
///
/// 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.
AssetEditAction? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'crop': return AssetEditAction.crop;
case r'rotate': return AssetEditAction.rotate;
case r'mirror': return AssetEditAction.mirror;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [AssetEditActionTypeTransformer] instance.
static AssetEditActionTypeTransformer? _instance;
}
+108
View File
@@ -0,0 +1,108 @@
//
// 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 AssetEditActionItemDto {
/// Returns a new [AssetEditActionItemDto] instance.
AssetEditActionItemDto({
required this.action,
required this.parameters,
});
/// Type of edit action to perform
AssetEditAction action;
AssetEditActionItemDtoParameters parameters;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDto &&
other.action == action &&
other.parameters == parameters;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(action.hashCode) +
(parameters.hashCode);
@override
String toString() => 'AssetEditActionItemDto[action=$action, parameters=$parameters]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'action'] = this.action;
json[r'parameters'] = this.parameters;
return json;
}
/// Returns a new [AssetEditActionItemDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditActionItemDto? fromJson(dynamic value) {
upgradeDto(value, "AssetEditActionItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetEditActionItemDto(
action: AssetEditAction.fromJson(json[r'action'])!,
parameters: AssetEditActionItemDtoParameters.fromJson(json[r'parameters'])!,
);
}
return null;
}
static List<AssetEditActionItemDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditActionItemDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditActionItemDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditActionItemDto> mapFromJson(dynamic json) {
final map = <String, AssetEditActionItemDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditActionItemDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditActionItemDto-objects as value to a dart map
static Map<String, List<AssetEditActionItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditActionItemDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditActionItemDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'action',
'parameters',
};
}
@@ -0,0 +1,153 @@
//
// 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 AssetEditActionItemDtoParameters {
/// Returns a new [AssetEditActionItemDtoParameters] instance.
AssetEditActionItemDtoParameters({
required this.height,
required this.width,
required this.x,
required this.y,
required this.angle,
required this.axis,
});
/// Height of the crop
///
/// Minimum value: 1
num height;
/// Width of the crop
///
/// Minimum value: 1
num width;
/// Top-Left X coordinate of crop
///
/// Minimum value: 0
num x;
/// Top-Left Y coordinate of crop
///
/// Minimum value: 0
num y;
/// Rotation angle in degrees
num angle;
/// Axis to mirror along
MirrorAxis axis;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDtoParameters &&
other.height == height &&
other.width == width &&
other.x == x &&
other.y == y &&
other.angle == angle &&
other.axis == axis;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(height.hashCode) +
(width.hashCode) +
(x.hashCode) +
(y.hashCode) +
(angle.hashCode) +
(axis.hashCode);
@override
String toString() => 'AssetEditActionItemDtoParameters[height=$height, width=$width, x=$x, y=$y, angle=$angle, axis=$axis]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'height'] = this.height;
json[r'width'] = this.width;
json[r'x'] = this.x;
json[r'y'] = this.y;
json[r'angle'] = this.angle;
json[r'axis'] = this.axis;
return json;
}
/// Returns a new [AssetEditActionItemDtoParameters] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditActionItemDtoParameters? fromJson(dynamic value) {
upgradeDto(value, "AssetEditActionItemDtoParameters");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetEditActionItemDtoParameters(
height: num.parse('${json[r'height']}'),
width: num.parse('${json[r'width']}'),
x: num.parse('${json[r'x']}'),
y: num.parse('${json[r'y']}'),
angle: num.parse('${json[r'angle']}'),
axis: MirrorAxis.fromJson(json[r'axis'])!,
);
}
return null;
}
static List<AssetEditActionItemDtoParameters> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditActionItemDtoParameters>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditActionItemDtoParameters.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditActionItemDtoParameters> mapFromJson(dynamic json) {
final map = <String, AssetEditActionItemDtoParameters>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditActionItemDtoParameters.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditActionItemDtoParameters-objects as value to a dart map
static Map<String, List<AssetEditActionItemDtoParameters>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditActionItemDtoParameters>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditActionItemDtoParameters.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'height',
'width',
'x',
'y',
'angle',
'axis',
};
}
@@ -0,0 +1,116 @@
//
// 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 AssetEditActionItemResponseDto {
/// Returns a new [AssetEditActionItemResponseDto] instance.
AssetEditActionItemResponseDto({
required this.action,
required this.id,
required this.parameters,
});
/// Type of edit action to perform
AssetEditAction action;
String id;
AssetEditActionItemDtoParameters parameters;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemResponseDto &&
other.action == action &&
other.id == id &&
other.parameters == parameters;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(action.hashCode) +
(id.hashCode) +
(parameters.hashCode);
@override
String toString() => 'AssetEditActionItemResponseDto[action=$action, id=$id, parameters=$parameters]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'action'] = this.action;
json[r'id'] = this.id;
json[r'parameters'] = this.parameters;
return json;
}
/// Returns a new [AssetEditActionItemResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditActionItemResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetEditActionItemResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetEditActionItemResponseDto(
action: AssetEditAction.fromJson(json[r'action'])!,
id: mapValueOfType<String>(json, r'id')!,
parameters: AssetEditActionItemDtoParameters.fromJson(json[r'parameters'])!,
);
}
return null;
}
static List<AssetEditActionItemResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditActionItemResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditActionItemResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditActionItemResponseDto> mapFromJson(dynamic json) {
final map = <String, AssetEditActionItemResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditActionItemResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditActionItemResponseDto-objects as value to a dart map
static Map<String, List<AssetEditActionItemResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditActionItemResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditActionItemResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'action',
'id',
'parameters',
};
}
+100
View File
@@ -0,0 +1,100 @@
//
// 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 AssetEditsCreateDto {
/// Returns a new [AssetEditsCreateDto] instance.
AssetEditsCreateDto({
this.edits = const [],
});
/// List of edit actions to apply (crop, rotate, or mirror)
List<AssetEditActionItemDto> edits;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditsCreateDto &&
_deepEquality.equals(other.edits, edits);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(edits.hashCode);
@override
String toString() => 'AssetEditsCreateDto[edits=$edits]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'edits'] = this.edits;
return json;
}
/// Returns a new [AssetEditsCreateDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditsCreateDto? fromJson(dynamic value) {
upgradeDto(value, "AssetEditsCreateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetEditsCreateDto(
edits: AssetEditActionItemDto.listFromJson(json[r'edits']),
);
}
return null;
}
static List<AssetEditsCreateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditsCreateDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditsCreateDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditsCreateDto> mapFromJson(dynamic json) {
final map = <String, AssetEditsCreateDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditsCreateDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditsCreateDto-objects as value to a dart map
static Map<String, List<AssetEditsCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditsCreateDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditsCreateDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'edits',
};
}
+109
View File
@@ -0,0 +1,109 @@
//
// 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 AssetEditsResponseDto {
/// Returns a new [AssetEditsResponseDto] instance.
AssetEditsResponseDto({
required this.assetId,
this.edits = const [],
});
/// Asset ID these edits belong to
String assetId;
/// List of edit actions applied to the asset
List<AssetEditActionItemResponseDto> edits;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditsResponseDto &&
other.assetId == assetId &&
_deepEquality.equals(other.edits, edits);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(edits.hashCode);
@override
String toString() => 'AssetEditsResponseDto[assetId=$assetId, edits=$edits]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
json[r'edits'] = this.edits;
return json;
}
/// Returns a new [AssetEditsResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetEditsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetEditsResponseDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
edits: AssetEditActionItemResponseDto.listFromJson(json[r'edits']),
);
}
return null;
}
static List<AssetEditsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditsResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditsResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditsResponseDto> mapFromJson(dynamic json) {
final map = <String, AssetEditsResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditsResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditsResponseDto-objects as value to a dart map
static Map<String, List<AssetEditsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditsResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditsResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'edits',
};
}
+8
View File
@@ -23,20 +23,28 @@ class AssetFaceCreateDto {
required this.y,
});
/// Asset ID
String assetId;
/// Face bounding box height
int height;
/// Image height in pixels
int imageHeight;
/// Image width in pixels
int imageWidth;
/// Person ID
String personId;
/// Face bounding box width
int width;
/// Face bounding box X coordinate
int x;
/// Face bounding box Y coordinate
int y;
@override
+1
View File
@@ -16,6 +16,7 @@ class AssetFaceDeleteDto {
required this.force,
});
/// Force delete even if person has other faces
bool force;
@override
+9
View File
@@ -24,22 +24,31 @@ class AssetFaceResponseDto {
this.sourceType,
});
/// Bounding box X1 coordinate
int boundingBoxX1;
/// Bounding box X2 coordinate
int boundingBoxX2;
/// Bounding box Y1 coordinate
int boundingBoxY1;
/// Bounding box Y2 coordinate
int boundingBoxY2;
/// Face ID
String id;
/// Image height in pixels
int imageHeight;
/// Image width in pixels
int imageWidth;
/// Person associated with face
PersonResponseDto? person;
/// Face detection source 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
+1
View File
@@ -16,6 +16,7 @@ class AssetFaceUpdateDto {
this.data = const [],
});
/// Face update items
List<AssetFaceUpdateItem> data;
@override
+2
View File
@@ -17,8 +17,10 @@ class AssetFaceUpdateItem {
required this.personId,
});
/// Asset ID
String assetId;
/// Person ID
String personId;
@override
@@ -23,20 +23,28 @@ class AssetFaceWithoutPersonResponseDto {
this.sourceType,
});
/// Bounding box X1 coordinate
int boundingBoxX1;
/// Bounding box X2 coordinate
int boundingBoxX2;
/// Bounding box Y1 coordinate
int boundingBoxY1;
/// Bounding box Y2 coordinate
int boundingBoxY2;
/// Face ID
String id;
/// Image height in pixels
int imageHeight;
/// Image width in pixels
int imageWidth;
/// Face detection source 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
+5
View File
@@ -19,6 +19,7 @@ class AssetFullSyncDto {
this.userId,
});
/// Last asset ID (pagination)
///
/// 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
@@ -27,11 +28,15 @@ class AssetFullSyncDto {
///
String? lastId;
/// Maximum number of assets to return
///
/// Minimum value: 1
int limit;
/// Sync assets updated until this date
DateTime updatedUntil;
/// Filter by user 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
+1
View File
@@ -16,6 +16,7 @@ class AssetIdsDto {
this.assetIds = const [],
});
/// Asset IDs
List<String> assetIds;
@override
+4 -1
View File
@@ -18,10 +18,13 @@ class AssetIdsResponseDto {
required this.success,
});
/// Asset ID
String assetId;
/// Error reason if failed
AssetIdsResponseDtoErrorEnum? error;
/// Whether operation succeeded
bool success;
@override
@@ -116,7 +119,7 @@ class AssetIdsResponseDto {
};
}
/// Error reason if failed
class AssetIdsResponseDtoErrorEnum {
/// Instantiate a new enum with the provided [value].
const AssetIdsResponseDtoErrorEnum._(this.value);
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Job name
class AssetJobName {
/// Instantiate a new enum with the provided [value].
const AssetJobName._(this.value);
+2
View File
@@ -17,8 +17,10 @@ class AssetJobsDto {
required this.name,
});
/// Asset IDs
List<String> assetIds;
/// Job name
AssetJobName name;
@override
+2
View File
@@ -17,8 +17,10 @@ class AssetMediaResponseDto {
required this.status,
});
/// Asset media ID
String id;
/// Upload status
AssetMediaStatus status;
@override
+3
View File
@@ -23,12 +23,14 @@ class AssetMediaSize {
String toJson() => value;
static const original = AssetMediaSize._(r'original');
static const fullsize = AssetMediaSize._(r'fullsize');
static const preview = AssetMediaSize._(r'preview');
static const thumbnail = AssetMediaSize._(r'thumbnail');
/// List of all possible values in this [enum][AssetMediaSize].
static const values = <AssetMediaSize>[
original,
fullsize,
preview,
thumbnail,
@@ -70,6 +72,7 @@ class AssetMediaSizeTypeTransformer {
AssetMediaSize? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'original': return AssetMediaSize.original;
case r'fullsize': return AssetMediaSize.fullsize;
case r'preview': return AssetMediaSize.preview;
case r'thumbnail': return AssetMediaSize.thumbnail;
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Upload status
class AssetMediaStatus {
/// Instantiate a new enum with the provided [value].
const AssetMediaStatus._(this.value);
@@ -0,0 +1,100 @@
//
// 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 AssetMetadataBulkDeleteDto {
/// Returns a new [AssetMetadataBulkDeleteDto] instance.
AssetMetadataBulkDeleteDto({
this.items = const [],
});
/// Metadata items to delete
List<AssetMetadataBulkDeleteItemDto> items;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteDto &&
_deepEquality.equals(other.items, items);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(items.hashCode);
@override
String toString() => 'AssetMetadataBulkDeleteDto[items=$items]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'items'] = this.items;
return json;
}
/// Returns a new [AssetMetadataBulkDeleteDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkDeleteDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkDeleteDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetMetadataBulkDeleteDto(
items: AssetMetadataBulkDeleteItemDto.listFromJson(json[r'items']),
);
}
return null;
}
static List<AssetMetadataBulkDeleteDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkDeleteDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkDeleteDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkDeleteDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkDeleteDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkDeleteDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkDeleteDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkDeleteDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkDeleteDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkDeleteDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'items',
};
}
@@ -0,0 +1,109 @@
//
// 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 AssetMetadataBulkDeleteItemDto {
/// Returns a new [AssetMetadataBulkDeleteItemDto] instance.
AssetMetadataBulkDeleteItemDto({
required this.assetId,
required this.key,
});
/// Asset ID
String assetId;
/// Metadata key
String key;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteItemDto &&
other.assetId == assetId &&
other.key == key;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(key.hashCode);
@override
String toString() => 'AssetMetadataBulkDeleteItemDto[assetId=$assetId, key=$key]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
json[r'key'] = this.key;
return json;
}
/// Returns a new [AssetMetadataBulkDeleteItemDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkDeleteItemDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkDeleteItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetMetadataBulkDeleteItemDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
);
}
return null;
}
static List<AssetMetadataBulkDeleteItemDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkDeleteItemDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkDeleteItemDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkDeleteItemDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkDeleteItemDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkDeleteItemDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkDeleteItemDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkDeleteItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkDeleteItemDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkDeleteItemDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'key',
};
}
@@ -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 AssetMetadataBulkResponseDto {
/// Returns a new [AssetMetadataBulkResponseDto] instance.
AssetMetadataBulkResponseDto({
required this.assetId,
required this.key,
required this.updatedAt,
required this.value,
});
/// Asset ID
String assetId;
/// Metadata key
String key;
/// Last update date
DateTime updatedAt;
/// Metadata value (object)
Object value;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkResponseDto &&
other.assetId == assetId &&
other.key == key &&
other.updatedAt == updatedAt &&
other.value == value;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(key.hashCode) +
(updatedAt.hashCode) +
(value.hashCode);
@override
String toString() => 'AssetMetadataBulkResponseDto[assetId=$assetId, key=$key, updatedAt=$updatedAt, value=$value]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
json[r'key'] = this.key;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
json[r'value'] = this.value;
return json;
}
/// Returns a new [AssetMetadataBulkResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetMetadataBulkResponseDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
value: mapValueOfType<Object>(json, r'value')!,
);
}
return null;
}
static List<AssetMetadataBulkResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkResponseDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkResponseDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'key',
'updatedAt',
'value',
};
}
@@ -0,0 +1,100 @@
//
// 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 AssetMetadataBulkUpsertDto {
/// Returns a new [AssetMetadataBulkUpsertDto] instance.
AssetMetadataBulkUpsertDto({
this.items = const [],
});
/// Metadata items to upsert
List<AssetMetadataBulkUpsertItemDto> items;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertDto &&
_deepEquality.equals(other.items, items);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(items.hashCode);
@override
String toString() => 'AssetMetadataBulkUpsertDto[items=$items]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'items'] = this.items;
return json;
}
/// Returns a new [AssetMetadataBulkUpsertDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkUpsertDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkUpsertDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetMetadataBulkUpsertDto(
items: AssetMetadataBulkUpsertItemDto.listFromJson(json[r'items']),
);
}
return null;
}
static List<AssetMetadataBulkUpsertDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkUpsertDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkUpsertDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkUpsertDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkUpsertDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkUpsertDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkUpsertDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkUpsertDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkUpsertDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkUpsertDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'items',
};
}
@@ -0,0 +1,118 @@
//
// 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 AssetMetadataBulkUpsertItemDto {
/// Returns a new [AssetMetadataBulkUpsertItemDto] instance.
AssetMetadataBulkUpsertItemDto({
required this.assetId,
required this.key,
required this.value,
});
/// Asset ID
String assetId;
/// Metadata key
String key;
/// Metadata value (object)
Object value;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertItemDto &&
other.assetId == assetId &&
other.key == key &&
other.value == value;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(key.hashCode) +
(value.hashCode);
@override
String toString() => 'AssetMetadataBulkUpsertItemDto[assetId=$assetId, key=$key, value=$value]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
json[r'key'] = this.key;
json[r'value'] = this.value;
return json;
}
/// Returns a new [AssetMetadataBulkUpsertItemDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkUpsertItemDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkUpsertItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetMetadataBulkUpsertItemDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
value: mapValueOfType<Object>(json, r'value')!,
);
}
return null;
}
static List<AssetMetadataBulkUpsertItemDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkUpsertItemDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkUpsertItemDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkUpsertItemDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkUpsertItemDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkUpsertItemDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkUpsertItemDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkUpsertItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkUpsertItemDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkUpsertItemDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'key',
'value',
};
}
+5 -2
View File
@@ -18,10 +18,13 @@ class AssetMetadataResponseDto {
required this.value,
});
AssetMetadataKey key;
/// Metadata key
String key;
/// Last update date
DateTime updatedAt;
/// Metadata value (object)
Object value;
@override
@@ -57,7 +60,7 @@ class AssetMetadataResponseDto {
final json = value.cast<String, dynamic>();
return AssetMetadataResponseDto(
key: AssetMetadataKey.fromJson(json[r'key'])!,
key: mapValueOfType<String>(json, r'key')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
value: mapValueOfType<Object>(json, r'value')!,
);
+1
View File
@@ -16,6 +16,7 @@ class AssetMetadataUpsertDto {
this.items = const [],
});
/// Metadata items to upsert
List<AssetMetadataUpsertItemDto> items;
@override
@@ -17,8 +17,10 @@ class AssetMetadataUpsertItemDto {
required this.value,
});
AssetMetadataKey key;
/// Metadata key
String key;
/// Metadata value (object)
Object value;
@override
@@ -51,7 +53,7 @@ class AssetMetadataUpsertItemDto {
final json = value.cast<String, dynamic>();
return AssetMetadataUpsertItemDto(
key: AssetMetadataKey.fromJson(json[r'key'])!,
key: mapValueOfType<String>(json, r'key')!,
value: mapValueOfType<Object>(json, r'value')!,
);
}
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Asset sort order
class AssetOrder {
/// Instantiate a new enum with the provided [value].
const AssetOrder._(this.value);
+63 -6
View File
@@ -23,8 +23,10 @@ class AssetResponseDto {
required this.fileCreatedAt,
required this.fileModifiedAt,
required this.hasMetadata,
required this.height,
required this.id,
required this.isArchived,
required this.isEdited,
required this.isFavorite,
required this.isOffline,
required this.isTrashed,
@@ -45,20 +47,25 @@ class AssetResponseDto {
this.unassignedFaces = const [],
required this.updatedAt,
required this.visibility,
required this.width,
});
/// base64 encoded sha1 hash
/// Base64 encoded SHA1 hash
String checksum;
/// The UTC timestamp when the asset was originally uploaded to Immich.
DateTime createdAt;
/// Device asset ID
String deviceAssetId;
/// Device ID
String deviceId;
/// Duplicate group ID
String? duplicateId;
/// Video duration (for videos)
String duration;
///
@@ -75,28 +82,43 @@ class AssetResponseDto {
/// The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken.
DateTime fileModifiedAt;
/// Whether asset has metadata
bool hasMetadata;
/// Asset height
num? height;
/// Asset ID
String id;
/// Is archived
bool isArchived;
/// Is edited
bool isEdited;
/// Is favorite
bool isFavorite;
/// Is offline
bool isOffline;
/// Is trashed
bool isTrashed;
/// This property was deprecated in v1.106.0
/// Library ID
String? libraryId;
/// Live photo video ID
String? livePhotoVideoId;
/// The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months.
DateTime localDateTime;
/// Original file name
String originalFileName;
/// Original MIME 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
@@ -105,6 +127,7 @@ class AssetResponseDto {
///
String? originalMimeType;
/// Original file path
String originalPath;
///
@@ -115,11 +138,12 @@ class AssetResponseDto {
///
UserResponseDto? owner;
/// Owner user ID
String ownerId;
List<PersonWithFacesResponseDto> people;
/// This property was deprecated in v1.113.0
/// Is resized
///
/// 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
@@ -132,8 +156,10 @@ class AssetResponseDto {
List<TagResponseDto> tags;
/// Thumbhash for thumbnail generation (base64) also used as the c query param for thumbnail cache busting.
String? thumbhash;
/// Asset type
AssetTypeEnum type;
List<AssetFaceWithoutPersonResponseDto> unassignedFaces;
@@ -141,8 +167,12 @@ class AssetResponseDto {
/// The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified.
DateTime updatedAt;
/// Asset visibility
AssetVisibility visibility;
/// Asset width
num? width;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetResponseDto &&
other.checksum == checksum &&
@@ -155,8 +185,10 @@ class AssetResponseDto {
other.fileCreatedAt == fileCreatedAt &&
other.fileModifiedAt == fileModifiedAt &&
other.hasMetadata == hasMetadata &&
other.height == height &&
other.id == id &&
other.isArchived == isArchived &&
other.isEdited == isEdited &&
other.isFavorite == isFavorite &&
other.isOffline == isOffline &&
other.isTrashed == isTrashed &&
@@ -176,7 +208,8 @@ class AssetResponseDto {
other.type == type &&
_deepEquality.equals(other.unassignedFaces, unassignedFaces) &&
other.updatedAt == updatedAt &&
other.visibility == visibility;
other.visibility == visibility &&
other.width == width;
@override
int get hashCode =>
@@ -191,8 +224,10 @@ class AssetResponseDto {
(fileCreatedAt.hashCode) +
(fileModifiedAt.hashCode) +
(hasMetadata.hashCode) +
(height == null ? 0 : height!.hashCode) +
(id.hashCode) +
(isArchived.hashCode) +
(isEdited.hashCode) +
(isFavorite.hashCode) +
(isOffline.hashCode) +
(isTrashed.hashCode) +
@@ -212,10 +247,11 @@ class AssetResponseDto {
(type.hashCode) +
(unassignedFaces.hashCode) +
(updatedAt.hashCode) +
(visibility.hashCode);
(visibility.hashCode) +
(width == null ? 0 : width!.hashCode);
@override
String toString() => 'AssetResponseDto[checksum=$checksum, createdAt=$createdAt, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, id=$id, isArchived=$isArchived, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, unassignedFaces=$unassignedFaces, updatedAt=$updatedAt, visibility=$visibility]';
String toString() => 'AssetResponseDto[checksum=$checksum, createdAt=$createdAt, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, height=$height, id=$id, isArchived=$isArchived, isEdited=$isEdited, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, unassignedFaces=$unassignedFaces, updatedAt=$updatedAt, visibility=$visibility, width=$width]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -237,8 +273,14 @@ class AssetResponseDto {
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
json[r'hasMetadata'] = this.hasMetadata;
if (this.height != null) {
json[r'height'] = this.height;
} else {
// json[r'height'] = null;
}
json[r'id'] = this.id;
json[r'isArchived'] = this.isArchived;
json[r'isEdited'] = this.isEdited;
json[r'isFavorite'] = this.isFavorite;
json[r'isOffline'] = this.isOffline;
json[r'isTrashed'] = this.isTrashed;
@@ -287,6 +329,11 @@ class AssetResponseDto {
json[r'unassignedFaces'] = this.unassignedFaces;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
json[r'visibility'] = this.visibility;
if (this.width != null) {
json[r'width'] = this.width;
} else {
// json[r'width'] = null;
}
return json;
}
@@ -309,8 +356,12 @@ class AssetResponseDto {
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!,
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!,
hasMetadata: mapValueOfType<bool>(json, r'hasMetadata')!,
height: json[r'height'] == null
? null
: num.parse('${json[r'height']}'),
id: mapValueOfType<String>(json, r'id')!,
isArchived: mapValueOfType<bool>(json, r'isArchived')!,
isEdited: mapValueOfType<bool>(json, r'isEdited')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
isOffline: mapValueOfType<bool>(json, r'isOffline')!,
isTrashed: mapValueOfType<bool>(json, r'isTrashed')!,
@@ -331,6 +382,9 @@ class AssetResponseDto {
unassignedFaces: AssetFaceWithoutPersonResponseDto.listFromJson(json[r'unassignedFaces']),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
visibility: AssetVisibility.fromJson(json[r'visibility'])!,
width: json[r'width'] == null
? null
: num.parse('${json[r'width']}'),
);
}
return null;
@@ -386,8 +440,10 @@ class AssetResponseDto {
'fileCreatedAt',
'fileModifiedAt',
'hasMetadata',
'height',
'id',
'isArchived',
'isEdited',
'isFavorite',
'isOffline',
'isTrashed',
@@ -399,6 +455,7 @@ class AssetResponseDto {
'type',
'updatedAt',
'visibility',
'width',
};
}
+3
View File
@@ -18,10 +18,13 @@ class AssetStackResponseDto {
required this.primaryAssetId,
});
/// Number of assets in stack
int assetCount;
/// Stack ID
String id;
/// Primary asset ID
String primaryAssetId;
@override

Some files were not shown because too many files have changed in this diff Show More