u
This commit is contained in:
@@ -801,7 +801,7 @@ _none_
|
||||
- Returns: `200 str`
|
||||
#### Execute a virtual filesystem applet — `POST /vfs/{*path}`
|
||||
- Params: `path: str, body?: { input?: {}, timeout?: int, max_output?: int }`
|
||||
- Returns: `200 { ok: bool, result: str, columns: { name: str, type: str }[], rows: int, stdout: str, consoleLines: int, durationMs: int, warnings?: str[], truncated?: bool, truncationNote?: str }`
|
||||
- Returns: `200 { ok: bool, result: str, columns: { name: str, type: str }[], rows: int, stdout: str, consoleLines: int, durationMs: int, description?: str, warnings?: str[], truncated?: bool, truncationNote?: str }`
|
||||
#### Create or overwrite a virtual filesystem file — `PUT /vfs/{*path}`
|
||||
- Params: `path: str, body: { content: str, mime?: str }`
|
||||
- Returns: `200 { success: bool, file: { name: str, size: int, mime: str, updated_at: str } }`
|
||||
|
||||
@@ -7,9 +7,10 @@ Execute a virtual filesystem applet
|
||||
Runs a `.applet.js` file from the virtual filesystem for the authenticated user's selected company
|
||||
and returns the exported function's result.
|
||||
|
||||
The applet file must begin with two metadata lines:
|
||||
The applet file must begin with three metadata lines:
|
||||
`// @applet-input-schema {JSON Schema}` followed by
|
||||
`// @applet-output-schema {name:type;name:type}`. The input schema describes the GUI form posted as
|
||||
`// @applet-output-schema {name:type;name:type}` and
|
||||
`// @applet-description "description"`. The input schema describes the GUI form posted as
|
||||
`input`. The output line declares the RESULT COLUMNS as typed CSV — `name:type` pairs separated by `;`
|
||||
(e.g. `id:integer;name:string;active:boolean`); allowed types are `string`, `integer`, `number`,
|
||||
`boolean` and `date`. The applet exports a function that receives the posted `input` as `applet_input`
|
||||
@@ -59,6 +60,7 @@ Applet executed successfully
|
||||
```json
|
||||
{
|
||||
"ok": true,
|
||||
"description": "…",
|
||||
"result": "id;name\n1;Kaffee",
|
||||
"columns": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user