ReadKeep/readeck/Domain/Protocols/PAnnotationsRepository.swift
Ilyas Hallak 8dc5f3000a feat: Add annotations, cache management, and offline feature improvements
- Add annotation creation to API and repository layer (AnnotationsRepository)
- Add DtoMapper for AnnotationDto to domain model conversion
- Extend PAnnotationsRepository protocol with createAnnotation method
- Add cache management to SettingsRepository (getCacheSize, getMaxCacheSize, updateMaxCacheSize, clearCache)
- Extend PSettingsRepository protocol with cache settings methods
- Use localized Highlight label in annotation overlay JavaScript for WebView and NativeWebView
- Improve API error handling with detailed logging for HTTP errors and response data
- Add LocalizedError extension for APIError with human-readable descriptions
- Update localization strings for German and English (Highlight, Synchronization, VPN warning)
- Update RELEASE_NOTES.md with version 2.0.0 offline reading feature details
2025-12-01 22:01:23 +01:00

6 lines
358 B
Swift

protocol PAnnotationsRepository {
func fetchAnnotations(bookmarkId: String) async throws -> [Annotation]
func deleteAnnotation(bookmarkId: String, annotationId: String) async throws
func createAnnotation(bookmarkId: String, color: String, startOffset: Int, endOffset: Int, startSelector: String, endSelector: String) async throws -> Annotation
}