1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-10 18:10:49 +09:00
anytype-heart/docs/proto.md
Sergey Cherepanov 317f6adc39
merge
2020-08-26 16:58:53 +03:00

236 KiB
Raw Blame History

Protocol Documentation

Table of Contents

Top

pb/protos/service/service.proto

ClientCommands

Method Name Request Type Response Type Description
WalletCreate Rpc.Wallet.Create.Request Rpc.Wallet.Create.Response
WalletRecover Rpc.Wallet.Recover.Request Rpc.Wallet.Recover.Response
AccountRecover Rpc.Account.Recover.Request Rpc.Account.Recover.Response
AccountCreate Rpc.Account.Create.Request Rpc.Account.Create.Response
AccountSelect Rpc.Account.Select.Request Rpc.Account.Select.Response
AccountStop Rpc.Account.Stop.Request Rpc.Account.Stop.Response
ImageGetBlob Rpc.Ipfs.Image.Get.Blob.Request Rpc.Ipfs.Image.Get.Blob.Response
VersionGet Rpc.Version.Get.Request Rpc.Version.Get.Response
LogSend Rpc.Log.Send.Request Rpc.Log.Send.Response
ConfigGet Rpc.Config.Get.Request Rpc.Config.Get.Response
Shutdown Rpc.Shutdown.Request Rpc.Shutdown.Response
ExternalDropFiles Rpc.ExternalDrop.Files.Request Rpc.ExternalDrop.Files.Response
ExternalDropContent Rpc.ExternalDrop.Content.Request Rpc.ExternalDrop.Content.Response
LinkPreview Rpc.LinkPreview.Request Rpc.LinkPreview.Response
UploadFile Rpc.UploadFile.Request Rpc.UploadFile.Response
BlockUpload Rpc.Block.Upload.Request Rpc.Block.Upload.Response
BlockReplace Rpc.Block.Replace.Request Rpc.Block.Replace.Response
BlockOpen Rpc.Block.Open.Request Rpc.Block.Open.Response
BlockGetPublicWebURL Rpc.Block.GetPublicWebURL.Request Rpc.Block.GetPublicWebURL.Response
BlockOpenBreadcrumbs Rpc.Block.OpenBreadcrumbs.Request Rpc.Block.OpenBreadcrumbs.Response
BlockSetBreadcrumbs Rpc.Block.SetBreadcrumbs.Request Rpc.Block.SetBreadcrumbs.Response
BlockCreate Rpc.Block.Create.Request Rpc.Block.Create.Response
BlockCreatePage Rpc.Block.CreatePage.Request Rpc.Block.CreatePage.Response
BlockUnlink Rpc.Block.Unlink.Request Rpc.Block.Unlink.Response
BlockClose Rpc.Block.Close.Request Rpc.Block.Close.Response
BlockDownload Rpc.Block.Download.Request Rpc.Block.Download.Response
BlockGetMarks Rpc.Block.Get.Marks.Request Rpc.Block.Get.Marks.Response
BlockUndo Rpc.Block.Undo.Request Rpc.Block.Undo.Response
BlockRedo Rpc.Block.Redo.Request Rpc.Block.Redo.Response
BlockSetFields Rpc.Block.Set.Fields.Request Rpc.Block.Set.Fields.Response
BlockSetRestrictions Rpc.Block.Set.Restrictions.Request Rpc.Block.Set.Restrictions.Response
BlockSetDetails Rpc.Block.Set.Details.Request Rpc.Block.Set.Details.Response
BlockSetPageIsArchived Rpc.Block.Set.Page.IsArchived.Request Rpc.Block.Set.Page.IsArchived.Response
BlockListMove Rpc.BlockList.Move.Request Rpc.BlockList.Move.Response
BlockListMoveToNewPage Rpc.BlockList.MoveToNewPage.Request Rpc.BlockList.MoveToNewPage.Response
BlockListConvertChildrenToPages Rpc.BlockList.ConvertChildrenToPages.Request Rpc.BlockList.ConvertChildrenToPages.Response
BlockListSetFields Rpc.BlockList.Set.Fields.Request Rpc.BlockList.Set.Fields.Response
BlockListSetTextStyle Rpc.BlockList.Set.Text.Style.Request Rpc.BlockList.Set.Text.Style.Response
BlockListDuplicate Rpc.BlockList.Duplicate.Request Rpc.BlockList.Duplicate.Response
BlockListSetBackgroundColor Rpc.BlockList.Set.BackgroundColor.Request Rpc.BlockList.Set.BackgroundColor.Response
BlockListSetAlign Rpc.BlockList.Set.Align.Request Rpc.BlockList.Set.Align.Response
BlockListSetDivStyle Rpc.BlockList.Set.Div.Style.Request Rpc.BlockList.Set.Div.Style.Response
BlockListSetPageIsArchived Rpc.BlockList.Set.Page.IsArchived.Request Rpc.BlockList.Set.Page.IsArchived.Response
BlockListDeletePage Rpc.BlockList.Delete.Page.Request Rpc.BlockList.Delete.Page.Response
BlockSetTextText Rpc.Block.Set.Text.Text.Request Rpc.Block.Set.Text.Text.Response
BlockSetTextColor Rpc.Block.Set.Text.Color.Request Rpc.Block.Set.Text.Color.Response
BlockListSetTextColor Rpc.BlockList.Set.Text.Color.Request Rpc.BlockList.Set.Text.Color.Response
BlockListSetTextMark Rpc.BlockList.Set.Text.Mark.Request Rpc.BlockList.Set.Text.Mark.Response
BlockSetTextStyle Rpc.Block.Set.Text.Style.Request Rpc.Block.Set.Text.Style.Response
BlockSetTextChecked Rpc.Block.Set.Text.Checked.Request Rpc.Block.Set.Text.Checked.Response
BlockSplit Rpc.Block.Split.Request Rpc.Block.Split.Response
BlockMerge Rpc.Block.Merge.Request Rpc.Block.Merge.Response
BlockCopy Rpc.Block.Copy.Request Rpc.Block.Copy.Response
BlockPaste Rpc.Block.Paste.Request Rpc.Block.Paste.Response
BlockCut Rpc.Block.Cut.Request Rpc.Block.Cut.Response
BlockExport Rpc.Block.Export.Request Rpc.Block.Export.Response
BlockImportMarkdown Rpc.Block.ImportMarkdown.Request Rpc.Block.ImportMarkdown.Response
BlockSetFileName Rpc.Block.Set.File.Name.Request Rpc.Block.Set.File.Name.Response
BlockSetImageName Rpc.Block.Set.Image.Name.Request Rpc.Block.Set.Image.Name.Response
BlockSetImageWidth Rpc.Block.Set.Image.Width.Request Rpc.Block.Set.Image.Width.Response
BlockSetVideoName Rpc.Block.Set.Video.Name.Request Rpc.Block.Set.Video.Name.Response
BlockSetVideoWidth Rpc.Block.Set.Video.Width.Request Rpc.Block.Set.Video.Width.Response
BlockSetLinkTargetBlockId Rpc.Block.Set.Link.TargetBlockId.Request Rpc.Block.Set.Link.TargetBlockId.Response
BlockSetDataviewView Rpc.Block.Set.Dataview.View.Request Rpc.Block.Set.Dataview.View.Response
BlockSetDataviewActiveView Rpc.Block.Set.Dataview.ActiveView.Request Rpc.Block.Set.Dataview.ActiveView.Response
BlockCreateDataviewView Rpc.Block.Create.Dataview.View.Request Rpc.Block.Create.Dataview.View.Response
BlockDeleteDataviewView Rpc.Block.Delete.Dataview.View.Request Rpc.Block.Delete.Dataview.View.Response
BlockCreateDataviewRecord Rpc.Block.Create.Dataview.Record.Request Rpc.Block.Create.Dataview.Record.Response
BlockUpdateDataviewRecord Rpc.Block.Update.Dataview.Record.Request Rpc.Block.Update.Dataview.Record.Response
BlockDeleteDataviewRecord Rpc.Block.Delete.Dataview.Record.Request Rpc.Block.Delete.Dataview.Record.Response
BlockBookmarkFetch Rpc.Block.Bookmark.Fetch.Request Rpc.Block.Bookmark.Fetch.Response
BlockBookmarkCreateAndFetch Rpc.Block.Bookmark.CreateAndFetch.Request Rpc.Block.Bookmark.CreateAndFetch.Response
BlockFileCreateAndUpload Rpc.Block.File.CreateAndUpload.Request Rpc.Block.File.CreateAndUpload.Response
NavigationListPages Rpc.Navigation.ListPages.Request Rpc.Navigation.ListPages.Response
NavigationGetPageInfoWithLinks Rpc.Navigation.GetPageInfoWithLinks.Request Rpc.Navigation.GetPageInfoWithLinks.Response
Ping Rpc.Ping.Request Rpc.Ping.Response
ProcessCancel Rpc.Process.Cancel.Request Rpc.Process.Cancel.Response
HistoryShow Rpc.History.Show.Request Rpc.History.Show.Response
HistoryVersions Rpc.History.Versions.Request Rpc.History.Versions.Response
HistorySetVersion Rpc.History.SetVersion.Request Rpc.History.SetVersion.Response
ListenEvents Empty Event stream used only for lib-server via grpc

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

Field Type Label Description
targetId string
position model.Block.Position
blocks model.Block repeated

Change.BlockDuplicate

Field Type Label Description
targetId string
position model.Block.Position
ids string repeated

Change.BlockMove

Field Type Label Description
targetId string
position model.Block.Position
ids string repeated

Change.BlockRemove

Field Type Label Description
ids string repeated

Change.BlockUpdate

Field Type Label Description
events Event.Message repeated

Change.Content

Field Type Label Description
blockCreate Change.BlockCreate
blockUpdate Change.BlockUpdate
blockRemove Change.BlockRemove
blockMove Change.BlockMove
blockDuplicate Change.BlockDuplicate
detailsSet Change.DetailsSet
detailsUnset Change.DetailsUnset

Change.DetailsSet

Field Type Label Description
key string
value google.protobuf.Value

Change.DetailsUnset

Field Type Label Description
key string

Change.FileKeys

Field Type Label Description
hash string
keys Change.FileKeys.KeysEntry repeated

Change.FileKeys.KeysEntry

Field Type Label Description
key string
value string

Change.Snapshot

Field Type Label Description
logHeads Change.Snapshot.LogHeadsEntry repeated logId -> lastChangeId
data model.SmartBlockSnapshotBase snapshot data
fileKeys Change.FileKeys repeated all file keys related to doc

Change.Snapshot.LogHeadsEntry

Field Type Label Description
key string
value string

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

Field Type Label Description
code Rpc.Account.Create.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Account.Recover.Response.Error Error while trying to recover an account

Rpc.Account.Recover.Response.Error

Field Type Label Description
code Rpc.Account.Recover.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Account.Select.Response.Error Error while trying to launch/select an account
account model.Account Selected account

Rpc.Account.Select.Response.Error

Field Type Label Description
code Rpc.Account.Select.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Account.Stop.Response.Error Error while trying to launch/select an account

Rpc.Account.Stop.Response.Error

Field Type Label Description
code Rpc.Account.Stop.Response.Error.Code
description string

Rpc.Block

Namespace, that agregates subtopics and actions, that relates to blocks.

Rpc.Block.Bookmark

Rpc.Block.Bookmark.CreateAndFetch

Rpc.Block.Bookmark.CreateAndFetch.Request

Field Type Label Description
contextId string
targetId string
position model.Block.Position
url string

Rpc.Block.Bookmark.CreateAndFetch.Response

Field Type Label Description
error Rpc.Block.Bookmark.CreateAndFetch.Response.Error
blockId string
event ResponseEvent

Rpc.Block.Bookmark.CreateAndFetch.Response.Error

Field Type Label Description
code Rpc.Block.Bookmark.CreateAndFetch.Response.Error.Code
description string

Rpc.Block.Bookmark.Fetch

Rpc.Block.Bookmark.Fetch.Request

Field Type Label Description
contextId string
blockId string
url string

Rpc.Block.Bookmark.Fetch.Response

Field Type Label Description
error Rpc.Block.Bookmark.Fetch.Response.Error
event ResponseEvent

Rpc.Block.Bookmark.Fetch.Response.Error

Field Type Label Description
code Rpc.Block.Bookmark.Fetch.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Block.Close.Response.Error

Rpc.Block.Close.Response.Error

Field Type Label Description
code Rpc.Block.Close.Response.Error.Code
description string

Rpc.Block.Copy

Rpc.Block.Copy.Request

Field Type Label Description
contextId string
blocks model.Block repeated
selectedTextRange model.Range

Rpc.Block.Copy.Response

Field Type Label Description
error Rpc.Block.Copy.Response.Error
textSlot string
htmlSlot string
anySlot model.Block repeated

Rpc.Block.Copy.Response.Error

Field Type Label Description
code Rpc.Block.Copy.Response.Error.Code
description string

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

Field Type Label Description
contextId string
blockId string
record google.protobuf.Struct

Rpc.Block.Create.Dataview.Record.Response

Field Type Label Description
error Rpc.Block.Create.Dataview.Record.Response.Error
record google.protobuf.Struct

Rpc.Block.Create.Dataview.Record.Response.Error

Field Type Label Description
code Rpc.Block.Create.Dataview.Record.Response.Error.Code
description string

Rpc.Block.Create.Dataview.View

Rpc.Block.Create.Dataview.View.Request

Field Type Label Description
contextId string
blockId string id of dataview block to insert the new block
view model.Block.Content.Dataview.View

Rpc.Block.Create.Dataview.View.Response

Field Type Label Description
error Rpc.Block.Create.Dataview.View.Response.Error
event ResponseEvent
viewId string

Rpc.Block.Create.Dataview.View.Response.Error

Field Type Label Description
code Rpc.Block.Create.Dataview.View.Response.Error.Code
description string

Rpc.Block.Create.Request

common simple block command

Field Type Label Description
contextId string id of the context block
targetId string id of the closest block
block model.Block
position model.Block.Position

Rpc.Block.Create.Response

Field Type Label Description
error Rpc.Block.Create.Response.Error
blockId string
event ResponseEvent

Rpc.Block.Create.Response.Error

Field Type Label Description
code Rpc.Block.Create.Response.Error.Code
description string

Rpc.Block.CreatePage

Rpc.Block.CreatePage.Request

Field Type Label Description
contextId string id of the context block
targetId string id of the closest block
details google.protobuf.Struct page details
position model.Block.Position

Rpc.Block.CreatePage.Response

Field Type Label Description
error Rpc.Block.CreatePage.Response.Error
blockId string
targetId string
event ResponseEvent

Rpc.Block.CreatePage.Response.Error

Field Type Label Description
code Rpc.Block.CreatePage.Response.Error.Code
description string

Rpc.Block.Cut

Rpc.Block.Cut.Request

Field Type Label Description
contextId string
blocks model.Block repeated
selectedTextRange model.Range

Rpc.Block.Cut.Response

Field Type Label Description
error Rpc.Block.Cut.Response.Error
textSlot string
htmlSlot string
anySlot model.Block repeated
event ResponseEvent

Rpc.Block.Cut.Response.Error

Field Type Label Description
code Rpc.Block.Cut.Response.Error.Code
description string

Rpc.Block.Delete

Rpc.Block.Delete.Dataview

Rpc.Block.Delete.Dataview.Record

Rpc.Block.Delete.Dataview.Record.Request

Field Type Label Description
contextId string
blockId string
recordId string

Rpc.Block.Delete.Dataview.Record.Response

Field Type Label Description
error Rpc.Block.Delete.Dataview.Record.Response.Error
event ResponseEvent

Rpc.Block.Delete.Dataview.Record.Response.Error

Field Type Label Description
code Rpc.Block.Delete.Dataview.Record.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Block.Delete.Dataview.View.Response.Error
event ResponseEvent

Rpc.Block.Delete.Dataview.View.Response.Error

Field Type Label Description
code Rpc.Block.Delete.Dataview.View.Response.Error.Code
description string

Rpc.Block.Download

Rpc.Block.Download.Request

Field Type Label Description
contextId string
blockId string

Rpc.Block.Download.Response

Field Type Label Description
error Rpc.Block.Download.Response.Error
event ResponseEvent

Rpc.Block.Download.Response.Error

Field Type Label Description
code Rpc.Block.Download.Response.Error.Code
description string

Rpc.Block.Export

Rpc.Block.Export.Request

Field Type Label Description
contextId string
blocks model.Block repeated

Rpc.Block.Export.Response

Field Type Label Description
error Rpc.Block.Export.Response.Error
path string
event ResponseEvent

Rpc.Block.Export.Response.Error

Field Type Label Description
code Rpc.Block.Export.Response.Error.Code
description string

Rpc.Block.File

Rpc.Block.File.CreateAndUpload

Rpc.Block.File.CreateAndUpload.Request

Field Type Label Description
contextId string
targetId string
position model.Block.Position
url string
localPath string
fileType model.Block.Content.File.Type

Rpc.Block.File.CreateAndUpload.Response

Field Type Label Description
error Rpc.Block.File.CreateAndUpload.Response.Error
blockId string
event ResponseEvent

Rpc.Block.File.CreateAndUpload.Response.Error

Field Type Label Description
code Rpc.Block.File.CreateAndUpload.Response.Error.Code
description string

Rpc.Block.Get

Rpc.Block.Get.Marks

Get marks list in the selected range in text block.

Rpc.Block.Get.Marks.Request

Field Type Label Description
contextId string
blockId string
range model.Range

Rpc.Block.Get.Marks.Response

Field Type Label Description
error Rpc.Block.Get.Marks.Response.Error
event ResponseEvent

Rpc.Block.Get.Marks.Response.Error

Field Type Label Description
code Rpc.Block.Get.Marks.Response.Error.Code
description string

Rpc.Block.GetPublicWebURL

Rpc.Block.GetPublicWebURL.Request

Field Type Label Description
blockId string

Rpc.Block.GetPublicWebURL.Response

Field Type Label Description
error Rpc.Block.GetPublicWebURL.Response.Error
url string

Rpc.Block.GetPublicWebURL.Response.Error

Field Type Label Description
code Rpc.Block.GetPublicWebURL.Response.Error.Code
description string

Rpc.Block.ImportMarkdown

Rpc.Block.ImportMarkdown.Request

Field Type Label Description
contextId string
importPath string

Rpc.Block.ImportMarkdown.Response

Field Type Label Description
error Rpc.Block.ImportMarkdown.Response.Error
rootLinkIds string repeated
event ResponseEvent

Rpc.Block.ImportMarkdown.Response.Error

Field Type Label Description
code Rpc.Block.ImportMarkdown.Response.Error.Code
description string

Rpc.Block.Merge

Rpc.Block.Merge.Request

Field Type Label Description
contextId string
firstBlockId string
secondBlockId string

Rpc.Block.Merge.Response

Field Type Label Description
error Rpc.Block.Merge.Response.Error
event ResponseEvent

Rpc.Block.Merge.Response.Error

Field Type Label Description
code Rpc.Block.Merge.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Block.Open.Response.Error
event ResponseEvent

Rpc.Block.Open.Response.Error

Field Type Label Description
code Rpc.Block.Open.Response.Error.Code
description string

Rpc.Block.OpenBreadcrumbs

Rpc.Block.OpenBreadcrumbs.Request

Field Type Label Description
contextId string id of the context blo1k

Rpc.Block.OpenBreadcrumbs.Response

Field Type Label Description
error Rpc.Block.OpenBreadcrumbs.Response.Error
blockId string
event ResponseEvent

Rpc.Block.OpenBreadcrumbs.Response.Error

Field Type Label Description
code Rpc.Block.OpenBreadcrumbs.Response.Error.Code
description string

Rpc.Block.Paste

Rpc.Block.Paste.Request

Field Type Label Description
contextId string
focusedBlockId string
selectedTextRange model.Range
selectedBlockIds string repeated
isPartOfBlock bool
textSlot string
htmlSlot string
anySlot model.Block repeated
fileSlot Rpc.Block.Paste.Request.File repeated

Rpc.Block.Paste.Request.File

Field Type Label Description
name string
data bytes

Rpc.Block.Paste.Response

Field Type Label Description
error Rpc.Block.Paste.Response.Error
blockIds string repeated
caretPosition int32
isSameBlockCaret bool
event ResponseEvent

Rpc.Block.Paste.Response.Error

Field Type Label Description
code Rpc.Block.Paste.Response.Error.Code
description string

Rpc.Block.Redo

Rpc.Block.Redo.Request

Field Type Label Description
contextId string id of the context block

Rpc.Block.Redo.Response

Field Type Label Description
error Rpc.Block.Redo.Response.Error
event ResponseEvent

Rpc.Block.Redo.Response.Error

Field Type Label Description
code Rpc.Block.Redo.Response.Error.Code
description string

Rpc.Block.Replace

Rpc.Block.Replace.Request

Field Type Label Description
contextId string
blockId string
block model.Block

Rpc.Block.Replace.Response

Field Type Label Description
error Rpc.Block.Replace.Response.Error
blockId string
event ResponseEvent

Rpc.Block.Replace.Response.Error

Field Type Label Description
code Rpc.Block.Replace.Response.Error.Code
description string

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

Field Type Label Description
contextId string
blockId string id of dataview block
viewId string id of active view
offset uint32
limit uint32

Rpc.Block.Set.Dataview.ActiveView.Response

Field Type Label Description
error Rpc.Block.Set.Dataview.ActiveView.Response.Error
event ResponseEvent

Rpc.Block.Set.Dataview.ActiveView.Response.Error

Field Type Label Description
code Rpc.Block.Set.Dataview.ActiveView.Response.Error.Code
description string

Rpc.Block.Set.Dataview.View

Rpc.Block.Set.Dataview.View.Request

Field Type Label Description
contextId string
blockId string id of dataview block to update
viewId string id of view to update
view model.Block.Content.Dataview.View

Rpc.Block.Set.Dataview.View.Response

Field Type Label Description
error Rpc.Block.Set.Dataview.View.Response.Error
event ResponseEvent

Rpc.Block.Set.Dataview.View.Response.Error

Field Type Label Description
code Rpc.Block.Set.Dataview.View.Response.Error.Code
description string

Rpc.Block.Set.Details

Rpc.Block.Set.Details.Detail

Field Type Label Description
key string
value google.protobuf.Value NUll - removes key

Rpc.Block.Set.Details.Request

Field Type Label Description
contextId string
details Rpc.Block.Set.Details.Detail repeated

Rpc.Block.Set.Details.Response

Field Type Label Description
error Rpc.Block.Set.Details.Response.Error

Rpc.Block.Set.Details.Response.Error

Field Type Label Description
code Rpc.Block.Set.Details.Response.Error.Code
description string

Rpc.Block.Set.Fields

Rpc.Block.Set.Fields.Request

Field Type Label Description
contextId string
blockId string
fields google.protobuf.Struct

Rpc.Block.Set.Fields.Response

Field Type Label Description
error Rpc.Block.Set.Fields.Response.Error
event ResponseEvent

Rpc.Block.Set.Fields.Response.Error

Field Type Label Description
code Rpc.Block.Set.Fields.Response.Error.Code
description string

Rpc.Block.Set.File

Rpc.Block.Set.File.Name

Rpc.Block.Set.File.Name.Request

Field Type Label Description
contextId string
blockId string
name string

Rpc.Block.Set.File.Name.Response

Field Type Label Description
error Rpc.Block.Set.File.Name.Response.Error
event ResponseEvent

Rpc.Block.Set.File.Name.Response.Error

Field Type Label Description
code Rpc.Block.Set.File.Name.Response.Error.Code
description string

Rpc.Block.Set.Image

Rpc.Block.Set.Image.Name

Rpc.Block.Set.Image.Name.Request

Field Type Label Description
contextId string
blockId string
name string

Rpc.Block.Set.Image.Name.Response

Field Type Label Description
error Rpc.Block.Set.Image.Name.Response.Error

Rpc.Block.Set.Image.Name.Response.Error

Field Type Label Description
code Rpc.Block.Set.Image.Name.Response.Error.Code
description string

Rpc.Block.Set.Image.Width

Rpc.Block.Set.Image.Width.Request

Field Type Label Description
contextId string
blockId string
width int32

Rpc.Block.Set.Image.Width.Response

Field Type Label Description
error Rpc.Block.Set.Image.Width.Response.Error

Rpc.Block.Set.Image.Width.Response.Error

Field Type Label Description
code Rpc.Block.Set.Image.Width.Response.Error.Code
description string

Field Type Label Description
contextId string
blockId string
targetBlockId string

Field Type Label Description
error Rpc.Block.Set.Link.TargetBlockId.Response.Error
event ResponseEvent

Field Type Label Description
code Rpc.Block.Set.Link.TargetBlockId.Response.Error.Code
description string

Rpc.Block.Set.Page

Rpc.Block.Set.Page.IsArchived

Rpc.Block.Set.Page.IsArchived.Request

Field Type Label Description
contextId string
blockId string
isArchived bool

Rpc.Block.Set.Page.IsArchived.Response

Field Type Label Description
error Rpc.Block.Set.Page.IsArchived.Response.Error

Rpc.Block.Set.Page.IsArchived.Response.Error

Field Type Label Description
code Rpc.Block.Set.Page.IsArchived.Response.Error.Code
description string

Rpc.Block.Set.Restrictions

Rpc.Block.Set.Restrictions.Request

Field Type Label Description
contextId string
blockId string
restrictions model.Block.Restrictions

Rpc.Block.Set.Restrictions.Response

Field Type Label Description
error Rpc.Block.Set.Restrictions.Response.Error
event ResponseEvent

Rpc.Block.Set.Restrictions.Response.Error

Field Type Label Description
code Rpc.Block.Set.Restrictions.Response.Error.Code
description string

Rpc.Block.Set.Text

Rpc.Block.Set.Text.Checked

Rpc.Block.Set.Text.Checked.Request

Field Type Label Description
contextId string
blockId string
checked bool

Rpc.Block.Set.Text.Checked.Response

Field Type Label Description
error Rpc.Block.Set.Text.Checked.Response.Error
event ResponseEvent

Rpc.Block.Set.Text.Checked.Response.Error

Field Type Label Description
code Rpc.Block.Set.Text.Checked.Response.Error.Code
description string

Rpc.Block.Set.Text.Color

Rpc.Block.Set.Text.Color.Request

Field Type Label Description
contextId string
blockId string
color string

Rpc.Block.Set.Text.Color.Response

Field Type Label Description
error Rpc.Block.Set.Text.Color.Response.Error
event ResponseEvent

Rpc.Block.Set.Text.Color.Response.Error

Field Type Label Description
code Rpc.Block.Set.Text.Color.Response.Error.Code
description string

Rpc.Block.Set.Text.Style

Rpc.Block.Set.Text.Style.Request

Field Type Label Description
contextId string
blockId string
style model.Block.Content.Text.Style

Rpc.Block.Set.Text.Style.Response

Field Type Label Description
error Rpc.Block.Set.Text.Style.Response.Error
event ResponseEvent

Rpc.Block.Set.Text.Style.Response.Error

Field Type Label Description
code Rpc.Block.Set.Text.Style.Response.Error.Code
description string

Rpc.Block.Set.Text.Text

Rpc.Block.Set.Text.Text.Request

Field Type Label Description
contextId string
blockId string
text string
marks model.Block.Content.Text.Marks

Rpc.Block.Set.Text.Text.Response

Field Type Label Description
error Rpc.Block.Set.Text.Text.Response.Error

Rpc.Block.Set.Text.Text.Response.Error

Field Type Label Description
code Rpc.Block.Set.Text.Text.Response.Error.Code
description string

Rpc.Block.Set.Video

Rpc.Block.Set.Video.Name

Rpc.Block.Set.Video.Name.Request

Field Type Label Description
contextId string
blockId string
name string

Rpc.Block.Set.Video.Name.Response

Field Type Label Description
error Rpc.Block.Set.Video.Name.Response.Error

Rpc.Block.Set.Video.Name.Response.Error

Field Type Label Description
code Rpc.Block.Set.Video.Name.Response.Error.Code
description string

Rpc.Block.Set.Video.Width

Rpc.Block.Set.Video.Width.Request

Field Type Label Description
contextId string
blockId string
width int32

Rpc.Block.Set.Video.Width.Response

Field Type Label Description
error Rpc.Block.Set.Video.Width.Response.Error

Rpc.Block.Set.Video.Width.Response.Error

Field Type Label Description
code Rpc.Block.Set.Video.Width.Response.Error.Code
description string

Rpc.Block.SetBreadcrumbs

Rpc.Block.SetBreadcrumbs.Request

Field Type Label Description
breadcrumbsId string
ids string repeated page ids

Rpc.Block.SetBreadcrumbs.Response

Field Type Label Description
error Rpc.Block.SetBreadcrumbs.Response.Error
event ResponseEvent

Rpc.Block.SetBreadcrumbs.Response.Error

Field Type Label Description
code Rpc.Block.SetBreadcrumbs.Response.Error.Code
description string

Rpc.Block.Split

Rpc.Block.Split.Request

Field Type Label Description
contextId string
blockId string
range model.Range
style model.Block.Content.Text.Style

Rpc.Block.Split.Response

Field Type Label Description
error Rpc.Block.Split.Response.Error
blockId string
event ResponseEvent

Rpc.Block.Split.Response.Error

Field Type Label Description
code Rpc.Block.Split.Response.Error.Code
description string

Rpc.Block.Undo

Rpc.Block.Undo.Request

Field Type Label Description
contextId string id of the context block

Rpc.Block.Undo.Response

Field Type Label Description
error Rpc.Block.Undo.Response.Error
event ResponseEvent

Rpc.Block.Undo.Response.Error

Field Type Label Description
code Rpc.Block.Undo.Response.Error.Code
description string

Remove blocks from the childrenIds of its parents

Field Type Label Description
contextId string id of the context block
blockIds string repeated targets to remove

Field Type Label Description
error Rpc.Block.Unlink.Response.Error
event ResponseEvent

Field Type Label Description
code Rpc.Block.Unlink.Response.Error.Code
description string

Rpc.Block.Update

Rpc.Block.Update.Dataview

Rpc.Block.Update.Dataview.Record

Rpc.Block.Update.Dataview.Record.Request

Field Type Label Description
contextId string
blockId string
recordId string
record google.protobuf.Struct

Rpc.Block.Update.Dataview.Record.Response

Field Type Label Description
error Rpc.Block.Update.Dataview.Record.Response.Error

Rpc.Block.Update.Dataview.Record.Response.Error

Field Type Label Description
code Rpc.Block.Update.Dataview.Record.Response.Error.Code
description string

Rpc.Block.Upload

Rpc.Block.Upload.Request

Field Type Label Description
contextId string
blockId string
filePath string
url string

Rpc.Block.Upload.Response

Field Type Label Description
error Rpc.Block.Upload.Response.Error
event ResponseEvent

Rpc.Block.Upload.Response.Error

Field Type Label Description
code Rpc.Block.Upload.Response.Error.Code
description string

Rpc.BlockList

Rpc.BlockList.ConvertChildrenToPages

Rpc.BlockList.ConvertChildrenToPages.Request

Field Type Label Description
contextId string
blockIds string repeated

Rpc.BlockList.ConvertChildrenToPages.Response

Field Type Label Description
error Rpc.BlockList.ConvertChildrenToPages.Response.Error
linkIds string repeated

Rpc.BlockList.ConvertChildrenToPages.Response.Error

Field Type Label Description
code Rpc.BlockList.ConvertChildrenToPages.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.BlockList.Delete.Page.Response.Error
event ResponseEvent

Rpc.BlockList.Delete.Page.Response.Error

Field Type Label Description
code Rpc.BlockList.Delete.Page.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.BlockList.Duplicate.Response.Error
blockIds string repeated
event ResponseEvent

Rpc.BlockList.Duplicate.Response.Error

Field Type Label Description
code Rpc.BlockList.Duplicate.Response.Error.Code
description string

Rpc.BlockList.Move

Rpc.BlockList.Move.Request

Field Type Label Description
contextId string
blockIds string repeated
targetContextId string
dropTargetId string
position model.Block.Position

Rpc.BlockList.Move.Response

Field Type Label Description
error Rpc.BlockList.Move.Response.Error
event ResponseEvent

Rpc.BlockList.Move.Response.Error

Field Type Label Description
code Rpc.BlockList.Move.Response.Error.Code
description string

Rpc.BlockList.MoveToNewPage

Rpc.BlockList.MoveToNewPage.Request

Field Type Label Description
contextId string
blockIds string repeated
details google.protobuf.Struct page details
dropTargetId string
position model.Block.Position

Rpc.BlockList.MoveToNewPage.Response

Field Type Label Description
error Rpc.BlockList.MoveToNewPage.Response.Error
linkId string
event ResponseEvent

Rpc.BlockList.MoveToNewPage.Response.Error

Field Type Label Description
code Rpc.BlockList.MoveToNewPage.Response.Error.Code
description string

Rpc.BlockList.Set

Rpc.BlockList.Set.Align

Rpc.BlockList.Set.Align.Request

Field Type Label Description
contextId string
blockIds string repeated
align model.Block.Align

Rpc.BlockList.Set.Align.Response

Field Type Label Description
error Rpc.BlockList.Set.Align.Response.Error
event ResponseEvent

Rpc.BlockList.Set.Align.Response.Error

Field Type Label Description
code Rpc.BlockList.Set.Align.Response.Error.Code
description string

Rpc.BlockList.Set.BackgroundColor

Rpc.BlockList.Set.BackgroundColor.Request

Field Type Label Description
contextId string
blockIds string repeated
color string

Rpc.BlockList.Set.BackgroundColor.Response

Field Type Label Description
error Rpc.BlockList.Set.BackgroundColor.Response.Error
event ResponseEvent

Rpc.BlockList.Set.BackgroundColor.Response.Error

Field Type Label Description
code Rpc.BlockList.Set.BackgroundColor.Response.Error.Code
description string

Rpc.BlockList.Set.Div

Rpc.BlockList.Set.Div.Style

Rpc.BlockList.Set.Div.Style.Request

Field Type Label Description
contextId string
blockIds string repeated
style model.Block.Content.Div.Style

Rpc.BlockList.Set.Div.Style.Response

Field Type Label Description
error Rpc.BlockList.Set.Div.Style.Response.Error
event ResponseEvent

Rpc.BlockList.Set.Div.Style.Response.Error

Field Type Label Description
code Rpc.BlockList.Set.Div.Style.Response.Error.Code
description string

Rpc.BlockList.Set.Fields

Rpc.BlockList.Set.Fields.Request

Field Type Label Description
contextId string
blockFields Rpc.BlockList.Set.Fields.Request.BlockField repeated

Rpc.BlockList.Set.Fields.Request.BlockField

Field Type Label Description
blockId string
fields google.protobuf.Struct

Rpc.BlockList.Set.Fields.Response

Field Type Label Description
error Rpc.BlockList.Set.Fields.Response.Error
event ResponseEvent

Rpc.BlockList.Set.Fields.Response.Error

Field Type Label Description
code Rpc.BlockList.Set.Fields.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.BlockList.Set.Page.IsArchived.Response.Error

Rpc.BlockList.Set.Page.IsArchived.Response.Error

Field Type Label Description
code Rpc.BlockList.Set.Page.IsArchived.Response.Error.Code
description string

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

Field Type Label Description
contextId string
blockIds string repeated
color string

Rpc.BlockList.Set.Text.Color.Response

Field Type Label Description
error Rpc.BlockList.Set.Text.Color.Response.Error
event ResponseEvent

Rpc.BlockList.Set.Text.Color.Response.Error

Field Type Label Description
code Rpc.BlockList.Set.Text.Color.Response.Error.Code
description string

Rpc.BlockList.Set.Text.Mark

Rpc.BlockList.Set.Text.Mark.Request

Field Type Label Description
contextId string
blockIds string repeated
mark model.Block.Content.Text.Mark

Rpc.BlockList.Set.Text.Mark.Response

Field Type Label Description
error Rpc.BlockList.Set.Text.Mark.Response.Error
event ResponseEvent

Rpc.BlockList.Set.Text.Mark.Response.Error

Field Type Label Description
code Rpc.BlockList.Set.Text.Mark.Response.Error.Code
description string

Rpc.BlockList.Set.Text.Style

Rpc.BlockList.Set.Text.Style.Request

Field Type Label Description
contextId string
blockIds string repeated
style model.Block.Content.Text.Style

Rpc.BlockList.Set.Text.Style.Response

Field Type Label Description
error Rpc.BlockList.Set.Text.Style.Response.Error
event ResponseEvent

Rpc.BlockList.Set.Text.Style.Response.Error

Field Type Label Description
code Rpc.BlockList.Set.Text.Style.Response.Error.Code
description string

Rpc.Config

Rpc.Config.Get

Rpc.Config.Get.Request

Rpc.Config.Get.Response

Field Type Label Description
error Rpc.Config.Get.Response.Error
homeBlockId string home dashboard block id
archiveBlockId string archive block id
profileBlockId string profile block id
gatewayUrl string gateway url for fetching static files

Rpc.Config.Get.Response.Error

Field Type Label Description
code Rpc.Config.Get.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.ExternalDrop.Content.Response.Error

Rpc.ExternalDrop.Content.Response.Error

Field Type Label Description
code Rpc.ExternalDrop.Content.Response.Error.Code
description string

Rpc.ExternalDrop.Files

Rpc.ExternalDrop.Files.Request

Field Type Label Description
contextId string
dropTargetId string
position model.Block.Position
localFilePaths string repeated

Rpc.ExternalDrop.Files.Response

Field Type Label Description
error Rpc.ExternalDrop.Files.Response.Error
event ResponseEvent

Rpc.ExternalDrop.Files.Response.Error

Field Type Label Description
code Rpc.ExternalDrop.Files.Response.Error.Code
description string

Rpc.History

Rpc.History.SetVersion

Rpc.History.SetVersion.Request

Field Type Label Description
pageId string
versionId string

Rpc.History.SetVersion.Response

Field Type Label Description
error Rpc.History.SetVersion.Response.Error

Rpc.History.SetVersion.Response.Error

Field Type Label Description
code Rpc.History.SetVersion.Response.Error.Code
description string

Rpc.History.Show

returns blockShow event for given version

Rpc.History.Show.Request

Field Type Label Description
pageId string
versionId string

Rpc.History.Show.Response

Field Type Label Description
error Rpc.History.Show.Response.Error
blockShow Event.Block.Show

Rpc.History.Show.Response.Error

Field Type Label Description
code Rpc.History.Show.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.History.Versions.Response.Error
versions Rpc.History.Versions.Version repeated

Rpc.History.Versions.Response.Error

Field Type Label Description
code Rpc.History.Versions.Response.Error.Code
description string

Rpc.History.Versions.Version

Field Type Label Description
id string
previousIds string repeated
authorId string
authorName string
time int64

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

Field Type Label Description
error Rpc.Ipfs.File.Get.Response.Error
data bytes
media string
name string

Rpc.Ipfs.File.Get.Response.Error

Field Type Label Description
code Rpc.Ipfs.File.Get.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Ipfs.Image.Get.Blob.Response.Error
blob bytes

Rpc.Ipfs.Image.Get.Blob.Response.Error

Field Type Label Description
code Rpc.Ipfs.Image.Get.Blob.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Ipfs.Image.Get.File.Response.Error
localPath string

Rpc.Ipfs.Image.Get.File.Response.Error

Field Type Label Description
code Rpc.Ipfs.Image.Get.File.Response.Error.Code
description string

Rpc.LinkPreview

Rpc.LinkPreview.Request

Field Type Label Description
url string

Rpc.LinkPreview.Response

Field Type Label Description
error Rpc.LinkPreview.Response.Error
linkPreview model.LinkPreview

Rpc.LinkPreview.Response.Error

Field Type Label Description
code Rpc.LinkPreview.Response.Error.Code
description string

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

Field Type Label Description
message string
level Rpc.Log.Send.Request.Level

Rpc.Log.Send.Response

Field Type Label Description
error Rpc.Log.Send.Response.Error

Rpc.Log.Send.Response.Error

Field Type Label Description
code Rpc.Log.Send.Response.Error.Code
description string

Rpc.Navigation

Get the info for page alongside with info for all inbound and outbound links from/to this page

Field Type Label Description
pageId string

Field Type Label Description
error Rpc.Navigation.GetPageInfoWithLinks.Response.Error
page model.PageInfoWithLinks

Field Type Label Description
code Rpc.Navigation.GetPageInfoWithLinks.Response.Error.Code
description string

Rpc.Navigation.ListPages

Rpc.Navigation.ListPages.Request

Rpc.Navigation.ListPages.Response

Field Type Label Description
error Rpc.Navigation.ListPages.Response.Error
pages model.PageInfo repeated

Rpc.Navigation.ListPages.Response.Error

Field Type Label Description
code Rpc.Navigation.ListPages.Response.Error.Code
description string

Rpc.Ping

Rpc.Ping.Request

Field Type Label Description
index int32
numberOfEventsToSend int32

Rpc.Ping.Response

Field Type Label Description
error Rpc.Ping.Response.Error
index int32

Rpc.Ping.Response.Error

Field Type Label Description
code Rpc.Ping.Response.Error.Code
description string

Rpc.Process

Rpc.Process.Cancel

Rpc.Process.Cancel.Request

Field Type Label Description
id string

Rpc.Process.Cancel.Response

Field Type Label Description
error Rpc.Process.Cancel.Response.Error

Rpc.Process.Cancel.Response.Error

Field Type Label Description
code Rpc.Process.Cancel.Response.Error.Code
description string

Rpc.Shutdown

Rpc.Shutdown.Request

Rpc.Shutdown.Response

Field Type Label Description
error Rpc.Shutdown.Response.Error

Rpc.Shutdown.Response.Error

Field Type Label Description
code Rpc.Shutdown.Response.Error.Code
description string

Rpc.UploadFile

Rpc.UploadFile.Request

Field Type Label Description
url string
localPath string
type model.Block.Content.File.Type
disableEncryption bool

Rpc.UploadFile.Response

Field Type Label Description
error Rpc.UploadFile.Response.Error
hash string

Rpc.UploadFile.Response.Error

Field Type Label Description
code Rpc.UploadFile.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Version.Get.Response.Error
version string
details string build date, branch and commit

Rpc.Version.Get.Response.Error

Field Type Label Description
code Rpc.Version.Get.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Wallet.Create.Response.Error
mnemonic string Mnemonic of a new account (sequence of words, divided by spaces)

Rpc.Wallet.Create.Response.Error

Field Type Label Description
code Rpc.Wallet.Create.Response.Error.Code
description string

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

Field Type Label Description
error Rpc.Wallet.Recover.Response.Error Error while trying to recover a wallet

Rpc.Wallet.Recover.Response.Error

Field Type Label Description
code Rpc.Wallet.Recover.Response.Error.Code
description string

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 ...

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 ...

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

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.

Field Type Label Description
messages Event.Message repeated
contextId string
initiator model.Account

Event.Account

Event.Account.Details

Field Type Label Description
profileId string
details google.protobuf.Struct

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

  1. Block A have been created on a client C1
  2. Client C2 receives Event.Block.Add(Block A), Event.Block.Update(Page.children) B. Partial block load
  3. Client C1 opens Page1, that contains, for example, 133 blocks.
  4. M -> F: ShowFullScreen(Root, blocks1-50)
  5. M -> F: Block.Add(blocks51-100)
  6. 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

  1. User A drops a set of files/pictures/videos
  2. 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

Field Type Label Description
id string
align model.Block.Align

Event.Block.Fill.BackgroundColor

Field Type Label Description
id string
backgroundColor string

Event.Block.Fill.Bookmark

Field Type Label Description
id string
url Event.Block.Fill.Bookmark.Url
title Event.Block.Fill.Bookmark.Title
description Event.Block.Fill.Bookmark.Description
imageHash Event.Block.Fill.Bookmark.ImageHash
faviconHash Event.Block.Fill.Bookmark.FaviconHash
type Event.Block.Fill.Bookmark.Type

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

Field Type Label Description
value model.LinkPreview.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

Field Type Label Description
id string
records google.protobuf.Struct repeated

Event.Block.Fill.Details

Field Type Label Description
id string
details google.protobuf.Struct

Event.Block.Fill.Div

Field Type Label Description
id string
style Event.Block.Fill.Div.Style

Event.Block.Fill.Div.Style

Field Type Label Description
value model.Block.Content.Div.Style

Event.Block.Fill.Fields

Field Type Label Description
id string
fields google.protobuf.Struct

Event.Block.Fill.File

Field Type Label Description
id string
type Event.Block.Fill.File.Type
state Event.Block.Fill.File.State
mime Event.Block.Fill.File.Mime
hash Event.Block.Fill.File.Hash
name Event.Block.Fill.File.Name
size Event.Block.Fill.File.Size

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

Field Type Label Description
value model.Block.Content.File.State

Event.Block.Fill.File.Type

Field Type Label Description
value model.Block.Content.File.Type

Event.Block.Fill.File.Width

Field Type Label Description
value int32

Field Type Label Description
id string
targetBlockId Event.Block.Fill.Link.TargetBlockId
style Event.Block.Fill.Link.Style
fields Event.Block.Fill.Link.Fields

Field Type Label Description
value google.protobuf.Struct

Field Type Label Description
value model.Block.Content.Link.Style

Field Type Label Description
value string

Event.Block.Fill.Restrictions

Field Type Label Description
id string
restrictions model.Block.Restrictions

Event.Block.Fill.Text

Field Type Label Description
id string
text Event.Block.Fill.Text.Text
style Event.Block.Fill.Text.Style
marks Event.Block.Fill.Text.Marks
checked Event.Block.Fill.Text.Checked
color Event.Block.Fill.Text.Color

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

Field Type Label Description
value model.Block.Content.Text.Marks

Event.Block.Fill.Text.Style

Field Type Label Description
value model.Block.Content.Text.Style

Event.Block.Fill.Text.Text

Field Type Label Description
value string

Event.Block.MarksInfo

Field Type Label Description
marksInRange model.Block.Content.Text.Mark.Type repeated

Event.Block.Set

Event.Block.Set.Align

Field Type Label Description
id string
align model.Block.Align

Event.Block.Set.BackgroundColor

Field Type Label Description
id string
backgroundColor string

Event.Block.Set.Bookmark

Field Type Label Description
id string
url Event.Block.Set.Bookmark.Url
title Event.Block.Set.Bookmark.Title
description Event.Block.Set.Bookmark.Description
imageHash Event.Block.Set.Bookmark.ImageHash
faviconHash Event.Block.Set.Bookmark.FaviconHash
type Event.Block.Set.Bookmark.Type

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

Field Type Label Description
value model.LinkPreview.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

Field Type Label Description
id string
details google.protobuf.Struct

Event.Block.Set.Div

Field Type Label Description
id string
style Event.Block.Set.Div.Style

Event.Block.Set.Div.Style

Field Type Label Description
value model.Block.Content.Div.Style

Event.Block.Set.Fields

Field Type Label Description
id string
fields google.protobuf.Struct

Event.Block.Set.File

Field Type Label Description
id string
type Event.Block.Set.File.Type
state Event.Block.Set.File.State
mime Event.Block.Set.File.Mime
hash Event.Block.Set.File.Hash
name Event.Block.Set.File.Name
size Event.Block.Set.File.Size

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

Field Type Label Description
value model.Block.Content.File.State

Event.Block.Set.File.Type

Field Type Label Description
value model.Block.Content.File.Type

Event.Block.Set.File.Width

Field Type Label Description
value int32

Field Type Label Description
id string
targetBlockId Event.Block.Set.Link.TargetBlockId
style Event.Block.Set.Link.Style
fields Event.Block.Set.Link.Fields

Field Type Label Description
value google.protobuf.Struct

Field Type Label Description
value model.Block.Content.Link.Style

Field Type Label Description
value string

Event.Block.Set.Restrictions

Field Type Label Description
id string
restrictions model.Block.Restrictions

Event.Block.Set.Text

Field Type Label Description
id string
text Event.Block.Set.Text.Text
style Event.Block.Set.Text.Style
marks Event.Block.Set.Text.Marks
checked Event.Block.Set.Text.Checked
color Event.Block.Set.Text.Color

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

Field Type Label Description
value model.Block.Content.Text.Marks

Event.Block.Set.Text.Style

Field Type Label Description
value model.Block.Content.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)

Field Type Label Description
rootId string Root block id
blocks model.Block repeated dependent blocks (descendants)
details Event.Block.Set.Details repeated details for current and dependent smart blocks
type SmartBlockType

Event.Message

Field Type Label Description
accountShow Event.Account.Show
accountDetails Event.Account.Details
blockAdd Event.Block.Add
blockDelete Event.Block.Delete
filesUpload Event.Block.FilesUpload
marksInfo Event.Block.MarksInfo
blockSetFields Event.Block.Set.Fields
blockSetChildrenIds Event.Block.Set.ChildrenIds
blockSetRestrictions Event.Block.Set.Restrictions
blockSetBackgroundColor Event.Block.Set.BackgroundColor
blockSetText Event.Block.Set.Text
blockSetFile Event.Block.Set.File
blockSetLink Event.Block.Set.Link
blockSetBookmark Event.Block.Set.Bookmark
blockSetAlign Event.Block.Set.Align
blockSetDetails Event.Block.Set.Details
blockSetDiv Event.Block.Set.Div
blockSetDataviewRecords Event.Block.Set.Dataview.Records
blockSetDataviewView Event.Block.Set.Dataview.View
blockDeleteDataviewView Event.Block.Delete.Dataview.View
blockShow Event.Block.Show
userBlockJoin Event.User.Block.Join
userBlockLeft Event.User.Block.Left
userBlockSelectRange Event.User.Block.SelectRange
userBlockTextRange Event.User.Block.TextRange
ping Event.Ping
processNew Event.Process.New
processUpdate Event.Process.Update
processDone Event.Process.Done

Event.Ping

Field Type Label Description
index int32

Event.Process

Event.Process.Done

Field Type Label Description
process Model.Process

Event.Process.New

Field Type Label Description
process Model.Process

Event.Process.Update

Field Type Label Description
process Model.Process

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

  1. User B opens the same block
  2. 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

  1. User B closes the block
  2. 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

  1. User B selects some inner blocks
  2. 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.

Event.User.Block.TextRange

Middleware to front end event message, that will be sent in this scenario: Precondition: user A and user B opened the same block

  1. User B sets cursor or selects a text region into a text block
  2. 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

Field Type Label Description
id string
type Model.Process.Type
state Model.Process.State
progress Model.Process.Progress

Model.Process.Progress

Field Type Label Description
total int64
done int64
message string

ResponseEvent

Field Type Label Description
messages Event.Message repeated
contextId string

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

Field Type Label Description
details google.protobuf.Struct

PageInfo

Field Type Label Description
id string
details google.protobuf.Struct
snippet string
state State
hasInboundLinks bool

Field Type Label Description
id string
info PageInfo
links PageLinksInfo
state State

Field Type Label Description
id string
info PageInfo
outboundLinks PageInfo repeated
state State

PageInfoWithOutboundLinksIDs

Field Type Label Description
id string
info PageInfo
outboundLinks string repeated
state State

Field Type Label Description
inboundIDs string repeated
outboundIDs string repeated

PageLinksInfo

Field Type Label Description
inbound PageInfo repeated
outbound PageInfo repeated

State

Field Type Label Description
state State.StateEntry repeated

State.StateEntry

Field Type Label Description
key string
value uint64

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

Field Type Label Description
id string
fields google.protobuf.Struct
restrictions Block.Restrictions
childrenIds string repeated
backgroundColor string
align Block.Align
smartblock Block.Content.Smartblock
text Block.Content.Text
file Block.Content.File
layout Block.Content.Layout
div Block.Content.Div
bookmark Block.Content.Bookmark
icon Block.Content.Icon
link Block.Content.Link
dataview Block.Content.Dataview

Block.Content

Block.Content.Bookmark

Bookmark is to keep a web-link and to preview a content.

Field Type Label Description
url string
title string
description string
imageHash string
faviconHash string
type LinkPreview.Type

Block.Content.Dataview

Field Type Label Description
databaseId string
views Block.Content.Dataview.View repeated
schemaURL string

Block.Content.Dataview.Filter

Field Type Label Description
operator Block.Content.Dataview.Filter.Operator
relationId string
relationProperty string
condition Block.Content.Dataview.Filter.Condition
value google.protobuf.Value

Block.Content.Dataview.Relation

Field Type Label Description
id string
isVisible bool
width int32 the displayed column % calculated based on other visible relations
emptyOptions Block.Content.Dataview.Relation.EmptyOptions
dateOptions Block.Content.Dataview.Relation.DateOptions

Block.Content.Dataview.Relation.DateOptions

Field Type Label Description
includeTime bool
timeFormat Block.Content.Dataview.Relation.TimeFormat
dateFormat Block.Content.Dataview.Relation.DateFormat

Block.Content.Dataview.Relation.EmptyOptions

Block.Content.Dataview.Sort

Field Type Label Description
relationId string
type Block.Content.Dataview.Sort.Type

Block.Content.Dataview.View

Field Type Label Description
id string
type Block.Content.Dataview.View.Type
name string
sorts Block.Content.Dataview.Sort repeated
filters Block.Content.Dataview.Filter repeated
relations Block.Content.Dataview.Relation repeated relations fields/columns options, also used to provide the order

Block.Content.Div

Divider: block, that contains only one horizontal thin line

Field Type Label Description
style Block.Content.Div.Style

Block.Content.File

Field Type Label Description
hash string
name string
type Block.Content.File.Type
mime string
size int64
addedAt int64
state Block.Content.File.State

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

Field Type Label Description
style Block.Content.Layout.Style

Link: block to link some content from an external sources.

Field Type Label Description
targetBlockId string id of the target block
style Block.Content.Link.Style
fields google.protobuf.Struct

Block.Content.Smartblock

Block.Content.Text

Field Type Label Description
text string
style Block.Content.Text.Style
marks Block.Content.Text.Marks list of marks to apply to the text
checked bool
color string

Block.Content.Text.Mark

Field Type Label Description
range Range range of symbols to apply this mark. From(symbol) To(symbol)
type Block.Content.Text.Mark.Type
param string link, color, etc

Block.Content.Text.Marks

Field Type Label Description
marks Block.Content.Text.Mark repeated

Block.Restrictions

Field Type Label Description
read bool
edit bool
remove bool
drag bool
dropOn bool

BlockMetaOnly

Used to decode block meta only, without the content itself

Field Type Label Description
id string
fields google.protobuf.Struct

LinkPreview

Field Type Label Description
url string
title string
description string
imageUrl string
faviconUrl string
type LinkPreview.Type

Range

General purpose structure, uses in Mark.

Field Type Label Description
from int32
to int32

SmartBlockSnapshotBase

deprecated

Field Type Label Description
blocks Block repeated
details google.protobuf.Struct
fileKeys google.protobuf.Struct

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

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)