Skip to content

Commit

Permalink
Update proto files
Browse files Browse the repository at this point in the history
  • Loading branch information
any-association committed Oct 21, 2024
1 parent 8af940e commit 62b31eb
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
49 changes: 49 additions & 0 deletions changes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,52 @@ message Change {
string name = 2;
}
}


message StoreChange {
repeated StoreChangeContent changeSet = 1;
}

message StoreChangeContent {
oneof change {
DocumentCreate create = 1;
DocumentModify modify = 2;
DocumentDelete delete = 3;
}
}

message DocumentCreate {
string collection = 1;
string documentId = 2;
// json
string value = 3;
}

message DocumentModify {
string collection = 1;
string documentId = 2;
repeated KeyModify keys = 4;
}

message KeyModify {
// key path; example: [user, email]
repeated string keyPath = 1;
// modify op: set, unset, inc, etc.
ModifyOp modifyOp = 3;
// json value; example: '"[email protected]"'
string modifyValue = 4;
}

enum ModifyOp {
Set = 0;
Unset = 1;
Inc = 2;
AddToSet = 3;
Pull = 4;
}

message DocumentDelete {
string collection = 1;
string documentId = 2;
}

6 changes: 3 additions & 3 deletions models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ enum SmartBlockType {

NotificationObject = 0x217;
DevicesObject = 0x218;

ChatObject = 0x219; // Container for any-store based chats
ChatDerivedObject = 0x220; // Any-store based object for chat
AccountObject = 0x221; // Container for account data in tech space
}

message Search {
Expand Down Expand Up @@ -805,7 +805,7 @@ message Relation {
string description = 14;

// on-store fields, injected only locally
Scope scope = 20; // scope from which this relation have been aggregated
Scope scope = 20; // deprecated, to be removed
string creator = 21; // creator profile id
int64 revision = 22; // revision of system relation. Used to check if we should change relation content or not

Expand Down Expand Up @@ -1359,4 +1359,4 @@ message ChatMessage {
repeated string ids = 1; // List of user IDs
}
}
}
}

0 comments on commit 62b31eb

Please sign in to comment.