Add basecamp files versions
Implements basecamp files versions <upload-id> over the SDK's typed
UploadsService.ListVersions, and absorbs the SDK v0.12.0 → v0.14.0 bump that
unblocked it.
Why this was held, and what unheld it
The SDK's ListVersions used to type the response as []Upload while the API
returns version events — the command printed blank fields. basecamp-sdk#683
(released in v0.14.0, live-canaried against production first) retyped it as
[]UploadVersion: the event's action/created_at/creator, plus the file it
recorded nested under upload with a per-version download_url.
The command
files versions flattens events into display rows: action, created,
creator, filename, byte_size, current, download_url. The row id is
the version event's id — no files command accepts it, so the breadcrumbs
address the upload by the id the user gave. Exactly one row is current; an
event whose recordable was deleted gets no file columns rather than zero
values. The unit fixture is the production response shape, captured live.
Live-verified against production (account 2914079, sandbox vault): a real
upload with a replaced file prints both real filenames, correct byte sizes,
exactly one current: true, and per-version download URLs. Upload trashed
after.
The SDK bump it rides on (v0.12.0 → v0.14.0, two breaking releases)
Compiler-caught breaks fixed per MIGRATING: schedule-update pointer fields,
gauges list options/result wrappers, RecurringScheduleEntryOccurrences
rename, UpdateStepRequest.DueOn / UpdateUploadRequest.Description
pointers, TodolistGroups().Update → merge-safe todolists endpoint, dead
FetchCommentThread deleted with the removed Recordings().Get it called.
Silent breaks, from an exhaustive audit of MIGRATING's no-signal/runtime
tables against every CLI call site:
- Two live nil-deref panics on
TimelineEvent.CreatedAtin the TUI hub
feeds (plus one onSearchResult.CreatedAtin workspace search) — guarded - Exit codes: 422
validation→ 9 and 507limit_exceeded→ 10, instead
of both collapsing into the shared table'sapi_errordefault of 7; the
sharedgithub.com/basecamp/cli/outputmodule still needs the same arms
(local override ininternal/output/codes.gountil then) - Circuit breaker states its decision for both new codes (a 507 used to
trip it as a 5xxapi_error; a plan limit is not server unhealth) - Schedule create/update revalidate timestamps locally (RFC 3339 or bare
date) now that the SDK forwards them verbatim - Webhooks update: all-blank
--typesno longer serializes as[]and
clears the subscription roster - Document update: explicit clears route through
Replace(omitted
fields null server-side); partial updates ride the SDK's merge-safe
composite instead of the old hand-rolled fetch-and-merge
Also release-note-worthy, no code change: --page N now actually returns
page N (fourteen services silently ignored it before), and JSON envelopes
drop 0001-01-01 placeholder timestamps where the API omits them.
bin/ci green at the head, SDK provenance in lockstep via make bump-sdk.
API-COVERAGE.md uploads row back to ✅. Follow-up: cli#404 (files new-version write command) rides CreateVersion in a separate PR.