Note Draft Store
Component Detail
Data Layer
low complexity
mobile
0
Dependencies
2
Dependents
1
Entities
0
Integrations
Description
Local SQLite-backed storage for note drafts, enabling autosave and offline editing. Persists in-progress note text, linked contact, and timestamp so that users do not lose work if the app is backgrounded or crashes before explicit save.
note-draft-store
Responsibilities
- Persist draft note content to local SQLite storage on autosave intervals
- Retrieve pending drafts for a given contact or note ID
- Clear draft entries after successful API submission
- Support offline draft creation when network is unavailable
Interfaces
saveDraft(noteId: String, text: String, contactId: String, dateTime: DateTime): Future<void>
getDraft(noteId: String): Future<NoteDraft?>
getDraftsForContact(contactId: String): Future<List<NoteDraft>>
getAllPendingDrafts(): Future<List<NoteDraft>>
deleteDraft(noteId: String): Future<void>
hasPendingDraft(noteId: String): Future<bool>
Relationships
Dependents (2)
Components that depend on this component