feat: add create/update/delete commands for template#52
Merged
Conversation
Collaborator
|
Ah the versioning is really interesting here. We should add a new noun "template_version". So we have "get template" (gets latest), but also "list template_version" and "get template_version" to get specific versions. I guess "create template" creates a whole new template, and "update template" mints a new version. So then we only have "delete template_version". |
BlueLabelscotch
force-pushed
the
feat/template-crud
branch
from
July 12, 2026 06:42
21056a4 to
5211abb
Compare
…ire format added file_body_content_type and then file_body_wrap_as_string for special conversions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rounds out the
templatenoun with create/update/delete commands, which previously only supportedlist/get.create template—POST /template/api/templatesupdate template—PUT /template/api/templates/update/{id}/{version}delete template—DELETE /template/api/templates/{id}/{version}(version is a required path segment; there's no bare "delete all versions" endpoint)multi_level: trueon thetemplatenoun, so--level account|org|projectworks across all five template commandsyamlfield on the noun (get templatenow shows the raw template YAML, matching howinput_setalready does this)list template:flags.list-typewas being parsed as subtraction by the expression evaluator, sotemplateListTypewas silently dropped from every request; changed toflags["list-type"]Testing
Manually tested against a live account:
get template <id> --version <v>— confirmed yaml field rendersdelete template <id> --version <v>— confirmed request path (--debug) hits/templates/{id}/{version}, not the old query-param formlist template --level account/--level org— confirmed scope is dropped correctly per levelupdate template— request is well-formed and tested.