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
// Namespace: "keybase.1"
// Protocol: "NotifyBadges"
#![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 crate::protocol::gregor1;
pub type ChatConversationID = String;

pub struct TeamMemberOutReset {
  pub teamname: Option<String>,
  pub username: Option<String>,
  pub uid: UID,
  pub id: gregor1::MsgID,
}

pub struct DeletedTeamInfo {
  pub teamName: Option<String>,
  pub deletedBy: Option<String>,
  pub id: gregor1::MsgID,
}

pub struct WalletAccountInfo {
  pub accountID: Option<String>,
  pub numUnread: i32,
}

pub struct ResetState {
  pub endTime: Time,
  pub active: bool,
}

pub struct BadgeState {
  // @lint("ignore")
  pub newTlfs: i32,
  pub rekeysNeeded: i32,
  pub newFollowers: i32,
  pub inboxVers: i32,
  pub homeTodoItems: i32,
  pub unverifiedEmails: i32,
  pub unverifiedPhones: i32,
  pub newDevices: Option<Vec<DeviceID>>,
  pub revokedDevices: Option<Vec<DeviceID>>,
  pub conversations: Option<Vec<BadgeConversationInfo>>,
  pub newGitRepoGlobalUniqueIDs: Option<Vec<String>>,
  pub newTeamNames: Option<Vec<String>>,
  pub deletedTeams: Option<Vec<DeletedTeamInfo>>,
  pub newTeamAccessRequests: Option<Vec<String>>,
  pub teamsWithResetUsers: Option<Vec<TeamMemberOutReset>>,
  pub unreadWalletAccounts: Option<Vec<WalletAccountInfo>>,
  pub resetState: ResetState,
}

pub struct BadgeConversationInfo {
  pub convID: ChatConversationID,
  pub badgeCounts: std::collections::HashMap<DeviceType, i32>,
  pub unreadMessages: i32,
}

// @notify("")