mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
88 lines
1.8 KiB
Protocol Buffer
88 lines
1.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
import "field.proto";
|
|
|
|
message Grid {
|
|
string id = 1;
|
|
repeated FieldOrder field_orders = 2;
|
|
repeated GridBlockOrder block_orders = 3;
|
|
}
|
|
message RowOrder {
|
|
string row_id = 1;
|
|
string block_id = 2;
|
|
int32 height = 3;
|
|
}
|
|
message Row {
|
|
string id = 1;
|
|
map<string, Cell> cell_by_field_id = 2;
|
|
int32 height = 3;
|
|
}
|
|
message RepeatedRow {
|
|
repeated Row items = 1;
|
|
}
|
|
message RepeatedGridBlock {
|
|
repeated GridBlock items = 1;
|
|
}
|
|
message GridBlockOrder {
|
|
string block_id = 1;
|
|
repeated RowOrder row_orders = 2;
|
|
}
|
|
message IndexRowOrder {
|
|
RowOrder row_order = 1;
|
|
oneof one_of_index { int32 index = 2; };
|
|
}
|
|
message UpdatedRowOrder {
|
|
RowOrder row_order = 1;
|
|
Row row = 2;
|
|
}
|
|
message GridRowsChangeset {
|
|
string block_id = 1;
|
|
repeated IndexRowOrder inserted_rows = 2;
|
|
repeated RowOrder deleted_rows = 3;
|
|
repeated UpdatedRowOrder updated_rows = 4;
|
|
}
|
|
message GridBlock {
|
|
string id = 1;
|
|
repeated RowOrder row_orders = 2;
|
|
}
|
|
message Cell {
|
|
string field_id = 1;
|
|
bytes data = 2;
|
|
}
|
|
message RepeatedCell {
|
|
repeated Cell items = 1;
|
|
}
|
|
message CreateGridPayload {
|
|
string name = 1;
|
|
}
|
|
message GridId {
|
|
string value = 1;
|
|
}
|
|
message GridBlockId {
|
|
string value = 1;
|
|
}
|
|
message CreateRowPayload {
|
|
string grid_id = 1;
|
|
oneof one_of_start_row_id { string start_row_id = 2; };
|
|
}
|
|
message QueryGridBlocksPayload {
|
|
string grid_id = 1;
|
|
repeated GridBlockOrder block_orders = 2;
|
|
}
|
|
message MoveItemPayload {
|
|
string grid_id = 1;
|
|
string item_id = 2;
|
|
int32 from_index = 3;
|
|
int32 to_index = 4;
|
|
MoveItemType ty = 5;
|
|
}
|
|
message CellChangeset {
|
|
string grid_id = 1;
|
|
string row_id = 2;
|
|
string field_id = 3;
|
|
oneof one_of_cell_content_changeset { string cell_content_changeset = 4; };
|
|
}
|
|
enum MoveItemType {
|
|
MoveField = 0;
|
|
MoveRow = 1;
|
|
}
|