ReadKeep/readeck/Domain/Model/Bookmark.swift
Ilyas Hallak c8368f0a70 feat: Implement bookmark filtering, enhanced UI, and API integration
- Add BookmarkState enum with unread, favorite, and archived states
- Extend API layer with query parameter filtering for bookmark states
- Update Bookmark domain model to match complete API response schema
- Implement BookmarkListView with card-based UI and preview images
- Add BookmarkListViewModel with state management and error handling
- Enhance BookmarkDetailView with meta information and WebView rendering
- Create comprehensive DTO mapping for all bookmark fields
- Add TabView with state-based bookmark filtering
- Implement date formatting utilities for ISO8601 timestamps
- Add progress indicators and pull-to-refresh functionality
2025-06-11 22:02:44 +02:00

50 lines
996 B
Swift

import Foundation
struct Bookmark {
let id: String
let title: String
let url: String
let href: String
let description: String
let authors: [String]
let created: String
let published: String?
let updated: String
let siteName: String
let site: String
let readingTime: Int?
let wordCount: Int
let hasArticle: Bool
let isArchived: Bool
let isDeleted: Bool
let isMarked: Bool
let labels: [String]
let lang: String?
let loaded: Bool
let readProgress: Int
let documentType: String
let state: Int
let textDirection: String
let type: String
let resources: BookmarkResources
}
struct BookmarkResources {
let article: Resource?
let icon: ImageResource?
let image: ImageResource?
let log: Resource?
let props: Resource?
let thumbnail: ImageResource?
}
struct Resource {
let src: String
}
struct ImageResource {
let src: String
let height: Int
let width: Int
}