page.corvus.subscribeOps

corvus.page

Documentation

main subscription

No description available.

Parameters

blockIds array Optional

The explicit set of block ids to subscribe to. The server delivers ops only for these blocks — it does not walk children, registers, or any other ref relation. Clients that want a tree should subscribe to the root, read child ids from its data, then add those to the subscription.

cursor integer Optional

The server-assigned sequence number to resume from.

Message Types

Open union

Errors

InvalidAuth Invalid auth credentials on the WebSocket upgrade.
View raw schema
{
  "type": "subscription",
  "errors": [
    {
      "name": "InvalidAuth",
      "description": "Invalid auth credentials on the WebSocket upgrade."
    }
  ],
  "message": {
    "schema": {
      "refs": [
        "#op",
        "#heartbeat",
        "#error"
      ],
      "type": "union"
    }
  },
  "parameters": {
    "type": "params",
    "properties": {
      "cursor": {
        "type": "integer",
        "description": "The server-assigned sequence number to resume from."
      },
      "blockIds": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "at-uri"
        },
        "description": "The explicit set of block ids to subscribe to. The server delivers ops only for these blocks — it does not walk children, registers, or any other ref relation. Clients that want a tree should subscribe to the root, read child ids from its data, then add those to the subscription."
      }
    }
  }
}
error object

Server→client. Non-fatal error report. The server closes the WebSocket on fatal errors instead of sending this frame. For errors triggered by a specific `#opSubmit` (e.g. `AuthorMismatch`, `Forbidden`, malformed op), `project` and `opId` are both set so the client can correlate the rejection to the submitted op. For subscribe-level errors (e.g. `UnknownProject`, project-level `Forbidden`), `project` is set and `opId` is omitted. Connection-level errors omit both.

Properties

code string Required

Stable machine-readable code. Implementations should treat unknown codes as opaque.

Known values: Forbidden, Malformed
cursor integer Required

The server-assigned sequence number at the time of the error.

message string Optional

Human-readable description; not stable across server versions.

View raw schema
{
  "type": "object",
  "required": [
    "code",
    "cursor"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "Stable machine-readable code. Implementations should treat unknown codes as opaque.",
      "knownValues": [
        "Forbidden",
        "Malformed"
      ]
    },
    "cursor": {
      "type": "integer",
      "description": "The server-assigned sequence number at the time of the error."
    },
    "message": {
      "type": "string",
      "description": "Human-readable description; not stable across server versions."
    }
  },
  "description": "Server→client. Non-fatal error report. The server closes the WebSocket on fatal errors instead of sending this frame.\n\nFor errors triggered by a specific `#opSubmit` (e.g. `AuthorMismatch`, `Forbidden`, malformed op), `project` and `opId` are both set so the client can correlate the rejection to the submitted op. For subscribe-level errors (e.g. `UnknownProject`, project-level `Forbidden`), `project` is set and `opId` is omitted. Connection-level errors omit both."
}
heartbeat object

Server→client. Liveness ping for one active subscription; carries the latest seq at the time of emission so clients can detect a stuck cursor when no ops are flowing.

Properties

cursor integer Required

Latest seq the server has assigned.

ts string datetime Required

ISO 8601 instant the heartbeat was emitted.

View raw schema
{
  "type": "object",
  "required": [
    "cursor",
    "ts"
  ],
  "properties": {
    "ts": {
      "type": "string",
      "format": "datetime",
      "description": "ISO 8601 instant the heartbeat was emitted."
    },
    "cursor": {
      "type": "integer",
      "description": "Latest seq the server has assigned."
    }
  },
  "description": "Server→client. Liveness ping for one active subscription; carries the latest seq at the time of emission so clients can detect a stuck cursor when no ops are flowing."
}
op object

Server→client. One CRDT op was just added

Properties

blockId string at-uri Required

The block id of the block that the op was applied to

cursor integer Required

server assigned sequence number for the op

editor string did Optional

The did of the editor that applied the op

View raw schema
{
  "type": "object",
  "required": [
    "cursor",
    "blockId",
    "op"
  ],
  "properties": {
    "op": {
      "refs": [
        "page.corvus.block#create",
        "page.corvus.block#insert",
        "page.corvus.block#delete",
        "page.corvus.block#set",
        "page.corvus.block#increment",
        "page.corvus.block#add",
        "page.corvus.block#remove"
      ],
      "type": "union",
      "closed": true,
      "description": "the op"
    },
    "cursor": {
      "type": "integer",
      "description": "server assigned sequence number for the op"
    },
    "editor": {
      "type": "string",
      "format": "did",
      "description": "The did of the editor that applied the op"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The block id of the block that the op was applied to"
    }
  },
  "description": "Server→client. One CRDT op was just added"
}

Lexicon Garden

@