-
Notifications
You must be signed in to change notification settings - Fork 0
/
teletype-client.proto
166 lines (136 loc) · 3.51 KB
/
teletype-client.proto
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
syntax = "proto3";
import "teletype-crdt.proto";
message PortalSubscriptionResponse {
map<string, uint32> site_ids_by_peer_id = 1;
reserved 2; // active_editor_proxy field is no longer supported
reserved 3; // active_buffer_proxy field is no longer supported
repeated Tether tethers = 4;
repeated BufferProxy active_buffer_proxies = 5;
repeated EditorProxy active_editor_proxies = 6;
map<uint32, uint32> active_editor_proxy_ids_by_site_id = 7;
repeated EditorProxyMetadata editor_proxies_metadata = 8;
}
message PortalUpdate {
oneof variant {
EditorProxySwitch editor_proxy_switch = 1;
SiteAssignment site_assignment = 2;
// EditorProxyRemoval editor_proxy_removal = 3; // No longer supported
Tether tether_update = 4;
EditorProxyCreation editor_proxy_creation = 5;
}
message EditorProxySwitch {
uint32 editor_proxy_id = 1;
reserved 2; // buffer_proxy_id field is no longer supported
}
message SiteAssignment {
string peer_id = 1;
uint32 site_id = 2;
}
message EditorProxyRemoval {
uint32 editor_proxy_id = 1;
}
message EditorProxyCreation {
EditorProxyMetadata editor_proxy_metadata = 1;
}
}
message Tether {
uint32 follower_site_id = 1;
uint32 leader_site_id = 2;
uint32 state = 3;
}
message EditorProxy {
uint32 id = 1;
uint32 buffer_proxy_id = 2;
map<uint32, uint32> selection_layer_ids_by_site_id = 3;
reserved 4; // tethers_by_follower_id field is no longer supported
}
message EditorProxyMetadata {
uint32 id = 1;
uint32 buffer_proxy_id = 2;
string buffer_proxy_uri = 3;
}
message EditorProxyUpdate {
oneof variant {
SelectionsUpdate selections_update = 1;
// TetherUpdate tether_update = 2; // No longer supported
}
message SelectionsUpdate {
map<uint32, uint32> selection_layer_ids_by_site_id = 1;
}
}
message BufferProxy {
uint32 id = 1;
string uri = 2;
repeated Operation operations = 3;
}
message BufferProxyUpdate {
reserved 1; // operations field is no longer supported; use OperationsUpdate instead
oneof variant {
OperationsUpdate operations_update = 2;
URIUpdate uri_update = 3;
}
message OperationsUpdate {
repeated Operation operations = 1;
}
message URIUpdate {
string uri = 1;
}
}
message RouterMessage {
oneof variant {
Notification notification = 2;
Request request = 3;
Response response = 4;
}
message Notification {
string channel_id = 1;
bytes body = 2;
}
message Request {
string channel_id = 1;
uint32 request_id = 2;
bytes body = 3;
}
message Response {
uint32 request_id = 1;
bytes body = 2;
bool ok = 3;
}
}
message NetworkMessage {
string network_id = 1;
oneof variant {
StarJoinRequest star_join_request = 2;
StarJoinResponse star_join_response = 3;
StarJoinNotification star_join_notification = 4;
StarLeaveNotification star_leave_notification = 5;
StarUnicast star_unicast = 6;
StarBroadcast star_broadcast = 7;
}
message StarJoinRequest {
string sender_id = 1;
}
message StarJoinResponse {
map<string, PeerIdentity> member_identities_by_id = 1;
}
message StarJoinNotification {
string member_id = 1;
PeerIdentity member_identity = 2;
}
message StarLeaveNotification {
string member_id = 1;
bool connection_lost = 2;
}
message StarUnicast {
string sender_id = 1;
string recipient_id = 2;
bytes body = 3;
}
message StarBroadcast {
string sender_id = 1;
bytes body = 2;
}
}
message PeerIdentity {
string login = 1;
}