{"name":"site_visual_customizer","title":"Настроить визуальный конструктор товара","section":"Контент и оформление","mode":"write","url":"/tools/site_visual_customizer","blurb":"Совмещает слои изображений, текст и варианты модификаторов для предпросмотра товара.","aliases":"","kind":"Инструмент","examples":[{"label":"Рабочая задача","prompt":"Подготовь конструктор футболки с двумя цветами и текстовой надписью. Используй реальные варианты каталога и покажи предпросмотр.","check":"Совмещает слои изображений, текст и варианты модификаторов для предпросмотра товара."},{"label":"Выбрать режим","prompt":"Для задачи «Настроить визуальный конструктор товара» сравни режимы contract и get инструмента site_visual_customizer. Какой подойдёт в моём случае и какие данные нужно подготовить?","check":"Сопоставить два режима и их аргументы."},{"label":"После сбоя","prompt":"При выполнении «Настроить визуальный конструктор товара» связь прервалась после отправки. Для site_visual_customizer проверь исходный ключ операции и текущее состояние объекта перед решением о повторе.","check":"Сопоставить результат с исходной операцией."}],"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"siteId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"operation":{"type":"string","enum":["contract","get","preview","save"],"description":"contract reads integration instructions; get/preview require productId; save requires productId, config, expectedRevision and idempotencyKey."},"productId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"selection":{"type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"choices":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,39}$"},"additionalProperties":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,39}$"}},"text":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,39}$"},"additionalProperties":{"type":"string","maxLength":80,"pattern":"^[^<>\\x00-\\x1f\\x7f]*$"}}},"required":["revision","choices","text"],"additionalProperties":false},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,128}$"},"config":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^<>\\x00-\\x1f]*$"},"enabled":{"default":false,"type":"boolean"},"baseMediaId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"width":{"type":"integer","minimum":100,"maximum":4096},"height":{"type":"integer","minimum":100,"maximum":4096},"groups":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^<>\\x00-\\x1f]*$"},"required":{"default":true,"type":"boolean"},"defaultChoiceId":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,39}$"},"choices":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^<>\\x00-\\x1f]*$"},"mediaId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"modifier":{"type":"object","properties":{"optionSetId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"productId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"}},"required":["optionSetId","productId"],"additionalProperties":false}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","required","choices"],"additionalProperties":false}},"textFields":{"default":[],"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^<>\\x00-\\x1f]*$"},"required":{"default":false,"type":"boolean"},"maxLength":{"type":"integer","minimum":1,"maximum":80},"x":{"type":"number","minimum":0,"maximum":100},"y":{"type":"number","minimum":0,"maximum":100},"fontSize":{"type":"number","minimum":1,"maximum":20},"color":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$"},"fontFamily":{"default":"sans-serif","type":"string","enum":["sans-serif","serif","monospace"]},"align":{"default":"middle","type":"string","enum":["start","middle","end"]}},"required":["id","label","required","maxLength","x","y","fontSize","color","fontFamily","align"],"additionalProperties":false}}},"required":["title","enabled","baseMediaId","width","height","groups","textFields"],"additionalProperties":false}},"required":["siteId","operation"],"additionalProperties":false},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"},"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}},"argumentExample":{"operation":"contract","siteId":"site_demo"}}