(value: string)
| 46 | } |
| 47 | |
| 48 | export function validateMoveNoteTarget(value: string): string | null { |
| 49 | const normalized = normalizeMoveTarget(value) |
| 50 | if (!normalized) return 'Folder path required' |
| 51 | const [top] = normalized.split('/') |
| 52 | if (top !== 'inbox' && top !== 'archive') { |
| 53 | return 'Top-level folder must be inbox or archive' |
| 54 | } |
| 55 | return null |
| 56 | } |
| 57 | |
| 58 | export function parseMoveNoteTarget(value: string): MoveNoteDestination { |
| 59 | const normalized = normalizeMoveTarget(value) |
no test coverage detected