Update the spec where bc3 changed: Campfire line updates and replies, menu permissions, custom search ranges
Absorbs the four bc3 contracts that #1125's repin to bc3 e759e8f2749 registered in spec/api-gaps/ but didn't model. I checked each one against bc3's code at that revision before changing the spec. All links below are pinned to it.
1. Updating a Campfire line answers 200 with the line (bc3 #14536)
Chats::LinesController#update now renders :show for JSON, and campfires.md documents 200 OK with the line. The spec declared code: 204 with an empty output.
UpdateCampfireLine now declares code: 200 and returns line: CampfireLine, so the update returns the line in every SDK. This is breaking, which is why the PR carries breaking:
- Go's
CampfiresService.UpdateLinechanges fromerrorto(*CampfireLine, error). Run locally againstorigin/main, apidiff reports this as the one incompatible change. Everything else in the PR is additive. - The return type also changes in TypeScript (
Promise<void>→Promise<CampfireLine>), Ruby, Python, Kotlin, Swift and Rust. Code that ignored the result keeps working outside Go, though Swift warns on the unused result. - MIGRATING.md has a table for all seven SDKs.
Basecamp 4's four branch still answers 204. Against it, Go, Kotlin, Swift and Rust would report a malformed response for an update that succeeded. I didn't add a shim for that: COORDINATION.md records that BC5 replaced BC4 in production, so no live BC4 backend remains.
2. Campfire line replies (bc3 #14407, #14461)
- Reading: a line that replies to another carries
original_idandoriginal, built by_original.json.jbuilder. In search results,originalalso hasplain_text_content. - Creating: the create accepts
original_id,excerptanduuid, and the publisher returns the line already published for a repeateduuid.
CampfireLine and SearchResult gain original_id and original, and CreateCampfireLineInput gains original_id, excerpt and uuid.
original is a new CampfireLineOriginal structure, not a CampfireLine. The quoted line has no parent, bucket, updated_at, inherits_status or visible_to_clients, all of which CampfireLine requires, so Swift, Kotlin and Rust couldn't decode it as one. Its creator is people/_person_minimal (id, name, avatar_url), which Person accepts.
Two things are deliberately left alone:
- The create's retry policy. Whether a create that carries a
uuidshould become retryable is a separate decision. - The
202 Acceptedthat an integration Ping answers.
3. Menu permissions and archive counts (bc3 #14599)
These views emit the keys:
todos/_todotodolists/_todolist, with the permissions at L39-L45todosets/_todosetkanban/card_tables/_card_tablekanban/lists/_list
Todo, Todolist (which also models groups), Todoset, CardTable and CardColumn gain the fields, and so does SearchResult's kanban-list branch, which renders _list and so carries archived_cards_count.
Every new member is optional:
- The permission keys appear only where a view passes
permissions: true. - A to-do list group has no archive counts.
- Only a
Kanban::Columnhascan_moveandcan_archive_or_trash.
Go's domain types use *bool and *int32 for these fields, so a missing key stays nil, which means "not reported" rather than "no".
4. Search by a custom date range (bc3 #14236)
Search::TimeFilter accepts since=custom with from and to, and Searching permits both. SearchInput gains from and to as ISO8601Date query members, and SearchSinceField documents custom.
Not in this PR
#1125 registered a fifth contract: bc3 #14348's notify on upload create (upload-create-subscriptions.md). It wasn't one of the four this PR set out to fix, so it stays registered for its own change.
What else changed
make generate, so all seven SDKs are regenerated.- The Go wrappers and domain types take the new fields.
UpdateLinereturns the line. - Shared fixtures carry the new keys.
campfires/reply_line_get.jsonis new and registered in the fixture manifest, which now coversCampfireLineandCampfireLineOriginal, as well asUpdateCampfireLine's 200 body. - New tests: Go for every gap, and TypeScript, Ruby, Python, Kotlin, Swift and Rust for the update's return value, reply create and read, and the custom range.
- The four gap entries move to
absorbed-in-sdk. The README's range triage is history and stays as written. - No operation is added or removed, so operation counts, routes and the bc3 pin don't change.
Local checks
make -k check passes everything except rs-deny. That one fails on a yanked sha2 0.11.2 in rust/Cargo.lock, which this PR doesn't touch, so main has it too.
Summary by cubic
Absorbs the four bc3 API contracts that #1125 registered in spec/api-gaps/ into the spec and all seven SDKs: Campfire line updates return the updated line, line replies carry their original, to-do and card table resources expose menu permissions and archive counts, and search accepts a custom date range.
Breaking change
- Updating a Campfire line now answers
200 OKwith the line instead of204 No Content(bc3 #14536). Every SDK's update returns the line; Go'sUpdateLinechanges fromerrorto(*CampfireLine, error), and MIGRATING.md covers all seven SDKs. - Callers that ignored the result keep working outside Go, though Swift warns on the unused result; BC4 still answers 204, but no live BC4 backend remains, so no shim was added.
Other changes
- Campfire reads:
CampfireLineandSearchResultcarryoriginal_idandoriginal, a newCampfireLineOriginalshape, since the quoted line is not a fullCampfireLine(bc3 #14407). - Campfire create takes
original_id,excerptanduuid(bc3 #14461); makinguuidcreates retryable is deliberately left out. Todo,Todolist,Todoset,CardTable,CardColumnand the kanban-list search branch gain optional menu permission and archive-count fields (bc3 #14599); Go uses pointers, so a missing key means "not reported", not "no".- Search takes
fromandtowithsince=custom(bc3 #14236). - The fifth gap from #1125,
upload-create-subscriptions, stays registered for its own change. make checkpasses exceptrs-deny, which fails onmaintoo (yankedsha2 0.11.2).