{
    "description": "Defines the schema for Component.",
    "type": "object",
    "properties": {
        "libraryId": {
            "description": "The identifier of the Library that Component belongs to",
            "minLength": 3,
            "maxLength": 64,
            "type": "string"
        },
        "id": {
            "description": "The identifier of the Component",
            "minLength": 3,
            "maxLength": 64,
            "type": "string"
        },
        "collectionId": {
            "description": "The identifier of the Collection",
            "minLength": 3,
            "maxLength": 64,
            "type": "string"
        },
        "name": {
            "description": "The name of the Component.",
            "minLength": 1,
            "maxLength": 128,
            "type": "string"
        },
        "description": {
            "description": "The description of the Component.",
            "minLength": 0,
            "maxLength": 128,
            "type": "string"
        },
        "status": {
            "description": "The status of the Component",
            "enum": [
                "changed",
                "deleted",
                "draft",
                "published",
                "staged"
            ],
            "type": "string"
        },
        "versionCount": {
            "description": "The number of versions this Component has.",
            "minimum": 0,
            "type": "integer"
        },
        "stagedVersionCount": {
            "description": "The number of versions that are currently staged.",
            "minimum": 0,
            "type": "integer"
        },
        "embeddableVersionCount": {
            "description": "The number of versions that are available to be embedded.",
            "minimum": 0,
            "type": "integer"
        },
        "datasourceIds": {
            "description": "The identifiers of the datasources for this Component.",
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "createdAt": {
            "description": "The timestamp when the Component was created at",
            "type": "string",
            "format": "date-time"
        },
        "stagedAt": {
            "anyOf": [
                {
                    "description": "The timestamp when the Component was last staged at.",
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ]
        },
        "publishedAt": {
            "anyOf": [
                {
                    "description": "The timestamp when the Component was last published at.",
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ]
        },
        "modifiedAt": {
            "description": "The timestamp when the Component was last modified at",
            "type": "string",
            "format": "date-time"
        },
        "modifiedBy": {
            "description": "The User who last modified the Component",
            "type": "object",
            "properties": {},
            "additionalProperties": true
        }
    },
    "additionalProperties": false,
    "required": [
        "collectionId",
        "id",
        "libraryId",
        "name",
        "status"
    ],
    "$schema": "http://json-schema.org/draft-07/schema#"
}
