Protocol Documentation
Table of Contents
Top
pb/protos/service/service.proto
ClientCommands
Top
pb/protos/changes.proto
Change
the element of change tree used to store and internal apply smartBlock history
Field |
Type |
Label |
Description |
previous_ids |
string |
repeated |
ids of previous changes |
last_snapshot_id |
string |
|
id of the last snapshot |
previous_details_ids |
string |
repeated |
ids of the last changes with details content |
content |
Change.Content |
repeated |
set of actions to apply |
snapshot |
Change.Snapshot |
|
snapshot - when not null, the content will ignoring |
fileKeys |
Change.FileKeys |
repeated |
file keys related to changes content |
timestamp |
int64 |
|
creation timestamp |
Change.BlockCreate
Change.BlockDuplicate
Change.BlockMove
Change.BlockRemove
Field |
Type |
Label |
Description |
ids |
string |
repeated |
|
Change.BlockUpdate
Change.Content
Change.DetailsSet
Change.DetailsUnset
Field |
Type |
Label |
Description |
key |
string |
|
|
Change.FileKeys
Change.FileKeys.KeysEntry
Change.Snapshot
Change.Snapshot.LogHeadsEntry
Top
pb/protos/commands.proto
Empty
Rpc
Rpc is a namespace, that agregates all of the service commands between client and middleware.
Structure: Topic > Subtopic > Subsub... > Action > (Request, Response).
Request – message from a client.
Response – message from a middleware.
Rpc.Account
Namespace, that agregates subtopics and actions, that relates to account.
Rpc.Account.Create
Rpc.Account.Create.Request
Front end to middleware request-to-create-an account
Field |
Type |
Label |
Description |
name |
string |
|
Account name |
avatarLocalPath |
string |
|
Path to an image, that will be used as an avatar of this account |
avatarColor |
string |
|
Avatar color as an alternative for avatar image |
alphaInviteCode |
string |
|
|
Rpc.Account.Create.Response
Middleware-to-front-end response for an account creation request, that can contain a NULL error and created account or a non-NULL error and an empty account
Field |
Type |
Label |
Description |
error |
Rpc.Account.Create.Response.Error |
|
Error while trying to create an account |
account |
model.Account |
|
A newly created account; In case of a failure, i.e. error is non-NULL, the account model should contain empty/default-value fields |
Rpc.Account.Create.Response.Error
Rpc.Account.Recover
Rpc.Account.Recover.Request
Front end to middleware request-to-start-search of an accounts for a recovered mnemonic.
Each of an account that would be found will come with an AccountAdd event
Rpc.Account.Recover.Response
Middleware-to-front-end response to an account recover request, that can contain a NULL error and created account or a non-NULL error and an empty account
Rpc.Account.Recover.Response.Error
Rpc.Account.Select
Rpc.Account.Select.Request
Front end to middleware request-to-launch-a specific account using account id and a root path
User can select an account from those, that came with an AccountAdd events
Field |
Type |
Label |
Description |
id |
string |
|
Id of a selected account |
rootPath |
string |
|
Root path is optional, set if this is a first request |
Rpc.Account.Select.Response
Middleware-to-front-end response for an account select request, that can contain a NULL error and selected account or a non-NULL error and an empty account
Rpc.Account.Select.Response.Error
Rpc.Account.Stop
Rpc.Account.Stop.Request
Front end to middleware request to stop currently running account node and optionally remove the locally stored data
Field |
Type |
Label |
Description |
removeData |
bool |
|
|
Rpc.Account.Stop.Response
Middleware-to-front-end response for an account stop request
Rpc.Account.Stop.Response.Error
Rpc.Block
Namespace, that agregates subtopics and actions, that relates to blocks.
Rpc.Block.Bookmark
Rpc.Block.Bookmark.CreateAndFetch
Rpc.Block.Bookmark.CreateAndFetch.Request
Rpc.Block.Bookmark.CreateAndFetch.Response
Rpc.Block.Bookmark.CreateAndFetch.Response.Error
Rpc.Block.Bookmark.Fetch
Rpc.Block.Bookmark.Fetch.Request
Rpc.Block.Bookmark.Fetch.Response
Rpc.Block.Bookmark.Fetch.Response.Error
Rpc.Block.Close
Block.Close – it means unsubscribe from a block.
Precondition: block should be opened.
Rpc.Block.Close.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
id of the context blo1k |
blockId |
string |
|
|
Rpc.Block.Close.Response
Rpc.Block.Close.Response.Error
Rpc.Block.Copy
Rpc.Block.Copy.Request
Rpc.Block.Copy.Response
Rpc.Block.Copy.Response.Error
Rpc.Block.Create
Create a Smart/Internal block. Request can contain a block with a content, or it can be an empty block with a specific block.content.
Example scenario
1A. Create Page on a dashboard
1. Front -> MW: Rpc.Block.Create.Request(blockId:dashboard.id, position:bottom, block: emtpy block with page content and id = "")
2. Front -> MW: Rpc.Block.Close.Request(block: dashboard.id)
3. Front <- MW: Rpc.Block.Close.Response(err)
4. Front <- MW: Rpc.Block.Create.Response(page.id)
5. Front <- MW: Rpc.Block.Open.Response(err)
6. Front <- MW: Event.Block.Show(page)
1B. Create Page on a Page
1. Front -> MW: Rpc.Block.Create.Request(blockId:dashboard.id, position:bottom, block: emtpy block with page content and id = "")
2. Front <- MW: Rpc.Block.Create.Response(newPage.id)
3. Front <- MW: Event.Block.Show(newPage)
Rpc.Block.Create.Dataview
Rpc.Block.Create.Dataview.Record
Rpc.Block.Create.Dataview.Record.Request
Rpc.Block.Create.Dataview.Record.Response
Rpc.Block.Create.Dataview.Record.Response.Error
Rpc.Block.Create.Dataview.View
Rpc.Block.Create.Dataview.View.Request
Rpc.Block.Create.Dataview.View.Response
Rpc.Block.Create.Dataview.View.Response.Error
Rpc.Block.Create.Request
common simple block command
Rpc.Block.Create.Response
Rpc.Block.Create.Response.Error
Rpc.Block.CreatePage
Rpc.Block.CreatePage.Request
Rpc.Block.CreatePage.Response
Rpc.Block.CreatePage.Response.Error
Rpc.Block.Cut
Rpc.Block.Cut.Request
Rpc.Block.Cut.Response
Rpc.Block.Cut.Response.Error
Rpc.Block.Delete
Rpc.Block.Delete.Dataview
Rpc.Block.Delete.Dataview.Record
Rpc.Block.Delete.Dataview.Record.Request
Rpc.Block.Delete.Dataview.Record.Response
Rpc.Block.Delete.Dataview.Record.Response.Error
Rpc.Block.Delete.Dataview.View
Rpc.Block.Delete.Dataview.View.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
id of the context block |
blockId |
string |
|
id of the dataview |
viewId |
string |
|
id of the view to remove |
Rpc.Block.Delete.Dataview.View.Response
Rpc.Block.Delete.Dataview.View.Response.Error
Rpc.Block.Download
Rpc.Block.Download.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
|
blockId |
string |
|
|
Rpc.Block.Download.Response
Rpc.Block.Download.Response.Error
Rpc.Block.Export
Rpc.Block.Export.Request
Rpc.Block.Export.Response
Rpc.Block.Export.Response.Error
Rpc.Block.File
Rpc.Block.File.CreateAndUpload
Rpc.Block.File.CreateAndUpload.Request
Rpc.Block.File.CreateAndUpload.Response
Rpc.Block.File.CreateAndUpload.Response.Error
Rpc.Block.Get
Rpc.Block.Get.Marks
Get marks list in the selected range in text block.
Rpc.Block.Get.Marks.Request
Rpc.Block.Get.Marks.Response
Rpc.Block.Get.Marks.Response.Error
Rpc.Block.GetPublicWebURL
Rpc.Block.GetPublicWebURL.Request
Field |
Type |
Label |
Description |
blockId |
string |
|
|
Rpc.Block.GetPublicWebURL.Response
Rpc.Block.GetPublicWebURL.Response.Error
Rpc.Block.ImportMarkdown
Rpc.Block.ImportMarkdown.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
|
importPath |
string |
|
|
Rpc.Block.ImportMarkdown.Response
Rpc.Block.ImportMarkdown.Response.Error
Rpc.Block.Merge
Rpc.Block.Merge.Request
Rpc.Block.Merge.Response
Rpc.Block.Merge.Response.Error
Rpc.Block.Open
Works with a smart blocks (block-organizers, like page, dashboard etc)
Example scenario
1A. On front-end start.
1. Front -> MW: Rpc.Block.Open.Request(dashboard.id)
2. MW -> Front: BlockShow(dashboard)
3. MW -> Front: Rpc.Block.Open.Response(err)
1B. User clicks on a page icon on the dashboard.
1. Front -> MW: Rpc.Block.Close.Request(dashboard.id)
Get close response first, then open request:
2. MW -> Front: Rpc.Block.Close.Response(err)
3. Front -> MW: Rpc.Block.Open.Request(page.id)
4. MW -> Front: BlockShow(<page, blocks>)
5. MW -> Front: Rpc.Block.Open.Response(err)
Image/Video/File blocks then:
6. MW -> Front: BlockShow(<blocks>)
Rpc.Block.Open.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
id of the context blo1k |
blockId |
string |
|
|
Rpc.Block.Open.Response
Rpc.Block.Open.Response.Error
Rpc.Block.OpenBreadcrumbs
Rpc.Block.OpenBreadcrumbs.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
id of the context blo1k |
Rpc.Block.OpenBreadcrumbs.Response
Rpc.Block.OpenBreadcrumbs.Response.Error
Rpc.Block.Paste
Rpc.Block.Paste.Request
Rpc.Block.Paste.Request.File
Rpc.Block.Paste.Response
Rpc.Block.Paste.Response.Error
Rpc.Block.Redo
Rpc.Block.Redo.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
id of the context block |
Rpc.Block.Redo.Response
Rpc.Block.Redo.Response.Error
Rpc.Block.Replace
Rpc.Block.Replace.Request
Rpc.Block.Replace.Response
Rpc.Block.Replace.Response.Error
Rpc.Block.Set
Rpc.Block.Set.Dataview
Rpc.Block.Set.Dataview.ActiveView
set the current active view (persisted only within a session)
Rpc.Block.Set.Dataview.ActiveView.Request
Rpc.Block.Set.Dataview.ActiveView.Response
Rpc.Block.Set.Dataview.ActiveView.Response.Error
Rpc.Block.Set.Dataview.View
Rpc.Block.Set.Dataview.View.Request
Rpc.Block.Set.Dataview.View.Response
Rpc.Block.Set.Dataview.View.Response.Error
Rpc.Block.Set.Details
Rpc.Block.Set.Details.Detail
Rpc.Block.Set.Details.Request
Rpc.Block.Set.Details.Response
Rpc.Block.Set.Details.Response.Error
Rpc.Block.Set.Fields
Rpc.Block.Set.Fields.Request
Rpc.Block.Set.Fields.Response
Rpc.Block.Set.Fields.Response.Error
Rpc.Block.Set.File
Rpc.Block.Set.File.Name
Rpc.Block.Set.File.Name.Request
Rpc.Block.Set.File.Name.Response
Rpc.Block.Set.File.Name.Response.Error
Rpc.Block.Set.Image
Rpc.Block.Set.Image.Name
Rpc.Block.Set.Image.Name.Request
Rpc.Block.Set.Image.Name.Response
Rpc.Block.Set.Image.Name.Response.Error
Rpc.Block.Set.Image.Width
Rpc.Block.Set.Image.Width.Request
Rpc.Block.Set.Image.Width.Response
Rpc.Block.Set.Image.Width.Response.Error
Rpc.Block.Set.Link
Rpc.Block.Set.Link.TargetBlockId
Rpc.Block.Set.Link.TargetBlockId.Request
Rpc.Block.Set.Link.TargetBlockId.Response
Rpc.Block.Set.Link.TargetBlockId.Response.Error
Rpc.Block.Set.Page
Rpc.Block.Set.Page.IsArchived
Rpc.Block.Set.Page.IsArchived.Request
Rpc.Block.Set.Page.IsArchived.Response
Rpc.Block.Set.Page.IsArchived.Response.Error
Rpc.Block.Set.Restrictions
Rpc.Block.Set.Restrictions.Request
Rpc.Block.Set.Restrictions.Response
Rpc.Block.Set.Restrictions.Response.Error
Rpc.Block.Set.Text
Rpc.Block.Set.Text.Checked
Rpc.Block.Set.Text.Checked.Request
Rpc.Block.Set.Text.Checked.Response
Rpc.Block.Set.Text.Checked.Response.Error
Rpc.Block.Set.Text.Color
Rpc.Block.Set.Text.Color.Request
Rpc.Block.Set.Text.Color.Response
Rpc.Block.Set.Text.Color.Response.Error
Rpc.Block.Set.Text.Style
Rpc.Block.Set.Text.Style.Request
Rpc.Block.Set.Text.Style.Response
Rpc.Block.Set.Text.Style.Response.Error
Rpc.Block.Set.Text.Text
Rpc.Block.Set.Text.Text.Request
Rpc.Block.Set.Text.Text.Response
Rpc.Block.Set.Text.Text.Response.Error
Rpc.Block.Set.Video
Rpc.Block.Set.Video.Name
Rpc.Block.Set.Video.Name.Request
Rpc.Block.Set.Video.Name.Response
Rpc.Block.Set.Video.Name.Response.Error
Rpc.Block.Set.Video.Width
Rpc.Block.Set.Video.Width.Request
Rpc.Block.Set.Video.Width.Response
Rpc.Block.Set.Video.Width.Response.Error
Rpc.Block.SetBreadcrumbs
Rpc.Block.SetBreadcrumbs.Request
Field |
Type |
Label |
Description |
breadcrumbsId |
string |
|
|
ids |
string |
repeated |
page ids |
Rpc.Block.SetBreadcrumbs.Response
Rpc.Block.SetBreadcrumbs.Response.Error
Rpc.Block.Split
Rpc.Block.Split.Request
Rpc.Block.Split.Response
Rpc.Block.Split.Response.Error
Rpc.Block.Undo
Rpc.Block.Undo.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
id of the context block |
Rpc.Block.Undo.Response
Rpc.Block.Undo.Response.Error
Rpc.Block.Unlink
Remove blocks from the childrenIds of its parents
Rpc.Block.Unlink.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
id of the context block |
blockIds |
string |
repeated |
targets to remove |
Rpc.Block.Unlink.Response
Rpc.Block.Unlink.Response.Error
Rpc.Block.Update
Rpc.Block.Update.Dataview
Rpc.Block.Update.Dataview.Record
Rpc.Block.Update.Dataview.Record.Request
Rpc.Block.Update.Dataview.Record.Response
Rpc.Block.Update.Dataview.Record.Response.Error
Rpc.Block.Upload
Rpc.Block.Upload.Request
Rpc.Block.Upload.Response
Rpc.Block.Upload.Response.Error
Rpc.BlockList
Rpc.BlockList.ConvertChildrenToPages
Rpc.BlockList.ConvertChildrenToPages.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
|
blockIds |
string |
repeated |
|
Rpc.BlockList.ConvertChildrenToPages.Response
Rpc.BlockList.ConvertChildrenToPages.Response.Error
Rpc.BlockList.Delete
Rpc.BlockList.Delete.Page
Deletes the page, keys and all records from the local store and unsubscribe from remote changes
Rpc.BlockList.Delete.Page.Request
Field |
Type |
Label |
Description |
blockIds |
string |
repeated |
pages to remove |
Rpc.BlockList.Delete.Page.Response
Rpc.BlockList.Delete.Page.Response.Error
Rpc.BlockList.Duplicate
Makes blocks copy by given ids and paste it to shown place
Rpc.BlockList.Duplicate.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
id of the context block |
targetId |
string |
|
id of the closest block |
blockIds |
string |
repeated |
id of block for duplicate |
position |
model.Block.Position |
|
|
Rpc.BlockList.Duplicate.Response
Rpc.BlockList.Duplicate.Response.Error
Rpc.BlockList.Move
Rpc.BlockList.Move.Request
Rpc.BlockList.Move.Response
Rpc.BlockList.Move.Response.Error
Rpc.BlockList.MoveToNewPage
Rpc.BlockList.MoveToNewPage.Request
Rpc.BlockList.MoveToNewPage.Response
Rpc.BlockList.MoveToNewPage.Response.Error
Rpc.BlockList.Set
Rpc.BlockList.Set.Align
Rpc.BlockList.Set.Align.Request
Rpc.BlockList.Set.Align.Response
Rpc.BlockList.Set.Align.Response.Error
Rpc.BlockList.Set.BackgroundColor
Rpc.BlockList.Set.BackgroundColor.Request
Rpc.BlockList.Set.BackgroundColor.Response
Rpc.BlockList.Set.BackgroundColor.Response.Error
Rpc.BlockList.Set.Div
Rpc.BlockList.Set.Div.Style
Rpc.BlockList.Set.Div.Style.Request
Rpc.BlockList.Set.Div.Style.Response
Rpc.BlockList.Set.Div.Style.Response.Error
Rpc.BlockList.Set.Fields
Rpc.BlockList.Set.Fields.Request
Rpc.BlockList.Set.Fields.Request.BlockField
Rpc.BlockList.Set.Fields.Response
Rpc.BlockList.Set.Fields.Response.Error
Rpc.BlockList.Set.Page
Rpc.BlockList.Set.Page.IsArchived
Rpc.BlockList.Set.Page.IsArchived.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
|
blockIds |
string |
repeated |
|
isArchived |
bool |
|
|
Rpc.BlockList.Set.Page.IsArchived.Response
Rpc.BlockList.Set.Page.IsArchived.Response.Error
Rpc.BlockList.Set.Text
commands acceptable only for text blocks, others will be ignored
Rpc.BlockList.Set.Text.Color
Rpc.BlockList.Set.Text.Color.Request
Rpc.BlockList.Set.Text.Color.Response
Rpc.BlockList.Set.Text.Color.Response.Error
Rpc.BlockList.Set.Text.Mark
Rpc.BlockList.Set.Text.Mark.Request
Rpc.BlockList.Set.Text.Mark.Response
Rpc.BlockList.Set.Text.Mark.Response.Error
Rpc.BlockList.Set.Text.Style
Rpc.BlockList.Set.Text.Style.Request
Rpc.BlockList.Set.Text.Style.Response
Rpc.BlockList.Set.Text.Style.Response.Error
Rpc.Config
Rpc.Config.Get
Rpc.Config.Get.Request
Rpc.Config.Get.Response
Rpc.Config.Get.Response.Error
Rpc.ExternalDrop
Rpc.ExternalDrop.Content
Rpc.ExternalDrop.Content.Request
Field |
Type |
Label |
Description |
contextId |
string |
|
|
focusedBlockId |
string |
|
can be null |
content |
bytes |
|
TODO |
Rpc.ExternalDrop.Content.Response
Rpc.ExternalDrop.Content.Response.Error
Rpc.ExternalDrop.Files
Rpc.ExternalDrop.Files.Request
Rpc.ExternalDrop.Files.Response
Rpc.ExternalDrop.Files.Response.Error
Rpc.History
Rpc.History.SetVersion
Rpc.History.SetVersion.Request
Rpc.History.SetVersion.Response
Rpc.History.SetVersion.Response.Error
Rpc.History.Show
returns blockShow event for given version
Rpc.History.Show.Request
Rpc.History.Show.Response
Rpc.History.Show.Response.Error
Rpc.History.Versions
returns list of versions (changes)
Rpc.History.Versions.Request
Field |
Type |
Label |
Description |
pageId |
string |
|
|
lastVersionId |
string |
|
when indicated, results will include versions before given id |
limit |
int32 |
|
desired count of versions |
Rpc.History.Versions.Response
Rpc.History.Versions.Response.Error
Rpc.History.Versions.Version
Rpc.Ipfs
Namespace, that agregates subtopics and actions to work with IPFS directly (get files, blobs, images, etc)
Rpc.Ipfs.File
Rpc.Ipfs.File.Get
Rpc.Ipfs.File.Get.Request
Field |
Type |
Label |
Description |
id |
string |
|
|
Rpc.Ipfs.File.Get.Response
Rpc.Ipfs.File.Get.Response.Error
Rpc.Ipfs.Image
Rpc.Ipfs.Image.Get
Rpc.Ipfs.Image.Get.Blob
Rpc.Ipfs.Image.Get.Blob.Request
Field |
Type |
Label |
Description |
hash |
string |
|
|
wantWidth |
int32 |
|
|
Rpc.Ipfs.Image.Get.Blob.Response
Rpc.Ipfs.Image.Get.Blob.Response.Error
Rpc.Ipfs.Image.Get.File
Rpc.Ipfs.Image.Get.File.Request
Field |
Type |
Label |
Description |
hash |
string |
|
|
wantWidth |
int32 |
|
|
Rpc.Ipfs.Image.Get.File.Response
Rpc.Ipfs.Image.Get.File.Response.Error
Rpc.LinkPreview
Rpc.LinkPreview.Request
Field |
Type |
Label |
Description |
url |
string |
|
|
Rpc.LinkPreview.Response
Rpc.LinkPreview.Response.Error
Rpc.Log
Namespace, that agregates log subtopics and actions.
Usage: send request with topic (Level) and description (message) from client to middleware to log.
Rpc.Log.Send
Rpc.Log.Send.Request
Rpc.Log.Send.Response
Rpc.Log.Send.Response.Error
Rpc.Navigation
Rpc.Navigation.GetPageInfoWithLinks
Get the info for page alongside with info for all inbound and outbound links from/to this page
Rpc.Navigation.GetPageInfoWithLinks.Request
Field |
Type |
Label |
Description |
pageId |
string |
|
|
Rpc.Navigation.GetPageInfoWithLinks.Response
Rpc.Navigation.GetPageInfoWithLinks.Response.Error
Rpc.Navigation.ListPages
Rpc.Navigation.ListPages.Request
Rpc.Navigation.ListPages.Response
Rpc.Navigation.ListPages.Response.Error
Rpc.Ping
Rpc.Ping.Request
Field |
Type |
Label |
Description |
index |
int32 |
|
|
numberOfEventsToSend |
int32 |
|
|
Rpc.Ping.Response
Rpc.Ping.Response.Error
Rpc.Process
Rpc.Process.Cancel
Rpc.Process.Cancel.Request
Field |
Type |
Label |
Description |
id |
string |
|
|
Rpc.Process.Cancel.Response
Rpc.Process.Cancel.Response.Error
Rpc.Shutdown
Rpc.Shutdown.Request
Rpc.Shutdown.Response
Rpc.Shutdown.Response.Error
Rpc.UploadFile
Rpc.UploadFile.Request
Rpc.UploadFile.Response
Rpc.UploadFile.Response.Error
Rpc.Version
Get info about a version of a middleware.
Info is a string, that contains: BuildDate, GitCommit, GitBranch, GitState
Rpc.Version.Get
Rpc.Version.Get.Request
Rpc.Version.Get.Response
Rpc.Version.Get.Response.Error
Rpc.Wallet
Namespace, that agregates subtopics and actions, that relates to wallet.
Rpc.Wallet.Create
Rpc.Wallet.Create.Request
Front-end-to-middleware request to create a new wallet
Field |
Type |
Label |
Description |
rootPath |
string |
|
Path to a wallet directory |
Rpc.Wallet.Create.Response
Middleware-to-front-end response, that can contain mnemonic of a created account and a NULL error or an empty mnemonic and a non-NULL error
Rpc.Wallet.Create.Response.Error
Rpc.Wallet.Recover
Rpc.Wallet.Recover.Request
Front end to middleware request-to-recover-a wallet with this mnemonic and a rootPath
Field |
Type |
Label |
Description |
rootPath |
string |
|
Path to a wallet directory |
mnemonic |
string |
|
Mnemonic of a wallet to recover |
Rpc.Wallet.Recover.Response
Middleware-to-front-end response, that can contain a NULL error or a non-NULL error
Rpc.Wallet.Recover.Response.Error
Rpc.Account.Create.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
No error; Account should be non-empty |
UNKNOWN_ERROR |
1 |
Any other errors |
BAD_INPUT |
2 |
Avatar or name is not correct |
ACCOUNT_CREATED_BUT_FAILED_TO_START_NODE |
101 |
|
ACCOUNT_CREATED_BUT_FAILED_TO_SET_NAME |
102 |
|
ACCOUNT_CREATED_BUT_FAILED_TO_SET_AVATAR |
103 |
|
FAILED_TO_STOP_RUNNING_NODE |
104 |
|
BAD_INVITE_CODE |
900 |
|
Rpc.Account.Recover.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
No error; |
UNKNOWN_ERROR |
1 |
Any other errors |
BAD_INPUT |
2 |
|
NO_ACCOUNTS_FOUND |
101 |
|
NEED_TO_RECOVER_WALLET_FIRST |
102 |
|
FAILED_TO_CREATE_LOCAL_REPO |
103 |
|
LOCAL_REPO_EXISTS_BUT_CORRUPTED |
104 |
|
FAILED_TO_RUN_NODE |
105 |
|
WALLET_RECOVER_NOT_PERFORMED |
106 |
|
FAILED_TO_STOP_RUNNING_NODE |
107 |
|
ANOTHER_ANYTYPE_PROCESS_IS_RUNNING |
108 |
|
Rpc.Account.Select.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
No error |
UNKNOWN_ERROR |
1 |
Any other errors |
BAD_INPUT |
2 |
Id or root path is wrong |
FAILED_TO_CREATE_LOCAL_REPO |
101 |
|
LOCAL_REPO_EXISTS_BUT_CORRUPTED |
102 |
|
FAILED_TO_RUN_NODE |
103 |
|
FAILED_TO_FIND_ACCOUNT_INFO |
104 |
|
LOCAL_REPO_NOT_EXISTS_AND_MNEMONIC_NOT_SET |
105 |
|
FAILED_TO_STOP_SEARCHER_NODE |
106 |
|
FAILED_TO_RECOVER_PREDEFINED_BLOCKS |
107 |
|
ANOTHER_ANYTYPE_PROCESS_IS_RUNNING |
108 |
|
Rpc.Account.Stop.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
No error |
UNKNOWN_ERROR |
1 |
Any other errors |
BAD_INPUT |
2 |
Id or root path is wrong |
ACCOUNT_IS_NOT_RUNNING |
101 |
|
FAILED_TO_STOP_NODE |
102 |
|
FAILED_TO_REMOVE_ACCOUNT_DATA |
103 |
|
Rpc.Block.Bookmark.CreateAndFetch.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
Rpc.Block.Bookmark.Fetch.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
Rpc.Block.Close.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Copy.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Create.Dataview.Record.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Create.Dataview.View.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Create.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.CreatePage.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Cut.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Delete.Dataview.Record.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Delete.Dataview.View.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Download.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Export.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.File.CreateAndUpload.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
Rpc.Block.Get.Marks.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.GetPublicWebURL.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.ImportMarkdown.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Merge.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Open.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
ANYTYPE_NEEDS_UPGRADE |
10 |
failed to read unknown data format – need to upgrade anytype |
Rpc.Block.OpenBreadcrumbs.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Paste.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Redo.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
CAN_NOT_MOVE |
3 |
... |
Rpc.Block.Replace.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Dataview.ActiveView.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Dataview.View.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Details.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Fields.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.File.Name.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Image.Name.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Image.Width.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Link.TargetBlockId.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Page.IsArchived.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Restrictions.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Text.Checked.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Text.Color.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Text.Style.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Text.Text.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Video.Name.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Set.Video.Width.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.SetBreadcrumbs.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Split.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Undo.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
CAN_NOT_MOVE |
3 |
... |
Rpc.Block.Unlink.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Update.Dataview.Record.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Block.Upload.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.ConvertChildrenToPages.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Delete.Page.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Duplicate.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Move.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.MoveToNewPage.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Set.Align.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Set.BackgroundColor.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Set.Div.Style.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Set.Fields.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Set.Page.IsArchived.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Set.Text.Color.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Set.Text.Mark.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.BlockList.Set.Text.Style.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Config.Get.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
NODE_NOT_STARTED |
101 |
|
Rpc.ExternalDrop.Content.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.ExternalDrop.Files.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.History.SetVersion.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.History.Show.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.History.Versions.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Ipfs.File.Get.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
NOT_FOUND |
101 |
|
TIMEOUT |
102 |
|
Rpc.Ipfs.Image.Get.Blob.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
NOT_FOUND |
101 |
|
TIMEOUT |
102 |
|
NODE_NOT_STARTED |
103 |
|
Rpc.Ipfs.Image.Get.File.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
NOT_FOUND |
101 |
|
TIMEOUT |
102 |
|
NODE_NOT_STARTED |
103 |
|
Rpc.LinkPreview.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
Rpc.Log.Send.Request.Level
Name |
Number |
Description |
DEBUG |
0 |
|
ERROR |
1 |
|
FATAL |
2 |
|
INFO |
3 |
|
PANIC |
4 |
|
WARNING |
5 |
|
Rpc.Log.Send.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
NOT_FOUND |
101 |
|
TIMEOUT |
102 |
|
Rpc.Navigation.GetPageInfoWithLinks.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Navigation.ListPages.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
... |
Rpc.Ping.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
Rpc.Process.Cancel.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
Rpc.Shutdown.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
NODE_NOT_STARTED |
101 |
|
Rpc.UploadFile.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
Rpc.Version.Get.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
|
UNKNOWN_ERROR |
1 |
|
BAD_INPUT |
2 |
|
VERSION_IS_EMPTY |
3 |
|
NOT_FOUND |
101 |
|
TIMEOUT |
102 |
|
Rpc.Wallet.Create.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
No error; mnemonic should be non-empty |
UNKNOWN_ERROR |
1 |
Any other errors |
BAD_INPUT |
2 |
Root path is wrong |
FAILED_TO_CREATE_LOCAL_REPO |
101 |
... |
Rpc.Wallet.Recover.Response.Error.Code
Name |
Number |
Description |
NULL |
0 |
No error; wallet successfully recovered |
UNKNOWN_ERROR |
1 |
Any other errors |
BAD_INPUT |
2 |
Root path or mnemonic is wrong |
FAILED_TO_CREATE_LOCAL_REPO |
101 |
|
Top
pb/protos/events.proto
Event
Event – type of message, that could be sent from a middleware to the corresponding front-end.
Event.Account
Event.Account.Details
Event.Account.Show
Message, that will be sent to the front on each account found after an AccountRecoverRequest
Field |
Type |
Label |
Description |
index |
int32 |
|
Number of an account in an all found accounts list |
account |
model.Account |
|
An Account, that has been found for the mnemonic |
Event.Block
Event.Block.Add
Event to show internal blocks on a client.
Example Scenarios
A. Block Creation
- Block A have been created on a client C1
- Client C2 receives Event.Block.Add(Block A), Event.Block.Update(Page.children)
B. Partial block load
- Client C1 opens Page1, that contains, for example, 133 blocks.
- M -> F: ShowFullScreen(Root, blocks1-50)
- M -> F: Block.Add(blocks51-100)
- M -> F: Block.Add(blocks101-133)
Field |
Type |
Label |
Description |
blocks |
model.Block |
repeated |
id -> block |
Event.Block.Delete
Field |
Type |
Label |
Description |
blockIds |
string |
repeated |
|
Event.Block.Delete.Dataview
Event.Block.Delete.Dataview.View
Field |
Type |
Label |
Description |
id |
string |
|
dataview block's id |
viewId |
string |
|
view id to remove |
Event.Block.FilesUpload
Middleware to front end event message, that will be sent on one of this scenarios:
Precondition: user A opened a block
- User A drops a set of files/pictures/videos
- User A creates a MediaBlock and drops a single media, that corresponds to its type.
Field |
Type |
Label |
Description |
blockId |
string |
|
if empty => create new blocks |
filePath |
string |
repeated |
filepaths to the files |
Event.Block.Fill
Event.Block.Fill.Align
Event.Block.Fill.BackgroundColor
Field |
Type |
Label |
Description |
id |
string |
|
|
backgroundColor |
string |
|
|
Event.Block.Fill.Bookmark
Event.Block.Fill.Bookmark.Description
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.Bookmark.FaviconHash
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.Bookmark.ImageHash
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.Bookmark.Title
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.Bookmark.Type
Event.Block.Fill.Bookmark.Url
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.ChildrenIds
Field |
Type |
Label |
Description |
id |
string |
|
|
childrenIds |
string |
repeated |
|
Event.Block.Fill.DatabaseRecords
Event.Block.Fill.Details
Event.Block.Fill.Div
Event.Block.Fill.Div.Style
Event.Block.Fill.Fields
Event.Block.Fill.File
Event.Block.Fill.File.Hash
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.File.Mime
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.File.Name
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.File.Size
Field |
Type |
Label |
Description |
value |
int64 |
|
|
Event.Block.Fill.File.State
Event.Block.Fill.File.Type
Event.Block.Fill.File.Width
Field |
Type |
Label |
Description |
value |
int32 |
|
|
Event.Block.Fill.Link
Event.Block.Fill.Link.Fields
Event.Block.Fill.Link.Style
Event.Block.Fill.Link.TargetBlockId
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.Restrictions
Event.Block.Fill.Text
Event.Block.Fill.Text.Checked
Field |
Type |
Label |
Description |
value |
bool |
|
|
Event.Block.Fill.Text.Color
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Fill.Text.Marks
Event.Block.Fill.Text.Style
Event.Block.Fill.Text.Text
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.MarksInfo
Event.Block.Set
Event.Block.Set.Align
Event.Block.Set.BackgroundColor
Field |
Type |
Label |
Description |
id |
string |
|
|
backgroundColor |
string |
|
|
Event.Block.Set.Bookmark
Event.Block.Set.Bookmark.Description
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.Bookmark.FaviconHash
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.Bookmark.ImageHash
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.Bookmark.Title
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.Bookmark.Type
Event.Block.Set.Bookmark.Url
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.ChildrenIds
Field |
Type |
Label |
Description |
id |
string |
|
|
childrenIds |
string |
repeated |
|
Event.Block.Set.Dataview
Event.Block.Set.Dataview.Records
sent when the active view's visible records have been
changed either by the view settings(filters/sort/limit/offset) or by the data itself
Field |
Type |
Label |
Description |
id |
string |
|
dataview block's id |
viewId |
string |
|
view id, client should double check this to make sure client doesn't switch the active view in the middle |
updated |
google.protobuf.Struct |
repeated |
existing records updated |
inserted |
google.protobuf.Struct |
repeated |
block of new records to insert |
insertPosition |
uint32 |
|
position to insert |
removed |
string |
repeated |
|
total |
uint32 |
|
total number of records |
Event.Block.Set.Dataview.View
sent when the view settings have been changed
Field |
Type |
Label |
Description |
id |
string |
|
dataview block's id |
viewId |
string |
|
view id, client should double check this to make sure client doesn't switch the active view in the middle |
view |
model.Block.Content.Dataview.View |
|
|
offset |
uint32 |
|
middleware will try to preserve the current aciveview's offset&limit but may reset it in case it becomes invalid or not actual anymore |
limit |
uint32 |
|
|
Event.Block.Set.Details
Event.Block.Set.Div
Event.Block.Set.Div.Style
Event.Block.Set.Fields
Event.Block.Set.File
Event.Block.Set.File.Hash
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.File.Mime
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.File.Name
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.File.Size
Field |
Type |
Label |
Description |
value |
int64 |
|
|
Event.Block.Set.File.State
Event.Block.Set.File.Type
Event.Block.Set.File.Width
Field |
Type |
Label |
Description |
value |
int32 |
|
|
Event.Block.Set.Link
Event.Block.Set.Link.Fields
Event.Block.Set.Link.Style
Event.Block.Set.Link.TargetBlockId
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.Restrictions
Event.Block.Set.Text
Event.Block.Set.Text.Checked
Field |
Type |
Label |
Description |
value |
bool |
|
|
Event.Block.Set.Text.Color
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Set.Text.Marks
Event.Block.Set.Text.Style
Event.Block.Set.Text.Text
Field |
Type |
Label |
Description |
value |
string |
|
|
Event.Block.Show
Works with a smart blocks: Page, Dashboard
Dashboard opened, click on a page, Rpc.Block.open, Block.ShowFullscreen(PageBlock)
Event.Message
Event.Ping
Field |
Type |
Label |
Description |
index |
int32 |
|
|
Event.Process
Event.Process.Done
Event.Process.New
Event.Process.Update
Event.User
Event.User.Block
Event.User.Block.Join
Middleware to front end event message, that will be sent in this scenario:
Precondition: user A opened a block
- User B opens the same block
- User A receives a message about p.1
Field |
Type |
Label |
Description |
account |
Event.Account |
|
Account of the user, that opened a block |
Event.User.Block.Left
Middleware to front end event message, that will be sent in this scenario:
Precondition: user A and user B opened the same block
- User B closes the block
- User A receives a message about p.1
Field |
Type |
Label |
Description |
account |
Event.Account |
|
Account of the user, that left the block |
Event.User.Block.SelectRange
Middleware to front end event message, that will be sent in this scenario:
Precondition: user A and user B opened the same block
- User B selects some inner blocks
- User A receives a message about p.1
Field |
Type |
Label |
Description |
account |
Event.Account |
|
Account of the user, that selected blocks |
blockIdsArray |
string |
repeated |
Ids of selected blocks. |
Middleware to front end event message, that will be sent in this scenario:
Precondition: user A and user B opened the same block
- User B sets cursor or selects a text region into a text block
- User A receives a message about p.1
Field |
Type |
Label |
Description |
account |
Event.Account |
|
Account of the user, that selected a text |
blockId |
string |
|
Id of the text block, that have a selection |
range |
model.Range |
|
Range of the selection |
Model
Model.Process
Model.Process.Progress
ResponseEvent
Model.Process.State
Name |
Number |
Description |
None |
0 |
|
Running |
1 |
|
Done |
2 |
|
Canceled |
3 |
|
Error |
4 |
|
Model.Process.Type
Name |
Number |
Description |
DropFiles |
0 |
|
Import |
1 |
|
SmartBlockType
Name |
Number |
Description |
Page |
0 |
|
Home |
1 |
have only Link simpleblocks |
ProfilePage |
2 |
just a usual page for now |
Archive |
3 |
have only Link simpleblocks |
Breadcrumbs |
4 |
have only Link simpleblocks |
Set |
5 |
only have dataview simpleblock |
Top
vendor/github.com/anytypeio/go-anytype-library/pb/model/protos/localstore.proto
PageDetails
PageInfo
PageInfoWithLinks
PageInfoWithOutboundLinks
PageInfoWithOutboundLinksIDs
PageLinks
Field |
Type |
Label |
Description |
inboundIDs |
string |
repeated |
|
outboundIDs |
string |
repeated |
|
PageLinksInfo
Field |
Type |
Label |
Description |
inbound |
PageInfo |
repeated |
|
outbound |
PageInfo |
repeated |
|
State
State.StateEntry
Top
vendor/github.com/anytypeio/go-anytype-library/pb/model/protos/models.proto
Account
Contains basic information about a user account
Field |
Type |
Label |
Description |
id |
string |
|
User's thread id |
name |
string |
|
User name, that associated with this account |
avatar |
Account.Avatar |
|
Avatar of a user's account |
Account.Avatar
Avatar of a user's account. It could be an image or color
Field |
Type |
Label |
Description |
image |
Block.Content.File |
|
Image of the avatar. Contains the hash to retrieve the image. |
color |
string |
|
Color of the avatar, used if image not set. |
Block
Block.Content
Block.Content.Bookmark
Bookmark is to keep a web-link and to preview a content.
Block.Content.Dataview
Block.Content.Dataview.Filter
Block.Content.Dataview.Relation
Block.Content.Dataview.Relation.DateOptions
Block.Content.Dataview.Relation.EmptyOptions
Block.Content.Dataview.Sort
Block.Content.Dataview.View
Block.Content.Div
Divider: block, that contains only one horizontal thin line
Block.Content.File
Block.Content.Icon
Field |
Type |
Label |
Description |
name |
string |
|
|
Block.Content.Layout
Layout have no visual representation, but affects on blocks, that it contains.
Row/Column layout blocks creates only automatically, after some of a D&D operations, for example
Block.Content.Link
Link: block to link some content from an external sources.
Block.Content.Smartblock
Block.Content.Text
Block.Content.Text.Mark
Block.Content.Text.Marks
Block.Restrictions
BlockMetaOnly
Used to decode block meta only, without the content itself
LinkPreview
Range
General purpose structure, uses in Mark.
SmartBlockSnapshotBase
deprecated
Block.Align
Name |
Number |
Description |
AlignLeft |
0 |
|
AlignCenter |
1 |
|
AlignRight |
2 |
|
Block.Content.Dataview.Filter.Condition
Name |
Number |
Description |
Equal |
0 |
|
NotEqual |
1 |
|
Greater |
2 |
|
Less |
3 |
|
GreaterOrEqual |
4 |
|
LessOrEqual |
5 |
|
Like |
6 |
|
NotLike |
7 |
|
In |
8 |
|
NotIn |
9 |
|
Empty |
10 |
|
NotEmpty |
11 |
|
Block.Content.Dataview.Filter.Operator
Name |
Number |
Description |
And |
0 |
|
Or |
1 |
|
Block.Content.Dataview.Relation.DateFormat
Name |
Number |
Description |
MonthAbbrBeforeDay |
0 |
Jul 30, 2020 |
MonthAbbrAfterDay |
1 |
30 Jul 2020 |
Short |
2 |
30/07/2020 |
ShortUS |
3 |
07/30/2020 |
ISO |
4 |
2020-07-30 |
Block.Content.Dataview.Relation.TimeFormat
Name |
Number |
Description |
Format12 |
0 |
|
Format24 |
1 |
|
Block.Content.Dataview.Sort.Type
Name |
Number |
Description |
Asc |
0 |
|
Desc |
1 |
|
Block.Content.Dataview.View.Type
Name |
Number |
Description |
Table |
0 |
|
List |
1 |
|
Gallery |
2 |
|
Kanban |
3 |
|
Block.Content.Div.Style
Name |
Number |
Description |
Line |
0 |
|
Dots |
1 |
|
Block.Content.File.State
Name |
Number |
Description |
Empty |
0 |
There is no file and preview, it's an empty block, that waits files. |
Uploading |
1 |
There is still no file/preview, but file already uploading |
Done |
2 |
File and preview downloaded |
Error |
3 |
Error while uploading |
Block.Content.File.Type
Name |
Number |
Description |
None |
0 |
|
File |
1 |
|
Image |
2 |
|
Video |
3 |
|
Block.Content.Layout.Style
Name |
Number |
Description |
Row |
0 |
|
Column |
1 |
|
Div |
2 |
|
Block.Content.Link.Style
Name |
Number |
Description |
Page |
0 |
|
Dataview |
1 |
|
Dashboard |
2 |
|
Archive |
3 |
... |
Block.Content.Text.Mark.Type
Name |
Number |
Description |
Strikethrough |
0 |
|
Keyboard |
1 |
|
Italic |
2 |
|
Bold |
3 |
|
Underscored |
4 |
|
Link |
5 |
|
TextColor |
6 |
|
BackgroundColor |
7 |
|
Mention |
8 |
|
Block.Content.Text.Style
Name |
Number |
Description |
Paragraph |
0 |
|
Header1 |
1 |
|
Header2 |
2 |
|
Header3 |
3 |
|
Header4 |
4 |
|
Quote |
5 |
|
Code |
6 |
|
Title |
7 |
|
Checkbox |
8 |
|
Marked |
9 |
|
Numbered |
10 |
|
Toggle |
11 |
|
Block.Position
Name |
Number |
Description |
None |
0 |
|
Top |
1 |
|
Bottom |
2 |
|
Left |
3 |
|
Right |
4 |
|
Inner |
5 |
|
Replace |
6 |
|
LinkPreview.Type
Name |
Number |
Description |
Unknown |
0 |
|
Page |
1 |
|
Image |
2 |
|
Text |
3 |
|
Scalar Value Types
.proto Type |
Notes |
C++ |
Java |
Python |
Go |
C# |
PHP |
Ruby |
double |
|
double |
double |
float |
float64 |
double |
float |
Float |
float |
|
float |
float |
float |
float32 |
float |
float |
Float |
int32 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
int64 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
uint32 |
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
uint64 |
Uses variable-length encoding. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum or Fixnum (as required) |
sint32 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
sint64 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
fixed32 |
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
fixed64 |
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum |
sfixed32 |
Always four bytes. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
sfixed64 |
Always eight bytes. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
bool |
|
bool |
boolean |
boolean |
bool |
bool |
boolean |
TrueClass/FalseClass |
string |
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
string |
string |
string |
String (UTF-8) |
bytes |
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |
[]byte |
ByteString |
string |
String (ASCII-8BIT) |