Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions apps/docs/content/docs/cli/files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ sim files create [options]

| Option | Required | Description |
| --- | --- | --- |
| `--workflow-ids <json\|@file>` | No | Deployed workflows in this workspace that the HTML document may call. (JSON, or @path / @- to read a file or stdin). |
| `--name <value>` | Yes | File name, including its extension. Path separators and dot segments are rejected. |
| `--content-type <value>` | No | MIME type. When omitted, it is inferred from the file extension. |
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
Expand Down Expand Up @@ -502,6 +503,77 @@ sim files read <fileId> [options]

</CommandTable>

## Get file workflow result

```bash
sim files workflows get <fileId> <workflowId>
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | HTML file identifier. |
| `workflowId` | Yes | Workflow ID configured in the file metadata. |

</CommandTable>

## Run file workflow

```bash
sim files workflows create <fileId> <workflowId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | HTML file identifier. |
| `workflowId` | Yes | Workflow ID configured in the file metadata. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--input <json\|@file>` | No | JSON values for fields declared by the current workflow deployment. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

## Read file workflow input result

```bash
sim files result create <fileId> <workflowId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | HTML file identifier. |
| `workflowId` | Yes | Workflow ID configured in the file metadata. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--input <json\|@file>` | Yes | The same declared JSON input values used to run this workflow. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

## Rename a file

```bash
Expand Down Expand Up @@ -619,6 +691,32 @@ sim files set-content <fileId> [options]

</CommandTable>

## Update file metadata

```bash
sim files metadata update <fileId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | HTML file identifier. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--workflow-ids <json\|@file>` | Yes | Replace the workflows this HTML file may call. Send an empty array to remove all dependencies. Sharing exposes these calls to the file audience. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

## Upload a file to the workspace

```bash
Expand Down
106 changes: 106 additions & 0 deletions apps/docs/content/docs/cli/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ sim files create [options]

| Option | Required | Description |
| --- | --- | --- |
| `--workflow-ids <json\|@file>` | No | Deployed workflows in this workspace that the HTML document may call. (JSON, or @path / @- to read a file or stdin). |
| `--name <value>` | Yes | File name, including its extension. Path separators and dot segments are rejected. |
| `--content-type <value>` | No | MIME type. When omitted, it is inferred from the file extension. |
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
Expand Down Expand Up @@ -1261,6 +1262,83 @@ sim files read <fileId> [options]

</CommandTable>

### sim files workflows get

Get File Workflow Result

```bash
sim files workflows get <fileId> <workflowId>
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | HTML file identifier. |
| `workflowId` | Yes | Workflow ID configured in the file metadata. |

</CommandTable>

### sim files workflows create

Run File Workflow

```bash
sim files workflows create <fileId> <workflowId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | HTML file identifier. |
| `workflowId` | Yes | Workflow ID configured in the file metadata. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--input <json\|@file>` | No | JSON values for fields declared by the current workflow deployment. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

### sim files result create

Read File Workflow Input Result

```bash
sim files result create <fileId> <workflowId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | HTML file identifier. |
| `workflowId` | Yes | Workflow ID configured in the file metadata. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--input <json\|@file>` | Yes | The same declared JSON input values used to run this workflow. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

### sim files rename

Rename a file
Expand Down Expand Up @@ -1388,6 +1466,34 @@ sim files set-content <fileId> [options]

</CommandTable>

### sim files metadata update

Update File Metadata

```bash
sim files metadata update <fileId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | HTML file identifier. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--workflow-ids <json\|@file>` | Yes | Replace the workflows this HTML file may call. Send an empty array to remove all dependencies. Sharing exposes these calls to the file audience. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

### sim files upload

Upload a file to the workspace
Expand Down
Loading