# `theme.upgrade` Move the workspace draft to a newer version of its active theme: installs the version (kit css pin), applies the pack's migrations (renames) and the new defaults only to values the owner never touched, keeps everything else; returns the Geçiş raporu. Publishing stays a separate step. - **scope**: `design:write` - **storefront-visible** (bumps the catalog generation): yes - **destructive**: no ## Payload | field | type | required | notes | |---|---|---|---| | `themeId` | string (/^[a-z][a-z0-9-]*\.[a-z][a-z0-9-]*$/, ≤80 chars) | yes | | | `toVersion` | string (/^\d+\.\d+\.\d+$/) | no | | | `workspace` | string (/^(main\|ws_[A-Z0-9]{26})$/, default "main") | no | | | `expectedRev` | integer (1..9007199254740991) \| null | no | | ### JSON Schema ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "themeId": { "type": "string", "maxLength": 80, "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*$" }, "toVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" }, "workspace": { "default": "main", "type": "string", "pattern": "^(main|ws_[A-Z0-9]{26})$" }, "expectedRev": { "default": null, "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "themeId" ], "additionalProperties": false } ```