{
  "protocol": "rekey",
  "imports": [
    {
      "path": "common.avdl",
      "type": "idl"
    }
  ],
  "types": [
    {
      "type": "record",
      "name": "TLF",
      "fields": [
        {
          "type": "TLFID",
          "name": "id"
        },
        {
          "type": "string",
          "name": "name"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "writers"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "readers"
        },
        {
          "type": "boolean",
          "name": "isPrivate"
        }
      ]
    },
    {
      "type": "record",
      "name": "ProblemTLF",
      "fields": [
        {
          "type": "TLF",
          "name": "tlf"
        },
        {
          "type": "int",
          "name": "score"
        },
        {
          "type": {
            "type": "array",
            "items": "KID"
          },
          "name": "solution_kids"
        }
      ]
    },
    {
      "type": "record",
      "name": "ProblemSet",
      "fields": [
        {
          "type": "User",
          "name": "user"
        },
        {
          "type": "KID",
          "name": "kid"
        },
        {
          "type": {
            "type": "array",
            "items": "ProblemTLF"
          },
          "name": "tlfs"
        }
      ],
      "doc": "ProblemSet is for a particular (user,kid) that initiated a rekey problem.\n   This problem consists of one or more problem TLFs, which are individually scored\n   and have attendant solutions --- devices that if they came online can rekey and\n   solve the ProblemTLF."
    },
    {
      "type": "record",
      "name": "ProblemSetDevices",
      "fields": [
        {
          "type": "ProblemSet",
          "name": "problemSet"
        },
        {
          "type": {
            "type": "array",
            "items": "Device"
          },
          "name": "devices"
        }
      ]
    },
    {
      "type": "enum",
      "name": "Outcome",
      "symbols": [
        "NONE_0",
        "FIXED_1",
        "IGNORED_2"
      ]
    }
  ],
  "messages": {
    "showPendingRekeyStatus": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": null,
      "doc": "ShowPendingRekeyStatus shows either pending gregor-initiated rekey harassments\n   or nothing if none were pending."
    },
    "getPendingRekeyStatus": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": "ProblemSetDevices",
      "doc": "GetPendingRekeyStatus returns the pending ProblemSetDevices."
    },
    "debugShowRekeyStatus": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": null,
      "doc": "DebugShowRekeyStatus is used by the CLI to kick off a \"ShowRekeyStatus\" window for\n   the current user."
    },
    "rekeyStatusFinish": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": "Outcome",
      "doc": "RekeyStatusFinish is called when work is completed on a given RekeyStatus window. The Outcome\n   can be Fixed or Ignored."
    },
    "rekeySync": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "force",
          "type": "boolean"
        }
      ],
      "response": null,
      "doc": "RekeySync flushes the current rekey loop and gets to a good stopping point\n   to assert state. Good for race-free testing, not very useful in production.\n   Force overrides a long-snooze."
    }
  },
  "namespace": "keybase.1"
}