diff --git a/events.proto b/events.proto index bb3ea18..d2f121a 100644 --- a/events.proto +++ b/events.proto @@ -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; @@ -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 } } diff --git a/models.proto b/models.proto index 9cb7d05..955f654 100644 --- a/models.proto +++ b/models.proto @@ -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 { @@ -886,6 +894,7 @@ enum ObjectOrigin { usecase = 6; builtin = 7; bookmark = 8; + api = 9; } message RelationLink {