Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
615 changes: 615 additions & 0 deletions .surface

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions API-COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Coverage of Basecamp 3 API endpoints. Source: [bc3-api/sections](https://github.

| Status | Sections | Endpoints |
|--------|----------|-----------|
| ✅ Implemented | 38 | 139 |
| ✅ Implemented | 42 | 155 |
| ⏭️ Out of scope | 4 | 12 |
| **Total (docs)** | **42** | **151** |
| **Total (docs)** | **46** | **167** |

**100% coverage of in-scope API** (139/139 endpoints)
**100% coverage of in-scope API** (155/155 endpoints)

Out-of-scope sections are excluded from parity totals and scripts: chatbots (different auth), legacy Clientside (deprecated)

**SDK version:** v0.6.0uniform pagination (Limit/Page) on all List methods; `types.FlexibleTime` and `types.FlexInt` for wire format handling.
**SDK version:** v0.7.1adds gauges, my assignments, my notifications, and account management services. Fixes Person.Id deserialization and Account.Logo type mismatch.

## Coverage by Section

Expand All @@ -28,13 +28,15 @@ Out-of-scope sections are excluded from parity totals and scripts: chatbots (dif
| todolist_groups | 8 | `todolistgroups` | ✅ | - | list, show, create, update, position |
| **Hill Charts** |
| hill_charts | 2 | `hillcharts` | ✅ | - | show, track/untrack todolists |
| gauges | 7 | `gauges` | ✅ | - | list, needles, needle, create, update, delete, enable/disable |
| **Communication** |
| messages | 10 | `messages`, `message` | ✅ | - | list, show, create, update, publish, pin, unpin. Create supports `--subscribe`/`--no-subscribe` and `--draft`. Publish promotes drafts to active |
| message_boards | 3 | `messageboards` | ✅ | - | Container, accessed via project dock |
| message_types | 5 | `messagetypes` | ✅ | - | list, show, create, update, delete |
| campfires | 14 | `chat` | ✅ | - | list, messages, post, line show/delete. @mentions in content |
| comments | 8 | `comment`, `comments` | ✅ | - | list, show, create, update. @mentions in content |
| boosts | 6 | `boost`, `react` | ✅ | - | list (recording + event), show, create (recording + event), delete |
| notifications | 2 | `notifications` | ✅ | - | list, mark as read |
| **Cards (Kanban)** |
| card_tables | 3 | `cards` | ✅ | - | Accessed via project dock |
| card_table_cards | 9 | `cards` | ✅ | - | list, show, create, update, move |
Expand All @@ -43,6 +45,7 @@ Out-of-scope sections are excluded from parity totals and scripts: chatbots (dif
| **People** |
| people | 12 | `people`, `me` | ✅ | - | list, show, pingable, add, remove |
| **Search & Recordings** |
| my_assignments | 3 | `assignments` | ✅ | - | list (priorities/non-priorities), completed, due (with scope filter) |
| search | 2 | `search` | ✅ | - | Full-text search |
| recordings | 4 | `recordings` | ✅ | - | Browse by type/status, trash/archive/restore |
| **Files & Documents** |
Expand Down Expand Up @@ -78,6 +81,8 @@ Out-of-scope sections are excluded from parity totals and scripts: chatbots (dif
| client_replies | 6 | - | ⏭️ | skip | Legacy Clientside only (see notes) |
| **Chatbots** |
| chatbots | 10 | - | ⏭️ | skip | Requires chatbot key, not OAuth (see notes) |
| **Account** |
| account | 4 | `accounts` | ✅ | - | show, update name, upload logo, remove logo |
| **Lineup** |
| lineup_markers | 4 | `lineup` | ✅ | - | list, create, update, delete markers |
| **Reference Only** |
Expand Down
30 changes: 30 additions & 0 deletions e2e/smoke/smoke_account.bats
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,33 @@ setup_file() {
assert_success
assert_json_value '.ok' 'true'
}

# --- Account management ---

@test "accounts show returns account details" {
run_smoke basecamp accounts show --json
assert_success
assert_json_value '.ok' 'true'
}

@test "accounts update rejects bare invocation" {
run_smoke basecamp accounts update --json
assert_failure
assert_output_contains "No changes specified"
}

@test "accounts logo upload rejects invalid file" {
run_smoke basecamp accounts logo upload /dev/null --json
assert_failure
}

@test "accounts logo remove deletes logo" {
mark_unverifiable "Mutating test - logo removal not safe in smoke environment"
run_smoke basecamp accounts logo remove --json
}

# --- account alias (covered by accounts tests above) ---

@test "account is out of scope" {
mark_out_of_scope "Alias for accounts — tested via canonical form"
}
26 changes: 26 additions & 0 deletions e2e/smoke/smoke_assignments.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bats
# smoke_assignments.bats - Level 0: My assignments operations

load smoke_helper

setup_file() {
ensure_token || return 1
}

@test "assignments list returns assignments" {
run_smoke basecamp assignments list --json
assert_success
assert_json_value '.ok' 'true'
}

@test "assignments completed returns completed items" {
run_smoke basecamp assignments completed --json
assert_success
assert_json_value '.ok' 'true'
}

@test "assignments due returns due items" {
run_smoke basecamp assignments due overdue --json
assert_success
assert_json_value '.ok' 'true'
}
58 changes: 58 additions & 0 deletions e2e/smoke/smoke_gauges.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bats
# smoke_gauges.bats - Level 0: Gauge operations

load smoke_helper

setup_file() {
ensure_token || return 1
}

@test "gauges list returns gauges" {
run_smoke basecamp gauges list --json
assert_success
assert_json_value '.ok' 'true'
}

@test "gauges needles requires project" {
ensure_project || mark_unverifiable "Cannot discover project"
run_smoke basecamp gauges needles -p "$QA_PROJECT" --json
# Gauges may not be enabled on the project (403)
[[ "$status" -eq 4 ]] && mark_unverifiable "Gauges not enabled on project"
assert_success
assert_json_value '.ok' 'true'
}

@test "gauges needle requires valid ID" {
run_smoke basecamp gauges needle 999999 --json
mark_unverifiable "Requires valid needle ID"
}

@test "gauges create requires project and position" {
ensure_project || mark_unverifiable "Cannot discover project"
run_smoke basecamp gauges create --position 50 -p "$QA_PROJECT" --json
# May fail if gauges not enabled (403) or other constraint
[[ "$status" -eq 4 ]] && mark_unverifiable "Gauges not enabled on project"
mark_unverifiable "Mutating test - gauge creation may not be safe in all environments"
}

@test "gauges update requires valid needle ID" {
run_smoke basecamp gauges update 999999 --description "test" --json
mark_unverifiable "Requires valid needle ID"
}

@test "gauges delete requires valid needle ID" {
run_smoke basecamp gauges delete 999999 --json
mark_unverifiable "Requires valid needle ID"
}

@test "gauges enable requires project" {
ensure_project || mark_unverifiable "Cannot discover project"
run_smoke basecamp gauges enable -p "$QA_PROJECT" --json
mark_unverifiable "Mutating test - gauge toggle may not be safe in all environments"
}

@test "gauges disable requires project" {
ensure_project || mark_unverifiable "Cannot discover project"
run_smoke basecamp gauges disable -p "$QA_PROJECT" --json
mark_unverifiable "Mutating test - gauge toggle may not be safe in all environments"
}
20 changes: 20 additions & 0 deletions e2e/smoke/smoke_notifications.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bats
# smoke_notifications.bats - Level 0: Notification operations

load smoke_helper

setup_file() {
ensure_token || return 1
}

@test "notifications list returns notifications" {
run_smoke basecamp notifications list --json
assert_success
assert_json_value '.ok' 'true'
}

@test "notifications read rejects unknown ID" {
run_smoke basecamp notifications read 999999 --json
assert_failure
assert_output_contains "not found"
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
charm.land/bubbles/v2 v2.0.0
charm.land/bubbletea/v2 v2.0.2
charm.land/lipgloss/v2 v2.0.2
github.com/basecamp/basecamp-sdk/go v0.6.1-0.20260320103941-fe6154c8b320
github.com/basecamp/basecamp-sdk/go v0.7.1
github.com/basecamp/cli v0.2.1
github.com/charmbracelet/bubbles v1.0.0
github.com/charmbracelet/glamour v1.0.0
Expand Down Expand Up @@ -65,7 +65,7 @@ require (
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.16.0 // indirect
github.com/oapi-codegen/runtime v1.2.0 // indirect
github.com/oapi-codegen/runtime v1.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ
github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/basecamp/basecamp-sdk/go v0.6.1-0.20260320103941-fe6154c8b320 h1:xHbqMcj57XgSb69wsy+dhTzZ+p3IYb/BnjisI9NF5c4=
github.com/basecamp/basecamp-sdk/go v0.6.1-0.20260320103941-fe6154c8b320/go.mod h1:g05DM58QkUm4/mvBAvRiugPw+F4trliuGkRGg8y+Th4=
github.com/basecamp/basecamp-sdk/go v0.7.1 h1:GsQl8tEImbPMZZR8gtWQkP63a1j/7H1S6K2Zw8XZpbU=
github.com/basecamp/basecamp-sdk/go v0.7.1/go.mod h1:3MczpIvzsnslxVqb3TVrqVe8u4Jz/RyjIsTldhmiK5Q=
github.com/basecamp/cli v0.2.1 h1:8GyehPVtsTXla0oOPu4QgXRjwwzJ99prlByvyi+0HRQ=
github.com/basecamp/cli v0.2.1/go.mod h1:p8tt/DatJ2LAzWO6N6tNfV8x3gF5T3IxDTo+U8FfWPo=
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
Expand Down Expand Up @@ -129,8 +129,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/oapi-codegen/runtime v1.2.0 h1:RvKc1CVS1QeKSNzO97FBQbSMZyQ8s6rZd+LpmzwHMP4=
github.com/oapi-codegen/runtime v1.2.0/go.mod h1:Y7ZhmmlE8ikZOmuHRRndiIm7nf3xcVv+YMweKgG1DT0=
github.com/oapi-codegen/runtime v1.3.0 h1:vyK1zc0gDWWXgk2xoQa4+X4RNNc5SL2RbTpJS/4vMYA=
github.com/oapi-codegen/runtime v1.3.0/go.mod h1:kOdeacKy7t40Rclb1je37ZLFboFxh+YLy0zaPCMibPY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand Down
3 changes: 3 additions & 0 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ func Execute() {
cmd.AddCommand(commands.NewAttachmentsCmd())
cmd.AddCommand(commands.NewAttachCmd())
cmd.AddCommand(commands.NewUploadCmd())
cmd.AddCommand(commands.NewGaugesCmd())
cmd.AddCommand(commands.NewAssignmentsCmd())
cmd.AddCommand(commands.NewNotificationsCmd())
cmd.AddCommand(commands.NewTUICmd())
cmd.AddCommand(commands.NewBonfireCmd())

Expand Down
Loading
Loading