Skip to content

Commit 6617d3c

Browse files
committed
docs: screenshots for input output methods
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
1 parent aca1e93 commit 6617d3c

16 files changed

+42
-0
lines changed

content/scripts/api-reference/input.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ const subject = await input.textAsync('Enter email subject:');
3939
output.text(`Email subject: ${subject}`);
4040
```
4141

42+
**Output:**
43+
![Text Input Example](/img/v2/scripts/input-text-1.png)
44+
4245
### input.buttonsAsync()
4346

4447
Presents the user with buttons to choose from.
@@ -64,6 +67,9 @@ const status = await input.buttonsAsync(
6467
output.text(`Selected status: ${status}`);
6568
```
6669

70+
**Output:**
71+
![Button Input Example](/img/v2/scripts/input-button-1.png)
72+
6773
**Example with button options:**
6874
```javascript
6975
// Ask for confirmation with styled buttons
@@ -83,6 +89,9 @@ if (confirmation) {
8389
}
8490
```
8591

92+
**Output:**
93+
![Button Input Example](/img/v2/scripts/input-button-2.png)
94+
8695
### input.selectAsync()
8796

8897
Presents a dropdown menu of options for the user to choose from.
@@ -103,6 +112,9 @@ const department = await input.selectAsync(
103112
output.text(`Selected department: ${department}`);
104113
```
105114

115+
**Output:**
116+
![Select Input Example](/img/v2/scripts/input-select-1.png)
117+
106118
**Example with label/value objects:**
107119
```javascript
108120
// Ask user to select a priority level
@@ -117,6 +129,9 @@ const priority = await input.selectAsync(
117129
output.text(`Selected priority level: ${priority}`);
118130
```
119131

132+
**Output:**
133+
![Select Input Example](/img/v2/scripts/input-select-2.png)
134+
120135
### input.fileAsync()
121136

122137
Prompts the user to upload a file.
@@ -150,6 +165,9 @@ if (result && result.parsedContents) {
150165
}
151166
```
152167

168+
**Output:**
169+
![File Input Example](/img/v2/scripts/input-file-1.png)
170+
153171
### input.tableAsync()
154172

155173
Prompts the user to select a table from the base.
@@ -172,6 +190,9 @@ for (const field of table.fields) {
172190
}
173191
```
174192

193+
**Output:**
194+
![Table Input Example](/img/v2/scripts/input-table-1.png)
195+
175196
### input.viewAsync()
176197

177198
Prompts the user to select a view from a specified table.
@@ -196,6 +217,9 @@ const records = await view.selectRecordsAsync();
196217
output.text(`This view contains ${records.records.length} records.`);
197218
```
198219

220+
**Output:**
221+
![View Input Example](/img/v2/scripts/input-view-1.png)
222+
199223
### input.fieldAsync()
200224

201225
Prompts the user to select a field from a specified table.
@@ -231,6 +255,9 @@ for (const record of records.records) {
231255
output.text(`The field "${field.name}" has values in ${nonEmptyCount} out of ${records.records.length} records.`);
232256
```
233257

258+
**Output:**
259+
![Field Input Example](/img/v2/scripts/input-field-1.png)
260+
234261
### input.recordAsync()
235262

236263
Prompts the user to select a record from a table, view, or set of records.
@@ -270,6 +297,9 @@ if (record) {
270297
}
271298
```
272299

300+
**Output:**
301+
![Record Input Example](/img/v2/scripts/input-record-1.png)
302+
273303
## Practical Examples
274304

275305
### Form-Based Data Entry

content/scripts/api-reference/output.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ output.text(`Records processed: ${recordCount}`);
3737
output.text(`Success: ${isSuccess}`);
3838
```
3939

40+
**Output:**
41+
![output.text example](/img/v2/scripts/output-text.png)
42+
4043
### output.markdown()
4144

4245
Renders text with Markdown formatting.
@@ -75,6 +78,9 @@ output.markdown('## Example Query\n\n' +
7578
'```');
7679
```
7780

81+
**Output:**
82+
![output.markdown example](/img/v2/scripts/output-markdown.png)
83+
7884
### output.table()
7985

8086
Displays data in a formatted table.
@@ -104,6 +110,9 @@ const summary = {
104110
output.table(summary);
105111
```
106112

113+
**Output:**
114+
![output.table example](/img/v2/scripts/output-table.png)
115+
107116
### output.inspect()
108117

109118
Displays an object in an expandable, interactive format for inspection.
@@ -165,6 +174,9 @@ const projectData = {
165174
output.inspect(projectData);
166175
```
167176

177+
**Output:**
178+
![output.inspect example](/img/v2/scripts/output-inspect.png)
179+
168180
### output.clear()
169181

170182
Clears all previous output content.
47.9 KB
Loading
52.5 KB
Loading
122 KB
Loading
44.3 KB
Loading
217 KB
Loading
97.4 KB
Loading
77.8 KB
Loading
109 KB
Loading

0 commit comments

Comments
 (0)