getNotes

suspend fun getNotes(module: ZuperModule, moduleUid: String, sortType: ZyncSortType): NotesResult

Retrieves notes associated with a specific module and instance.

Offline-First Behavior:

  • First Access: Waits for initial sync completion before returning data

  • Subsequent Access: Returns cached data immediately, triggers background sync if needed

  • Background Sync: Automatically syncs changes when network becomes available

This ensures users always see actual data on first load, while providing instant responses for subsequent requests.

Return

NotesResult containing success/error state and note data

Parameters

module

Module type to filter notes by (e.g., ZuperModule.JOB)

moduleUid

Unique identifier of the module instance