Update authoring draft
update_template_draftRefine an existing template authoring draft by draftId: patch layout AST, slot contracts, selection metadata, or theme tokens; validation warnings return on save.
Instructions
Update layer AST, slot definitions, selection metadata, or theme tokens of an existing template authoring draft by draftId. Call iteratively to refine draft layout and slot contracts during authoring. Do NOT use to create new drafts (use create_template_draft), view draft AST (use get_template_draft), or release to public catalog (use publish_template_draft). Requires draft owner authorization. Performs safe partial patch: unmentioned properties remain untouched. Automatically triggers layout rule validation on save; returns validation warnings if constraints are breached. Returns updated TemplateDraft record with latest validation status and AST snapshot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Updated template title. | |
| theme | No | Updated theme tokens. | |
| draftId | Yes | The unique draft identifier to update. | |
| authoringSource | No | Updated template AST layout structure and slot bindings. | |
| selectionMetadata | No | Updated platform and family metadata. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Draft ID. | |
| validationStatus | No | Validation status: valid | warnings | errors |