{
  "protocol": "user",
  "imports": [
    {
      "path": "common.avdl",
      "type": "idl"
    }
  ],
  "types": [
    {
      "type": "record",
      "name": "Tracker",
      "fields": [
        {
          "type": "UID",
          "name": "tracker"
        },
        {
          "type": "int",
          "name": "status"
        },
        {
          "type": "Time",
          "name": "mTime"
        }
      ]
    },
    {
      "type": "record",
      "name": "TrackProof",
      "fields": [
        {
          "type": "string",
          "name": "proofType"
        },
        {
          "type": "string",
          "name": "proofName"
        },
        {
          "type": "string",
          "name": "idString"
        }
      ]
    },
    {
      "type": "record",
      "name": "WebProof",
      "fields": [
        {
          "type": "string",
          "name": "hostname"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "protocols"
        }
      ]
    },
    {
      "type": "record",
      "name": "Proofs",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "TrackProof"
          },
          "name": "social"
        },
        {
          "type": {
            "type": "array",
            "items": "WebProof"
          },
          "name": "web"
        },
        {
          "type": {
            "type": "array",
            "items": "PublicKey"
          },
          "name": "publicKeys"
        }
      ]
    },
    {
      "type": "record",
      "name": "UserSummary",
      "fields": [
        {
          "type": "UID",
          "name": "uid"
        },
        {
          "type": "string",
          "name": "username"
        },
        {
          "type": "string",
          "name": "thumbnail"
        },
        {
          "type": "int",
          "name": "idVersion"
        },
        {
          "type": "string",
          "name": "fullName"
        },
        {
          "type": "string",
          "name": "bio"
        },
        {
          "type": "Proofs",
          "name": "proofs"
        },
        {
          "type": "string",
          "name": "sigIDDisplay"
        },
        {
          "type": "Time",
          "name": "trackTime"
        }
      ]
    },
    {
      "type": "record",
      "name": "Email",
      "fields": [
        {
          "type": "string",
          "name": "email"
        },
        {
          "type": "boolean",
          "name": "isVerified"
        }
      ]
    },
    {
      "type": "record",
      "name": "UserSettings",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "Email"
          },
          "name": "emails"
        }
      ]
    },
    {
      "type": "record",
      "name": "SearchComponent",
      "fields": [
        {
          "type": "string",
          "name": "key"
        },
        {
          "type": "string",
          "name": "value"
        },
        {
          "type": "double",
          "name": "score"
        }
      ]
    },
    {
      "type": "record",
      "name": "SearchResult",
      "fields": [
        {
          "type": "UID",
          "name": "uid"
        },
        {
          "type": "string",
          "name": "username"
        },
        {
          "type": {
            "type": "array",
            "items": "SearchComponent"
          },
          "name": "components"
        },
        {
          "type": "double",
          "name": "score"
        }
      ]
    },
    {
      "type": "record",
      "name": "UserSummary2",
      "fields": [
        {
          "type": "UID",
          "name": "uid"
        },
        {
          "type": "string",
          "name": "username"
        },
        {
          "type": "string",
          "name": "thumbnail"
        },
        {
          "type": "string",
          "name": "fullName"
        },
        {
          "type": "boolean",
          "name": "isFollower"
        },
        {
          "type": "boolean",
          "name": "isFollowee"
        }
      ]
    },
    {
      "type": "record",
      "name": "UserSummary2Set",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "UserSummary2"
          },
          "name": "users"
        },
        {
          "type": "Time",
          "name": "time"
        },
        {
          "type": "int",
          "name": "version"
        }
      ]
    }
  ],
  "messages": {
    "listTrackers": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "uid",
          "type": "UID"
        }
      ],
      "response": {
        "type": "array",
        "items": "Tracker"
      }
    },
    "listTrackersByName": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "username",
          "type": "string"
        }
      ],
      "response": {
        "type": "array",
        "items": "Tracker"
      }
    },
    "listTrackersSelf": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": {
        "type": "array",
        "items": "Tracker"
      }
    },
    "loadUncheckedUserSummaries": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "uids",
          "type": {
            "type": "array",
            "items": "UID"
          }
        }
      ],
      "response": {
        "type": "array",
        "items": "UserSummary"
      },
      "doc": "Load user summaries for the supplied uids.\n    They are \"unchecked\" in that the client is not verifying the info from the server.\n    If len(uids) > 500, the first 500 will be returned."
    },
    "loadUser": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "uid",
          "type": "UID"
        }
      ],
      "response": "User",
      "doc": "Load a user from the server."
    },
    "loadUserByName": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "username",
          "type": "string"
        }
      ],
      "response": "User"
    },
    "loadUserPlusKeys": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "uid",
          "type": "UID"
        },
        {
          "name": "pollForKID",
          "type": "KID"
        }
      ],
      "response": "UserPlusKeys",
      "doc": "Load a user + device keys from the server."
    },
    "loadPublicKeys": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "uid",
          "type": "UID"
        }
      ],
      "response": {
        "type": "array",
        "items": "PublicKey"
      },
      "doc": "Load public keys for a user."
    },
    "loadMyPublicKeys": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": {
        "type": "array",
        "items": "PublicKey"
      },
      "doc": "Load my public keys (for logged in user)."
    },
    "loadMySettings": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        }
      ],
      "response": "UserSettings",
      "doc": "Load user settings (for logged in user)."
    },
    "listTracking": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "filter",
          "type": "string"
        },
        {
          "name": "assertion",
          "type": "string"
        }
      ],
      "response": {
        "type": "array",
        "items": "UserSummary"
      },
      "doc": "The list-tracking functions get verified data from the tracking statements\n    in the user's sigchain.\n\n    If assertion is empty, it will use the current logged in user."
    },
    "listTrackingJSON": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "filter",
          "type": "string"
        },
        {
          "name": "verbose",
          "type": "boolean"
        },
        {
          "name": "assertion",
          "type": "string"
        }
      ],
      "response": "string"
    },
    "search": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "query",
          "type": "string"
        }
      ],
      "response": {
        "type": "array",
        "items": "SearchResult"
      },
      "doc": "Search for users who match a given query."
    },
    "loadAllPublicKeysUnverified": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "uid",
          "type": "UID"
        }
      ],
      "response": {
        "type": "array",
        "items": "PublicKey"
      },
      "doc": "Load all the user's public keys (even those in reset key families)\n    from the server with no verification"
    },
    "listTrackers2": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "assertion",
          "type": "string"
        },
        {
          "name": "reverse",
          "type": "boolean"
        }
      ],
      "response": "UserSummary2Set"
    },
    "profileEdit": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "fullName",
          "type": "string"
        },
        {
          "name": "location",
          "type": "string"
        },
        {
          "name": "bio",
          "type": "string"
        }
      ],
      "response": null
    }
  },
  "namespace": "keybase.1"
}