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
39 changes: 38 additions & 1 deletion API-COVERAGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# API Coverage

> 139 of 139 API operations covered (100%): 136 direct CLI commands + 3 used internally — source: `docs/public_api.json`
> 159 of 159 API operations covered (100%): 156 direct CLI commands + 3 used internally — source: `docs/public_api.json`
>
> PATCH and PUT are collapsed into a single "update" operation throughout.
> ✅ = direct CLI command · ⚠️ = used internally · ❌ = not implemented
Expand Down Expand Up @@ -257,6 +257,43 @@ Sub-item commands take `--screen-id` and `--section-id` flags for list/add/reord
| PATCH | `/api/public/screens/{id}/story_sections/{section_id}/social_items/{item_id}` | `stqry screens sections social update <item-id>` | ✅ |
| DELETE | `/api/public/screens/{id}/story_sections/{section_id}/social_items/{item_id}` | `stqry screens sections social remove <item-id>` | ✅ |

## Quizzes

Quizzes are a three-level hierarchy: `quiz` → `questions` → `answers`. Questions and answers take positional parent IDs (`<quiz-id>`, then `<question-id>`), mirroring `collections items`. Reorder takes the parent IDs followed by child IDs in the desired order; positions are 0-based here (the quiz `update_positions` concern writes literal positions), unlike the 1-based `collections items reorder`.

| Method | Endpoint | CLI Command | Status |
|--------|----------|-------------|--------|
| GET | `/api/public/quizzes` | `stqry quizzes list` | ✅ |
| POST | `/api/public/quizzes` | `stqry quizzes create` | ✅ |
| GET | `/api/public/quizzes/{id}` | `stqry quizzes get <id>` | ✅ |
| PATCH | `/api/public/quizzes/{id}` | `stqry quizzes update <id>` | ✅ |
| DELETE | `/api/public/quizzes/{id}` | `stqry quizzes delete <id>` | ✅ |
| GET | `/api/public/quizzes/{id}/appears_in` | `stqry quizzes appears-in <id>` | ✅ |

### Quiz Questions

| Method | Endpoint | CLI Command | Status |
|--------|----------|-------------|--------|
| GET | `/api/public/quizzes/{quiz_id}/questions` | `stqry quizzes questions list <quiz-id>` | ✅ |
| POST | `/api/public/quizzes/{quiz_id}/questions` | `stqry quizzes questions add <quiz-id>` | ✅ |
| POST | `/api/public/quizzes/{quiz_id}/questions/update_positions` | `stqry quizzes questions reorder <quiz-id>` | ✅ |
| GET | `/api/public/quizzes/{quiz_id}/questions/{id}` | `stqry quizzes questions get <quiz-id> <question-id>` | ✅ |
| PATCH | `/api/public/quizzes/{quiz_id}/questions/{id}` | `stqry quizzes questions update <quiz-id> <question-id>` | ✅ |
| DELETE | `/api/public/quizzes/{quiz_id}/questions/{id}` | `stqry quizzes questions remove <quiz-id> <question-id>` | ✅ |
| GET | `/api/public/quizzes/{quiz_id}/questions/{id}/appears_in` | `stqry quizzes questions appears-in <quiz-id> <question-id>` | ✅ |

### Quiz Question Answers

| Method | Endpoint | CLI Command | Status |
|--------|----------|-------------|--------|
| GET | `/api/public/quizzes/{quiz_id}/questions/{question_id}/answers` | `stqry quizzes questions answers list <quiz-id> <question-id>` | ✅ |
| POST | `/api/public/quizzes/{quiz_id}/questions/{question_id}/answers` | `stqry quizzes questions answers add <quiz-id> <question-id>` | ✅ |
| POST | `/api/public/quizzes/{quiz_id}/questions/{question_id}/answers/update_positions` | `stqry quizzes questions answers reorder <quiz-id> <question-id>` | ✅ |
| GET | `/api/public/quizzes/{quiz_id}/questions/{question_id}/answers/{id}` | `stqry quizzes questions answers get <quiz-id> <question-id> <answer-id>` | ✅ |
| PATCH | `/api/public/quizzes/{quiz_id}/questions/{question_id}/answers/{id}` | `stqry quizzes questions answers update <quiz-id> <question-id> <answer-id>` | ✅ |
| DELETE | `/api/public/quizzes/{quiz_id}/questions/{question_id}/answers/{id}` | `stqry quizzes questions answers remove <quiz-id> <question-id> <answer-id>` | ✅ |
| GET | `/api/public/quizzes/{quiz_id}/questions/{question_id}/answers/{id}/appears_in` | `stqry quizzes questions answers appears-in <quiz-id> <question-id> <answer-id>` | ✅ |

## Uploaded Files

> Metadata-only CRUD is exposed via `stqry uploaded-files`. The presigned/process endpoints stay internal — they're orchestrated by `stqry media upload`, which is the right command when you have actual binary content to upload.
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `stqry quizzes` — full CRUD for the Quizzes Public API across the quiz → questions → answers hierarchy, with matching MCP tools, shell completion, and reference/coverage docs. Translated fields respect `--lang`, `--question-type` is validated client-side, answers carry a `--correct` flag, and `delete`/`remove` accept `--lang` for per-locale translation deletes.

## [0.10.33] - 2026-05-28

### Added
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@ Media types: `map`, `webpackage`, `animation`, `audio`, `image`, `video`, `webvi
Collection types, tour types, geofence modes — `internal/cli/collections.go`
Section types, header layouts, link types, social networks, link-item types, section layouts, text-position, map-type — `internal/cli/screens.go`
Project subtypes (`Project::App` / `Kiosk` / `Signage`) — `internal/cli/projects.go` (`validProjectableTypes`)
Quiz question types (`single_text_choice`, `single_image_choice`, `multi_text_choice`, `multi_image_choice`, `free_text`) — `internal/cli/quizzes.go` (`validQuizQuestionTypes`)
Region→URL mapping (`us`, `ca`, `eu`, `sg`, `au`) — `internal/cli/config.go` (`var regionURLs`); add new regions there.
Supported content languages — defined in `internal/api/languages_gen.go`. Validated by `api.ValidateLanguage`.
Loading
Loading