Design kit command

annotation.list

List annotations

Answers the annotations on layers or a page, optionally of one category.

Kit
Design 0.1.0 (.kdesign)
Changes the document
no
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of annotation.list
NameTypeRequiredDescription
assetsbooleannoread by the command beside its listed parameters
categorystringno
idinteger | stringnoan id; those layers; one of several alternative parameters
ids(integer | string)[]nothose layers; one of several alternative parameters
pageintegernopage id, or "all"; default the current page
querystringnoread by the command beside its listed parameters
serverstringnoread by the command beside its listed parameters

Call through design_run

text
design_run {
  "path": "<file>.kdesign",
  "steps": [{ "command": "annotation.list" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: assets, category, id, ids, page, query, server. design_run answers the step’s result in completed[i].result.

Result

Result of annotation.list
NameTypeRequiredDescription
annotationsany[]no
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "annotations": {
      "type": "array"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "assets": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "category": {
      "type": "string"
    },
    "id": {
      "description": "an id; those layers; one of several alternative parameters",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "those layers; one of several alternative parameters",
      "items": {
        "description": "an id",
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "page": {
      "description": "page id, or \"all\"; default the current page",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "query": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "server": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    }
  },
  "returns": "{annotations: [{id, name, index, label, category?: {id, name, color}, properties: [{property, label, value (null when the layer has none), token?, color?}]}]}",
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (design_commands through @kition/[email protected], built from KitionAI/kition-design@abc7e16). As data: commands.jsonl.