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.
Files changed (66) hide show
  1. package/bin/mcp-server.js +6 -6
  2. package/bin/mcp-server.js.map +4 -4
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/openapi.json +33 -33
  10. package/package.json +1 -1
  11. package/src/lib/config.ts +3 -3
  12. package/src/mcp-server/mcp-server.ts +1 -1
  13. package/src/mcp-server/server.ts +1 -1
  14. package/.devcontainer/README.md +0 -35
  15. package/api-reference/sdks/agents/README.md +0 -224
  16. package/api-reference/sdks/availabletargets/README.md +0 -49
  17. package/api-reference/sdks/channels/README.md +0 -92
  18. package/api-reference/sdks/chats/README.md +0 -55
  19. package/api-reference/sdks/conversations/README.md +0 -91
  20. package/api-reference/sdks/dashboards/README.md +0 -321
  21. package/api-reference/sdks/events/README.md +0 -50
  22. package/api-reference/sdks/greetings/README.md +0 -223
  23. package/api-reference/sdks/organizations/README.md +0 -48
  24. package/api-reference/sdks/prompts/README.md +0 -225
  25. package/api-reference/sdks/sessions/README.md +0 -50
  26. package/api-reference/sdks/syllable/README.md +0 -22
  27. package/api-reference/sdks/targets/README.md +0 -194
  28. package/api-reference/sdks/tools/README.md +0 -92
  29. package/docs/sdks/agents/README.md +0 -589
  30. package/docs/sdks/batches/README.md +0 -742
  31. package/docs/sdks/campaigns/README.md +0 -526
  32. package/docs/sdks/channels/README.md +0 -401
  33. package/docs/sdks/conversations/README.md +0 -100
  34. package/docs/sdks/custommessages/README.md +0 -496
  35. package/docs/sdks/dashboards/README.md +0 -481
  36. package/docs/sdks/datasources/README.md +0 -458
  37. package/docs/sdks/directory/README.md +0 -727
  38. package/docs/sdks/events/README.md +0 -100
  39. package/docs/sdks/folders/README.md +0 -675
  40. package/docs/sdks/fullsummary/README.md +0 -82
  41. package/docs/sdks/incidents/README.md +0 -501
  42. package/docs/sdks/insights/README.md +0 -100
  43. package/docs/sdks/languagegroups/README.md +0 -565
  44. package/docs/sdks/latency/README.md +0 -82
  45. package/docs/sdks/numbers/README.md +0 -250
  46. package/docs/sdks/organizations/README.md +0 -317
  47. package/docs/sdks/permissions/README.md +0 -78
  48. package/docs/sdks/prompts/README.md +0 -592
  49. package/docs/sdks/pronunciations/README.md +0 -360
  50. package/docs/sdks/roles/README.md +0 -430
  51. package/docs/sdks/services/README.md +0 -430
  52. package/docs/sdks/sessiondebug/README.md +0 -236
  53. package/docs/sdks/sessionlabels/README.md +0 -262
  54. package/docs/sdks/sessions/README.md +0 -325
  55. package/docs/sdks/syllablesdktools/README.md +0 -578
  56. package/docs/sdks/takeouts/README.md +0 -228
  57. package/docs/sdks/targets/README.md +0 -454
  58. package/docs/sdks/test/README.md +0 -92
  59. package/docs/sdks/tools/README.md +0 -518
  60. package/docs/sdks/transcript/README.md +0 -82
  61. package/docs/sdks/twilio/README.md +0 -246
  62. package/docs/sdks/users/README.md +0 -561
  63. package/docs/sdks/v1/README.md +0 -561
  64. package/docs/sdks/voicegroups/README.md +0 -551
  65. package/docs/sdks/workflows/README.md +0 -781
  66. package/examples/README.md +0 -31
@@ -1,589 +0,0 @@
1
- # Agents
2
- (*agents*)
3
-
4
- ## Overview
5
-
6
- Operations related to agent configuration. When a user interacts with the Syllable system, they do so by communicating with an agent. An agent is linked to a prompt, a custom message, and one or more channel targets to define its behavior and capabilities. For more information, see [Console docs](https://docs.syllable.ai/workspaces/Agents).
7
-
8
- ### Available Operations
9
-
10
- * [list](#list) - Agent List
11
- * [create](#create) - Create Agent
12
- * [update](#update) - Update Agent
13
- * [getById](#getbyid) - Get Agent By Id
14
- * [delete](#delete) - Delete Agent
15
- * [agentGetAvailableVoices](#agentgetavailablevoices) - Get Available Agent Voices
16
-
17
- ## list
18
-
19
- List the existing agents
20
-
21
- ### Example Usage
22
-
23
- <!-- UsageSnippet language="typescript" operationID="agent_list" method="get" path="/api/v1/agents/" -->
24
- ```typescript
25
- import { SyllableSDK } from "syllable-sdk";
26
-
27
- const syllableSDK = new SyllableSDK({
28
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
29
- });
30
-
31
- async function run() {
32
- const result = await syllableSDK.agents.list({
33
- page: 0,
34
- searchFields: [
35
- "name",
36
- ],
37
- searchFieldValues: [
38
- "Some Object Name",
39
- ],
40
- startDatetime: "2023-01-01T00:00:00Z",
41
- endDatetime: "2024-01-01T00:00:00Z",
42
- });
43
-
44
- console.log(result);
45
- }
46
-
47
- run();
48
- ```
49
-
50
- ### Standalone function
51
-
52
- The standalone function version of this method:
53
-
54
- ```typescript
55
- import { SyllableSDKCore } from "syllable-sdk/core.js";
56
- import { agentsList } from "syllable-sdk/funcs/agentsList.js";
57
-
58
- // Use `SyllableSDKCore` for best tree-shaking performance.
59
- // You can create one instance of it to use across an application.
60
- const syllableSDK = new SyllableSDKCore({
61
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
62
- });
63
-
64
- async function run() {
65
- const res = await agentsList(syllableSDK, {
66
- page: 0,
67
- searchFields: [
68
- "name",
69
- ],
70
- searchFieldValues: [
71
- "Some Object Name",
72
- ],
73
- startDatetime: "2023-01-01T00:00:00Z",
74
- endDatetime: "2024-01-01T00:00:00Z",
75
- });
76
- if (res.ok) {
77
- const { value: result } = res;
78
- console.log(result);
79
- } else {
80
- console.log("agentsList failed:", res.error);
81
- }
82
- }
83
-
84
- run();
85
- ```
86
-
87
- ### Parameters
88
-
89
- | Parameter | Type | Required | Description |
90
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
91
- | `request` | [operations.AgentListRequest](../../models/operations/agentlistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
92
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
93
- | `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. |
94
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
95
-
96
- ### Response
97
-
98
- **Promise\<[components.ListResponseAgentResponse](../../models/components/listresponseagentresponse.md)\>**
99
-
100
- ### Errors
101
-
102
- | Error Type | Status Code | Content Type |
103
- | -------------------------- | -------------------------- | -------------------------- |
104
- | errors.HTTPValidationError | 422 | application/json |
105
- | errors.SDKError | 4XX, 5XX | \*/\* |
106
-
107
- ## create
108
-
109
- Create a new agent
110
-
111
- ### Example Usage
112
-
113
- <!-- UsageSnippet language="typescript" operationID="agent_create" method="post" path="/api/v1/agents/" -->
114
- ```typescript
115
- import { SyllableSDK } from "syllable-sdk";
116
-
117
- const syllableSDK = new SyllableSDK({
118
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
119
- });
120
-
121
- async function run() {
122
- const result = await syllableSDK.agents.create({
123
- name: "Weather agent",
124
- description: "Agent for answering questions about weather.",
125
- labels: [
126
- "Information",
127
- "Weather",
128
- ],
129
- type: "ca_v1",
130
- promptId: 1,
131
- customMessageId: 1,
132
- languageGroupId: 1,
133
- timezone: "America/New_York",
134
- promptToolDefaults: [
135
- {
136
- toolName: "get_weather",
137
- defaultValues: [
138
- {
139
- fieldName: "temperature_unit",
140
- defaultValue: "fahrenheit",
141
- },
142
- ],
143
- },
144
- ],
145
- variables: {
146
- "vars.location_name": "Main Street Pizza",
147
- },
148
- toolHeaders: {
149
- "some-header": "some-value",
150
- },
151
- sttProvider: "Google STT V2 (Chirp 2)",
152
- waitSound: "No Sound",
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 { agentsCreate } from "syllable-sdk/funcs/agentsCreate.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 agentsCreate(syllableSDK, {
177
- name: "Weather agent",
178
- description: "Agent for answering questions about weather.",
179
- labels: [
180
- "Information",
181
- "Weather",
182
- ],
183
- type: "ca_v1",
184
- promptId: 1,
185
- customMessageId: 1,
186
- languageGroupId: 1,
187
- timezone: "America/New_York",
188
- promptToolDefaults: [
189
- {
190
- toolName: "get_weather",
191
- defaultValues: [
192
- {
193
- fieldName: "temperature_unit",
194
- defaultValue: "fahrenheit",
195
- },
196
- ],
197
- },
198
- ],
199
- variables: {
200
- "vars.location_name": "Main Street Pizza",
201
- },
202
- toolHeaders: {
203
- "some-header": "some-value",
204
- },
205
- sttProvider: "Google STT V2 (Chirp 2)",
206
- waitSound: "No Sound",
207
- });
208
- if (res.ok) {
209
- const { value: result } = res;
210
- console.log(result);
211
- } else {
212
- console.log("agentsCreate failed:", res.error);
213
- }
214
- }
215
-
216
- run();
217
- ```
218
-
219
- ### Parameters
220
-
221
- | Parameter | Type | Required | Description |
222
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
223
- | `request` | [components.AgentCreate](../../models/components/agentcreate.md) | :heavy_check_mark: | The request object to use for the request. |
224
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
225
- | `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. |
226
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
227
-
228
- ### Response
229
-
230
- **Promise\<[components.AgentResponse](../../models/components/agentresponse.md)\>**
231
-
232
- ### Errors
233
-
234
- | Error Type | Status Code | Content Type |
235
- | -------------------------- | -------------------------- | -------------------------- |
236
- | errors.HTTPValidationError | 422 | application/json |
237
- | errors.SDKError | 4XX, 5XX | \*/\* |
238
-
239
- ## update
240
-
241
- Update an existing agent
242
-
243
- ### Example Usage
244
-
245
- <!-- UsageSnippet language="typescript" operationID="agent_update" method="put" path="/api/v1/agents/" -->
246
- ```typescript
247
- import { SyllableSDK } from "syllable-sdk";
248
-
249
- const syllableSDK = new SyllableSDK({
250
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
251
- });
252
-
253
- async function run() {
254
- const result = await syllableSDK.agents.update({
255
- name: "Weather agent",
256
- description: "Agent for answering questions about weather.",
257
- labels: [
258
- "Information",
259
- "Weather",
260
- ],
261
- type: "ca_v1",
262
- promptId: 1,
263
- customMessageId: 1,
264
- languageGroupId: 1,
265
- timezone: "America/New_York",
266
- promptToolDefaults: [
267
- {
268
- toolName: "get_weather",
269
- defaultValues: [
270
- {
271
- fieldName: "temperature_unit",
272
- defaultValue: "fahrenheit",
273
- },
274
- ],
275
- },
276
- ],
277
- variables: {
278
- "vars.location_name": "Main Street Pizza",
279
- },
280
- toolHeaders: {
281
- "some-header": "some-value",
282
- },
283
- sttProvider: "Google STT V2 (Chirp 2)",
284
- waitSound: "No Sound",
285
- id: 1,
286
- });
287
-
288
- console.log(result);
289
- }
290
-
291
- run();
292
- ```
293
-
294
- ### Standalone function
295
-
296
- The standalone function version of this method:
297
-
298
- ```typescript
299
- import { SyllableSDKCore } from "syllable-sdk/core.js";
300
- import { agentsUpdate } from "syllable-sdk/funcs/agentsUpdate.js";
301
-
302
- // Use `SyllableSDKCore` for best tree-shaking performance.
303
- // You can create one instance of it to use across an application.
304
- const syllableSDK = new SyllableSDKCore({
305
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
306
- });
307
-
308
- async function run() {
309
- const res = await agentsUpdate(syllableSDK, {
310
- name: "Weather agent",
311
- description: "Agent for answering questions about weather.",
312
- labels: [
313
- "Information",
314
- "Weather",
315
- ],
316
- type: "ca_v1",
317
- promptId: 1,
318
- customMessageId: 1,
319
- languageGroupId: 1,
320
- timezone: "America/New_York",
321
- promptToolDefaults: [
322
- {
323
- toolName: "get_weather",
324
- defaultValues: [
325
- {
326
- fieldName: "temperature_unit",
327
- defaultValue: "fahrenheit",
328
- },
329
- ],
330
- },
331
- ],
332
- variables: {
333
- "vars.location_name": "Main Street Pizza",
334
- },
335
- toolHeaders: {
336
- "some-header": "some-value",
337
- },
338
- sttProvider: "Google STT V2 (Chirp 2)",
339
- waitSound: "No Sound",
340
- id: 1,
341
- });
342
- if (res.ok) {
343
- const { value: result } = res;
344
- console.log(result);
345
- } else {
346
- console.log("agentsUpdate failed:", res.error);
347
- }
348
- }
349
-
350
- run();
351
- ```
352
-
353
- ### Parameters
354
-
355
- | Parameter | Type | Required | Description |
356
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
357
- | `request` | [components.AgentUpdate](../../models/components/agentupdate.md) | :heavy_check_mark: | The request object to use for the request. |
358
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
359
- | `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. |
360
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
361
-
362
- ### Response
363
-
364
- **Promise\<[components.AgentResponse](../../models/components/agentresponse.md)\>**
365
-
366
- ### Errors
367
-
368
- | Error Type | Status Code | Content Type |
369
- | -------------------------- | -------------------------- | -------------------------- |
370
- | errors.HTTPValidationError | 422 | application/json |
371
- | errors.SDKError | 4XX, 5XX | \*/\* |
372
-
373
- ## getById
374
-
375
- Get an agent by ID.
376
-
377
- ### Example Usage
378
-
379
- <!-- UsageSnippet language="typescript" operationID="agent_get_by_id" method="get" path="/api/v1/agents/{agent_id}" -->
380
- ```typescript
381
- import { SyllableSDK } from "syllable-sdk";
382
-
383
- const syllableSDK = new SyllableSDK({
384
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
385
- });
386
-
387
- async function run() {
388
- const result = await syllableSDK.agents.getById({
389
- agentId: 910445,
390
- });
391
-
392
- console.log(result);
393
- }
394
-
395
- run();
396
- ```
397
-
398
- ### Standalone function
399
-
400
- The standalone function version of this method:
401
-
402
- ```typescript
403
- import { SyllableSDKCore } from "syllable-sdk/core.js";
404
- import { agentsGetById } from "syllable-sdk/funcs/agentsGetById.js";
405
-
406
- // Use `SyllableSDKCore` for best tree-shaking performance.
407
- // You can create one instance of it to use across an application.
408
- const syllableSDK = new SyllableSDKCore({
409
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
410
- });
411
-
412
- async function run() {
413
- const res = await agentsGetById(syllableSDK, {
414
- agentId: 910445,
415
- });
416
- if (res.ok) {
417
- const { value: result } = res;
418
- console.log(result);
419
- } else {
420
- console.log("agentsGetById failed:", res.error);
421
- }
422
- }
423
-
424
- run();
425
- ```
426
-
427
- ### Parameters
428
-
429
- | Parameter | Type | Required | Description |
430
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
431
- | `request` | [operations.AgentGetByIdRequest](../../models/operations/agentgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
432
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
433
- | `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. |
434
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
435
-
436
- ### Response
437
-
438
- **Promise\<[components.AgentResponse](../../models/components/agentresponse.md)\>**
439
-
440
- ### Errors
441
-
442
- | Error Type | Status Code | Content Type |
443
- | -------------------------- | -------------------------- | -------------------------- |
444
- | errors.HTTPValidationError | 422 | application/json |
445
- | errors.SDKError | 4XX, 5XX | \*/\* |
446
-
447
- ## delete
448
-
449
- Delete Agent
450
-
451
- ### Example Usage
452
-
453
- <!-- UsageSnippet language="typescript" operationID="agent_delete" method="delete" path="/api/v1/agents/{agent_id}" -->
454
- ```typescript
455
- import { SyllableSDK } from "syllable-sdk";
456
-
457
- const syllableSDK = new SyllableSDK({
458
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
459
- });
460
-
461
- async function run() {
462
- const result = await syllableSDK.agents.delete({
463
- agentId: 78115,
464
- reason: "<value>",
465
- });
466
-
467
- console.log(result);
468
- }
469
-
470
- run();
471
- ```
472
-
473
- ### Standalone function
474
-
475
- The standalone function version of this method:
476
-
477
- ```typescript
478
- import { SyllableSDKCore } from "syllable-sdk/core.js";
479
- import { agentsDelete } from "syllable-sdk/funcs/agentsDelete.js";
480
-
481
- // Use `SyllableSDKCore` for best tree-shaking performance.
482
- // You can create one instance of it to use across an application.
483
- const syllableSDK = new SyllableSDKCore({
484
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
485
- });
486
-
487
- async function run() {
488
- const res = await agentsDelete(syllableSDK, {
489
- agentId: 78115,
490
- reason: "<value>",
491
- });
492
- if (res.ok) {
493
- const { value: result } = res;
494
- console.log(result);
495
- } else {
496
- console.log("agentsDelete failed:", res.error);
497
- }
498
- }
499
-
500
- run();
501
- ```
502
-
503
- ### Parameters
504
-
505
- | Parameter | Type | Required | Description |
506
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
507
- | `request` | [operations.AgentDeleteRequest](../../models/operations/agentdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
508
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
509
- | `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. |
510
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
511
-
512
- ### Response
513
-
514
- **Promise\<[any](../../models/.md)\>**
515
-
516
- ### Errors
517
-
518
- | Error Type | Status Code | Content Type |
519
- | -------------------------- | -------------------------- | -------------------------- |
520
- | errors.HTTPValidationError | 422 | application/json |
521
- | errors.SDKError | 4XX, 5XX | \*/\* |
522
-
523
- ## agentGetAvailableVoices
524
-
525
- Get available agent voices.
526
-
527
- ### Example Usage
528
-
529
- <!-- UsageSnippet language="typescript" operationID="agent_get_available_voices" method="get" path="/api/v1/agents/voices/available" -->
530
- ```typescript
531
- import { SyllableSDK } from "syllable-sdk";
532
-
533
- const syllableSDK = new SyllableSDK({
534
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
535
- });
536
-
537
- async function run() {
538
- const result = await syllableSDK.agents.agentGetAvailableVoices();
539
-
540
- console.log(result);
541
- }
542
-
543
- run();
544
- ```
545
-
546
- ### Standalone function
547
-
548
- The standalone function version of this method:
549
-
550
- ```typescript
551
- import { SyllableSDKCore } from "syllable-sdk/core.js";
552
- import { agentsAgentGetAvailableVoices } from "syllable-sdk/funcs/agentsAgentGetAvailableVoices.js";
553
-
554
- // Use `SyllableSDKCore` for best tree-shaking performance.
555
- // You can create one instance of it to use across an application.
556
- const syllableSDK = new SyllableSDKCore({
557
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
558
- });
559
-
560
- async function run() {
561
- const res = await agentsAgentGetAvailableVoices(syllableSDK);
562
- if (res.ok) {
563
- const { value: result } = res;
564
- console.log(result);
565
- } else {
566
- console.log("agentsAgentGetAvailableVoices failed:", res.error);
567
- }
568
- }
569
-
570
- run();
571
- ```
572
-
573
- ### Parameters
574
-
575
- | Parameter | Type | Required | Description |
576
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
577
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
578
- | `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. |
579
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
580
-
581
- ### Response
582
-
583
- **Promise\<[components.AgentVoice[]](../../models/.md)\>**
584
-
585
- ### Errors
586
-
587
- | Error Type | Status Code | Content Type |
588
- | --------------- | --------------- | --------------- |
589
- | errors.SDKError | 4XX, 5XX | \*/\* |