{
  "protocol": "config",
  "imports": [
    {
      "path": "common.avdl",
      "type": "idl"
    }
  ],
  "types": [
    {
      "type": "record",
      "name": "GetCurrentStatusRes",
      "fields": [
        {
          "type": "boolean",
          "name": "configured"
        },
        {
          "type": "boolean",
          "name": "registered"
        },
        {
          "type": "boolean",
          "name": "loggedIn"
        },
        {
          "type": "boolean",
          "name": "sessionIsValid"
        },
        {
          "type": [
            null,
            "User"
          ],
          "name": "user"
        }
      ]
    },
    {
      "type": "record",
      "name": "SessionStatus",
      "fields": [
        {
          "type": "string",
          "name": "SessionFor",
          "lint": "ignore"
        },
        {
          "type": "boolean",
          "name": "Loaded",
          "lint": "ignore"
        },
        {
          "type": "boolean",
          "name": "Cleared",
          "lint": "ignore"
        },
        {
          "type": "boolean",
          "name": "SaltOnly",
          "lint": "ignore"
        },
        {
          "type": "boolean",
          "name": "Expired",
          "lint": "ignore"
        }
      ]
    },
    {
      "type": "record",
      "name": "ClientDetails",
      "fields": [
        {
          "type": "int",
          "name": "pid"
        },
        {
          "type": "ClientType",
          "name": "clientType"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "argv"
        },
        {
          "type": "string",
          "name": "desc"
        },
        {
          "type": "string",
          "name": "version"
        }
      ]
    },
    {
      "type": "record",
      "name": "PlatformInfo",
      "fields": [
        {
          "type": "string",
          "name": "os"
        },
        {
          "type": "string",
          "name": "osVersion"
        },
        {
          "type": "string",
          "name": "arch"
        },
        {
          "type": "string",
          "name": "goVersion"
        }
      ]
    },
    {
      "type": "record",
      "name": "LoadDeviceErr",
      "fields": [
        {
          "type": "string",
          "name": "where"
        },
        {
          "type": "string",
          "name": "desc"
        }
      ]
    },
    {
      "type": "record",
      "name": "ExtendedStatus",
      "fields": [
        {
          "type": "boolean",
          "name": "standalone"
        },
        {
          "type": "boolean",
          "name": "passphraseStreamCached"
        },
        {
          "type": "boolean",
          "name": "tsecCached"
        },
        {
          "type": "boolean",
          "name": "deviceSigKeyCached"
        },
        {
          "type": "boolean",
          "name": "deviceEncKeyCached"
        },
        {
          "type": "boolean",
          "name": "paperSigKeyCached"
        },
        {
          "type": "boolean",
          "name": "paperEncKeyCached"
        },
        {
          "type": "boolean",
          "name": "storedSecret"
        },
        {
          "type": "boolean",
          "name": "secretPromptSkip"
        },
        {
          "type": [
            null,
            "Device"
          ],
          "name": "device"
        },
        {
          "type": [
            null,
            "LoadDeviceErr"
          ],
          "name": "deviceErr"
        },
        {
          "type": "string",
          "name": "logDir"
        },
        {
          "type": [
            null,
            "SessionStatus"
          ],
          "name": "session"
        },
        {
          "type": "string",
          "name": "defaultUsername"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "provisionedUsernames"
        },
        {
          "type": {
            "type": "array",
            "items": "ClientDetails"
          },
          "name": "Clients",
          "lint": "ignore"
        },
        {
          "type": "PlatformInfo",
          "name": "platformInfo"
        },
        {
          "type": "DeviceID",
          "name": "defaultDeviceID"
        }
      ]
    },
    {
      "type": "enum",
      "name": "ForkType",
      "symbols": [
        "NONE_0",
        "AUTO_1",
        "WATCHDOG_2",
        "LAUNCHD_3"
      ]
    },
    {
      "type": "record",
      "name": "Config",
      "fields": [
        {
          "type": "string",
          "name": "serverURI"
        },
        {
          "type": "string",
          "name": "socketFile"
        },
        {
          "type": "string",
          "name": "label"
        },
        {
          "type": "string",
          "name": "runMode"
        },
        {
          "type": "boolean",
          "name": "gpgExists"
        },
        {
          "type": "string",
          "name": "gpgPath"
        },
        {
          "type": "string",
          "name": "version"
        },
        {
          "type": "string",
          "name": "path"
        },
        {
          "type": "string",
          "name": "configPath"
        },
        {
          "type": "string",
          "name": "versionShort"
        },
        {
          "type": "string",
          "name": "versionFull"
        },
        {
          "type": "boolean",
          "name": "isAutoForked"
        },
        {
          "type": "ForkType",
          "name": "forkType"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConfigValue",
      "fields": [
        {
          "type": "boolean",
          "name": "isNull"
        },
        {
          "type": [
            null,
            "boolean"
          ],
          "name": "b"
        },
        {
          "type": [
            null,
            "int"
          ],
          "name": "i"
        },
        {
          "type": [
            null,
            "string"
          ],
          "name": "s"
        },
        {
          "type": [
            null,
            "string"
          ],
          "name": "o"
        }
      ]
    },
    {
      "type": "record",
      "name": "OutOfDateInfo",
      "fields": [
        {
          "type": "string",
          "name": "upgradeTo"
        },
        {
          "type": "string",
          "name": "upgradeURI"
        },
        {
          "type": "string",
          "name": "customMessage"
        },
        {
          "type": "long",
          "name": "criticalClockSkew"
        }
      ]
    }
  ],
  "messages": {
    "getCurrentStatus": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": "GetCurrentStatusRes"
    },
    "getExtendedStatus": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": "ExtendedStatus"
    },
    "getConfig": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": "Config"
    },
    "setUserConfig": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "username",
          "type": "string"
        },
        {
          "name": "key",
          "type": "string"
        },
        {
          "name": "value",
          "type": "string"
        }
      ],
      "response": null,
      "doc": "Change user config.\n    For example, to update primary picture source:\n      key=picture.source, value=twitter (or github)"
    },
    "setPath": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "path",
          "type": "string"
        }
      ],
      "response": null
    },
    "helloIAm": {
      "request": [
        {
          "name": "details",
          "type": "ClientDetails"
        }
      ],
      "response": null
    },
    "setValue": {
      "request": [
        {
          "name": "path",
          "type": "string"
        },
        {
          "name": "value",
          "type": "ConfigValue"
        }
      ],
      "response": null
    },
    "clearValue": {
      "request": [
        {
          "name": "path",
          "type": "string"
        }
      ],
      "response": null
    },
    "getValue": {
      "request": [
        {
          "name": "path",
          "type": "string"
        }
      ],
      "response": "ConfigValue"
    },
    "checkAPIServerOutOfDateWarning": {
      "request": [],
      "response": "OutOfDateInfo",
      "doc": "Check whether the API server has told us we're out of date."
    },
    "waitForClient": {
      "request": [
        {
          "name": "clientType",
          "type": "ClientType"
        },
        {
          "name": "timeout",
          "type": "DurationSec"
        }
      ],
      "response": "boolean",
      "doc": "Wait for client type to connect to service."
    }
  },
  "namespace": "keybase.1"
}