LegalStack

Документы — коллаборация

Realtime-collaboration в редакторе (Yjs).

Уведомить о новом комментарии к документу (публикует Kafka event)

POST
/api/v1/smartdoc/documents/{id}/comments/notify
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/smartdoc/documents/string/comments/notify" \  -H "Content-Type: application/json" \  -d '{    "commentId": "string",    "text": "string"  }'
{
  "ok": true
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Получить Yjs CRDT-состояние документа (merged, бинарь)

GET
/api/v1/smartdoc/documents/{id}/yjs
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа

Тело ответа

application/octet-stream

application/problem+json

curl -X GET "https://loading/api/v1/smartdoc/documents/string/yjs"
"string"
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}