MCP Control
Документы · Изменение

Документы · Изменение · Задачи · Документы

documents_update_task_document
Папки документов

Попробуйте три запроса

Подготовить
  1. Вы указываетеДокумент
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Документы / Изменение / Задачи / Документы». Для изменения нужны документ, taskId. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
documentId
Документ
taskId
Параметр
document
Параметр
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Документы / Изменение / Задачи / Документы» с параметром documentId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
documentId
DEMO-101
taskId
DEMO-101
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Документы / Изменение / Задачи / Документы» по исходному ответу. Покажи документ, updated. Объясни, чем подтвердить эффект для выбранного объекта.
Как сверить изменение
  1. До измененияПрочитать версию
  2. При записиПередать выбранную версию
  3. После ответаПеречитать объект
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.

Описание разработчика

Update the native layout of a document linked to the explicitly selected task. Requires the latest document revision; task access and exact association are checked inside the transaction. Preserves unrelated wrapper fields and leaves the task unchanged. Retries use an atomic operation receipt.

Параметры запроса
documentId
Existing task-linked Documents identifier. обязательно по схеме · string · до символов 128
taskId
Exact task ID returned by documents_get_task_document. обязательно по схеме · string · до символов 128
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
document
Complete replacement native layout, preserving its repeat-data path when needed. обязательно по схеме · object
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
Что вернёт команда
documentId
Updated native Documents identifier. обязательно по схеме · string
updated
Only the native document layout was updated. обязательно по схеме · boolean
Поля и технические схемы
Входные поля и поля ответа documents_update_task_document
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Existing task-linked Documents identifier."
    },
    "taskId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Exact task ID returned by documents_get_task_document."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Exact current native document revision from its get action."
    },
    "document": {
      "type": "object",
      "properties": {
        "name": {
          "minItems": 1,
          "maxItems": 78,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "Language": {
                "type": "string",
                "minLength": 2,
                "maxLength": 20,
                "description": "Stored language code, preserving native casing."
              },
              "Text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "description": "Human-readable document template name in this language."
              }
            },
            "required": [
              "Language",
              "Text"
            ],
            "additionalProperties": false
          },
          "description": "Native Namesjson localized template names."
        },
        "width": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000,
          "description": "Native document.width layout dimension; use values from the existing editor or a template."
        },
        "higth": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 100000,
          "description": "Native misspelled document.higth layout dimension; preserve its existing unit."
        },
        "color": {
          "description": "Native document background color value.",
          "type": "string",
          "maxLength": 60
        },
        "items": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Existing native document item id field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "type": {
                "description": "Existing native document item type field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "title": {
                "description": "Existing native document item title field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "value": {
                "description": "Existing native document item value field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 8000
              },
              "typedata": {
                "description": "Existing native document item typedata field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "field": {
                "description": "Existing native document item field field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "typebold": {
                "description": "Existing native document item typebold field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "color": {
                "description": "Existing native document item color field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "colorBackround": {
                "description": "Existing native document item colorBackround field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "colorframe": {
                "description": "Existing native document item colorframe field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "size": {
                "description": "Existing native document item size layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "frame": {
                "description": "Existing native document item frame layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "left": {
                "description": "Existing native document item left layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "top": {
                "description": "Existing native document item top layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "right": {
                "description": "Existing native document item right layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "bottom": {
                "description": "Existing native document item bottom layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "radius": {
                "description": "Existing native document item radius layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "row": {
                "description": "Existing native integer itemdocument.row layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "alignment": {
                "description": "Existing native integer itemdocument.alignment layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "alignmentVertical": {
                "description": "Existing native integer itemdocument.alignmentVertical layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "lyer": {
                "description": "Existing native integer itemdocument.lyer layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "place": {
                "description": "Existing native integer itemdocument.place layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "placeheight": {
                "description": "Existing native integer itemdocument.placeheight layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "list": {
                "description": "Native itemdocument.list values.",
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "Existing native list entry."
                }
              },
              "paddings": {
                "description": "Native itemdocument.paddings array; retain the editor ordering.",
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "number",
                  "minimum": -10000,
                  "maximum": 10000,
                  "description": "Native editor padding value."
                }
              },
              "edite": {
                "description": "Native itemdocument.edite flag used by the existing editor.",
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "description": "Native itemdocument layout elements. Field names match the existing document editor."
        },
        "backround": {
          "description": "Existing document.backround image reference. Only a previously authorized media reference should be used.",
          "type": "string",
          "maxLength": 2000
        },
        "reguest": {
          "description": "Native document.reguest field list; preserve existing editor semantics.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 500,
            "description": "Existing native requested field identifier."
          }
        },
        "printdata": {
          "description": "Native repeat-data path used by preparePrintJob, for example @order.Items. This is a data path, not a JSON printer payload. Omit or use an empty value for one document.",
          "type": "string",
          "maxLength": 500,
          "pattern": "^(?:@?[A-Za-z_][A-Za-z0-9_.\\[\\]*/-]*)?$"
        }
      },
      "required": [
        "name",
        "width",
        "higth",
        "items"
      ],
      "additionalProperties": false,
      "description": "Complete replacement native layout, preserving its repeat-data path when needed."
    },
    "requestId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "allOf": [
        {
          "pattern": "^[A-Za-z0-9_~:@+.-]+$"
        },
        {
          "pattern": "^[A-Za-z0-9_-]+$"
        }
      ],
      "description": "Unique retry ID for this exact operation. Reuse the same ID and arguments on network retries."
    }
  },
  "required": [
    "documentId",
    "taskId",
    "expectedRevision",
    "document",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "description": "Updated native Documents identifier."
    },
    "updated": {
      "type": "boolean",
      "const": true,
      "description": "Only the native document layout was updated."
    }
  },
  "required": [
    "documentId",
    "updated"
  ],
  "additionalProperties": false
}