export function validateActivityNote(body: unknown): { note: string } | { error: string } {
  if (!body || typeof body !== 'object' || typeof (body as { note?: unknown }).note !== 'string') {
    return { error: 'note is required' }
  }

  const note = (body as { note: string }).note.trim()
  if (!note) return { error: 'note is required' }
  if (note.length > 1000) return { error: 'note must be 1-1000 characters' }

  return { note }
}
