{
  "protocol": "incoming",
  "imports": [],
  "types": [
    {
      "type": "record",
      "name": "SyncResult",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "InBandMessage"
          },
          "name": "msgs"
        },
        {
          "type": "bytes",
          "name": "hash"
        }
      ]
    }
  ],
  "messages": {
    "sync": {
      "request": [
        {
          "name": "uid",
          "type": "UID"
        },
        {
          "name": "deviceid",
          "type": "DeviceID"
        },
        {
          "name": "ctime",
          "type": "Time"
        }
      ],
      "response": "SyncResult"
    },
    "consumeMessage": {
      "request": [
        {
          "name": "m",
          "type": "Message"
        }
      ],
      "response": null
    },
    "consumePublishMessage": {
      "request": [
        {
          "name": "m",
          "type": "Message"
        }
      ],
      "response": null
    },
    "ping": {
      "request": [],
      "response": "string"
    },
    "version": {
      "request": [
        {
          "name": "uid",
          "type": "UID"
        }
      ],
      "response": "string"
    },
    "state": {
      "request": [
        {
          "name": "uid",
          "type": "UID"
        },
        {
          "name": "deviceid",
          "type": "DeviceID"
        },
        {
          "name": "timeOrOffset",
          "type": "TimeOrOffset"
        }
      ],
      "response": "State"
    },
    "stateByCategoryPrefix": {
      "request": [
        {
          "name": "uid",
          "type": "UID"
        },
        {
          "name": "deviceid",
          "type": "DeviceID"
        },
        {
          "name": "timeOrOffset",
          "type": "TimeOrOffset"
        },
        {
          "name": "categoryPrefix",
          "type": "Category"
        }
      ],
      "response": "State",
      "doc": "StateByCategoryPrefix loads the messages of the user's state whose\n    categories are prefixed by the given prefix"
    }
  },
  "namespace": "gregor.1"
}