---
title: "eidos | Eidos Docs"
description: "SDK signatures, permissions and behavior for eidos."
source: "https://docs.eidos.space/plugins/api/eidos/"
lang: "en"
---

# eidos

Declare eidos/schema, eidos/table or eidos/config. Lite supports all three; Serve supports table. Table operations target the bound table and use field IDs. Configuration writes require write access and expectedVersion; stale versions must be reconciled. watch sends invalidation hints, without an initial value; reread after notifications. setViewConfig replaces configuration rather than merging it.

Usage guide: [tables](https://docs.eidos.space/plugins/tables/). [API index](https://docs.eidos.space/plugins/api/).

Signatures, parameters and return types are generated from the SDK. Optional members are not available in every host and context.

## EidosTable

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L619)

### EidosTable.tableId

Supported hosts: Lite Serve Mobile

```ts
readonly tableId: string;
```

### EidosTable.viewId

Supported hosts: Lite Serve Mobile

```ts
readonly viewId: string;
```

### EidosTable.readContext

Supported hosts: Lite Serve Mobile

Read fields and saved-view information for the bound table.

```ts
readContext(): Promise<EidosTableSnapshot>;
```

Returns: `Promise<EidosTableSnapshot>`.

### EidosTable.readRows

Supported hosts: Lite Serve Mobile

Read a page of records from the bound table.

```ts
readRows(options: {
    offset: number;
    limit: number;
}): Promise<EidosFileRowPage>;
```

| Parameter | Type                               | Required |
| --------- | ---------------------------------- | -------- |
| options   | { offset: number; limit: number; } | Yes      |

Returns: `Promise<EidosFileRowPage>`.

### EidosTable.aggregate

Supported hosts: Lite Serve Mobile

Aggregate records using field IDs and the selected metric.

```ts
aggregate(options: TableAggregateOptions): Promise<TableAggregateResult>;
```

| Parameter | Type                  | Required |
| --------- | --------------------- | -------- |
| options   | TableAggregateOptions | Yes      |

Returns: `Promise<TableAggregateResult>`.

### EidosTable.setViewConfig

Supported hosts: Lite Serve Mobile

Replace the saved view’s plugin configuration. Merge retained keys before calling.

```ts
setViewConfig(config: Record<string, unknown>): Promise<void>;
```

| Parameter | Type                    | Required |
| --------- | ----------------------- | -------- |
| config    | Record<string, unknown> | Yes      |

Returns: `Promise<void>`.

### EidosTable.openRecord

Supported hosts: Lite Serve Mobile

Open a record in the host.

```ts
openRecord(rowId: string): Promise<void>;
```

| Parameter | Type   | Required |
| --------- | ------ | -------- |
| rowId     | string | Yes      |

Returns: `Promise<void>`.

### EidosTable.watch

Supported hosts: Lite Serve Mobile

Receive invalidation hints; reread current data after a notification.

```ts
watch(listener: () => void): Disposable;
```

| Parameter | Type       | Required |
| --------- | ---------- | -------- |
| listener  | () => void | Yes      |

Returns: `Disposable`.

Related types: [EidosTableSnapshot](https://docs.eidos.space/plugins/api/types/#eidostablesnapshot), [TableAggregateOptions](https://docs.eidos.space/plugins/api/types/#tableaggregateoptions), [TableAggregateResult](https://docs.eidos.space/plugins/api/types/#tableaggregateresult), [Disposable](https://docs.eidos.space/plugins/api/types/#disposable).

## EidosCapabilities

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L644)

### EidosCapabilities.schema

Supported hosts: Lite Mobile

```ts
readonly schema?: EidosSchema;
```

### EidosCapabilities.table

Supported hosts: Lite Serve Mobile

```ts
readonly table?: EidosTable;
```

### EidosCapabilities.config

Supported hosts: Lite Mobile

```ts
readonly config?: EidosConfig;
```

Related types: [EidosSchema](https://docs.eidos.space/plugins/api/eidos/#eidosschema), [EidosTable](https://docs.eidos.space/plugins/api/eidos/#eidostable), [EidosConfig](https://docs.eidos.space/plugins/api/eidos/#eidosconfig).

## EidosSchema

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L649)

### EidosSchema.listTables

Supported hosts: Lite Mobile

List tables in the current Eidos file.

```ts
listTables(): Promise<Array<{
    id: string;
    name: string;
}>>;
```

Returns: `Promise<Array<{ id: string; name: string; }>>`.

### EidosSchema.readTable

Supported hosts: Lite Mobile

Read the selected table’s fields within the current file.

```ts
readTable(tableId: string): Promise<{
    fields: EidosFileFieldInfo[];
}>;
```

| Parameter | Type   | Required |
| --------- | ------ | -------- |
| tableId   | string | Yes      |

Returns: `Promise<{ fields: EidosFileFieldInfo[]; }>`.

## EidosConfig

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L654)

### EidosConfig.read

Supported hosts: Lite Mobile

Read this plugin’s configuration and version for a table.

```ts
read(tableId: string): Promise<EidosConfigSnapshot>;
```

| Parameter | Type   | Required |
| --------- | ------ | -------- |
| tableId   | string | Yes      |

Returns: `Promise<EidosConfigSnapshot>`.

### EidosConfig.write

Supported hosts: Lite Mobile

Replace configuration if expectedVersion matches; a stale version fails with STALE\_REVISION.

```ts
write(tableId: string, input: {
    value: JsonObject | null;
    expectedVersion: string;
}): Promise<EidosConfigSnapshot>;
```

| Parameter | Type                                                        | Required |
| --------- | ----------------------------------------------------------- | -------- |
| tableId   | string                                                      | Yes      |
| input     | { value: JsonObject &#124; null; expectedVersion: string; } | Yes      |

Returns: `Promise<EidosConfigSnapshot>`.

### EidosConfig.watch

Supported hosts: Lite Mobile

Subscribe to invalidation hints without an initial value. Notifications may include unrelated changes.

```ts
watch(tableId: string, listener: () => void): Disposable;
```

| Parameter | Type       | Required |
| --------- | ---------- | -------- |
| tableId   | string     | Yes      |
| listener  | () => void | Yes      |

Returns: `Disposable`.

Related types: [EidosConfigSnapshot](https://docs.eidos.space/plugins/api/types/#eidosconfigsnapshot), [Disposable](https://docs.eidos.space/plugins/api/types/#disposable).
