{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://heartcortex.ai/schemas/1.0/platform.schema.json",
  "title": "platform",
  "type": "object",
  "required": [],
  "properties": {
    "hardware": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string"
        },
        "cpu": {
          "type": "string"
        },
        "memoryBytes": {
          "type": "integer",
          "minimum": 0
        },
        "serial": {
          "type": "string",
          "x-heart-privacy": "private"
        }
      },
      "x-heart-privacy": "internal"
    },
    "os": {
      "type": "string",
      "x-heart-privacy": "internal"
    },
    "power": {
      "type": "object",
      "properties": {
        "source": {
          "enum": [
            "mains",
            "battery",
            "solar",
            "poe",
            "other"
          ]
        },
        "batteryPct": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Battery charge, in percent (0 to 100)."
        },
        "lowPower": {
          "type": "boolean"
        }
      },
      "x-heart-privacy": "internal"
    },
    "network": {
      "type": "object",
      "properties": {
        "connected": {
          "type": "boolean"
        },
        "kind": {
          "type": "string"
        },
        "signalDbm": {
          "type": "number",
          "description": "Received signal strength of a radio link, in dBm."
        }
      },
      "x-heart-privacy": "internal"
    },
    "clock": {
      "type": "object",
      "properties": {
        "synced": {
          "type": "boolean"
        },
        "source": {
          "type": "string"
        },
        "driftMs": {
          "type": "number",
          "description": "Local clock minus the time source, in milliseconds (positive: local clock is ahead)."
        }
      },
      "x-heart-privacy": "internal"
    },
    "location": {
      "type": "object",
      "x-heart-privacy": "private"
    },
    "ext": {
      "$ref": "common.schema.json#/$defs/ext",
      "x-heart-privacy": "private"
    }
  }
}
