Skip to content

Space API Reference

The eidos.currentSpace object provides access to all data space functionality including navigation, document management, and extension node operations.


Navigate to a node within the current space.

navigate(path: string): void

Parameters:

  • path (string): The path to navigate to, relative to the current space

Supported Path Formats:

  • "/<nodeId>" - Navigate to a specific node by ID
  • "/<tableId>" - Navigate to a table view
  • "/<docId>#<hash>" - Navigate to a document (supports hash anchors, e.g., #title)
  • "/2025-09-30" - Navigate to a date-based node
  • "/extensions/<extensionId>" - Navigate to an extension
  • "/blocks/<blockId>" - Navigate to a block

Example:

// Navigate to a specific table
eidos.currentSpace.navigate("/table_123")
// Navigate to a document
eidos.currentSpace.navigate("/doc_456")
// Navigate to a specific title in a document
eidos.currentSpace.navigate("/doc_456#my-title")
// Navigate to today's page
const today = new Date().toISOString().split("T")[0]
eidos.currentSpace.navigate(`/${today}`)
// Navigate to an extension
eidos.currentSpace.navigate("/extensions/my-extension")
// Navigate to a block
eidos.currentSpace.navigate("/blocks/block_789")

notify(title: string, description: string)

Section titled “notify(title: string, description: string)”

Show a notification to the user with markdown support.

notify(title: string, description: string): void

Parameters:

  • title (string): The notification title
  • description (string): The notification description (supports markdown)

Example:

eidos.currentSpace.notify(
"Task Completed",
"Successfully processed **100 records** and updated the database."
)

The eidos.currentSpace.doc object provides document management functionality.

Get the Markdown content of a document.

async getMarkdown(id: string): Promise<string>

Example:

const markdown = await eidos.currentSpace.doc.getMarkdown("doc_123")
console.log("Markdown content:", markdown)

Get all properties of a document (including system properties and custom properties).

async getProperties(id: string): Promise<Record<string, any>>

Example:

const allProps = await eidos.currentSpace.doc.getProperties("doc_123")
console.log("All properties:", allProps)

setProperties(id: string, properties: Record<string, any>)

Section titled “setProperties(id: string, properties: Record<string, any>)”

Set properties of a document.

async setProperties(id: string, properties: Record<string, any>): Promise<{ success: boolean; message?: string; updatedProperties?: string[] }>

Example:

const result = await eidos.currentSpace.doc.setProperties("doc_123", {
title: "My Document",
author: "John Doe",
tags: "important,work",
})
if (result.success) {
console.log("Properties set successfully:", result.updatedProperties)
}

Delete the specified property column.

async deleteProperty(propertyName: string): Promise<void>

Example:

await eidos.currentSpace.doc.deleteProperty("old_property")
console.log("Property deleted")

The eidos.currentSpace.extNode object provides extension node data storage functionality.

Get the text content of a node.

async getText(id: string): Promise<string | null>

Example:

const textContent = await eidos.currentSpace.extNode.getText("node_123")
if (textContent) {
const data = JSON.parse(textContent)
console.log("Parsed data:", data)
}

Set the text content of a node.

async setText(id: string, text: string): Promise<boolean>

Example:

const data = { elements: [], appState: {} }
await eidos.currentSpace.extNode.setText("node_123", JSON.stringify(data))

Get the binary data of a node.

async getBlob(id: string): Promise<Buffer | null>

Example:

const blobData = await eidos.currentSpace.extNode.getBlob("node_123")
if (blobData) {
// Process binary data
console.log("Binary data size:", blobData.length)
}

Set the binary data of a node.

async setBlob(id: string, blob: Buffer): Promise<boolean>

Example:

const buffer = Buffer.from("some binary data")
await eidos.currentSpace.extNode.setBlob("node_123", buffer)