Types & Errors
Supporting data types are listed below. Error codes describe failures, not a guarantee that every method emits every code. Permission and lifetime checks happen in the host. Preserve user input on failure; do not retry non-idempotent writes blindly. Text edit stale and save conflict are result statuses, not error codes. Imported Eidos data types belong to @eidos.space/eidos-file; DOM and ECMAScript types use their standard definitions.
Usage guide: files. API index.
Signatures, parameters and return types are generated from the SDK. Optional members are not available in every host and context.
PluginIconDefinition
Section titled “PluginIconDefinition”export type PluginIconDefinition = string | { paths: string[];} | { src: string;} | { file: string;};ResourceSource
Section titled “ResourceSource”export type ResourceSource = { kind: "file"; path: string; editor?: string;} | { kind: "eidos-view"; path: string; tableId: string; viewId: string;};ResourceViewInfo
Section titled “ResourceViewInfo”export type ResourceViewInfo = { kind: "file"; editor: string; name: string; type: string;} | { kind?: "eidos-view"; tableId: string; tableName: string; viewId: string; name: string; type: string;};ViewCapability
Section titled “ViewCapability”export type ViewCapability = "document" | "eidos/schema" | "eidos/table" | "eidos/config";FileHookEventType
Section titled “FileHookEventType”export type FileHookEventType = "document.saved" | "file.renamed";FileHookEvent
Section titled “FileHookEvent”FileHookEvent.type
Section titled “FileHookEvent.type”type: FileHookEventType;FileHookEvent.operationId
Section titled “FileHookEvent.operationId”operationId: string;FileHookEvent.source
Section titled “FileHookEvent.source”source: "local" | "plugin" | "sync";FileHookEvent.path
Section titled “FileHookEvent.path”path: string;FileHookEvent.previousPath
Section titled “FileHookEvent.previousPath”previousPath?: string;FileHookEvent.previousText
Section titled “FileHookEvent.previousText”previousText?: string;FileHookEvent.document
Section titled “FileHookEvent.document”document: { text: string; version: string;};Related types: FileHookEventType.
FileHookPlan
Section titled “FileHookPlan”FileHookPlan.text
Section titled “FileHookPlan.text”text?: string;FileHookPlan.name
Section titled “FileHookPlan.name”name?: string;FormatterInput
Section titled “FormatterInput”FormatterInput.text
Section titled “FormatterInput.text”text: string;FormatterInput.path
Section titled “FormatterInput.path”path: string;FormatterInput.signal
Section titled “FormatterInput.signal”signal: AbortSignal;Disposable
Section titled “Disposable”Disposable.dispose
Section titled “Disposable.dispose”dispose(): void;Returns: void.
BackgroundMessage
Section titled “BackgroundMessage”export type BackgroundMessage = null | boolean | number | string | BackgroundMessage[] | { [key: string]: BackgroundMessage;};FileStat
Section titled “FileStat”FileStat.path
Section titled “FileStat.path”readonly path: string;FileStat.name
Section titled “FileStat.name”readonly name: string;FileStat.extension
Section titled “FileStat.extension”readonly extension: string;FileStat.size
Section titled “FileStat.size”readonly size: number;FileStat.isDirectory
Section titled “FileStat.isDirectory”readonly isDirectory: boolean;FileStat.modifiedAtMs
Section titled “FileStat.modifiedAtMs”readonly modifiedAtMs?: number;FileListOptions
Section titled “FileListOptions”FileListOptions.extensions
Section titled “FileListOptions.extensions”extensions?: string[];FileListOptions.recursive
Section titled “FileListOptions.recursive”recursive?: boolean;FileListOptions.includeDirectories
Section titled “FileListOptions.includeDirectories”includeDirectories?: boolean;FileMetaValue
Section titled “FileMetaValue”export type FileMetaValue = null | string | number | boolean | FileMetaValue[] | { [key: string]: FileMetaValue;};FileMetaValues
Section titled “FileMetaValues”export type FileMetaValues = Record<string, FileMetaValue>;Related types: FileMetaValue.
FileMetaPatch
Section titled “FileMetaPatch”FileMetaPatch.set
Section titled “FileMetaPatch.set”set?: FileMetaValues;FileMetaPatch.remove
Section titled “FileMetaPatch.remove”remove?: string[];Related types: FileMetaValues.
ExplorerState
Section titled “ExplorerState”ExplorerState.rootDirectory
Section titled “ExplorerState.rootDirectory”rootDirectory: string | null;ExplorerState.activePath
Section titled “ExplorerState.activePath”activePath: string | null;ExplorerState.sort
Section titled “ExplorerState.sort”sort: { by: "name" | "modified" | "type"; direction: "ascending" | "descending";};FileMetadata
Section titled “FileMetadata”FileMetadata.path
Section titled “FileMetadata.path”readonly path: string;FileMetadata.name
Section titled “FileMetadata.name”readonly name: string;FileMetadata.baseName
Section titled “FileMetadata.baseName”readonly baseName: string;FileMetadata.extension
Section titled “FileMetadata.extension”readonly extension: string;FileMetadata.mimeType
Section titled “FileMetadata.mimeType”readonly mimeType?: string;FileMetadata.size
Section titled “FileMetadata.size”readonly size: number;FileRef
Section titled “FileRef”interface FileRef extends Partial<FileMetadata> { /* members below */ }FileRef.id
Section titled “FileRef.id”readonly id: string;Related types: FileMetadata.
ViewBinding
Section titled “ViewBinding”export type ViewBinding = { kind: "page"; route: string;} | { kind: "file"; file: FileRef; location?: { kind: "eidos-table"; tableId: string; viewId: string; };};Related types: FileRef.
ActionBinding
Section titled “ActionBinding”export type ActionBinding = { kind: "workspace";} | { kind: "file"; file: FileRef;};Related types: FileRef.
TableActionItem
Section titled “TableActionItem”TableActionItem.id
Section titled “TableActionItem.id”id: string;TableActionItem.title
Section titled “TableActionItem.title”title: string;TableActionItem.icon
Section titled “TableActionItem.icon”icon?: { paths: string[];};TableActionItem.targets
Section titled “TableActionItem.targets”targets: Array<"row" | "selection" | "view">;TableActionRecord
Section titled “TableActionRecord”TableActionRecord.id
Section titled “TableActionRecord.id”id: string;TableActionRecord.values
Section titled “TableActionRecord.values”values: Record<string, LogicalValue>;TableActionRecord.readToken
Section titled “TableActionRecord.readToken”readToken: string;PluginPackage
Section titled “PluginPackage”PluginPackage.format
Section titled “PluginPackage.format”format: 1 | 2 | 3;PluginPackage.manifest
Section titled “PluginPackage.manifest”manifest: PluginManifest;PluginPackage.modules
Section titled “PluginPackage.modules”modules: Record<string, string>;PluginPackage.resources
Section titled “PluginPackage.resources”resources?: Record<string, string>;Related types: PluginManifest.
TextSnapshot
Section titled “TextSnapshot”TextSnapshot.text
Section titled “TextSnapshot.text”text: string;TextSnapshot.version
Section titled “TextSnapshot.version”version: string;TextSnapshot.encoding
Section titled “TextSnapshot.encoding”encoding: "utf-8" | "utf-16le" | "utf-16be";TextSnapshot.bom
Section titled “TextSnapshot.bom”bom: boolean;TextSnapshot.dirty
Section titled “TextSnapshot.dirty”dirty: boolean;TextSnapshot.conflicted
Section titled “TextSnapshot.conflicted”conflicted: boolean;EidosConfigSnapshot
Section titled “EidosConfigSnapshot”EidosConfigSnapshot.value
Section titled “EidosConfigSnapshot.value”value: JsonObject | null;EidosConfigSnapshot.version
Section titled “EidosConfigSnapshot.version”version: string;EidosTableSnapshot
Section titled “EidosTableSnapshot”EidosTableSnapshot.fields
Section titled “EidosTableSnapshot.fields”fields: EidosFileFieldInfo[];EidosTableSnapshot.view
Section titled “EidosTableSnapshot.view”view: EidosFileViewInfo;TableAggregateMetric
Section titled “TableAggregateMetric”export type TableAggregateMetric = "count" | "sum" | "average" | "min" | "max";TableAggregateDateInterval
Section titled “TableAggregateDateInterval”export type TableAggregateDateInterval = "exact" | "day" | "month" | "year";TableAggregateOptions
Section titled “TableAggregateOptions”TableAggregateOptions.groupBy
Section titled “TableAggregateOptions.groupBy”groupBy?: { fieldId: string; dateInterval?: TableAggregateDateInterval;};TableAggregateOptions.metric
Section titled “TableAggregateOptions.metric”metric: { fieldId?: string; op: TableAggregateMetric;};TableAggregateOptions.sort
Section titled “TableAggregateOptions.sort”sort?: "label" | "value-desc" | "value-asc";Related types: TableAggregateDateInterval, TableAggregateMetric.
TableAggregateItem
Section titled “TableAggregateItem”TableAggregateItem.key
Section titled “TableAggregateItem.key”key: unknown;TableAggregateItem.label
Section titled “TableAggregateItem.label”label: string;TableAggregateItem.value
Section titled “TableAggregateItem.value”value: number;TableAggregateResult
Section titled “TableAggregateResult”TableAggregateResult.items
Section titled “TableAggregateResult.items”items: TableAggregateItem[];TableAggregateResult.totalRecords
Section titled “TableAggregateResult.totalRecords”totalRecords: number;Related types: TableAggregateItem.
SettingValue
Section titled “SettingValue”export type SettingValue = boolean | string | number;FileExportRequest
Section titled “FileExportRequest”FileExportRequest.name
Section titled “FileExportRequest.name”name: string;FileExportRequest.mimeType
Section titled “FileExportRequest.mimeType”mimeType: string;FileExportRequest.data
Section titled “FileExportRequest.data”data: Uint8Array;FileExportResult
Section titled “FileExportResult”export type FileExportResult = { status: "saved" | "download-started" | "cancelled";};ObserverErrorHandler
Section titled “ObserverErrorHandler”export type ObserverErrorHandler = (error: { code: string; message: string;}) => void;PluginErrorCode
Section titled “PluginErrorCode”export type PluginErrorCode = "INVALID_REQUEST" | "UNSUPPORTED_API" | "PERMISSION_DENIED" | "DOCUMENT_UNAVAILABLE" | "INSTANCE_CLOSED" | "STALE_REVISION" | "ALREADY_EXISTS" | "BUSY" | "TOO_LARGE" | "IO_ERROR" | "TIMEOUT" | "CANCELLED" | "REGISTRATION_CONFLICT" | "DEPENDENCY_MISSING" | "SOURCE_INVALID";