The Checkvist API returns the 'tasks' field as an array of child task IDs
(integers), not as full Task objects. This was causing JSON unmarshal errors.
BREAKING CHANGE: Task.Children []*Task renamed to Task.ChildIDs []int
The Checkvist API expects due_date values without the caret (^) prefix.
The ^ prefix is only used in task content smart syntax, not in API parameters.
- Remove ^ prefix from DueToday and DueTomorrow constants
- Remove unused DueASAP and DueMonday constants
- Update DueAt() and DueInDays() to not add ^ prefix
- Update tests to expect new format
Closes checkvist-api-4pz
- Add createTaskWrapper and updateTaskWrapper structs to wrap request
bodies in nested JSON format expected by Checkvist API
- Change JSON tag from "due" to "due_date" as required by API
- Update DueDate constants to use valid Checkvist smart syntax values
(^Today, ^Tomorrow, ^ASAP, ^Monday)
- Update tests to verify nested format and correct field names
Fixes checkvist-api-a5b
Add custom APITime type with UnmarshalJSON to handle the non-standard
date format returned by the Checkvist API ("2026/01/14 16:07:31 +0000")
instead of the expected RFC3339 format.
Changes:
- Add APITime type with custom JSON marshaling/unmarshaling in models.go
- Replace time.Time with APITime for UpdatedAt/CreatedAt fields in
Checklist, Task, and Note structs
- Add NewAPITime constructor for convenience
- Update test fixtures to use real API date format
- Add comprehensive unit tests for APITime in models_test.go
Fixes: checkvist-api-4qn
Add models.go with all data structures:
- Checklist struct with fields for ID, Name, Public, Archived, etc.
- Task struct with full task data including status, priority, due dates
- TaskStatus enum (StatusOpen, StatusClosed, StatusInvalidated)
- Note struct for task comments
- User struct for user information
- Tags type as map[string]bool for efficient lookup
- DueDate struct with smart syntax support and constructors
(DueAt, DueString, DueInDays) and constants (DueToday, DueTomorrow,
DueNextWeek, DueNextMonth)
Closes checkvist-api-e9p