{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-device-patched-schema.json",
  "title": "Device (after patch)",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-devices-api-openapi.yml#/components/schemas/DevicePatched",
  "type": "object",
  "required": [
    "id",
    "name",
    "platform",
    "capabilities",
    "has_push_token",
    "lastSeenAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "platform": {
      "$ref": "#/$defs/DevicePlatform"
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "has_push_token": {
      "type": "boolean"
    },
    "lastSeenAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "DevicePlatform": {
      "type": "string",
      "description": "Client platform; anything else sent in `x-codai-device-platform` is stored as `agent`.",
      "enum": [
        "android",
        "ios",
        "web",
        "desktop",
        "cli",
        "agent"
      ]
    }
  }
}