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

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

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

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

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

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

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

Save an existing native editor draft at its exact current revision. Signed, sent, sender-signed and deleted records remain locked by native rules.

Параметры запроса
documentId
Native documentId value; use the value and type returned by the corresponding service. обязательно по схеме · string
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
values
Значения для записи. Состав и вложенность указаны в схеме. обязательно по схеме · object
Что вернёт команда
companyId
Native companyId value; use the value and type returned by the corresponding service. обязательно по схеме · string
result
Native result value; use the value and type returned by the corresponding service. обязательно по схеме · object
Поля и технические схемы
Входные поля и поля ответа documents_workspace_update
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Native documentId value; use the value and type returned by the corresponding service."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable request ID for these exact arguments. Keep it if the response is uncertain."
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Native expectedRevision value; use the value and type returned by the corresponding service."
    },
    "values": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Native name value; use the value and type returned by the corresponding service."
        },
        "type": {
          "type": "string",
          "maxLength": 80,
          "description": "Native type value; use the value and type returned by the corresponding service."
        },
        "context": {
          "type": "string",
          "enum": [
            "Заказы / POS",
            "Клиенты",
            "Лиды",
            "Компания",
            "Сотрудники",
            "Склад",
            "Финансы",
            "Задачи"
          ],
          "description": "Native context value; use the value and type returned by the corresponding service."
        },
        "kind": {
          "type": "string",
          "enum": [
            "document",
            "template"
          ],
          "description": "Native kind value; use the value and type returned by the corresponding service."
        },
        "layout": {
          "type": "object",
          "properties": {
            "editor": {
              "type": "object",
              "properties": {
                "blocks": {
                  "maxItems": 300,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "$ref": "#/$defs/__schema0"
                    }
                  },
                  "description": "Native blocks value; use the value and type returned by the corresponding service."
                },
                "pages": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 50,
                  "description": "Native pages value; use the value and type returned by the corresponding service."
                },
                "format": {
                  "description": "Native format value; use the value and type returned by the corresponding service.",
                  "type": "string",
                  "enum": [
                    "A4",
                    "A5",
                    "Letter",
                    "Custom"
                  ]
                },
                "pageSize": {
                  "description": "Native pageSize value; use the value and type returned by the corresponding service.",
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 72,
                      "maximum": 2400
                    },
                    {
                      "type": "number",
                      "minimum": 72,
                      "maximum": 2400
                    }
                  ],
                  "items": false,
                  "minItems": 2,
                  "maxItems": 2
                },
                "originalPages": {
                  "description": "Native originalPages value; use the value and type returned by the corresponding service.",
                  "maxItems": 50,
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "uploadRequests": {
                  "description": "Native uploadRequests value; use the value and type returned by the corresponding service.",
                  "maxItems": 5,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
                        "description": "Native id value; use the value and type returned by the corresponding service."
                      },
                      "type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100,
                        "description": "Native type value; use the value and type returned by the corresponding service."
                      },
                      "description": {
                        "description": "Native description value; use the value and type returned by the corresponding service.",
                        "type": "string",
                        "maxLength": 1000
                      },
                      "required": {
                        "type": "boolean",
                        "description": "Native required value; use the value and type returned by the corresponding service."
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "required"
                    ],
                    "additionalProperties": false
                  }
                },
                "signatureReceiptPlacement": {
                  "description": "Native signatureReceiptPlacement value; use the value and type returned by the corresponding service.",
                  "type": "string",
                  "enum": [
                    "same_page",
                    "separate_page"
                  ]
                }
              },
              "required": [
                "blocks",
                "pages"
              ],
              "additionalProperties": {
                "$ref": "#/$defs/__schema1"
              },
              "description": "Native editor value; use the value and type returned by the corresponding service."
            },
            "columns": {
              "maxItems": 40,
              "type": "array",
              "items": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema2"
                }
              },
              "description": "Native columns value; use the value and type returned by the corresponding service."
            }
          },
          "required": [
            "editor",
            "columns"
          ],
          "additionalProperties": false,
          "description": "Native layout value; use the value and type returned by the corresponding service."
        },
        "bindings": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
          },
          "description": "Native bindings value; use the value and type returned by the corresponding service."
        }
      },
      "required": [
        "name",
        "type",
        "context",
        "kind",
        "layout",
        "bindings"
      ],
      "additionalProperties": false,
      "description": "Native values value; use the value and type returned by the corresponding service."
    }
  },
  "required": [
    "documentId",
    "requestId",
    "expectedRevision",
    "values"
  ],
  "additionalProperties": false,
  "$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"
          }
        }
      ]
    },
    "__schema1": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema1"
          }
        }
      ]
    },
    "__schema2": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema2"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema2"
          }
        }
      ]
    }
  }
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "companyId": {
      "type": "string",
      "description": "Native companyId value; use the value and type returned by the corresponding service."
    },
    "result": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "description": "Native result value; use the value and type returned by the corresponding service."
    }
  },
  "required": [
    "companyId",
    "result"
  ],
  "additionalProperties": false,
  "$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"
          }
        }
      ]
    }
  }
}