{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/figma/json-schema/figma-variable-collection-change-schema.json",
  "title": "VariableCollectionChange",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/figma-variables-api-openapi.yml#/components/schemas/VariableCollectionChange",
  "oneOf": [
    {
      "$ref": "#/$defs/VariableCollectionCreate"
    },
    {
      "$ref": "#/$defs/VariableCollectionUpdate"
    },
    {
      "$ref": "#/$defs/VariableCollectionDelete"
    }
  ],
  "$defs": {
    "VariableCollectionCreate": {
      "type": "object",
      "description": "An object that contains details about creating a `VariableCollection`.",
      "properties": {
        "action": {
          "type": "string",
          "description": "The action to perform for the variable collection.",
          "enum": [
            "CREATE"
          ]
        },
        "id": {
          "type": "string",
          "description": "A temporary id for this variable collection."
        },
        "name": {
          "type": "string",
          "description": "The name of this variable collection."
        },
        "initialModeId": {
          "type": "string",
          "description": "The initial mode refers to the mode that is created by default. You can set a temporary id here, in order to reference this mode later in this request."
        },
        "hiddenFromPublishing": {
          "type": "boolean",
          "description": "Whether this variable collection is hidden when publishing the current file as a library.",
          "default": false
        },
        "parentVariableCollectionId": {
          "type": "string",
          "description": "The id of the parent variable collection that this variable collection is extending from."
        },
        "initialModeIdToParentModeIdMapping": {
          "type": "object",
          "description": "Maps inherited modes from the parent variable collection to the initial mode ids on the extended variable collection.",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "action",
        "name"
      ]
    },
    "VariableCollectionDelete": {
      "type": "object",
      "description": "An object that contains details about deleting a `VariableCollection`.",
      "properties": {
        "action": {
          "type": "string",
          "description": "The action to perform for the variable collection.",
          "enum": [
            "DELETE"
          ]
        },
        "id": {
          "type": "string",
          "description": "The id of the variable collection to delete."
        }
      },
      "required": [
        "action",
        "id"
      ]
    },
    "VariableCollectionUpdate": {
      "type": "object",
      "description": "An object that contains details about updating a `VariableCollection`.",
      "properties": {
        "action": {
          "type": "string",
          "description": "The action to perform for the variable collection.",
          "enum": [
            "UPDATE"
          ]
        },
        "id": {
          "type": "string",
          "description": "The id of the variable collection to update."
        },
        "name": {
          "type": "string",
          "description": "The name of this variable collection."
        },
        "hiddenFromPublishing": {
          "type": "boolean",
          "description": "Whether this variable collection is hidden when publishing the current file as a library.",
          "default": false
        }
      },
      "required": [
        "action",
        "id"
      ]
    }
  }
}