{
  "protocol": "device",
  "imports": [
    {
      "path": "common.avdl",
      "type": "idl"
    }
  ],
  "types": [
    {
      "type": "record",
      "name": "DeviceDetail",
      "fields": [
        {
          "type": "Device",
          "name": "device"
        },
        {
          "type": "boolean",
          "name": "eldest"
        },
        {
          "type": [
            null,
            "Device"
          ],
          "name": "provisioner"
        },
        {
          "type": [
            null,
            "Time"
          ],
          "name": "provisionedAt"
        },
        {
          "type": [
            null,
            "Time"
          ],
          "name": "revokedAt"
        },
        {
          "type": "KID",
          "name": "revokedBy"
        },
        {
          "type": [
            null,
            "Device"
          ],
          "name": "revokedByDevice"
        },
        {
          "type": "boolean",
          "name": "currentDevice"
        }
      ]
    }
  ],
  "messages": {
    "deviceList": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": {
        "type": "array",
        "items": "Device"
      },
      "doc": "List devices for the user."
    },
    "deviceHistoryList": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": {
        "type": "array",
        "items": "DeviceDetail"
      },
      "doc": "List all devices with detailed history and status information."
    },
    "deviceAdd": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": null,
      "doc": "Starts the process of adding a new device using an existing\n    device.  It is called on the existing device.\n    This is for kex2."
    },
    "checkDeviceNameFormat": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "name",
          "type": "string"
        }
      ],
      "response": "boolean",
      "doc": "Checks the device name format."
    }
  },
  "namespace": "keybase.1"
}