1
2@namespace("keybase.1")
3protocol NotifyTeam {
4  import idl "common.avdl";
5
6  record TeamChangeSet {
7    // Set to `true` if the membership of the team changed
8    boolean membershipChanged;
9    // Set to `true` if the key rotated. This might have happened if a user
10    // was kicked out, or left, or if a user revoked a device.
11    boolean keyRotated;
12    // Set to `true` if the team was renamed, either explicitly, or implicitly
13    // if one of its ancestors changed names
14    boolean renamed;
15    // Set to `true` if the team  has miscellaneous information updated (i.e.
16    // settings, showcasing, tars)
17    boolean misc;
18  }
19
20  // These notifications either come from API server through gregor,
21  // or are spawned locally when a team change is being made.
22  enum TeamChangedSource {
23    SERVER_0,
24    LOCAL_1,
25    LOCAL_RENAME_2 // local notification sent when subteam rename is detected
26  }
27
28  // All fields are unverified
29  void teamChangedByID(
30    TeamID teamID,
31    Seqno latestSeqno,
32    boolean implicitTeam,
33    TeamChangeSet changes,
34    Seqno latestHiddenSeqno,
35    Seqno latestOffchainSeqno,
36    TeamChangedSource source
37  ) oneway;
38
39  // All fields are unverified
40  void teamChangedByName(
41    string teamName,
42    Seqno latestSeqno,
43    boolean implicitTeam,
44    TeamChangeSet changes,
45    Seqno latestHiddenSeqno,
46    Seqno latestOffchainSeqno,
47    TeamChangedSource source
48  ) oneway;
49
50  void teamDeleted(TeamID teamID) oneway;
51
52  void teamAbandoned(TeamID teamID) oneway;
53
54  void teamExit(TeamID teamID) oneway;
55
56  void newlyAddedToTeam(TeamID teamID) oneway;
57
58  void teamRoleMapChanged(UserTeamVersion newVersion) oneway;
59
60  enum AvatarUpdateType {
61    NONE_0,
62    USER_1,
63    TEAM_2
64  }
65  void avatarUpdated(string name, array<AvatarFormat> formats, AvatarUpdateType typ) oneway;
66
67  // Sent when any information on the top-level teams tab changes
68  void teamMetadataUpdate() oneway;
69
70  void teamTreeMembershipsPartial(TeamTreeMembership membership) oneway;
71  void teamTreeMembershipsDone(TeamTreeMembershipsDoneResult result) oneway;
72}
73