{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cavuno-com/json-schema/cavuno-com-taxonomy-merge-schema.json",
  "title": "TaxonomyMerge",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cavuno-com-categories-api-openapi.yml#/components/schemas/TaxonomyMerge",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "type": "string",
      "enum": [
        "taxonomy_merge"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "category",
        "skill"
      ]
    },
    "from": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "slug"
      ],
      "description": "The term merged away. Its id no longer exists after the merge."
    },
    "into": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "slug"
      ],
      "description": "The term that survived."
    },
    "undo": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "applying",
            "ready",
            "over_cap",
            "undoing",
            "undone",
            "expired"
          ],
          "description": "`applying` while jobs are being retagged; `ready` once undo is available; `over_cap` when the merge retagged too many jobs to undo; `undoing` / `undone` after an undo; `expired` after 30 days."
        },
        "expiresAt": {
          "type": "string",
          "description": "When undo stops being available."
        },
        "restoredId": {
          "type": [
            "string",
            "null"
          ],
          "description": "After an undo, the id of the recreated term."
        }
      },
      "required": [
        "status",
        "expiresAt",
        "restoredId"
      ]
    },
    "createdAt": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "object",
    "kind",
    "from",
    "into",
    "undo",
    "createdAt"
  ]
}