{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/RepositoryObject",
  "title": "RepositoryObject",
  "type": "object",
  "description": "A file or folder in the Control Room repository",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "description": "Unique numeric identifier of the repository object"
    },
    "parentId": {
      "type": "integer",
      "format": "int64",
      "description": "ID of the parent folder containing this object"
    },
    "name": {
      "type": "string",
      "description": "Display name of the file or folder"
    },
    "path": {
      "type": "string",
      "description": "Full repository path from the workspace root"
    },
    "type": {
      "type": "string",
      "description": "Type of repository object",
      "enum": [
        "FILE",
        "FOLDER",
        "BOT"
      ]
    },
    "size": {
      "type": "integer",
      "format": "int64",
      "description": "File size in bytes (0 for folders)"
    },
    "version": {
      "type": "integer",
      "description": "Version number of the file (for versioned bot files)"
    },
    "lastModifiedBy": {
      "type": "string",
      "description": "Username of the user who last modified this object"
    },
    "lastModifiedOn": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp of the last modification"
    },
    "createdBy": {
      "type": "string",
      "description": "Username of the user who created this object"
    },
    "createdOn": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the object was created"
    },
    "workspaceType": {
      "type": "string",
      "description": "Workspace containing this object",
      "enum": [
        "PUBLIC",
        "PRIVATE"
      ]
    },
    "permission": {
      "$ref": "#/components/schemas/ObjectPermission"
    }
  }
}