1.4 KiB
1.4 KiB
Todo Data Protocol
Scope
Defines the backend/frontend data contract for /api/v1/todos.
Field Definitions
id: string (UUID)owner_id: string (UUID)title: string,1..255description: string ornull, max1000priority: int, quadrant value in[1, 4]order: int, zero-based ordering inside the sameprioritybucket,>= 0status: enum string:pending | done | canceledcompleted_at: datetime string ornullcreated_at: datetime stringupdated_at: datetime stringschedule_items: array
Request Contracts
Create Todo (POST /api/v1/todos)
- required:
title - optional:
description,priority,order,schedule_item_ids orderomitted: backend assigns append position in the target quadrant.
Update Todo (PATCH /api/v1/todos/{todo_id})
- optional:
title,description,priority,order,status,schedule_item_ids orderis interpreted inside the todo's finalpriorityquadrant.
Ordering Rules
- Todo list API returns items sorted by
priority ASC, thenorder ASC. - Drag reorder in same quadrant updates
orderto a continuous sequence starting from0. - Drag move across quadrants updates both
priorityandorder, and source/target quadrants should both stay contiguous from0.
Compatibility Notes
due_atis removed from todo protocol.- Clients must not send or depend on
due_atfor todo ordering.