{"name":"site_service_packages","title":"Настроить пакет посещений","section":"Запись и личный кабинет","mode":"write","url":"/tools/site_service_packages","blurb":"Управляет разовыми предоплаченными пакетами услуг, которые продаются через сайт.","aliases":"","kind":"Инструмент","examples":[{"label":"Рабочая задача","prompt":"Подготовь пакет из пяти визитов на выбранную услугу. Покажи связанную товарную позицию и правило использования посещений.","check":"Управляет разовыми предоплаченными пакетами услуг, которые продаются через сайт."},{"label":"Выбрать режим","prompt":"Для задачи «Настроить пакет посещений» сравни режимы contract и status инструмента site_service_packages. Какой подойдёт в моём случае и какие данные нужно подготовить?","check":"Сопоставить два режима и их аргументы."},{"label":"После сбоя","prompt":"При выполнении «Настроить пакет посещений» связь прервалась после отправки. Для site_service_packages проверь исходный ключ операции и текущее состояние объекта перед решением о повторе.","check":"Сопоставить результат с исходной операцией."}],"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"operation":{"type":"string","const":"contract"},"siteId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"}},"required":["operation","siteId"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"status"},"siteId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"}},"required":["operation","siteId"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"configure"},"siteId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"enabled":{"type":"boolean"},"offers":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"productId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"title":{"type":"string","minLength":1,"maxLength":120},"serviceIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"}},"visits":{"type":"integer","minimum":1,"maximum":100},"validDays":{"type":"integer","minimum":1,"maximum":1095},"enabled":{"default":true,"type":"boolean"}},"required":["id","productId","title","serviceIds","visits","validDays","enabled"],"additionalProperties":false}},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,128}$"}},"required":["operation","siteId","enabled","offers","expectedRevision","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"list"},"siteId":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"after":{"type":"string","pattern":"^[A-Za-z0-9_~:@+.-]{1,128}$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":40}},"required":["operation","siteId","limit"],"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"}}