upsertNote method
Idempotent insert for replay paths that have only the raw payload
map (e.g. SyncWorker). Requires data["id"].
Implementation
Future<void> upsertNote(Map<String, dynamic> data) async {
assert(data.containsKey('id'), 'upsertNote requires data["id"]');
await _client
.from('user_notes')
.upsert(data, onConflict: 'id', ignoreDuplicates: true);
}