create()
Create a new source view. Iffilter is provided, the view is created in query mode. Otherwise, it uses smart mode with LLM inference from guidance.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
workspaceId | string | Yes | — | Workspace external ID |
integration | string | Yes | — | Integration source (gmail, github, gdrive, notion, slack, linear, posthog, web) |
name | string | Yes | — | Display name |
guidance | string | No | — | Natural language query for LLM inference (smart mode) |
filter | object | No | — | Structured filter object (query mode). Shape depends on the integration — see per-integration filters |
outputFormat | 'folder' | 'file' | No | folder | folder = one file per result; file = single aggregated file |
fileExt | string | No | — | File extension for file output (e.g., .md) |
Promise<SourceView>
list()
List all source views in a workspace.| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace external ID |
Promise<SourceView[]>
retrieve()
Get a source view by its virtual filesystem path.| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace external ID |
viewPath | string | Yes | Virtual filesystem path of the view |
Promise<SourceView>
update()
Update an existing source view’s name, guidance, or filter.| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace external ID |
viewId | string | Yes | View external ID |
name | string | No | New display name |
guidance | string | No | New LLM guidance (smart mode) |
filter | object | No | New structured filter (query mode) |
Promise<SourceView>
del()
Delete a source view.| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace external ID |
viewId | string | Yes | View external ID |
Promise<void>
sync()
Sync a source view — re-execute its query against the live source and refresh cached files.| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace external ID |
viewId | string | Yes | View external ID |
Promise<SyncResult>
| Field | Type | Description |
|---|---|---|
external_id | string | View external ID |
integration | string | Integration source |
path | string | Virtual filesystem path |
mode | string | smart or query |
last_synced_at | string | ISO 8601 timestamp |
results_count | number | Total results after sync |
new_results | number | Newly discovered results |
SourceView object
All view methods return (or accept) aSourceView with these fields:
| Field | Type | Description |
|---|---|---|
external_id | string | Unique identifier |
integration | string | Integration source |
path | string | Virtual filesystem path |
name | string | Display name |
mode | string | smart or query |
guidance | string | LLM guidance text (smart mode) |
filter | object | Structured filter (query mode) |
output_format | string | Output format |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last update timestamp |