Skip to content

Operations reference

Generated from the zod schemas of the first-party plugins. Every op carries type, id and an optional at; unknown fields are rejected.

finetune (stage color, order 100, v1)

finetune.set

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "finetune.set"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "params": {
      "type": "object",
      "properties": {
        "brightness": {
          "type": "number",
          "minimum": -1,
          "maximum": 1
        },
        "contrast": {
          "type": "number",
          "minimum": -1,
          "maximum": 1
        },
        "saturation": {
          "type": "number",
          "minimum": -1,
          "maximum": 1
        },
        "exposure": {
          "type": "number",
          "minimum": -3,
          "maximum": 3
        },
        "gamma": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 10
        },
        "clarity": {
          "type": "number",
          "minimum": -1,
          "maximum": 1
        },
        "vignette": {
          "type": "number",
          "minimum": -1,
          "maximum": 1
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "type",
    "id",
    "params"
  ],
  "additionalProperties": false
}

finetune.reset

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "finetune.reset"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

filter (stage color, order 110, v1)

filter.set

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "filter.set"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "preset": {
      "type": [
        "string",
        "null"
      ]
    },
    "matrix": {
      "type": "array",
      "prefixItems": [
        {
          "type": "array",
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "items": false,
          "minItems": 5,
          "maxItems": 5
        },
        {
          "type": "array",
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "items": false,
          "minItems": 5,
          "maxItems": 5
        },
        {
          "type": "array",
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "items": false,
          "minItems": 5,
          "maxItems": 5
        },
        {
          "type": "array",
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "items": false,
          "minItems": 5,
          "maxItems": 5
        }
      ],
      "items": false,
      "minItems": 4,
      "maxItems": 4
    },
    "strength": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    }
  },
  "required": [
    "type",
    "id",
    "preset"
  ],
  "additionalProperties": false
}

redact (stage redact, order 200, v1)

redact.add

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "redact.add"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "region": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "rect"
            },
            "rect": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "y": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "width": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                },
                "height": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "x",
                "y",
                "width",
                "height"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "kind",
            "rect"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "path"
            },
            "points": {
              "minItems": 3,
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              }
            }
          },
          "required": [
            "kind",
            "points"
          ],
          "additionalProperties": false
        }
      ]
    },
    "mode": {
      "type": "string",
      "enum": [
        "pixelate",
        "blur"
      ]
    },
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 4096
    },
    "regionId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "type",
    "id",
    "region",
    "mode",
    "amount"
  ],
  "additionalProperties": false
}

redact.update

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "redact.update"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "regionId": {
      "type": "string",
      "minLength": 1
    },
    "region": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "rect"
            },
            "rect": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "y": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "width": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                },
                "height": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "x",
                "y",
                "width",
                "height"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "kind",
            "rect"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "path"
            },
            "points": {
              "minItems": 3,
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              }
            }
          },
          "required": [
            "kind",
            "points"
          ],
          "additionalProperties": false
        }
      ]
    },
    "mode": {
      "type": "string",
      "enum": [
        "pixelate",
        "blur"
      ]
    },
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 4096
    }
  },
  "required": [
    "type",
    "id",
    "regionId"
  ],
  "additionalProperties": false
}

redact.remove

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "redact.remove"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "regionId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "type",
    "id",
    "regionId"
  ],
  "additionalProperties": false
}

redact.clear

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "redact.clear"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

annotate (stage annotate, order 300, v1)

annotate.add

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "annotate.add"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "shape": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "rect"
            },
            "rect": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "width": {
                  "type": "number",
                  "minimum": 0
                },
                "height": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "x",
                "y",
                "width",
                "height"
              ],
              "additionalProperties": false
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            },
            "fill": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            },
            "radius": {
              "type": "number",
              "minimum": 0,
              "maximum": 4096
            }
          },
          "required": [
            "kind",
            "rect"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "ellipse"
            },
            "rect": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "width": {
                  "type": "number",
                  "minimum": 0
                },
                "height": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "x",
                "y",
                "width",
                "height"
              ],
              "additionalProperties": false
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            },
            "fill": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            }
          },
          "required": [
            "kind",
            "rect"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "line"
            },
            "from": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "to": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "kind",
            "from",
            "to",
            "stroke"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "arrow"
            },
            "from": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "to": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            },
            "head": {
              "type": "number",
              "minimum": 0,
              "maximum": 4096
            }
          },
          "required": [
            "kind",
            "from",
            "to",
            "stroke"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "path"
            },
            "points": {
              "minItems": 2,
              "maxItems": 5000,
              "type": "array",
              "items": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              }
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            },
            "closed": {
              "type": "boolean"
            },
            "fill": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            }
          },
          "required": [
            "kind",
            "points",
            "stroke"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "text"
            },
            "rect": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "width": {
                  "type": "number",
                  "minimum": 0
                },
                "height": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "x",
                "y",
                "width",
                "height"
              ],
              "additionalProperties": false
            },
            "text": {
              "type": "string",
              "maxLength": 10000
            },
            "font": {
              "type": "string",
              "minLength": 1
            },
            "size": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 4096
            },
            "color": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            },
            "align": {
              "type": "string",
              "enum": [
                "left",
                "center",
                "right"
              ]
            },
            "lineHeight": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 10
            },
            "background": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            },
            "padding": {
              "type": "number",
              "minimum": 0,
              "maximum": 4096
            }
          },
          "required": [
            "kind",
            "rect",
            "text",
            "font",
            "size",
            "color"
          ],
          "additionalProperties": false
        }
      ]
    },
    "shapeId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "type",
    "id",
    "shape"
  ],
  "additionalProperties": false
}

annotate.update

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "annotate.update"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "shapeId": {
      "type": "string",
      "minLength": 1
    },
    "shape": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "rect"
            },
            "rect": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "width": {
                  "type": "number",
                  "minimum": 0
                },
                "height": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "x",
                "y",
                "width",
                "height"
              ],
              "additionalProperties": false
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            },
            "fill": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            },
            "radius": {
              "type": "number",
              "minimum": 0,
              "maximum": 4096
            }
          },
          "required": [
            "kind",
            "rect"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "ellipse"
            },
            "rect": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "width": {
                  "type": "number",
                  "minimum": 0
                },
                "height": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "x",
                "y",
                "width",
                "height"
              ],
              "additionalProperties": false
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            },
            "fill": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            }
          },
          "required": [
            "kind",
            "rect"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "line"
            },
            "from": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "to": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "kind",
            "from",
            "to",
            "stroke"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "arrow"
            },
            "from": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "to": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            },
            "head": {
              "type": "number",
              "minimum": 0,
              "maximum": 4096
            }
          },
          "required": [
            "kind",
            "from",
            "to",
            "stroke"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "path"
            },
            "points": {
              "minItems": 2,
              "maxItems": 5000,
              "type": "array",
              "items": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "items": false,
                "minItems": 2,
                "maxItems": 2
              }
            },
            "stroke": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 4,
                  "maxItems": 4
                },
                "width": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 4096
                }
              },
              "required": [
                "color",
                "width"
              ],
              "additionalProperties": false
            },
            "closed": {
              "type": "boolean"
            },
            "fill": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            }
          },
          "required": [
            "kind",
            "points",
            "stroke"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "text"
            },
            "rect": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "width": {
                  "type": "number",
                  "minimum": 0
                },
                "height": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "x",
                "y",
                "width",
                "height"
              ],
              "additionalProperties": false
            },
            "text": {
              "type": "string",
              "maxLength": 10000
            },
            "font": {
              "type": "string",
              "minLength": 1
            },
            "size": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 4096
            },
            "color": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            },
            "align": {
              "type": "string",
              "enum": [
                "left",
                "center",
                "right"
              ]
            },
            "lineHeight": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 10
            },
            "background": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            },
            "padding": {
              "type": "number",
              "minimum": 0,
              "maximum": 4096
            }
          },
          "required": [
            "kind",
            "rect",
            "text",
            "font",
            "size",
            "color"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "type",
    "id",
    "shapeId",
    "shape"
  ],
  "additionalProperties": false
}

annotate.remove

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "annotate.remove"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "shapeId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "type",
    "id",
    "shapeId"
  ],
  "additionalProperties": false
}

annotate.reorder

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "annotate.reorder"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "order": {
      "maxItems": 10000,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "type",
    "id",
    "order"
  ],
  "additionalProperties": false
}

annotate.clear

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "annotate.clear"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

crop (stage crop, order 400, v1)

crop.set

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "crop.set"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "rotation": {
      "type": "number"
    },
    "mask": {
      "type": "string",
      "enum": [
        "none",
        "circle"
      ]
    },
    "flipX": {
      "type": "boolean"
    },
    "flipY": {
      "type": "boolean"
    },
    "rect": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "y": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "width": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1
        },
        "height": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "x",
        "y",
        "width",
        "height"
      ],
      "additionalProperties": false
    },
    "aspect": {
      "anyOf": [
        {
          "type": "number",
          "exclusiveMinimum": 0
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

crop.reset

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "crop.reset"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

fill (stage crop, order 410, v1)

fill.set

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "fill.set"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "color": {
      "anyOf": [
        {
          "type": "array",
          "prefixItems": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          ],
          "items": false,
          "minItems": 4,
          "maxItems": 4
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "type",
    "id",
    "color"
  ],
  "additionalProperties": false
}

sticker (stage sticker, order 500, v1)

sticker.add

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "sticker.add"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "asset": {
      "type": "string",
      "minLength": 1
    },
    "rect": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "width": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "height": {
          "type": "number",
          "exclusiveMinimum": 0
        }
      },
      "required": [
        "x",
        "y",
        "width",
        "height"
      ],
      "additionalProperties": false
    },
    "rotation": {
      "type": "number"
    },
    "opacity": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "flipX": {
      "type": "boolean"
    },
    "flipY": {
      "type": "boolean"
    },
    "itemId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "type",
    "id",
    "asset",
    "rect"
  ],
  "additionalProperties": false
}

sticker.update

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "sticker.update"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "itemId": {
      "type": "string",
      "minLength": 1
    },
    "rect": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "width": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "height": {
          "type": "number",
          "exclusiveMinimum": 0
        }
      },
      "required": [
        "x",
        "y",
        "width",
        "height"
      ],
      "additionalProperties": false
    },
    "rotation": {
      "type": "number"
    },
    "opacity": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "flipX": {
      "type": "boolean"
    },
    "flipY": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "id",
    "itemId"
  ],
  "additionalProperties": false
}

sticker.remove

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "sticker.remove"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "itemId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "type",
    "id",
    "itemId"
  ],
  "additionalProperties": false
}

sticker.clear

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "sticker.clear"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

frame (stage frame, order 600, v1)

frame.set

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "frame.set"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "style": {
      "type": "string",
      "enum": [
        "solid",
        "inset",
        "polaroid"
      ]
    },
    "color": {
      "type": "array",
      "prefixItems": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      ],
      "items": false,
      "minItems": 4,
      "maxItems": 4
    },
    "thickness": {
      "type": "number",
      "minimum": 0,
      "maximum": 4096
    },
    "radius": {
      "type": "number",
      "minimum": 0,
      "maximum": 4096
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

frame.clear

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "frame.clear"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

watermark (stage watermark, order 700, v1)

watermark.set

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "watermark.set"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "source": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "asset"
            },
            "asset": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "asset"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "text"
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "font": {
              "type": "string",
              "minLength": 1
            },
            "color": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            }
          },
          "required": [
            "kind",
            "text",
            "font",
            "color"
          ],
          "additionalProperties": false
        }
      ]
    },
    "anchor": {
      "type": "string",
      "enum": [
        "tl",
        "tc",
        "tr",
        "cl",
        "c",
        "cr",
        "bl",
        "bc",
        "br"
      ]
    },
    "margin": {
      "type": "number",
      "minimum": 0,
      "maximum": 4096
    },
    "scale": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 4
    },
    "opacity": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "tile": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "gapX": {
              "type": "number",
              "minimum": 0,
              "maximum": 4096
            },
            "gapY": {
              "type": "number",
              "minimum": 0,
              "maximum": 4096
            },
            "rotation": {
              "type": "number"
            }
          },
          "required": [
            "gapX",
            "gapY",
            "rotation"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

watermark.clear

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "watermark.clear"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

resize (stage resize, order 800, v1)

resize.set

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "resize.set"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    },
    "width": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 65535
        },
        {
          "type": "null"
        }
      ]
    },
    "height": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 65535
        },
        {
          "type": "null"
        }
      ]
    },
    "fit": {
      "type": "string",
      "enum": [
        "contain",
        "cover",
        "fill"
      ]
    },
    "upscale": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}

resize.clear

json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "resize.clear"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "id"
  ],
  "additionalProperties": false
}