Skip to content

Commit bff7af2

Browse files
authored
Merge pull request #129 from basecamp/bump-fizzy-sdk-0.1.3
Add SDK-backed commands and server-side card column filtering
2 parents 2b6ac58 + 428c7a0 commit bff7af2

27 files changed

Lines changed: 1574 additions & 100 deletions

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,29 @@ sudo rpm -i fizzy-cli_VERSION_linux_amd64.rpm
8282

8383
</details>
8484

85-
## Usage
85+
## Next Steps
86+
87+
Start with a few common commands:
8688

8789
```bash
88-
fizzy board list # List boards
89-
fizzy card list # List cards on default board
90-
fizzy card show 42 # Show card details
91-
fizzy card create --board ID --title "Fix login bug" # Create card
92-
fizzy card close 42 # Close card
93-
fizzy search "authentication" # Search across cards
94-
fizzy comment create --card 42 --body "Looks good!" # Add comment
90+
fizzy board list
91+
fizzy card list
92+
fizzy card show 42
93+
fizzy search "authentication"
94+
fizzy comment create --card 42 --body "Looks good!"
9595
```
9696

97+
Then branch out as needed:
98+
99+
```bash
100+
fizzy board accesses --board ID # Show board access settings and users
101+
fizzy activity list --board ID # List recent board activity
102+
fizzy webhook deliveries --board ID WEBHOOK_ID
103+
fizzy user export-create USER_ID
104+
```
105+
106+
For the full command surface, run `fizzy commands --json` or read [`skills/fizzy/SKILL.md`](skills/fizzy/SKILL.md).
107+
97108
### Attachments
98109

99110
Simple mode uses repeatable `--attach` and appends inline attachments to the end of card descriptions or comment bodies:

SURFACE.txt

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ARG fizzy account help 00 [command]
2+
ARG fizzy activity help 00 [command]
23
ARG fizzy auth help 00 [command]
34
ARG fizzy board help 00 [command]
45
ARG fizzy card attachments download 00 [ATTACHMENT_INDEX]
@@ -38,6 +39,10 @@ CMD fizzy account join-code-update
3839
CMD fizzy account settings-update
3940
CMD fizzy account show
4041
CMD fizzy account view
42+
CMD fizzy activity
43+
CMD fizzy activity help
44+
CMD fizzy activity list
45+
CMD fizzy activity ls
4146
CMD fizzy auth
4247
CMD fizzy auth help
4348
CMD fizzy auth list
@@ -47,6 +52,7 @@ CMD fizzy auth ls
4752
CMD fizzy auth status
4853
CMD fizzy auth switch
4954
CMD fizzy board
55+
CMD fizzy board accesses
5056
CMD fizzy board closed
5157
CMD fizzy board create
5258
CMD fizzy board delete
@@ -194,6 +200,10 @@ CMD fizzy upload help
194200
CMD fizzy user
195201
CMD fizzy user avatar-remove
196202
CMD fizzy user deactivate
203+
CMD fizzy user email-change-confirm
204+
CMD fizzy user email-change-request
205+
CMD fizzy user export-create
206+
CMD fizzy user export-show
197207
CMD fizzy user help
198208
CMD fizzy user list
199209
CMD fizzy user ls
@@ -207,6 +217,7 @@ CMD fizzy version
207217
CMD fizzy webhook
208218
CMD fizzy webhook create
209219
CMD fizzy webhook delete
220+
CMD fizzy webhook deliveries
210221
CMD fizzy webhook help
211222
CMD fizzy webhook list
212223
CMD fizzy webhook ls
@@ -387,6 +398,70 @@ FLAG fizzy account view --quiet type=bool
387398
FLAG fizzy account view --styled type=bool
388399
FLAG fizzy account view --token type=string
389400
FLAG fizzy account view --verbose type=bool
401+
FLAG fizzy activity --agent type=bool
402+
FLAG fizzy activity --api-url type=string
403+
FLAG fizzy activity --count type=bool
404+
FLAG fizzy activity --help type=bool
405+
FLAG fizzy activity --ids-only type=bool
406+
FLAG fizzy activity --jq type=string
407+
FLAG fizzy activity --json type=bool
408+
FLAG fizzy activity --limit type=int
409+
FLAG fizzy activity --markdown type=bool
410+
FLAG fizzy activity --profile type=string
411+
FLAG fizzy activity --quiet type=bool
412+
FLAG fizzy activity --styled type=bool
413+
FLAG fizzy activity --token type=string
414+
FLAG fizzy activity --verbose type=bool
415+
FLAG fizzy activity help --agent type=bool
416+
FLAG fizzy activity help --api-url type=string
417+
FLAG fizzy activity help --count type=bool
418+
FLAG fizzy activity help --help type=bool
419+
FLAG fizzy activity help --ids-only type=bool
420+
FLAG fizzy activity help --jq type=string
421+
FLAG fizzy activity help --json type=bool
422+
FLAG fizzy activity help --limit type=int
423+
FLAG fizzy activity help --markdown type=bool
424+
FLAG fizzy activity help --profile type=string
425+
FLAG fizzy activity help --quiet type=bool
426+
FLAG fizzy activity help --styled type=bool
427+
FLAG fizzy activity help --token type=string
428+
FLAG fizzy activity help --verbose type=bool
429+
FLAG fizzy activity list --agent type=bool
430+
FLAG fizzy activity list --all type=bool
431+
FLAG fizzy activity list --api-url type=string
432+
FLAG fizzy activity list --board type=string
433+
FLAG fizzy activity list --count type=bool
434+
FLAG fizzy activity list --creator type=string
435+
FLAG fizzy activity list --help type=bool
436+
FLAG fizzy activity list --ids-only type=bool
437+
FLAG fizzy activity list --jq type=string
438+
FLAG fizzy activity list --json type=bool
439+
FLAG fizzy activity list --limit type=int
440+
FLAG fizzy activity list --markdown type=bool
441+
FLAG fizzy activity list --page type=int
442+
FLAG fizzy activity list --profile type=string
443+
FLAG fizzy activity list --quiet type=bool
444+
FLAG fizzy activity list --styled type=bool
445+
FLAG fizzy activity list --token type=string
446+
FLAG fizzy activity list --verbose type=bool
447+
FLAG fizzy activity ls --agent type=bool
448+
FLAG fizzy activity ls --all type=bool
449+
FLAG fizzy activity ls --api-url type=string
450+
FLAG fizzy activity ls --board type=string
451+
FLAG fizzy activity ls --count type=bool
452+
FLAG fizzy activity ls --creator type=string
453+
FLAG fizzy activity ls --help type=bool
454+
FLAG fizzy activity ls --ids-only type=bool
455+
FLAG fizzy activity ls --jq type=string
456+
FLAG fizzy activity ls --json type=bool
457+
FLAG fizzy activity ls --limit type=int
458+
FLAG fizzy activity ls --markdown type=bool
459+
FLAG fizzy activity ls --page type=int
460+
FLAG fizzy activity ls --profile type=string
461+
FLAG fizzy activity ls --quiet type=bool
462+
FLAG fizzy activity ls --styled type=bool
463+
FLAG fizzy activity ls --token type=string
464+
FLAG fizzy activity ls --verbose type=bool
390465
FLAG fizzy auth --agent type=bool
391466
FLAG fizzy auth --api-url type=string
392467
FLAG fizzy auth --count type=bool
@@ -514,6 +589,22 @@ FLAG fizzy board --quiet type=bool
514589
FLAG fizzy board --styled type=bool
515590
FLAG fizzy board --token type=string
516591
FLAG fizzy board --verbose type=bool
592+
FLAG fizzy board accesses --agent type=bool
593+
FLAG fizzy board accesses --api-url type=string
594+
FLAG fizzy board accesses --board type=string
595+
FLAG fizzy board accesses --count type=bool
596+
FLAG fizzy board accesses --help type=bool
597+
FLAG fizzy board accesses --ids-only type=bool
598+
FLAG fizzy board accesses --jq type=string
599+
FLAG fizzy board accesses --json type=bool
600+
FLAG fizzy board accesses --limit type=int
601+
FLAG fizzy board accesses --markdown type=bool
602+
FLAG fizzy board accesses --page type=int
603+
FLAG fizzy board accesses --profile type=string
604+
FLAG fizzy board accesses --quiet type=bool
605+
FLAG fizzy board accesses --styled type=bool
606+
FLAG fizzy board accesses --token type=string
607+
FLAG fizzy board accesses --verbose type=bool
517608
FLAG fizzy board closed --agent type=bool
518609
FLAG fizzy board closed --all type=bool
519610
FLAG fizzy board closed --api-url type=string
@@ -2730,6 +2821,63 @@ FLAG fizzy user deactivate --quiet type=bool
27302821
FLAG fizzy user deactivate --styled type=bool
27312822
FLAG fizzy user deactivate --token type=string
27322823
FLAG fizzy user deactivate --verbose type=bool
2824+
FLAG fizzy user email-change-confirm --agent type=bool
2825+
FLAG fizzy user email-change-confirm --api-url type=string
2826+
FLAG fizzy user email-change-confirm --count type=bool
2827+
FLAG fizzy user email-change-confirm --help type=bool
2828+
FLAG fizzy user email-change-confirm --ids-only type=bool
2829+
FLAG fizzy user email-change-confirm --jq type=string
2830+
FLAG fizzy user email-change-confirm --json type=bool
2831+
FLAG fizzy user email-change-confirm --limit type=int
2832+
FLAG fizzy user email-change-confirm --markdown type=bool
2833+
FLAG fizzy user email-change-confirm --profile type=string
2834+
FLAG fizzy user email-change-confirm --quiet type=bool
2835+
FLAG fizzy user email-change-confirm --styled type=bool
2836+
FLAG fizzy user email-change-confirm --token type=string
2837+
FLAG fizzy user email-change-confirm --verbose type=bool
2838+
FLAG fizzy user email-change-request --agent type=bool
2839+
FLAG fizzy user email-change-request --api-url type=string
2840+
FLAG fizzy user email-change-request --count type=bool
2841+
FLAG fizzy user email-change-request --email type=string
2842+
FLAG fizzy user email-change-request --help type=bool
2843+
FLAG fizzy user email-change-request --ids-only type=bool
2844+
FLAG fizzy user email-change-request --jq type=string
2845+
FLAG fizzy user email-change-request --json type=bool
2846+
FLAG fizzy user email-change-request --limit type=int
2847+
FLAG fizzy user email-change-request --markdown type=bool
2848+
FLAG fizzy user email-change-request --profile type=string
2849+
FLAG fizzy user email-change-request --quiet type=bool
2850+
FLAG fizzy user email-change-request --styled type=bool
2851+
FLAG fizzy user email-change-request --token type=string
2852+
FLAG fizzy user email-change-request --verbose type=bool
2853+
FLAG fizzy user export-create --agent type=bool
2854+
FLAG fizzy user export-create --api-url type=string
2855+
FLAG fizzy user export-create --count type=bool
2856+
FLAG fizzy user export-create --help type=bool
2857+
FLAG fizzy user export-create --ids-only type=bool
2858+
FLAG fizzy user export-create --jq type=string
2859+
FLAG fizzy user export-create --json type=bool
2860+
FLAG fizzy user export-create --limit type=int
2861+
FLAG fizzy user export-create --markdown type=bool
2862+
FLAG fizzy user export-create --profile type=string
2863+
FLAG fizzy user export-create --quiet type=bool
2864+
FLAG fizzy user export-create --styled type=bool
2865+
FLAG fizzy user export-create --token type=string
2866+
FLAG fizzy user export-create --verbose type=bool
2867+
FLAG fizzy user export-show --agent type=bool
2868+
FLAG fizzy user export-show --api-url type=string
2869+
FLAG fizzy user export-show --count type=bool
2870+
FLAG fizzy user export-show --help type=bool
2871+
FLAG fizzy user export-show --ids-only type=bool
2872+
FLAG fizzy user export-show --jq type=string
2873+
FLAG fizzy user export-show --json type=bool
2874+
FLAG fizzy user export-show --limit type=int
2875+
FLAG fizzy user export-show --markdown type=bool
2876+
FLAG fizzy user export-show --profile type=string
2877+
FLAG fizzy user export-show --quiet type=bool
2878+
FLAG fizzy user export-show --styled type=bool
2879+
FLAG fizzy user export-show --token type=string
2880+
FLAG fizzy user export-show --verbose type=bool
27332881
FLAG fizzy user help --agent type=bool
27342882
FLAG fizzy user help --api-url type=string
27352883
FLAG fizzy user help --count type=bool
@@ -2929,6 +3077,23 @@ FLAG fizzy webhook delete --quiet type=bool
29293077
FLAG fizzy webhook delete --styled type=bool
29303078
FLAG fizzy webhook delete --token type=string
29313079
FLAG fizzy webhook delete --verbose type=bool
3080+
FLAG fizzy webhook deliveries --agent type=bool
3081+
FLAG fizzy webhook deliveries --all type=bool
3082+
FLAG fizzy webhook deliveries --api-url type=string
3083+
FLAG fizzy webhook deliveries --board type=string
3084+
FLAG fizzy webhook deliveries --count type=bool
3085+
FLAG fizzy webhook deliveries --help type=bool
3086+
FLAG fizzy webhook deliveries --ids-only type=bool
3087+
FLAG fizzy webhook deliveries --jq type=string
3088+
FLAG fizzy webhook deliveries --json type=bool
3089+
FLAG fizzy webhook deliveries --limit type=int
3090+
FLAG fizzy webhook deliveries --markdown type=bool
3091+
FLAG fizzy webhook deliveries --page type=int
3092+
FLAG fizzy webhook deliveries --profile type=string
3093+
FLAG fizzy webhook deliveries --quiet type=bool
3094+
FLAG fizzy webhook deliveries --styled type=bool
3095+
FLAG fizzy webhook deliveries --token type=string
3096+
FLAG fizzy webhook deliveries --verbose type=bool
29323097
FLAG fizzy webhook help --agent type=bool
29333098
FLAG fizzy webhook help --api-url type=string
29343099
FLAG fizzy webhook help --count type=bool
@@ -3065,6 +3230,10 @@ SUB fizzy account join-code-update
30653230
SUB fizzy account settings-update
30663231
SUB fizzy account show
30673232
SUB fizzy account view
3233+
SUB fizzy activity
3234+
SUB fizzy activity help
3235+
SUB fizzy activity list
3236+
SUB fizzy activity ls
30683237
SUB fizzy auth
30693238
SUB fizzy auth help
30703239
SUB fizzy auth list
@@ -3074,6 +3243,7 @@ SUB fizzy auth ls
30743243
SUB fizzy auth status
30753244
SUB fizzy auth switch
30763245
SUB fizzy board
3246+
SUB fizzy board accesses
30773247
SUB fizzy board closed
30783248
SUB fizzy board create
30793249
SUB fizzy board delete
@@ -3221,6 +3391,10 @@ SUB fizzy upload help
32213391
SUB fizzy user
32223392
SUB fizzy user avatar-remove
32233393
SUB fizzy user deactivate
3394+
SUB fizzy user email-change-confirm
3395+
SUB fizzy user email-change-request
3396+
SUB fizzy user export-create
3397+
SUB fizzy user export-show
32243398
SUB fizzy user help
32253399
SUB fizzy user list
32263400
SUB fizzy user ls
@@ -3234,6 +3408,7 @@ SUB fizzy version
32343408
SUB fizzy webhook
32353409
SUB fizzy webhook create
32363410
SUB fizzy webhook delete
3411+
SUB fizzy webhook deliveries
32373412
SUB fizzy webhook help
32383413
SUB fizzy webhook list
32393414
SUB fizzy webhook ls

e2e/cli_tests/account_user_test.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,27 @@ func TestUserAvatarUpdateAndRemove(t *testing.T) {
122122
t.Fatal("expected avatar endpoint to fall back to generated SVG after removal")
123123
}
124124
}
125+
126+
func TestUserExportCreateShow(t *testing.T) {
127+
h := newHarness(t)
128+
userID := currentUserID(t, h)
129+
130+
create := h.Run("user", "export-create", userID)
131+
assertOK(t, create)
132+
exportID := create.GetDataString("id")
133+
if exportID == "" {
134+
exportID = mapValueString(create.GetDataMap(), "id")
135+
}
136+
if exportID == "" {
137+
t.Fatal("expected export ID in user export-create response")
138+
}
139+
140+
show := h.Run("user", "export-show", userID, exportID)
141+
assertOK(t, show)
142+
if got := mapValueString(show.GetDataMap(), "id"); got != exportID {
143+
t.Fatalf("expected export-show id %q, got %q", exportID, got)
144+
}
145+
if got := mapValueString(show.GetDataMap(), "status"); got == "" {
146+
t.Fatal("expected export status in user export-show response")
147+
}
148+
}

e2e/cli_tests/activity_test.go

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package clitests
2+
3+
import (
4+
"strconv"
5+
"testing"
6+
"time"
7+
8+
"github.com/basecamp/fizzy-cli/e2e/harness"
9+
)
10+
11+
func TestActivityList(t *testing.T) {
12+
h := newHarness(t)
13+
boardID := createBoard(t, h)
14+
cardNum := createCard(t, h, boardID)
15+
creatorID := currentUserID(t, h)
16+
17+
cardNumStr := strconv.Itoa(cardNum)
18+
var result *harness.Result
19+
foundCard := false
20+
for attempt := 0; attempt < 10; attempt++ {
21+
r := h.Run("activity", "list", "--board", boardID)
22+
if r.ExitCode == harness.ExitSuccess {
23+
result = r
24+
for _, item := range r.GetDataArray() {
25+
m := asMap(item)
26+
if m == nil {
27+
continue
28+
}
29+
if eventable := asMap(m["eventable"]); eventable != nil {
30+
if mapValueString(eventable, "number") == cardNumStr {
31+
foundCard = true
32+
break
33+
}
34+
}
35+
}
36+
if foundCard {
37+
break
38+
}
39+
}
40+
time.Sleep(200 * time.Millisecond)
41+
}
42+
if result == nil {
43+
t.Fatal("expected at least one successful activity list call")
44+
}
45+
assertOK(t, result)
46+
if !foundCard {
47+
t.Fatalf("activity list did not expose created card number %d after retries", cardNum)
48+
}
49+
50+
creatorResult := h.Run("activity", "list", "--board", boardID, "--creator", creatorID)
51+
assertOK(t, creatorResult)
52+
if creatorResult.GetDataArray() == nil {
53+
t.Fatal("expected activity creator-filter response array")
54+
}
55+
}

0 commit comments

Comments
 (0)