Highlights
Response time fields now read as RFC3339 in JSON, logs, and LLM-facing output instead of opaque integers — ported from flashduty-sdk.
- New
Timestamp(Unix seconds) andTimestampMilli(milliseconds) types, bothint64-based:MarshalJSON→ quoted RFC3339 in the local timezone.UnmarshalJSONaccepts either a numeric epoch or an RFC3339 string, so values round-trip cleanly.- Zero value stays the numeric
0sentinel (never a 1970 date) and is dropped byomitempty. String()forfmt/TOON output;Unix(),Time(),IsZero()accessors.
- The generator detects epoch-timestamp fields by their spec description (unix/epoch/timestamp + second/milli, excluding duration/offset/elapsed) — not by name, which is an unreliable proxy.
- Conversion is response-only: fields in request-reachable schemas keep
int64, because a request marshals to the wire where the API wants a numeric epoch. 114 response fields converted; every request struct keepsint64. Verified live against the API.
⚠️ Breaking change
Response time fields change from int64 to Timestamp or TimestampMilli. Migrate with .Unix() for the raw epoch or .Time() for a time.Time.
inc := list.Items[0]
fmt.Println(inc.StartTime) // 2026-05-30T14:37:11+08:00
epoch := inc.StartTime.Unix() // 1779514631 (raw wire value)
t := inc.StartTime.Time() // time.TimeFull Changelog: v0.2.1...v0.3.0