syllable-sdk 1.0.8-rc.1 → 1.0.8-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +6 -6
- package/bin/mcp-server.js.map +4 -4
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/openapi.json +33 -33
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/.devcontainer/README.md +0 -35
- package/api-reference/sdks/agents/README.md +0 -224
- package/api-reference/sdks/availabletargets/README.md +0 -49
- package/api-reference/sdks/channels/README.md +0 -92
- package/api-reference/sdks/chats/README.md +0 -55
- package/api-reference/sdks/conversations/README.md +0 -91
- package/api-reference/sdks/dashboards/README.md +0 -321
- package/api-reference/sdks/events/README.md +0 -50
- package/api-reference/sdks/greetings/README.md +0 -223
- package/api-reference/sdks/organizations/README.md +0 -48
- package/api-reference/sdks/prompts/README.md +0 -225
- package/api-reference/sdks/sessions/README.md +0 -50
- package/api-reference/sdks/syllable/README.md +0 -22
- package/api-reference/sdks/targets/README.md +0 -194
- package/api-reference/sdks/tools/README.md +0 -92
- package/docs/sdks/agents/README.md +0 -589
- package/docs/sdks/batches/README.md +0 -742
- package/docs/sdks/campaigns/README.md +0 -526
- package/docs/sdks/channels/README.md +0 -401
- package/docs/sdks/conversations/README.md +0 -100
- package/docs/sdks/custommessages/README.md +0 -496
- package/docs/sdks/dashboards/README.md +0 -481
- package/docs/sdks/datasources/README.md +0 -458
- package/docs/sdks/directory/README.md +0 -727
- package/docs/sdks/events/README.md +0 -100
- package/docs/sdks/folders/README.md +0 -675
- package/docs/sdks/fullsummary/README.md +0 -82
- package/docs/sdks/incidents/README.md +0 -501
- package/docs/sdks/insights/README.md +0 -100
- package/docs/sdks/languagegroups/README.md +0 -565
- package/docs/sdks/latency/README.md +0 -82
- package/docs/sdks/numbers/README.md +0 -250
- package/docs/sdks/organizations/README.md +0 -317
- package/docs/sdks/permissions/README.md +0 -78
- package/docs/sdks/prompts/README.md +0 -592
- package/docs/sdks/pronunciations/README.md +0 -360
- package/docs/sdks/roles/README.md +0 -430
- package/docs/sdks/services/README.md +0 -430
- package/docs/sdks/sessiondebug/README.md +0 -236
- package/docs/sdks/sessionlabels/README.md +0 -262
- package/docs/sdks/sessions/README.md +0 -325
- package/docs/sdks/syllablesdktools/README.md +0 -578
- package/docs/sdks/takeouts/README.md +0 -228
- package/docs/sdks/targets/README.md +0 -454
- package/docs/sdks/test/README.md +0 -92
- package/docs/sdks/tools/README.md +0 -518
- package/docs/sdks/transcript/README.md +0 -82
- package/docs/sdks/twilio/README.md +0 -246
- package/docs/sdks/users/README.md +0 -561
- package/docs/sdks/v1/README.md +0 -561
- package/docs/sdks/voicegroups/README.md +0 -551
- package/docs/sdks/workflows/README.md +0 -781
- package/examples/README.md +0 -31
|
@@ -1,781 +0,0 @@
|
|
|
1
|
-
# Workflows
|
|
2
|
-
(*insights.workflows*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
Operations related to insights workflows. An workflow is series of tool invocations that processes conversation data to extract information and generate reports.
|
|
7
|
-
|
|
8
|
-
### Available Operations
|
|
9
|
-
|
|
10
|
-
* [list](#list) - Insight Workflow List
|
|
11
|
-
* [create](#create) - Create Insight Workflow
|
|
12
|
-
* [getById](#getbyid) - Get Insight Workflow By Id
|
|
13
|
-
* [update](#update) - Update Insights Workflow
|
|
14
|
-
* [delete](#delete) - Delete Insights Workflow
|
|
15
|
-
* [inactivate](#inactivate) - Inactivate Insights Workflow
|
|
16
|
-
* [activate](#activate) - Activate Insights Workflow
|
|
17
|
-
* [queueWork](#queuework) - Queue Insights Workflow For Sessions/Files
|
|
18
|
-
|
|
19
|
-
## list
|
|
20
|
-
|
|
21
|
-
List the existing insight_workflows
|
|
22
|
-
|
|
23
|
-
### Example Usage
|
|
24
|
-
|
|
25
|
-
<!-- UsageSnippet language="typescript" operationID="insights_workflow_list" method="get" path="/api/v1/insights/workflows/" -->
|
|
26
|
-
```typescript
|
|
27
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
28
|
-
|
|
29
|
-
const syllableSDK = new SyllableSDK({
|
|
30
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
async function run() {
|
|
34
|
-
const result = await syllableSDK.insights.workflows.list({
|
|
35
|
-
page: 0,
|
|
36
|
-
searchFields: [
|
|
37
|
-
"name",
|
|
38
|
-
],
|
|
39
|
-
searchFieldValues: [
|
|
40
|
-
"Some Object Name",
|
|
41
|
-
],
|
|
42
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
43
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
console.log(result);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
run();
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Standalone function
|
|
53
|
-
|
|
54
|
-
The standalone function version of this method:
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
58
|
-
import { insightsWorkflowsList } from "syllable-sdk/funcs/insightsWorkflowsList.js";
|
|
59
|
-
|
|
60
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
61
|
-
// You can create one instance of it to use across an application.
|
|
62
|
-
const syllableSDK = new SyllableSDKCore({
|
|
63
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
async function run() {
|
|
67
|
-
const res = await insightsWorkflowsList(syllableSDK, {
|
|
68
|
-
page: 0,
|
|
69
|
-
searchFields: [
|
|
70
|
-
"name",
|
|
71
|
-
],
|
|
72
|
-
searchFieldValues: [
|
|
73
|
-
"Some Object Name",
|
|
74
|
-
],
|
|
75
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
76
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
77
|
-
});
|
|
78
|
-
if (res.ok) {
|
|
79
|
-
const { value: result } = res;
|
|
80
|
-
console.log(result);
|
|
81
|
-
} else {
|
|
82
|
-
console.log("insightsWorkflowsList failed:", res.error);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
run();
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Parameters
|
|
90
|
-
|
|
91
|
-
| Parameter | Type | Required | Description |
|
|
92
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
93
|
-
| `request` | [operations.InsightsWorkflowListRequest](../../models/operations/insightsworkflowlistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
94
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
95
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
96
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
97
|
-
|
|
98
|
-
### Response
|
|
99
|
-
|
|
100
|
-
**Promise\<[components.ListResponseInsightWorkflowOutput](../../models/components/listresponseinsightworkflowoutput.md)\>**
|
|
101
|
-
|
|
102
|
-
### Errors
|
|
103
|
-
|
|
104
|
-
| Error Type | Status Code | Content Type |
|
|
105
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
106
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
107
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
108
|
-
|
|
109
|
-
## create
|
|
110
|
-
|
|
111
|
-
Create a new tool in the insights
|
|
112
|
-
|
|
113
|
-
### Example Usage
|
|
114
|
-
|
|
115
|
-
<!-- UsageSnippet language="typescript" operationID="insights_workflow_create" method="post" path="/api/v1/insights/workflows/" -->
|
|
116
|
-
```typescript
|
|
117
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
118
|
-
|
|
119
|
-
const syllableSDK = new SyllableSDK({
|
|
120
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
async function run() {
|
|
124
|
-
const result = await syllableSDK.insights.workflows.create({
|
|
125
|
-
name: "summary-workflow",
|
|
126
|
-
source: "agent",
|
|
127
|
-
description: "Default workflow - generates a summary of the call",
|
|
128
|
-
insightToolIds: [
|
|
129
|
-
1,
|
|
130
|
-
],
|
|
131
|
-
conditions: {
|
|
132
|
-
minDuration: 120,
|
|
133
|
-
maxDuration: 600,
|
|
134
|
-
sampleRate: 0.1,
|
|
135
|
-
agentList: [
|
|
136
|
-
866324,
|
|
137
|
-
826325,
|
|
138
|
-
],
|
|
139
|
-
promptList: [
|
|
140
|
-
"123324",
|
|
141
|
-
],
|
|
142
|
-
folderList: [
|
|
143
|
-
16754,
|
|
144
|
-
67535,
|
|
145
|
-
],
|
|
146
|
-
sheetInfo: {
|
|
147
|
-
"sheet_id": "1AGOCYz05AZYYOMzow2EYlgdDXSXaWIhyA3-zCxBm4go",
|
|
148
|
-
"sheet_name": "Q1 Sales Data",
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
startDatetime: new Date("2025-10-29T00:00:00Z"),
|
|
152
|
-
endDatetime: new Date("2025-10-30T00:00:00Z"),
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
console.log(result);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
run();
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Standalone function
|
|
162
|
-
|
|
163
|
-
The standalone function version of this method:
|
|
164
|
-
|
|
165
|
-
```typescript
|
|
166
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
167
|
-
import { insightsWorkflowsCreate } from "syllable-sdk/funcs/insightsWorkflowsCreate.js";
|
|
168
|
-
|
|
169
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
170
|
-
// You can create one instance of it to use across an application.
|
|
171
|
-
const syllableSDK = new SyllableSDKCore({
|
|
172
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
async function run() {
|
|
176
|
-
const res = await insightsWorkflowsCreate(syllableSDK, {
|
|
177
|
-
name: "summary-workflow",
|
|
178
|
-
source: "agent",
|
|
179
|
-
description: "Default workflow - generates a summary of the call",
|
|
180
|
-
insightToolIds: [
|
|
181
|
-
1,
|
|
182
|
-
],
|
|
183
|
-
conditions: {
|
|
184
|
-
minDuration: 120,
|
|
185
|
-
maxDuration: 600,
|
|
186
|
-
sampleRate: 0.1,
|
|
187
|
-
agentList: [
|
|
188
|
-
866324,
|
|
189
|
-
826325,
|
|
190
|
-
],
|
|
191
|
-
promptList: [
|
|
192
|
-
"123324",
|
|
193
|
-
],
|
|
194
|
-
folderList: [
|
|
195
|
-
16754,
|
|
196
|
-
67535,
|
|
197
|
-
],
|
|
198
|
-
sheetInfo: {
|
|
199
|
-
"sheet_id": "1AGOCYz05AZYYOMzow2EYlgdDXSXaWIhyA3-zCxBm4go",
|
|
200
|
-
"sheet_name": "Q1 Sales Data",
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
startDatetime: new Date("2025-10-29T00:00:00Z"),
|
|
204
|
-
endDatetime: new Date("2025-10-30T00:00:00Z"),
|
|
205
|
-
});
|
|
206
|
-
if (res.ok) {
|
|
207
|
-
const { value: result } = res;
|
|
208
|
-
console.log(result);
|
|
209
|
-
} else {
|
|
210
|
-
console.log("insightsWorkflowsCreate failed:", res.error);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
run();
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### Parameters
|
|
218
|
-
|
|
219
|
-
| Parameter | Type | Required | Description |
|
|
220
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
221
|
-
| `request` | [components.InsightWorkflowInput](../../models/components/insightworkflowinput.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
222
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
223
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
224
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
225
|
-
|
|
226
|
-
### Response
|
|
227
|
-
|
|
228
|
-
**Promise\<[components.InsightWorkflowOutput](../../models/components/insightworkflowoutput.md)\>**
|
|
229
|
-
|
|
230
|
-
### Errors
|
|
231
|
-
|
|
232
|
-
| Error Type | Status Code | Content Type |
|
|
233
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
234
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
235
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
236
|
-
|
|
237
|
-
## getById
|
|
238
|
-
|
|
239
|
-
Get a InsightWorkflow by ID.
|
|
240
|
-
|
|
241
|
-
### Example Usage
|
|
242
|
-
|
|
243
|
-
<!-- UsageSnippet language="typescript" operationID="insights_workflow_get_by_id" method="get" path="/api/v1/insights/workflows/{workflow_id}" -->
|
|
244
|
-
```typescript
|
|
245
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
246
|
-
|
|
247
|
-
const syllableSDK = new SyllableSDK({
|
|
248
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
async function run() {
|
|
252
|
-
const result = await syllableSDK.insights.workflows.getById({
|
|
253
|
-
workflowId: 788857,
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
console.log(result);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
run();
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
### Standalone function
|
|
263
|
-
|
|
264
|
-
The standalone function version of this method:
|
|
265
|
-
|
|
266
|
-
```typescript
|
|
267
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
268
|
-
import { insightsWorkflowsGetById } from "syllable-sdk/funcs/insightsWorkflowsGetById.js";
|
|
269
|
-
|
|
270
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
271
|
-
// You can create one instance of it to use across an application.
|
|
272
|
-
const syllableSDK = new SyllableSDKCore({
|
|
273
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
async function run() {
|
|
277
|
-
const res = await insightsWorkflowsGetById(syllableSDK, {
|
|
278
|
-
workflowId: 788857,
|
|
279
|
-
});
|
|
280
|
-
if (res.ok) {
|
|
281
|
-
const { value: result } = res;
|
|
282
|
-
console.log(result);
|
|
283
|
-
} else {
|
|
284
|
-
console.log("insightsWorkflowsGetById failed:", res.error);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
run();
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### Parameters
|
|
292
|
-
|
|
293
|
-
| Parameter | Type | Required | Description |
|
|
294
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
295
|
-
| `request` | [operations.InsightsWorkflowGetByIdRequest](../../models/operations/insightsworkflowgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
296
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
297
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
298
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
299
|
-
|
|
300
|
-
### Response
|
|
301
|
-
|
|
302
|
-
**Promise\<[components.InsightWorkflowOutput](../../models/components/insightworkflowoutput.md)\>**
|
|
303
|
-
|
|
304
|
-
### Errors
|
|
305
|
-
|
|
306
|
-
| Error Type | Status Code | Content Type |
|
|
307
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
308
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
309
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
310
|
-
|
|
311
|
-
## update
|
|
312
|
-
|
|
313
|
-
Update a InsightWorkflow.
|
|
314
|
-
|
|
315
|
-
### Example Usage
|
|
316
|
-
|
|
317
|
-
<!-- UsageSnippet language="typescript" operationID="insights_workflow_update" method="put" path="/api/v1/insights/workflows/{workflow_id}" -->
|
|
318
|
-
```typescript
|
|
319
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
320
|
-
|
|
321
|
-
const syllableSDK = new SyllableSDK({
|
|
322
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
async function run() {
|
|
326
|
-
const result = await syllableSDK.insights.workflows.update({
|
|
327
|
-
workflowId: 673493,
|
|
328
|
-
insightWorkflowInput: {
|
|
329
|
-
name: "summary-workflow",
|
|
330
|
-
source: "agent",
|
|
331
|
-
description: "Default workflow - generates a summary of the call",
|
|
332
|
-
insightToolIds: [
|
|
333
|
-
1,
|
|
334
|
-
],
|
|
335
|
-
conditions: {
|
|
336
|
-
minDuration: 120,
|
|
337
|
-
maxDuration: 600,
|
|
338
|
-
sampleRate: 0.1,
|
|
339
|
-
agentList: [
|
|
340
|
-
866324,
|
|
341
|
-
826325,
|
|
342
|
-
],
|
|
343
|
-
promptList: [
|
|
344
|
-
"123324",
|
|
345
|
-
],
|
|
346
|
-
folderList: [
|
|
347
|
-
16754,
|
|
348
|
-
67535,
|
|
349
|
-
],
|
|
350
|
-
sheetInfo: {
|
|
351
|
-
"sheet_id": "1AGOCYz05AZYYOMzow2EYlgdDXSXaWIhyA3-zCxBm4go",
|
|
352
|
-
"sheet_name": "Q1 Sales Data",
|
|
353
|
-
},
|
|
354
|
-
},
|
|
355
|
-
startDatetime: new Date("2025-10-29T00:00:00Z"),
|
|
356
|
-
endDatetime: new Date("2025-10-30T00:00:00Z"),
|
|
357
|
-
},
|
|
358
|
-
});
|
|
359
|
-
|
|
360
|
-
console.log(result);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
run();
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
### Standalone function
|
|
367
|
-
|
|
368
|
-
The standalone function version of this method:
|
|
369
|
-
|
|
370
|
-
```typescript
|
|
371
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
372
|
-
import { insightsWorkflowsUpdate } from "syllable-sdk/funcs/insightsWorkflowsUpdate.js";
|
|
373
|
-
|
|
374
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
375
|
-
// You can create one instance of it to use across an application.
|
|
376
|
-
const syllableSDK = new SyllableSDKCore({
|
|
377
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
async function run() {
|
|
381
|
-
const res = await insightsWorkflowsUpdate(syllableSDK, {
|
|
382
|
-
workflowId: 673493,
|
|
383
|
-
insightWorkflowInput: {
|
|
384
|
-
name: "summary-workflow",
|
|
385
|
-
source: "agent",
|
|
386
|
-
description: "Default workflow - generates a summary of the call",
|
|
387
|
-
insightToolIds: [
|
|
388
|
-
1,
|
|
389
|
-
],
|
|
390
|
-
conditions: {
|
|
391
|
-
minDuration: 120,
|
|
392
|
-
maxDuration: 600,
|
|
393
|
-
sampleRate: 0.1,
|
|
394
|
-
agentList: [
|
|
395
|
-
866324,
|
|
396
|
-
826325,
|
|
397
|
-
],
|
|
398
|
-
promptList: [
|
|
399
|
-
"123324",
|
|
400
|
-
],
|
|
401
|
-
folderList: [
|
|
402
|
-
16754,
|
|
403
|
-
67535,
|
|
404
|
-
],
|
|
405
|
-
sheetInfo: {
|
|
406
|
-
"sheet_id": "1AGOCYz05AZYYOMzow2EYlgdDXSXaWIhyA3-zCxBm4go",
|
|
407
|
-
"sheet_name": "Q1 Sales Data",
|
|
408
|
-
},
|
|
409
|
-
},
|
|
410
|
-
startDatetime: new Date("2025-10-29T00:00:00Z"),
|
|
411
|
-
endDatetime: new Date("2025-10-30T00:00:00Z"),
|
|
412
|
-
},
|
|
413
|
-
});
|
|
414
|
-
if (res.ok) {
|
|
415
|
-
const { value: result } = res;
|
|
416
|
-
console.log(result);
|
|
417
|
-
} else {
|
|
418
|
-
console.log("insightsWorkflowsUpdate failed:", res.error);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
run();
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
### Parameters
|
|
426
|
-
|
|
427
|
-
| Parameter | Type | Required | Description |
|
|
428
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
429
|
-
| `request` | [operations.InsightsWorkflowUpdateRequest](../../models/operations/insightsworkflowupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
430
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
431
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
432
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
433
|
-
|
|
434
|
-
### Response
|
|
435
|
-
|
|
436
|
-
**Promise\<[components.InsightWorkflowOutput](../../models/components/insightworkflowoutput.md)\>**
|
|
437
|
-
|
|
438
|
-
### Errors
|
|
439
|
-
|
|
440
|
-
| Error Type | Status Code | Content Type |
|
|
441
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
442
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
443
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
444
|
-
|
|
445
|
-
## delete
|
|
446
|
-
|
|
447
|
-
Delete an Insights workflow.
|
|
448
|
-
|
|
449
|
-
### Example Usage
|
|
450
|
-
|
|
451
|
-
<!-- UsageSnippet language="typescript" operationID="insights_workflow_delete" method="delete" path="/api/v1/insights/workflows/{workflow_id}" -->
|
|
452
|
-
```typescript
|
|
453
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
454
|
-
|
|
455
|
-
const syllableSDK = new SyllableSDK({
|
|
456
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
async function run() {
|
|
460
|
-
const result = await syllableSDK.insights.workflows.delete({
|
|
461
|
-
workflowId: 609419,
|
|
462
|
-
});
|
|
463
|
-
|
|
464
|
-
console.log(result);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
run();
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
### Standalone function
|
|
471
|
-
|
|
472
|
-
The standalone function version of this method:
|
|
473
|
-
|
|
474
|
-
```typescript
|
|
475
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
476
|
-
import { insightsWorkflowsDelete } from "syllable-sdk/funcs/insightsWorkflowsDelete.js";
|
|
477
|
-
|
|
478
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
479
|
-
// You can create one instance of it to use across an application.
|
|
480
|
-
const syllableSDK = new SyllableSDKCore({
|
|
481
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
482
|
-
});
|
|
483
|
-
|
|
484
|
-
async function run() {
|
|
485
|
-
const res = await insightsWorkflowsDelete(syllableSDK, {
|
|
486
|
-
workflowId: 609419,
|
|
487
|
-
});
|
|
488
|
-
if (res.ok) {
|
|
489
|
-
const { value: result } = res;
|
|
490
|
-
console.log(result);
|
|
491
|
-
} else {
|
|
492
|
-
console.log("insightsWorkflowsDelete failed:", res.error);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
run();
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
### Parameters
|
|
500
|
-
|
|
501
|
-
| Parameter | Type | Required | Description |
|
|
502
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
503
|
-
| `request` | [operations.InsightsWorkflowDeleteRequest](../../models/operations/insightsworkflowdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
504
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
505
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
506
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
507
|
-
|
|
508
|
-
### Response
|
|
509
|
-
|
|
510
|
-
**Promise\<[any](../../models/.md)\>**
|
|
511
|
-
|
|
512
|
-
### Errors
|
|
513
|
-
|
|
514
|
-
| Error Type | Status Code | Content Type |
|
|
515
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
516
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
517
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
518
|
-
|
|
519
|
-
## inactivate
|
|
520
|
-
|
|
521
|
-
Inactivate an InsightWorkflow.
|
|
522
|
-
|
|
523
|
-
### Example Usage
|
|
524
|
-
|
|
525
|
-
<!-- UsageSnippet language="typescript" operationID="insights_workflow_inactivate" method="put" path="/api/v1/insights/workflows/{workflow_id}/inactivate" -->
|
|
526
|
-
```typescript
|
|
527
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
528
|
-
|
|
529
|
-
const syllableSDK = new SyllableSDK({
|
|
530
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
531
|
-
});
|
|
532
|
-
|
|
533
|
-
async function run() {
|
|
534
|
-
const result = await syllableSDK.insights.workflows.inactivate({
|
|
535
|
-
workflowId: 248768,
|
|
536
|
-
});
|
|
537
|
-
|
|
538
|
-
console.log(result);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
run();
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
### Standalone function
|
|
545
|
-
|
|
546
|
-
The standalone function version of this method:
|
|
547
|
-
|
|
548
|
-
```typescript
|
|
549
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
550
|
-
import { insightsWorkflowsInactivate } from "syllable-sdk/funcs/insightsWorkflowsInactivate.js";
|
|
551
|
-
|
|
552
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
553
|
-
// You can create one instance of it to use across an application.
|
|
554
|
-
const syllableSDK = new SyllableSDKCore({
|
|
555
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
556
|
-
});
|
|
557
|
-
|
|
558
|
-
async function run() {
|
|
559
|
-
const res = await insightsWorkflowsInactivate(syllableSDK, {
|
|
560
|
-
workflowId: 248768,
|
|
561
|
-
});
|
|
562
|
-
if (res.ok) {
|
|
563
|
-
const { value: result } = res;
|
|
564
|
-
console.log(result);
|
|
565
|
-
} else {
|
|
566
|
-
console.log("insightsWorkflowsInactivate failed:", res.error);
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
run();
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
### Parameters
|
|
574
|
-
|
|
575
|
-
| Parameter | Type | Required | Description |
|
|
576
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
577
|
-
| `request` | [operations.InsightsWorkflowInactivateRequest](../../models/operations/insightsworkflowinactivaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
578
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
579
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
580
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
581
|
-
|
|
582
|
-
### Response
|
|
583
|
-
|
|
584
|
-
**Promise\<[components.InsightWorkflowOutput](../../models/components/insightworkflowoutput.md)\>**
|
|
585
|
-
|
|
586
|
-
### Errors
|
|
587
|
-
|
|
588
|
-
| Error Type | Status Code | Content Type |
|
|
589
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
590
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
591
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
592
|
-
|
|
593
|
-
## activate
|
|
594
|
-
|
|
595
|
-
Activate an InsightWorkflow.
|
|
596
|
-
|
|
597
|
-
### Example Usage
|
|
598
|
-
|
|
599
|
-
<!-- UsageSnippet language="typescript" operationID="insights_workflow_activate" method="put" path="/api/v1/insights/workflows/{workflow_id}/activate" -->
|
|
600
|
-
```typescript
|
|
601
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
602
|
-
|
|
603
|
-
const syllableSDK = new SyllableSDK({
|
|
604
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
605
|
-
});
|
|
606
|
-
|
|
607
|
-
async function run() {
|
|
608
|
-
const result = await syllableSDK.insights.workflows.activate({
|
|
609
|
-
workflowId: 303095,
|
|
610
|
-
insightWorkflowActivate: {
|
|
611
|
-
isAcknowledged: true,
|
|
612
|
-
estimate: {
|
|
613
|
-
backfillCount: 100,
|
|
614
|
-
backfillDuration: 1000,
|
|
615
|
-
estimatedDailyCount: 10,
|
|
616
|
-
estimatedDailyDuration: 3674.11,
|
|
617
|
-
estimatedDailyCost: 45.25,
|
|
618
|
-
estimatedBackfillCost: 4561,
|
|
619
|
-
},
|
|
620
|
-
},
|
|
621
|
-
});
|
|
622
|
-
|
|
623
|
-
console.log(result);
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
run();
|
|
627
|
-
```
|
|
628
|
-
|
|
629
|
-
### Standalone function
|
|
630
|
-
|
|
631
|
-
The standalone function version of this method:
|
|
632
|
-
|
|
633
|
-
```typescript
|
|
634
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
635
|
-
import { insightsWorkflowsActivate } from "syllable-sdk/funcs/insightsWorkflowsActivate.js";
|
|
636
|
-
|
|
637
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
638
|
-
// You can create one instance of it to use across an application.
|
|
639
|
-
const syllableSDK = new SyllableSDKCore({
|
|
640
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
641
|
-
});
|
|
642
|
-
|
|
643
|
-
async function run() {
|
|
644
|
-
const res = await insightsWorkflowsActivate(syllableSDK, {
|
|
645
|
-
workflowId: 303095,
|
|
646
|
-
insightWorkflowActivate: {
|
|
647
|
-
isAcknowledged: true,
|
|
648
|
-
estimate: {
|
|
649
|
-
backfillCount: 100,
|
|
650
|
-
backfillDuration: 1000,
|
|
651
|
-
estimatedDailyCount: 10,
|
|
652
|
-
estimatedDailyDuration: 3674.11,
|
|
653
|
-
estimatedDailyCost: 45.25,
|
|
654
|
-
estimatedBackfillCost: 4561,
|
|
655
|
-
},
|
|
656
|
-
},
|
|
657
|
-
});
|
|
658
|
-
if (res.ok) {
|
|
659
|
-
const { value: result } = res;
|
|
660
|
-
console.log(result);
|
|
661
|
-
} else {
|
|
662
|
-
console.log("insightsWorkflowsActivate failed:", res.error);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
run();
|
|
667
|
-
```
|
|
668
|
-
|
|
669
|
-
### Parameters
|
|
670
|
-
|
|
671
|
-
| Parameter | Type | Required | Description |
|
|
672
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
673
|
-
| `request` | [operations.InsightsWorkflowActivateRequest](../../models/operations/insightsworkflowactivaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
674
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
675
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
676
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
677
|
-
|
|
678
|
-
### Response
|
|
679
|
-
|
|
680
|
-
**Promise\<[components.InsightWorkflowOutput](../../models/components/insightworkflowoutput.md)\>**
|
|
681
|
-
|
|
682
|
-
### Errors
|
|
683
|
-
|
|
684
|
-
| Error Type | Status Code | Content Type |
|
|
685
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
686
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
687
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
688
|
-
|
|
689
|
-
## queueWork
|
|
690
|
-
|
|
691
|
-
Manually queue sessions for insights workflow evaluation.
|
|
692
|
-
|
|
693
|
-
### Example Usage
|
|
694
|
-
|
|
695
|
-
<!-- UsageSnippet language="typescript" operationID="insights_workflow_queue_work" method="post" path="/api/v1/insights/workflows/queue-work" -->
|
|
696
|
-
```typescript
|
|
697
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
698
|
-
|
|
699
|
-
const syllableSDK = new SyllableSDK({
|
|
700
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
701
|
-
});
|
|
702
|
-
|
|
703
|
-
async function run() {
|
|
704
|
-
const result = await syllableSDK.insights.workflows.queueWork({
|
|
705
|
-
workflowName: "summary-workflow",
|
|
706
|
-
sessionIdList: [
|
|
707
|
-
12334,
|
|
708
|
-
23445,
|
|
709
|
-
34556,
|
|
710
|
-
],
|
|
711
|
-
fileIdList: [
|
|
712
|
-
1234,
|
|
713
|
-
1678,
|
|
714
|
-
2224,
|
|
715
|
-
],
|
|
716
|
-
});
|
|
717
|
-
|
|
718
|
-
console.log(result);
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
run();
|
|
722
|
-
```
|
|
723
|
-
|
|
724
|
-
### Standalone function
|
|
725
|
-
|
|
726
|
-
The standalone function version of this method:
|
|
727
|
-
|
|
728
|
-
```typescript
|
|
729
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
730
|
-
import { insightsWorkflowsQueueWork } from "syllable-sdk/funcs/insightsWorkflowsQueueWork.js";
|
|
731
|
-
|
|
732
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
733
|
-
// You can create one instance of it to use across an application.
|
|
734
|
-
const syllableSDK = new SyllableSDKCore({
|
|
735
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
736
|
-
});
|
|
737
|
-
|
|
738
|
-
async function run() {
|
|
739
|
-
const res = await insightsWorkflowsQueueWork(syllableSDK, {
|
|
740
|
-
workflowName: "summary-workflow",
|
|
741
|
-
sessionIdList: [
|
|
742
|
-
12334,
|
|
743
|
-
23445,
|
|
744
|
-
34556,
|
|
745
|
-
],
|
|
746
|
-
fileIdList: [
|
|
747
|
-
1234,
|
|
748
|
-
1678,
|
|
749
|
-
2224,
|
|
750
|
-
],
|
|
751
|
-
});
|
|
752
|
-
if (res.ok) {
|
|
753
|
-
const { value: result } = res;
|
|
754
|
-
console.log(result);
|
|
755
|
-
} else {
|
|
756
|
-
console.log("insightsWorkflowsQueueWork failed:", res.error);
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
run();
|
|
761
|
-
```
|
|
762
|
-
|
|
763
|
-
### Parameters
|
|
764
|
-
|
|
765
|
-
| Parameter | Type | Required | Description |
|
|
766
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
767
|
-
| `request` | [components.InsightsWorkflowQueueSession](../../models/components/insightsworkflowqueuesession.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
768
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
769
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
770
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
771
|
-
|
|
772
|
-
### Response
|
|
773
|
-
|
|
774
|
-
**Promise\<[any](../../models/.md)\>**
|
|
775
|
-
|
|
776
|
-
### Errors
|
|
777
|
-
|
|
778
|
-
| Error Type | Status Code | Content Type |
|
|
779
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
780
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
781
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|