Space API Reference
The eidos.currentSpace object provides access to all data space functionality including navigation, document management, and extension node operations.
Common Methods
Section titled “Common Methods”navigate(path: string)
Section titled “navigate(path: string)”Navigate to a node within the current space.
navigate(path: string): voidParameters:
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 tableeidos.currentSpace.navigate("/table_123")
// Navigate to a documenteidos.currentSpace.navigate("/doc_456")
// Navigate to a specific title in a documenteidos.currentSpace.navigate("/doc_456#my-title")
// Navigate to today's pageconst today = new Date().toISOString().split("T")[0]eidos.currentSpace.navigate(`/${today}`)
// Navigate to an extensioneidos.currentSpace.navigate("/extensions/my-extension")
// Navigate to a blockeidos.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): voidParameters:
title(string): The notification titledescription(string): The notification description (supports markdown)
Example:
eidos.currentSpace.notify( "Task Completed", "Successfully processed **100 records** and updated the database.")Document API
Section titled “Document API”The eidos.currentSpace.doc object provides document management functionality.
getMarkdown(id: string)
Section titled “getMarkdown(id: string)”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)getProperties(id: string)
Section titled “getProperties(id: string)”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)}deleteProperty(propertyName: string)
Section titled “deleteProperty(propertyName: string)”Delete the specified property column.
async deleteProperty(propertyName: string): Promise<void>Example:
await eidos.currentSpace.doc.deleteProperty("old_property")console.log("Property deleted")Extension Node API
Section titled “Extension Node API”The eidos.currentSpace.extNode object provides extension node data storage functionality.
getText(id: string)
Section titled “getText(id: string)”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)}setText(id: string, text: string)
Section titled “setText(id: string, text: string)”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))getBlob(id: string)
Section titled “getBlob(id: string)”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)}setBlob(id: string, blob: Buffer)
Section titled “setBlob(id: string, blob: Buffer)”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)