{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/xtiles-app/json-schema/xtiles-app-resource-response-schema.json",
  "title": "ResourceResponse",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/xtiles-app-openapi.json#/components/schemas/ResourceResponse",
  "type": "object",
  "properties": {
    "resource_type": {
      "type": "string",
      "enum": [
        "PAGE",
        "TILE",
        "BLOCK"
      ]
    },
    "url": {
      "type": "string"
    },
    "ids": {
      "$ref": "#/$defs/ResourceIds"
    },
    "title": {
      "type": "string"
    },
    "page_title": {
      "type": "string"
    },
    "project_title": {
      "type": "string"
    },
    "access": {
      "$ref": "#/$defs/AccessInfo"
    },
    "resource_url": {
      "type": "string"
    },
    "page_url": {
      "type": "string"
    },
    "content": {
      "$ref": "#/$defs/ContentBody"
    },
    "collection": {
      "$ref": "#/$defs/CollectionSummary"
    }
  },
  "$defs": {
    "AccessInfo": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "OWNER",
            "WRITE",
            "SIMPLE_WRITE",
            "COMMENTATOR",
            "READ",
            "NO_ACCESS"
          ]
        },
        "can_edit": {
          "type": "boolean"
        }
      }
    },
    "CollectionAttributeInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "TEXT",
            "NUMBER",
            "DATE",
            "CHECKBOX",
            "SELECT",
            "MULTISELECT",
            "RELATION",
            "CREATED_TIME",
            "CREATED_BY",
            "ARCHIVED",
            "URL",
            "PERSON",
            "FILE",
            "IMAGE",
            "DUE_DATE",
            "ASSIGNEE",
            "STATUS",
            "LOCATION",
            "ROLLUP",
            "ELEMENT_COLOR",
            "MEDIA_TYPE",
            "PRIORITY",
            "SOURCE_URL",
            "UNKNOWN"
          ]
        },
        "title": {
          "type": "string"
        }
      }
    },
    "CollectionSummary": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "attributes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CollectionAttributeInfo"
          }
        },
        "views": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CollectionViewInfo"
          }
        }
      }
    },
    "CollectionViewInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "CARD",
            "BOARD",
            "CALENDAR",
            "TABLE",
            "TIMELINE",
            "FORM",
            "UNKNOWN"
          ]
        },
        "title": {
          "type": "string"
        },
        "content_url": {
          "type": "string"
        }
      }
    },
    "ContentBody": {
      "type": "object",
      "properties": {
        "format": {
          "type": "string"
        },
        "body": {
          "type": "string"
        }
      }
    },
    "ResourceIds": {
      "type": "object",
      "properties": {
        "project_id": {
          "type": "string"
        },
        "view_id": {
          "type": "string"
        },
        "tile_id": {
          "type": "string"
        },
        "block_id": {
          "type": "string"
        },
        "collection_view_id": {
          "type": "string"
        },
        "collection_element_id": {
          "type": "string"
        },
        "task_id": {
          "type": "string"
        },
        "context_view_id": {
          "type": "string"
        }
      }
    }
  }
}