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 Jan 22, 2025
1 parent 56271e9 commit 2c6e29e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ message Event {
Account.Config.Update accountConfigUpdate = 202;
Account.Update accountUpdate = 203;
Account.LinkChallenge accountLinkChallenge = 204;
Account.LinkChallengeHide accountLinkChallengeHide = 205;

Object.Details.Set objectDetailsSet = 16;
Object.Details.Amend objectDetailsAmend = 50;
Expand Down Expand Up @@ -172,6 +173,11 @@ message Event {
}
string challenge = 1;
ClientInfo clientInfo = 2;
model.Account.Auth.LocalApiScope scope = 3;
}

message LinkChallengeHide {
string challenge = 1; // verify code before hiding to protect from MITM attacks
}
}

Expand Down
9 changes: 9 additions & 0 deletions models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,14 @@ message Account {
string networkId = 106; // network id to which anytype is connected
}

message Auth {
enum LocalApiScope {
Limited = 0; // Used in WebClipper; AccountSelect(to be deprecated), ObjectSearch, ObjectShow, ObjectCreate, ObjectCreateFromURL, BlockPreview, BlockPaste, BroadcastPayloadEvent
JsonAPI = 1; // JSON API only, no direct grpc api calls allowed
Full = 2; // Full access, not available via LocalLink
}
}

}

message LinkPreview {
Expand Down Expand Up @@ -886,6 +894,7 @@ enum ObjectOrigin {
usecase = 6;
builtin = 7;
bookmark = 8;
api = 9;
}

message RelationLink {
Expand Down

0 comments on commit 2c6e29e

Please sign in to comment.