Table kit command
table.preview.show
Show a table, view or dashboard in the picture
Picks what the document's picture (its renders and previews) shows: a table with its first view, a view, or a dashboard; without parameters, what the editor opens (the first table's first view).
- Kit
- Table 0.4.0 (.ktable)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dashboardId | integer | string | no | A dashboard to show instead of a table. |
tableId | integer | string | no | The table to show, with its first view unless viewId names another. Default: the first table. |
viewId | integer | string | no | The view to show (its table is shown). |
Call through table_run
text
table_run {
"path": "<file>.ktable",
"steps": [{ "command": "table.preview.show" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: dashboardId, tableId, viewId. table_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
change | object | null | no | What the call changed, or null. |
error | object | no | Why the call failed (A18); the file is as it was. |
result | object | no | What the picture shows now. |
Result JSON Schema
json
{
"additionalProperties": false,
"description": "The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).",
"properties": {
"change": {
"description": "What the call changed, or null.",
"oneOf": [
{
"additionalProperties": false,
"description": "What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.",
"properties": {
"dashboards": {
"description": "A dashboard, or the base's list of them, changed.",
"type": "boolean"
},
"documentId": {
"type": "string"
},
"origin": {
"description": "Who wrote it: kind:principal, or a system origin's label.",
"type": "string"
},
"recordsDeleted": {
"description": "[tableId, rowKey] pairs.",
"items": {
"items": {},
"type": "array"
},
"type": "array"
},
"recordsReordered": {
"description": "Tables whose records' positions changed.",
"items": {
"type": "integer"
},
"type": "array"
},
"recordsUpserted": {
"description": "[tableId, rowKey] pairs.",
"items": {
"items": {},
"type": "array"
},
"type": "array"
},
"schema": {
"description": "Tables whose fields were added, removed, updated, or reordered.",
"items": {
"type": "integer"
},
"type": "array"
},
"tables": {
"description": "Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.",
"items": {
"type": "integer"
},
"type": "array"
},
"views": {
"description": "Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.",
"items": {
"type": "integer"
},
"type": "array"
}
},
"required": [
"tables",
"schema",
"views",
"recordsReordered",
"dashboards"
],
"type": "object"
},
{
"type": "null"
}
]
},
"error": {
"additionalProperties": false,
"description": "Why the call failed (A18); the file is as it was.",
"properties": {
"code": {
"enum": [
"invalid-params",
"invalid-op",
"invalid-value",
"not-found",
"read-only",
"unknown-command",
"command-failed",
"not-open",
"draft-required",
"not-allowed",
"unsupported",
"unavailable",
"failed"
],
"type": "string"
},
"index": {
"description": "The failing step or operation.",
"type": "integer"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"result": {
"additionalProperties": true,
"description": "What the picture shows now.",
"properties": {
"dashboard": {
"description": "The dashboard's title.",
"type": "string"
},
"dashboardId": {
"description": "The dashboard shown; null for a table.",
"oneOf": [
{
"description": "The dashboard shown; null for a table.",
"type": "string"
},
{
"type": "null"
}
]
},
"records": {
"description": "How many records the view shows.",
"type": "integer"
},
"table": {
"description": "The table's title.",
"type": "string"
},
"tableId": {
"description": "The table shown; null for a dashboard.",
"oneOf": [
{
"description": "The table shown; null for a dashboard.",
"type": "integer"
},
{
"type": "null"
}
]
},
"view": {
"description": "The view's title.",
"type": "string"
},
"viewId": {
"description": "The view shown.",
"oneOf": [
{
"description": "The view shown.",
"type": "integer"
},
{
"type": "null"
}
]
},
"viewType": {
"description": "The view's type: grid, kanban, calendar or gallery.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"dashboardId": {
"description": "A dashboard to show instead of a table.",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-khp-types": [
"Dashboard"
]
},
"tableId": {
"description": "The table to show, with its first view unless viewId names another. Default: the first table.",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-khp-types": [
"Table"
]
},
"viewId": {
"description": "The view to show (its table is shown).",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-khp-types": [
"View"
]
}
},
"type": "object"
}Generated from kition-sdk packages/script/kits/table.ts and the kit itself (kition-table@ee73209). As data: commands.jsonl.