{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-content-fragment-tree-result-schema.json",
  "title": "ContentFragmentTreeResult",
  "description": "Tree and map representation of references. The tree representation is utilising the references stored in the map.\n",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-aem-sites-openapi.yml#/components/schemas/ContentFragmentTreeResult",
  "type": "object",
  "properties": {
    "items": {
      "description": "A tree representation of references.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/PointerReference"
      }
    },
    "references": {
      "description": "Map of hydrated references with ids represented as UUID, Urn or Path, depending on the Resource type.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/FlatReference"
      }
    }
  },
  "$defs": {
    "AuthoringInfo": {
      "readOnly": true,
      "type": "object",
      "description": "Provides details about an authoring operation (e.g. user and date).",
      "properties": {
        "at": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time of the operation."
        },
        "by": {
          "type": "string",
          "description": "The identifier of the user who performed the operation."
        },
        "fullName": {
          "type": "string",
          "description": "The full name of the user who performed the operation."
        },
        "firstName": {
          "type": "string",
          "description": "The first name of the user who performed the operation."
        },
        "lastName": {
          "type": "string",
          "description": "The last name of the user who performed the operation."
        }
      }
    },
    "ContentFragmentStatus": {
      "description": "Status of a Resource",
      "type": "string",
      "readOnly": true,
      "enum": [
        "NEW",
        "DRAFT",
        "PUBLISHED",
        "MODIFIED",
        "UNPUBLISHED"
      ]
    },
    "FlatReference": {
      "type": "object",
      "description": "Core information about referenced resources.",
      "properties": {
        "name": {
          "description": "Item name",
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ReferenceType"
        },
        "title": {
          "type": "string",
          "description": "Reference title."
        },
        "path": {
          "$ref": "#/$defs/Path"
        },
        "created": {
          "$ref": "#/$defs/AuthoringInfo"
        },
        "modified": {
          "$ref": "#/$defs/AuthoringInfo"
        },
        "published": {
          "$ref": "#/$defs/AuthoringInfo"
        },
        "status": {
          "$ref": "#/$defs/ContentFragmentStatus"
        },
        "previewReplicationStatus": {
          "$ref": "#/$defs/PreviewReplicationStatus"
        },
        "previewStatus": {
          "$ref": "#/$defs/PreviewStatus"
        }
      },
      "required": [
        "type",
        "path"
      ]
    },
    "Path": {
      "type": "string",
      "pattern": "^[^\\\\\\[\\]|*]*$",
      "description": "A valid path to a resource"
    },
    "PointerReference": {
      "type": "object",
      "description": "A reference that contains the `fieldName` and a JSON Pointer to the hydrated reference.",
      "properties": {
        "fieldName": {
          "description": "Name of the field that contains the reference.",
          "type": "string",
          "minLength": 1
        },
        "identifier": {
          "description": "The key where the hydrated reference is stored at - this can pe a UUID, URN or Path.",
          "type": "string",
          "minLength": 1
        },
        "pointerReferences": {
          "type": "array",
          "description": "An array containing inner references.",
          "items": {
            "$ref": "#/$defs/PointerReference"
          }
        }
      },
      "required": [
        "fieldName",
        "identifier"
      ]
    },
    "PreviewReplicationStatus": {
      "description": "The preview replication status of a resource, which can also act as a a filtering criterion that allows users \nto select resources based on their replication status. The following options are available:\n  * `PUBLISHED` - the resource is published\n  * `UNPUBLISHED` - the resource was published and then later unpublished\n  * `MODIFIED` - the resource was published and then later modified on the author\n  * `NEVER_PUBLISHED` - the resource has never been published\n",
      "type": "string",
      "readOnly": true,
      "enum": [
        "PUBLISHED",
        "UNPUBLISHED",
        "MODIFIED",
        "NEVER_PUBLISHED"
      ],
      "x-audience": "cloud"
    },
    "PreviewStatus": {
      "type": "string",
      "x-audience": "cloud",
      "deprecated": true,
      "enum": [
        "IN_SYNC",
        "OUT_OF_SYNC"
      ],
      "readOnly": true
    },
    "ReferenceType": {
      "type": "string",
      "description": "Type of referenced resource",
      "enum": [
        "content-fragment",
        "experience-fragment",
        "asset",
        "page"
      ]
    }
  }
}