- Add PATCH API endpoint for updating bookmarks with toggle functions - Add DELETE API endpoint for permanent bookmark deletion - Implement UpdateBookmarkUseCase with convenience methods for common actions - Implement DeleteBookmarkUseCase for permanent bookmark removal - Create BookmarkUpdateRequest domain model with builder pattern - Extend BookmarkCardView with action menu and confirmation dialog - Add context-sensitive actions based on current bookmark state - Implement optimistic updates in BookmarksViewModel - Add error handling and recovery for failed operations - Enhance UI with badges, progress indicators, and action buttons
25 lines
674 B
Swift
25 lines
674 B
Swift
import Foundation
|
|
|
|
struct UpdateBookmarkRequestDto: Codable {
|
|
let addLabels: [String]?
|
|
let isArchived: Bool?
|
|
let isDeleted: Bool?
|
|
let isMarked: Bool?
|
|
let labels: [String]?
|
|
let readAnchor: String?
|
|
let readProgress: Int?
|
|
let removeLabels: [String]?
|
|
let title: String?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case addLabels = "add_labels"
|
|
case isArchived = "is_archived"
|
|
case isDeleted = "is_deleted"
|
|
case isMarked = "is_marked"
|
|
case labels
|
|
case readAnchor = "read_anchor"
|
|
case readProgress = "read_progress"
|
|
case removeLabels = "remove_labels"
|
|
case title
|
|
}
|
|
} |