syllable-sdk 1.0.7 → 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 (92) hide show
  1. package/bin/mcp-server.js +54 -17
  2. package/bin/mcp-server.js.map +11 -10
  3. package/examples/package-lock.json +1 -1
  4. package/funcs/directoryUpdate.js +3 -1
  5. package/funcs/directoryUpdate.js.map +1 -1
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +3 -3
  8. package/lib/config.js +3 -3
  9. package/lib/config.js.map +1 -1
  10. package/mcp-server/mcp-server.js +1 -1
  11. package/mcp-server/mcp-server.js.map +1 -1
  12. package/mcp-server/server.js +1 -1
  13. package/mcp-server/server.js.map +1 -1
  14. package/models/components/directorymember.d.ts +4 -4
  15. package/models/components/directorymember.d.ts.map +1 -1
  16. package/models/components/directorymember.js +4 -4
  17. package/models/components/directorymember.js.map +1 -1
  18. package/models/components/directorymemberupdate.d.ts +60 -0
  19. package/models/components/directorymemberupdate.d.ts.map +1 -0
  20. package/models/components/directorymemberupdate.js +87 -0
  21. package/models/components/directorymemberupdate.js.map +1 -0
  22. package/models/components/index.d.ts +1 -0
  23. package/models/components/index.d.ts.map +1 -1
  24. package/models/components/index.js +1 -0
  25. package/models/components/index.js.map +1 -1
  26. package/models/operations/directorymemberupdate.d.ts +2 -2
  27. package/models/operations/directorymemberupdate.d.ts.map +1 -1
  28. package/models/operations/directorymemberupdate.js +4 -4
  29. package/models/operations/directorymemberupdate.js.map +1 -1
  30. package/openapi.json +136 -52
  31. package/package.json +1 -1
  32. package/src/funcs/directoryUpdate.ts +3 -1
  33. package/src/lib/config.ts +3 -3
  34. package/src/mcp-server/mcp-server.ts +1 -1
  35. package/src/mcp-server/server.ts +1 -1
  36. package/src/models/components/directorymember.ts +8 -10
  37. package/src/models/components/directorymemberupdate.ts +115 -0
  38. package/src/models/components/index.ts +1 -0
  39. package/src/models/operations/directorymemberupdate.ts +6 -6
  40. package/.devcontainer/README.md +0 -35
  41. package/api-reference/sdks/agents/README.md +0 -224
  42. package/api-reference/sdks/availabletargets/README.md +0 -49
  43. package/api-reference/sdks/channels/README.md +0 -92
  44. package/api-reference/sdks/chats/README.md +0 -55
  45. package/api-reference/sdks/conversations/README.md +0 -91
  46. package/api-reference/sdks/dashboards/README.md +0 -321
  47. package/api-reference/sdks/events/README.md +0 -50
  48. package/api-reference/sdks/greetings/README.md +0 -223
  49. package/api-reference/sdks/organizations/README.md +0 -48
  50. package/api-reference/sdks/prompts/README.md +0 -225
  51. package/api-reference/sdks/sessions/README.md +0 -50
  52. package/api-reference/sdks/syllable/README.md +0 -22
  53. package/api-reference/sdks/targets/README.md +0 -194
  54. package/api-reference/sdks/tools/README.md +0 -92
  55. package/docs/sdks/agents/README.md +0 -589
  56. package/docs/sdks/batches/README.md +0 -742
  57. package/docs/sdks/campaigns/README.md +0 -526
  58. package/docs/sdks/channels/README.md +0 -401
  59. package/docs/sdks/conversations/README.md +0 -100
  60. package/docs/sdks/custommessages/README.md +0 -496
  61. package/docs/sdks/dashboards/README.md +0 -481
  62. package/docs/sdks/datasources/README.md +0 -458
  63. package/docs/sdks/directory/README.md +0 -731
  64. package/docs/sdks/events/README.md +0 -100
  65. package/docs/sdks/folders/README.md +0 -675
  66. package/docs/sdks/fullsummary/README.md +0 -82
  67. package/docs/sdks/incidents/README.md +0 -501
  68. package/docs/sdks/insights/README.md +0 -100
  69. package/docs/sdks/languagegroups/README.md +0 -565
  70. package/docs/sdks/latency/README.md +0 -82
  71. package/docs/sdks/numbers/README.md +0 -250
  72. package/docs/sdks/organizations/README.md +0 -317
  73. package/docs/sdks/permissions/README.md +0 -78
  74. package/docs/sdks/prompts/README.md +0 -592
  75. package/docs/sdks/pronunciations/README.md +0 -360
  76. package/docs/sdks/roles/README.md +0 -430
  77. package/docs/sdks/services/README.md +0 -430
  78. package/docs/sdks/sessiondebug/README.md +0 -236
  79. package/docs/sdks/sessionlabels/README.md +0 -262
  80. package/docs/sdks/sessions/README.md +0 -325
  81. package/docs/sdks/syllablesdktools/README.md +0 -578
  82. package/docs/sdks/takeouts/README.md +0 -228
  83. package/docs/sdks/targets/README.md +0 -454
  84. package/docs/sdks/test/README.md +0 -92
  85. package/docs/sdks/tools/README.md +0 -518
  86. package/docs/sdks/transcript/README.md +0 -82
  87. package/docs/sdks/twilio/README.md +0 -246
  88. package/docs/sdks/users/README.md +0 -561
  89. package/docs/sdks/v1/README.md +0 -561
  90. package/docs/sdks/voicegroups/README.md +0 -551
  91. package/docs/sdks/workflows/README.md +0 -781
  92. 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 | \*/\* |