-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaxiom.proto
329 lines (240 loc) · 5.52 KB
/
axiom.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
syntax = "proto3";
import "common.proto";
package PlanProto;
message RowColLinkKey {
string sheet = 1;
uint64 sl = 2;
bool prev_not_next = 3;
bool row_not_col = 4;
}
message RowColLinkValue {
uint64 sl = 1;
}
message LabelPosKey {
string sheet = 1;
bytes label_sha1 = 2; // binary representation; size == 20 bytes
}
message LabelPosValue {
string label = 1;
// row/col will be translated. If already translated, set both to -1
int64 row = 2;
int64 col = 3;
// .. into rsl & csl
uint64 rsl = 4;
uint64 csl = 5;
}
// -> SetCellCode action using firm positions
// removed after translation to CellCodeKeySl
message CellCodeKey {
string sheet = 1;
int64 rf = 2;
int64 cf = 3;
}
// actually store cell codes in skiplist coordinates
message CellCodeKeySl {
string sheet = 1;
int64 rsl = 2;
int64 csl = 3;
}
message CellCodeValue {
string code = 1;
bytes literal_value = 3;
VType literal_vtype = 4;
string literal_metadata = 5;
bool hidden = 2;
// if set, all cells covered by this formula will have a property visibility:hidden
}
// -> SetBarrierKey action using firm positions
// removed after translation to BarrierKey
message HBarrierKey {
string sheet = 1;
int64 row = 2;
}
message HBarrierValue {
bool on = 1;
}
// -> SetBarrierKey using firm positions
// removed after translation to BarrierKey
message VBarrierKey {
string sheet = 1;
int64 col = 2;
}
message VBarrierValue {
bool on = 1;
}
// actually store barriers in skiplist coordinates
message BarrierKey {
string sheet = 1;
bool row_not_col = 2;
uint64 sl = 3;
}
message BarrierValue {
bool on = 1;
}
message DocOptionKey {
bytes name_sha1 = 1; // binary representation; size == 20 bytes
}
message DocOptionValue {
string name = 1;
string value = 2;
}
message GlobalVarKey {
string name = 1;
}
message GlobalVarValue {
Table value = 1;
}
message NodeConfigKey {
string node = 1;
string name = 2;
}
message NodeConfigValue {
string code = 1;
}
message PropertyDefKey {
string sheet = 1;
string property = 2;
}
message PropertyDefValue {
string sheet = 1;
string property = 2;
int64 priority = 3;
string topleft = 4;
string bottomright = 5;
string scode = 6;
}
message TwitPropertyDefKey {
string sheet = 1;
string twit_property = 2;
}
message TwitPropertyDefValue {
string sheet = 1;
string twit_property = 2;
int64 priority = 3;
repeated string tags = 4;
TwitPropertyVerb verb = 5;
string region = 6;
string property_code = 7;
}
message OverlayDefKey {
string overlay = 1;
}
message OverlayDefSub {
string node = 1; // '' for global var
string name = 2;
Table value = 3;
}
message OverlayDefInput {
string sheet = 1;
uint64 rsl = 2;
int64 re = 3;
uint64 csl = 4;
int64 ce = 5;
string value = 6;
VType vtype = 7;
string metadata = 8;
}
message OverlayDefValue {
bool exists = 1;
bool is_const = 2;
string error_key = 3;
repeated OverlayDefSub label_subs = 5;
repeated OverlayDefSub node_config_subs = 6;
repeated OverlayDefSub global_var_subs = 7;
repeated OverlayDefInput inputs = 8;
repeated string node_subscriptions = 9;
}
message VaultedOverlayDefKey {
string overlay = 1;
}
message OverlayHashLookupKey {
int64 hash = 1;
}
message OverlayHashLookupEntry {
string overlay = 1;
OverlayDefValue def = 2;
}
message OverlayHashLookupValue {
repeated OverlayHashLookupEntry entry = 3;
}
message NodeTypeKey {
string node = 1;
}
message NodeTypeValue {
NodeType type = 1;
}
message NodeParentKey {
string node = 1;
}
message NodeParentValue {
string name = 1;
string parent = 2;
}
message NodeStatusKey {
string node = 1;
string name = 2;
}
message OverlaidTable {
string overlay = 1;
Table value = 2;
}
message NodeStatusValue {
Table value_v = 1;
repeated OverlaidTable value_overlaid = 2;
}
// must add corresponding lines in:
// - sss/iku/axiom/convert.cpp Proto2IkuKey
// - sss/iku/axiom/foreach_axiom_key.snippet
message AxiomKey {
oneof key {
RowColLinkKey rc_link = 16;
LabelPosKey label_pos = 1;
CellCodeKey cell_code = 2;
CellCodeKeySl cell_code_sl =17;
HBarrierKey hbarrier = 3;
VBarrierKey vbarrier = 4;
BarrierKey barrier = 18;
DocOptionKey doc_option = 5;
GlobalVarKey global_var = 6;
NodeConfigKey node_config = 7;
PropertyDefKey property_def = 9;
TwitPropertyDefKey twit_property_def = 19;
OverlayDefKey overlay_def = 10;
VaultedOverlayDefKey vaulted_overlay_def = 15;
OverlayHashLookupKey overlay_hash_lookup = 14;
NodeTypeKey node_type = 11;
NodeParentKey node_parent = 12;
NodeStatusKey node_status = 13;
}
}
// must add corresponding lines in:
// - sss/iku/axiom/convert.cpp Proto2IkuValue
// - sss/iku/axiom/foreach_axiom_key.snippet
message AxiomValue {
oneof value {
RowColLinkValue rc_link = 16;
LabelPosValue label_pos = 1;
CellCodeValue cell_code = 2;
HBarrierValue hbarrier = 3;
VBarrierValue vbarrier = 4;
BarrierValue barrier = 18;
DocOptionValue doc_option = 5;
GlobalVarValue global_var = 6;
NodeConfigValue node_config = 7;
PropertyDefValue property_def = 9;
TwitPropertyDefValue twit_property_def = 19;
OverlayDefValue overlay_def = 10;
OverlayHashLookupValue overlay_hash_lookup = 14;
NodeTypeValue node_type = 11;
NodeParentValue node_parent = 12;
NodeStatusValue node_status = 13;
}
}
message AxiomKeyValue {
AxiomKey key = 1;
AxiomValue value = 2;
}
message AxiomDump {
string format = 1;
repeated AxiomKeyValue kv = 3;
}