feat: expose consistent workbook and template state controls #1033
✅ Devin Review: No Issues Found
Devin Review analyzed this PR and found no bugs or issues to report.
<!-- devin-review-badge-begin -->
<a href="https://app.devin.ai/review/nominal-io/nominal-client/pull/1033" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->
<!-- devin-review-summary -->
Just to ensure I understand correctly: workbook templates can be published but not locked?
Two flags that encode the same information?
Args docstring section, or left out on purpose because of all the flags?
No pull from API here?
No pull from API here?
is_published was me making this consistent with how it's exposed with workbook templates, but I'll leave that out as a future "ergonomic improvement" alongside actual deprecation of the old flag.
correct!
under the hood, we can hit the update() api with only the is_published field & then it returns the latest reference to the object & we update our dataclass fields with the response. So there _is_ a pull, though, we can also just set is_published=False before it as it's idempotent.
see other
stefanv
drake-nominal
Adds
publish()andunpublish()to workbooks and templates,is_lockedto workbook updates, andis_publishedto template updates and creation.Refreshes cached metadata from state-query and update responses without extra fetches.