1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// Namespace: "keybase.1"
// Protocol: "identifyCommon"
#![allow(dead_code)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::{Serialize, Deserialize};
use serde_repr::{Deserialize_repr, Serialize_repr};use super::*;

use super::common::*;
use super::prove_common::*;
pub type TrackToken = String;

pub type SigVersion = i32;

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum TrackDiffType {
  None_0,
  Error_1,
  Clash_2,
  Revoked_3,
  Upgraded_4,
  New_5,
  Remote_fail_6,
  Remote_working_7,
  Remote_changed_8,
  New_eldest_9,
  None_via_temporary_10,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct TrackDiff {
  #[serde(rename = "type")]
  pub ty: Option<TrackDiffType>,
  #[serde(default)]
  pub displayMarkup: Option<String>,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct TrackSummary {
  #[serde(default)]
  pub username: Option<String>,
  pub time: Option<Time>,
  #[serde(default)]
  pub isRemote: Option<bool>,
}

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum TrackStatus {
  New_ok_1,
  New_zero_proofs_2,
  New_fail_proofs_3,
  Update_broken_failed_proofs_4,
  Update_new_proofs_5,
  Update_ok_6,
  Update_broken_revoked_7,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct TrackOptions {
  #[serde(default)]
  pub localOnly: Option<bool>,
  #[serde(default)]
  pub bypassConfirm: Option<bool>,
  #[serde(default)]
  pub forceRetrack: Option<bool>,
  #[serde(default)]
  pub expiringLocal: Option<bool>,
  #[serde(default)]
  pub forPGPPull: Option<bool>,
  pub sigVersion: Option<SigVersion>,
}

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum IdentifyReasonType {
  None_0,
  Id_1,
  Track_2,
  Encrypt_3,
  Decrypt_4,
  Verify_5,
  Resource_6,
  Background_7,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct IdentifyReason {
  #[serde(rename = "type")]
  pub ty: Option<IdentifyReasonType>,
  #[serde(default)]
  pub reason: Option<String>,
  #[serde(default)]
  pub resource: Option<String>,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct IdentifyOutcome {
  #[serde(default)]
  pub username: Option<String>,
  pub status: Option<Status>,
  #[serde(default)]
  pub warnings: Option<Vec<String>>,
  pub trackUsed: Option<TrackSummary>,
  pub trackStatus: Option<TrackStatus>,
  pub numTrackFailures: Option<i32>,
  pub numTrackChanges: Option<i32>,
  pub numProofFailures: Option<i32>,
  pub numRevoked: Option<i32>,
  pub numProofSuccesses: Option<i32>,
  #[serde(default)]
  pub revoked: Option<Vec<TrackDiff>>,
  pub trackOptions: Option<TrackOptions>,
  #[serde(default)]
  pub forPGPPull: Option<bool>,
  pub reason: Option<IdentifyReason>,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct RemoteProof {
  pub proofType: Option<ProofType>,
  #[serde(default)]
  pub key: Option<String>,
  #[serde(default)]
  pub value: Option<String>,
  #[serde(default)]
  pub displayMarkup: Option<String>,
  pub sigID: Option<SigID>,
  pub mTime: Option<Time>,
}