ZyncNotesManager

Manager class for handling note operations with offline-first architecture.

This manager provides comprehensive note management capabilities including:

  • Immediate local storage with background synchronization

  • Smart conflict resolution for offline edits

  • Automatic retry mechanisms for failed sync operations

  • Real-time data access with cached responses

All operations follow the offline-first pattern where local data serves as the primary source of truth, with seamless background synchronization when online.

Functions

Link copied to clipboard

Creates a new note with offline-first support.

Link copied to clipboard
suspend fun deleteNote(noteUid: String): DeleteNoteResult

Deletes an existing note using smart deletion strategy.

Link copied to clipboard
suspend fun getNoteDetail(noteUid: String): GetNoteResult

Retrieves a specific note by its unique identifier.

Link copied to clipboard
suspend fun getNotes(module: ZuperModule, moduleUid: String, sortType: ZyncSortType): NotesResult

Retrieves notes associated with a specific module and instance.

Link copied to clipboard
fun observeNoteChanges(module: ZuperModule, moduleUid: String): Flow<NoteChangeEvent>

Observes notes for a specific module with real-time updates and efficient change detection.

Link copied to clipboard

Toggles the pinned state of a note with offline-first support.

Link copied to clipboard

Updates an existing note with offline-first support.

Link copied to clipboard
suspend fun updateNoteVisibility(noteUid: String, noteVisibilityType: ZyncNoteVisibilityType, jobUid: String?, customerUid: String?): UpdateNoteVisibilityResult

Updates the visibility settings of a note with offline-first support.