syllable-sdk 1.0.8-rc.1 → 1.0.8-rc.3

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 (91) hide show
  1. package/bin/mcp-server.js +135 -59
  2. package/bin/mcp-server.js.map +13 -12
  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/models/components/daotoolresponse.d.ts +80 -0
  10. package/models/components/daotoolresponse.d.ts.map +1 -0
  11. package/models/components/daotoolresponse.js +111 -0
  12. package/models/components/daotoolresponse.js.map +1 -0
  13. package/models/components/index.d.ts +1 -0
  14. package/models/components/index.d.ts.map +1 -1
  15. package/models/components/index.js +1 -0
  16. package/models/components/index.js.map +1 -1
  17. package/models/components/promptcreaterequest.d.ts +5 -0
  18. package/models/components/promptcreaterequest.d.ts.map +1 -1
  19. package/models/components/promptcreaterequest.js +4 -0
  20. package/models/components/promptcreaterequest.js.map +1 -1
  21. package/models/components/promptresponse.d.ts +11 -0
  22. package/models/components/promptresponse.d.ts.map +1 -1
  23. package/models/components/promptresponse.js +9 -0
  24. package/models/components/promptresponse.js.map +1 -1
  25. package/models/components/promptupdaterequest.d.ts +5 -0
  26. package/models/components/promptupdaterequest.d.ts.map +1 -1
  27. package/models/components/promptupdaterequest.js +4 -0
  28. package/models/components/promptupdaterequest.js.map +1 -1
  29. package/openapi.json +243 -33
  30. package/package.json +1 -1
  31. package/src/lib/config.ts +3 -3
  32. package/src/mcp-server/mcp-server.ts +1 -1
  33. package/src/mcp-server/server.ts +1 -1
  34. package/src/models/components/daotoolresponse.ts +171 -0
  35. package/src/models/components/index.ts +1 -0
  36. package/src/models/components/promptcreaterequest.ts +9 -0
  37. package/src/models/components/promptresponse.ts +24 -0
  38. package/src/models/components/promptupdaterequest.ts +9 -0
  39. package/.devcontainer/README.md +0 -35
  40. package/api-reference/sdks/agents/README.md +0 -224
  41. package/api-reference/sdks/availabletargets/README.md +0 -49
  42. package/api-reference/sdks/channels/README.md +0 -92
  43. package/api-reference/sdks/chats/README.md +0 -55
  44. package/api-reference/sdks/conversations/README.md +0 -91
  45. package/api-reference/sdks/dashboards/README.md +0 -321
  46. package/api-reference/sdks/events/README.md +0 -50
  47. package/api-reference/sdks/greetings/README.md +0 -223
  48. package/api-reference/sdks/organizations/README.md +0 -48
  49. package/api-reference/sdks/prompts/README.md +0 -225
  50. package/api-reference/sdks/sessions/README.md +0 -50
  51. package/api-reference/sdks/syllable/README.md +0 -22
  52. package/api-reference/sdks/targets/README.md +0 -194
  53. package/api-reference/sdks/tools/README.md +0 -92
  54. package/docs/sdks/agents/README.md +0 -589
  55. package/docs/sdks/batches/README.md +0 -742
  56. package/docs/sdks/campaigns/README.md +0 -526
  57. package/docs/sdks/channels/README.md +0 -401
  58. package/docs/sdks/conversations/README.md +0 -100
  59. package/docs/sdks/custommessages/README.md +0 -496
  60. package/docs/sdks/dashboards/README.md +0 -481
  61. package/docs/sdks/datasources/README.md +0 -458
  62. package/docs/sdks/directory/README.md +0 -727
  63. package/docs/sdks/events/README.md +0 -100
  64. package/docs/sdks/folders/README.md +0 -675
  65. package/docs/sdks/fullsummary/README.md +0 -82
  66. package/docs/sdks/incidents/README.md +0 -501
  67. package/docs/sdks/insights/README.md +0 -100
  68. package/docs/sdks/languagegroups/README.md +0 -565
  69. package/docs/sdks/latency/README.md +0 -82
  70. package/docs/sdks/numbers/README.md +0 -250
  71. package/docs/sdks/organizations/README.md +0 -317
  72. package/docs/sdks/permissions/README.md +0 -78
  73. package/docs/sdks/prompts/README.md +0 -592
  74. package/docs/sdks/pronunciations/README.md +0 -360
  75. package/docs/sdks/roles/README.md +0 -430
  76. package/docs/sdks/services/README.md +0 -430
  77. package/docs/sdks/sessiondebug/README.md +0 -236
  78. package/docs/sdks/sessionlabels/README.md +0 -262
  79. package/docs/sdks/sessions/README.md +0 -325
  80. package/docs/sdks/syllablesdktools/README.md +0 -578
  81. package/docs/sdks/takeouts/README.md +0 -228
  82. package/docs/sdks/targets/README.md +0 -454
  83. package/docs/sdks/test/README.md +0 -92
  84. package/docs/sdks/tools/README.md +0 -518
  85. package/docs/sdks/transcript/README.md +0 -82
  86. package/docs/sdks/twilio/README.md +0 -246
  87. package/docs/sdks/users/README.md +0 -561
  88. package/docs/sdks/v1/README.md +0 -561
  89. package/docs/sdks/voicegroups/README.md +0 -551
  90. package/docs/sdks/workflows/README.md +0 -781
  91. package/examples/README.md +0 -31
@@ -1,454 +0,0 @@
1
- # Targets
2
- (*channels.targets*)
3
-
4
- ## Overview
5
-
6
- Operations related to channel target configuration. A channel target links a channel to an agent, allowing users to communicate with the agent through that channel. For more information, see [Console docs](https://docs.syllable.ai/Resources/Channels).
7
-
8
- ### Available Operations
9
-
10
- * [availableTargets](#availabletargets) - Available Targets List
11
- * [list](#list) - Get Channel Targets
12
- * [create](#create) - Assign A Channel Target
13
- * [getById](#getbyid) - Get A Channel Target
14
- * [update](#update) - Edit Channel Target
15
-
16
- ## availableTargets
17
-
18
- List the available phone numbers
19
-
20
- ### Example Usage
21
-
22
- <!-- UsageSnippet language="typescript" operationID="available_targets" method="get" path="/api/v1/channels/available-targets" -->
23
- ```typescript
24
- import { SyllableSDK } from "syllable-sdk";
25
-
26
- const syllableSDK = new SyllableSDK({
27
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
28
- });
29
-
30
- async function run() {
31
- const result = await syllableSDK.channels.targets.availableTargets({
32
- page: 0,
33
- searchFields: [
34
- "target",
35
- ],
36
- searchFieldValues: [
37
- "Some Object Name",
38
- ],
39
- startDatetime: "2023-01-01T00:00:00Z",
40
- endDatetime: "2024-01-01T00:00:00Z",
41
- });
42
-
43
- console.log(result);
44
- }
45
-
46
- run();
47
- ```
48
-
49
- ### Standalone function
50
-
51
- The standalone function version of this method:
52
-
53
- ```typescript
54
- import { SyllableSDKCore } from "syllable-sdk/core.js";
55
- import { channelsTargetsAvailableTargets } from "syllable-sdk/funcs/channelsTargetsAvailableTargets.js";
56
-
57
- // Use `SyllableSDKCore` for best tree-shaking performance.
58
- // You can create one instance of it to use across an application.
59
- const syllableSDK = new SyllableSDKCore({
60
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
61
- });
62
-
63
- async function run() {
64
- const res = await channelsTargetsAvailableTargets(syllableSDK, {
65
- page: 0,
66
- searchFields: [
67
- "target",
68
- ],
69
- searchFieldValues: [
70
- "Some Object Name",
71
- ],
72
- startDatetime: "2023-01-01T00:00:00Z",
73
- endDatetime: "2024-01-01T00:00:00Z",
74
- });
75
- if (res.ok) {
76
- const { value: result } = res;
77
- console.log(result);
78
- } else {
79
- console.log("channelsTargetsAvailableTargets failed:", res.error);
80
- }
81
- }
82
-
83
- run();
84
- ```
85
-
86
- ### Parameters
87
-
88
- | Parameter | Type | Required | Description |
89
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
90
- | `request` | [operations.AvailableTargetsRequest](../../models/operations/availabletargetsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
91
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
92
- | `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. |
93
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
94
-
95
- ### Response
96
-
97
- **Promise\<[components.ListResponseAvailableTarget](../../models/components/listresponseavailabletarget.md)\>**
98
-
99
- ### Errors
100
-
101
- | Error Type | Status Code | Content Type |
102
- | -------------------------- | -------------------------- | -------------------------- |
103
- | errors.HTTPValidationError | 422 | application/json |
104
- | errors.SDKError | 4XX, 5XX | \*/\* |
105
-
106
- ## list
107
-
108
- Get Channel Targets
109
-
110
- ### Example Usage
111
-
112
- <!-- UsageSnippet language="typescript" operationID="channel_targets_list" method="get" path="/api/v1/channels/targets" -->
113
- ```typescript
114
- import { SyllableSDK } from "syllable-sdk";
115
-
116
- const syllableSDK = new SyllableSDK({
117
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
118
- });
119
-
120
- async function run() {
121
- const result = await syllableSDK.channels.targets.list({
122
- page: 0,
123
- searchFields: [
124
- "agent_id",
125
- ],
126
- searchFieldValues: [
127
- "Some Object Name",
128
- ],
129
- startDatetime: "2023-01-01T00:00:00Z",
130
- endDatetime: "2024-01-01T00:00:00Z",
131
- });
132
-
133
- console.log(result);
134
- }
135
-
136
- run();
137
- ```
138
-
139
- ### Standalone function
140
-
141
- The standalone function version of this method:
142
-
143
- ```typescript
144
- import { SyllableSDKCore } from "syllable-sdk/core.js";
145
- import { channelsTargetsList } from "syllable-sdk/funcs/channelsTargetsList.js";
146
-
147
- // Use `SyllableSDKCore` for best tree-shaking performance.
148
- // You can create one instance of it to use across an application.
149
- const syllableSDK = new SyllableSDKCore({
150
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
151
- });
152
-
153
- async function run() {
154
- const res = await channelsTargetsList(syllableSDK, {
155
- page: 0,
156
- searchFields: [
157
- "agent_id",
158
- ],
159
- searchFieldValues: [
160
- "Some Object Name",
161
- ],
162
- startDatetime: "2023-01-01T00:00:00Z",
163
- endDatetime: "2024-01-01T00:00:00Z",
164
- });
165
- if (res.ok) {
166
- const { value: result } = res;
167
- console.log(result);
168
- } else {
169
- console.log("channelsTargetsList failed:", res.error);
170
- }
171
- }
172
-
173
- run();
174
- ```
175
-
176
- ### Parameters
177
-
178
- | Parameter | Type | Required | Description |
179
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
180
- | `request` | [operations.ChannelTargetsListRequest](../../models/operations/channeltargetslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
181
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
182
- | `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. |
183
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
184
-
185
- ### Response
186
-
187
- **Promise\<[components.ListResponseChannelTargetResponse](../../models/components/listresponsechanneltargetresponse.md)\>**
188
-
189
- ### Errors
190
-
191
- | Error Type | Status Code | Content Type |
192
- | -------------------------- | -------------------------- | -------------------------- |
193
- | errors.HTTPValidationError | 422 | application/json |
194
- | errors.SDKError | 4XX, 5XX | \*/\* |
195
-
196
- ## create
197
-
198
- Assign A Channel Target
199
-
200
- ### Example Usage
201
-
202
- <!-- UsageSnippet language="typescript" operationID="channel_targets_create" method="post" path="/api/v1/channels/{channel_id}/targets" -->
203
- ```typescript
204
- import { SyllableSDK } from "syllable-sdk";
205
-
206
- const syllableSDK = new SyllableSDK({
207
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
208
- });
209
-
210
- async function run() {
211
- const result = await syllableSDK.channels.targets.create({
212
- channelId: 824809,
213
- channelTargetCreateRequest: {
214
- agentId: 1,
215
- channelId: 1,
216
- target: "+19995551234",
217
- targetMode: "email",
218
- fallbackTarget: "+19995551235",
219
- isTest: true,
220
- },
221
- });
222
-
223
- console.log(result);
224
- }
225
-
226
- run();
227
- ```
228
-
229
- ### Standalone function
230
-
231
- The standalone function version of this method:
232
-
233
- ```typescript
234
- import { SyllableSDKCore } from "syllable-sdk/core.js";
235
- import { channelsTargetsCreate } from "syllable-sdk/funcs/channelsTargetsCreate.js";
236
-
237
- // Use `SyllableSDKCore` for best tree-shaking performance.
238
- // You can create one instance of it to use across an application.
239
- const syllableSDK = new SyllableSDKCore({
240
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
241
- });
242
-
243
- async function run() {
244
- const res = await channelsTargetsCreate(syllableSDK, {
245
- channelId: 824809,
246
- channelTargetCreateRequest: {
247
- agentId: 1,
248
- channelId: 1,
249
- target: "+19995551234",
250
- targetMode: "email",
251
- fallbackTarget: "+19995551235",
252
- isTest: true,
253
- },
254
- });
255
- if (res.ok) {
256
- const { value: result } = res;
257
- console.log(result);
258
- } else {
259
- console.log("channelsTargetsCreate failed:", res.error);
260
- }
261
- }
262
-
263
- run();
264
- ```
265
-
266
- ### Parameters
267
-
268
- | Parameter | Type | Required | Description |
269
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
270
- | `request` | [operations.ChannelTargetsCreateRequest](../../models/operations/channeltargetscreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
271
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
272
- | `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. |
273
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
274
-
275
- ### Response
276
-
277
- **Promise\<[components.ChannelTargetResponse](../../models/components/channeltargetresponse.md)\>**
278
-
279
- ### Errors
280
-
281
- | Error Type | Status Code | Content Type |
282
- | -------------------------- | -------------------------- | -------------------------- |
283
- | errors.HTTPValidationError | 422 | application/json |
284
- | errors.SDKError | 4XX, 5XX | \*/\* |
285
-
286
- ## getById
287
-
288
- Get A Channel Target
289
-
290
- ### Example Usage
291
-
292
- <!-- UsageSnippet language="typescript" operationID="channel_targets_get_by_id" method="get" path="/api/v1/channels/{channel_id}/targets/{target_id}" -->
293
- ```typescript
294
- import { SyllableSDK } from "syllable-sdk";
295
-
296
- const syllableSDK = new SyllableSDK({
297
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
298
- });
299
-
300
- async function run() {
301
- const result = await syllableSDK.channels.targets.getById({
302
- channelId: 184507,
303
- targetId: 235358,
304
- });
305
-
306
- console.log(result);
307
- }
308
-
309
- run();
310
- ```
311
-
312
- ### Standalone function
313
-
314
- The standalone function version of this method:
315
-
316
- ```typescript
317
- import { SyllableSDKCore } from "syllable-sdk/core.js";
318
- import { channelsTargetsGetById } from "syllable-sdk/funcs/channelsTargetsGetById.js";
319
-
320
- // Use `SyllableSDKCore` for best tree-shaking performance.
321
- // You can create one instance of it to use across an application.
322
- const syllableSDK = new SyllableSDKCore({
323
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
324
- });
325
-
326
- async function run() {
327
- const res = await channelsTargetsGetById(syllableSDK, {
328
- channelId: 184507,
329
- targetId: 235358,
330
- });
331
- if (res.ok) {
332
- const { value: result } = res;
333
- console.log(result);
334
- } else {
335
- console.log("channelsTargetsGetById failed:", res.error);
336
- }
337
- }
338
-
339
- run();
340
- ```
341
-
342
- ### Parameters
343
-
344
- | Parameter | Type | Required | Description |
345
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
346
- | `request` | [operations.ChannelTargetsGetByIdRequest](../../models/operations/channeltargetsgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
347
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
348
- | `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. |
349
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
350
-
351
- ### Response
352
-
353
- **Promise\<[components.ChannelTargetResponse](../../models/components/channeltargetresponse.md)\>**
354
-
355
- ### Errors
356
-
357
- | Error Type | Status Code | Content Type |
358
- | -------------------------- | -------------------------- | -------------------------- |
359
- | errors.HTTPValidationError | 422 | application/json |
360
- | errors.SDKError | 4XX, 5XX | \*/\* |
361
-
362
- ## update
363
-
364
- Update channel target by ID
365
-
366
- ### Example Usage
367
-
368
- <!-- UsageSnippet language="typescript" operationID="channel_targets_update" method="put" path="/api/v1/channels/{channel_id}/targets/{target_id}" -->
369
- ```typescript
370
- import { SyllableSDK } from "syllable-sdk";
371
-
372
- const syllableSDK = new SyllableSDK({
373
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
374
- });
375
-
376
- async function run() {
377
- const result = await syllableSDK.channels.targets.update({
378
- channelId: 508167,
379
- targetId: 880236,
380
- channelTargetUpdateRequest: {
381
- agentId: 1,
382
- channelId: 1,
383
- target: "+19995551234",
384
- targetMode: "email",
385
- fallbackTarget: "+19995551235",
386
- isTest: true,
387
- id: 1,
388
- },
389
- });
390
-
391
- console.log(result);
392
- }
393
-
394
- run();
395
- ```
396
-
397
- ### Standalone function
398
-
399
- The standalone function version of this method:
400
-
401
- ```typescript
402
- import { SyllableSDKCore } from "syllable-sdk/core.js";
403
- import { channelsTargetsUpdate } from "syllable-sdk/funcs/channelsTargetsUpdate.js";
404
-
405
- // Use `SyllableSDKCore` for best tree-shaking performance.
406
- // You can create one instance of it to use across an application.
407
- const syllableSDK = new SyllableSDKCore({
408
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
409
- });
410
-
411
- async function run() {
412
- const res = await channelsTargetsUpdate(syllableSDK, {
413
- channelId: 508167,
414
- targetId: 880236,
415
- channelTargetUpdateRequest: {
416
- agentId: 1,
417
- channelId: 1,
418
- target: "+19995551234",
419
- targetMode: "email",
420
- fallbackTarget: "+19995551235",
421
- isTest: true,
422
- id: 1,
423
- },
424
- });
425
- if (res.ok) {
426
- const { value: result } = res;
427
- console.log(result);
428
- } else {
429
- console.log("channelsTargetsUpdate failed:", res.error);
430
- }
431
- }
432
-
433
- run();
434
- ```
435
-
436
- ### Parameters
437
-
438
- | Parameter | Type | Required | Description |
439
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
440
- | `request` | [operations.ChannelTargetsUpdateRequest](../../models/operations/channeltargetsupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
441
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
442
- | `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. |
443
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
444
-
445
- ### Response
446
-
447
- **Promise\<[components.ChannelTargetResponse](../../models/components/channeltargetresponse.md)\>**
448
-
449
- ### Errors
450
-
451
- | Error Type | Status Code | Content Type |
452
- | -------------------------- | -------------------------- | -------------------------- |
453
- | errors.HTTPValidationError | 422 | application/json |
454
- | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -1,92 +0,0 @@
1
- # Test
2
- (*agents.test*)
3
-
4
- ## Overview
5
-
6
- Operations for testing agents with live text. These endpoints allow sending messages to an agent and receiving its responses.
7
-
8
- ### Available Operations
9
-
10
- * [sendTestMessage](#sendtestmessage) - Send New Message
11
-
12
- ## sendTestMessage
13
-
14
- Send a new message
15
-
16
- ### Example Usage
17
-
18
- <!-- UsageSnippet language="typescript" operationID="send_test_message" method="post" path="/api/v1/agents/test/messages" -->
19
- ```typescript
20
- import { SyllableSDK } from "syllable-sdk";
21
-
22
- const syllableSDK = new SyllableSDK({
23
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
24
- });
25
-
26
- async function run() {
27
- const result = await syllableSDK.agents.test.sendTestMessage({
28
- serviceName: "<value>",
29
- source: "user@email.com",
30
- text: "Hello",
31
- testId: "<id>",
32
- agentId: "<id>",
33
- });
34
-
35
- console.log(result);
36
- }
37
-
38
- run();
39
- ```
40
-
41
- ### Standalone function
42
-
43
- The standalone function version of this method:
44
-
45
- ```typescript
46
- import { SyllableSDKCore } from "syllable-sdk/core.js";
47
- import { agentsTestSendTestMessage } from "syllable-sdk/funcs/agentsTestSendTestMessage.js";
48
-
49
- // Use `SyllableSDKCore` for best tree-shaking performance.
50
- // You can create one instance of it to use across an application.
51
- const syllableSDK = new SyllableSDKCore({
52
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
53
- });
54
-
55
- async function run() {
56
- const res = await agentsTestSendTestMessage(syllableSDK, {
57
- serviceName: "<value>",
58
- source: "user@email.com",
59
- text: "Hello",
60
- testId: "<id>",
61
- agentId: "<id>",
62
- });
63
- if (res.ok) {
64
- const { value: result } = res;
65
- console.log(result);
66
- } else {
67
- console.log("agentsTestSendTestMessage failed:", res.error);
68
- }
69
- }
70
-
71
- run();
72
- ```
73
-
74
- ### Parameters
75
-
76
- | Parameter | Type | Required | Description |
77
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
78
- | `request` | [components.TestMessage](../../models/components/testmessage.md) | :heavy_check_mark: | The request object to use for the request. |
79
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
80
- | `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. |
81
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
82
-
83
- ### Response
84
-
85
- **Promise\<[components.TestMessageResponse](../../models/components/testmessageresponse.md)\>**
86
-
87
- ### Errors
88
-
89
- | Error Type | Status Code | Content Type |
90
- | -------------------------- | -------------------------- | -------------------------- |
91
- | errors.HTTPValidationError | 422 | application/json |
92
- | errors.SDKError | 4XX, 5XX | \*/\* |