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,518 +0,0 @@
1
- # Tools
2
- (*tools*)
3
-
4
- ## Overview
5
-
6
- Operations related to tool configuration. A tool is a function that an agent can call to perform actions like accessing databases, making API calls, or processing data. For an agent to have access to a tool, the prompt associated with that agent should be linked to the tool and include instructions to use it. For more information, see [Console docs](https://docs.syllable.ai/Resources/Tools).
7
-
8
- ### Available Operations
9
-
10
- * [list](#list) - Tool List
11
- * [create](#create) - Create Tool
12
- * [update](#update) - Update Tool
13
- * [getByName](#getbyname) - Tool Info
14
- * [delete](#delete) - Delete Tool
15
-
16
- ## list
17
-
18
- List the existing tools
19
-
20
- ### Example Usage
21
-
22
- <!-- UsageSnippet language="typescript" operationID="tool_list" method="get" path="/api/v1/tools/" -->
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.tools.list({
32
- page: 0,
33
- searchFields: [
34
- "name",
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 { toolsList } from "syllable-sdk/funcs/toolsList.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 toolsList(syllableSDK, {
65
- page: 0,
66
- searchFields: [
67
- "name",
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("toolsList failed:", res.error);
80
- }
81
- }
82
-
83
- run();
84
- ```
85
-
86
- ### Parameters
87
-
88
- | Parameter | Type | Required | Description |
89
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
90
- | `request` | [operations.ToolListRequest](../../models/operations/toollistrequest.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.ListResponseToolResponse](../../models/components/listresponsetoolresponse.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
- ## create
107
-
108
- Create a new tool
109
-
110
- ### Example Usage
111
-
112
- <!-- UsageSnippet language="typescript" operationID="tool_create" method="post" path="/api/v1/tools/" -->
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.tools.create({
122
- name: "Weather Fetcher",
123
- definition: {
124
- type: "endpoint",
125
- tool: {
126
- function: {
127
- name: "get_weather",
128
- description: "Get the weather for a city",
129
- parameters: {
130
-
131
- },
132
- },
133
- },
134
- endpoint: {
135
- url: "https://api.example.com",
136
- method: "post",
137
- argumentLocation: "path",
138
- },
139
- defaults: "<value>",
140
- staticParameters: [
141
- {
142
- name: "temperature_unit",
143
- description: "Whether the temperature information should be fetched in Celsius or Fahrenheit",
144
- required: false,
145
- type: "string",
146
- default: "fahrenheit",
147
- },
148
- ],
149
- },
150
- serviceId: 1,
151
- });
152
-
153
- console.log(result);
154
- }
155
-
156
- run();
157
- ```
158
-
159
- ### Standalone function
160
-
161
- The standalone function version of this method:
162
-
163
- ```typescript
164
- import { SyllableSDKCore } from "syllable-sdk/core.js";
165
- import { toolsCreate } from "syllable-sdk/funcs/toolsCreate.js";
166
-
167
- // Use `SyllableSDKCore` for best tree-shaking performance.
168
- // You can create one instance of it to use across an application.
169
- const syllableSDK = new SyllableSDKCore({
170
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
171
- });
172
-
173
- async function run() {
174
- const res = await toolsCreate(syllableSDK, {
175
- name: "Weather Fetcher",
176
- definition: {
177
- type: "endpoint",
178
- tool: {
179
- function: {
180
- name: "get_weather",
181
- description: "Get the weather for a city",
182
- parameters: {
183
-
184
- },
185
- },
186
- },
187
- endpoint: {
188
- url: "https://api.example.com",
189
- method: "post",
190
- argumentLocation: "path",
191
- },
192
- defaults: "<value>",
193
- staticParameters: [
194
- {
195
- name: "temperature_unit",
196
- description: "Whether the temperature information should be fetched in Celsius or Fahrenheit",
197
- required: false,
198
- type: "string",
199
- default: "fahrenheit",
200
- },
201
- ],
202
- },
203
- serviceId: 1,
204
- });
205
- if (res.ok) {
206
- const { value: result } = res;
207
- console.log(result);
208
- } else {
209
- console.log("toolsCreate failed:", res.error);
210
- }
211
- }
212
-
213
- run();
214
- ```
215
-
216
- ### Parameters
217
-
218
- | Parameter | Type | Required | Description |
219
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
220
- | `request` | [components.ToolCreateRequest](../../models/components/toolcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
221
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
222
- | `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. |
223
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
224
-
225
- ### Response
226
-
227
- **Promise\<[components.ToolResponse](../../models/components/toolresponse.md)\>**
228
-
229
- ### Errors
230
-
231
- | Error Type | Status Code | Content Type |
232
- | -------------------------- | -------------------------- | -------------------------- |
233
- | errors.HTTPValidationError | 422 | application/json |
234
- | errors.SDKError | 4XX, 5XX | \*/\* |
235
-
236
- ## update
237
-
238
- Update an existing tool
239
-
240
- ### Example Usage
241
-
242
- <!-- UsageSnippet language="typescript" operationID="tool_update" method="put" path="/api/v1/tools/" -->
243
- ```typescript
244
- import { SyllableSDK } from "syllable-sdk";
245
-
246
- const syllableSDK = new SyllableSDK({
247
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
248
- });
249
-
250
- async function run() {
251
- const result = await syllableSDK.tools.update({
252
- name: "Weather Fetcher",
253
- definition: {
254
- type: "endpoint",
255
- tool: {
256
- function: {
257
- name: "get_weather",
258
- description: "Get the weather for a city",
259
- parameters: {
260
-
261
- },
262
- },
263
- },
264
- endpoint: {
265
- url: "https://api.example.com",
266
- method: "get",
267
- argumentLocation: "form",
268
- },
269
- defaults: "<value>",
270
- staticParameters: [
271
- {
272
- name: "temperature_unit",
273
- description: "Whether the temperature information should be fetched in Celsius or Fahrenheit",
274
- required: false,
275
- type: "string",
276
- default: "fahrenheit",
277
- },
278
- ],
279
- },
280
- serviceId: 1,
281
- id: 1,
282
- lastUpdatedComments: "Updated to use new API endpoint",
283
- });
284
-
285
- console.log(result);
286
- }
287
-
288
- run();
289
- ```
290
-
291
- ### Standalone function
292
-
293
- The standalone function version of this method:
294
-
295
- ```typescript
296
- import { SyllableSDKCore } from "syllable-sdk/core.js";
297
- import { toolsUpdate } from "syllable-sdk/funcs/toolsUpdate.js";
298
-
299
- // Use `SyllableSDKCore` for best tree-shaking performance.
300
- // You can create one instance of it to use across an application.
301
- const syllableSDK = new SyllableSDKCore({
302
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
303
- });
304
-
305
- async function run() {
306
- const res = await toolsUpdate(syllableSDK, {
307
- name: "Weather Fetcher",
308
- definition: {
309
- type: "endpoint",
310
- tool: {
311
- function: {
312
- name: "get_weather",
313
- description: "Get the weather for a city",
314
- parameters: {
315
-
316
- },
317
- },
318
- },
319
- endpoint: {
320
- url: "https://api.example.com",
321
- method: "get",
322
- argumentLocation: "form",
323
- },
324
- defaults: "<value>",
325
- staticParameters: [
326
- {
327
- name: "temperature_unit",
328
- description: "Whether the temperature information should be fetched in Celsius or Fahrenheit",
329
- required: false,
330
- type: "string",
331
- default: "fahrenheit",
332
- },
333
- ],
334
- },
335
- serviceId: 1,
336
- id: 1,
337
- lastUpdatedComments: "Updated to use new API endpoint",
338
- });
339
- if (res.ok) {
340
- const { value: result } = res;
341
- console.log(result);
342
- } else {
343
- console.log("toolsUpdate failed:", res.error);
344
- }
345
- }
346
-
347
- run();
348
- ```
349
-
350
- ### Parameters
351
-
352
- | Parameter | Type | Required | Description |
353
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
354
- | `request` | [components.ToolUpdateRequest](../../models/components/toolupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
355
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
356
- | `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. |
357
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
358
-
359
- ### Response
360
-
361
- **Promise\<[components.ToolResponse](../../models/components/toolresponse.md)\>**
362
-
363
- ### Errors
364
-
365
- | Error Type | Status Code | Content Type |
366
- | -------------------------- | -------------------------- | -------------------------- |
367
- | errors.HTTPValidationError | 422 | application/json |
368
- | errors.SDKError | 4XX, 5XX | \*/\* |
369
-
370
- ## getByName
371
-
372
- Get the details of a specific tool
373
-
374
- ### Example Usage
375
-
376
- <!-- UsageSnippet language="typescript" operationID="tool_get_by_name" method="get" path="/api/v1/tools/{tool_name}" -->
377
- ```typescript
378
- import { SyllableSDK } from "syllable-sdk";
379
-
380
- const syllableSDK = new SyllableSDK({
381
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
382
- });
383
-
384
- async function run() {
385
- const result = await syllableSDK.tools.getByName({
386
- toolName: "<value>",
387
- });
388
-
389
- console.log(result);
390
- }
391
-
392
- run();
393
- ```
394
-
395
- ### Standalone function
396
-
397
- The standalone function version of this method:
398
-
399
- ```typescript
400
- import { SyllableSDKCore } from "syllable-sdk/core.js";
401
- import { toolsGetByName } from "syllable-sdk/funcs/toolsGetByName.js";
402
-
403
- // Use `SyllableSDKCore` for best tree-shaking performance.
404
- // You can create one instance of it to use across an application.
405
- const syllableSDK = new SyllableSDKCore({
406
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
407
- });
408
-
409
- async function run() {
410
- const res = await toolsGetByName(syllableSDK, {
411
- toolName: "<value>",
412
- });
413
- if (res.ok) {
414
- const { value: result } = res;
415
- console.log(result);
416
- } else {
417
- console.log("toolsGetByName failed:", res.error);
418
- }
419
- }
420
-
421
- run();
422
- ```
423
-
424
- ### Parameters
425
-
426
- | Parameter | Type | Required | Description |
427
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
428
- | `request` | [operations.ToolGetByNameRequest](../../models/operations/toolgetbynamerequest.md) | :heavy_check_mark: | The request object to use for the request. |
429
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
430
- | `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. |
431
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
432
-
433
- ### Response
434
-
435
- **Promise\<[components.ToolDetailResponse](../../models/components/tooldetailresponse.md)\>**
436
-
437
- ### Errors
438
-
439
- | Error Type | Status Code | Content Type |
440
- | -------------------------- | -------------------------- | -------------------------- |
441
- | errors.HTTPValidationError | 422 | application/json |
442
- | errors.SDKError | 4XX, 5XX | \*/\* |
443
-
444
- ## delete
445
-
446
- Delete a tool.
447
-
448
- ### Example Usage
449
-
450
- <!-- UsageSnippet language="typescript" operationID="tool_delete" method="delete" path="/api/v1/tools/{tool_name}" -->
451
- ```typescript
452
- import { SyllableSDK } from "syllable-sdk";
453
-
454
- const syllableSDK = new SyllableSDK({
455
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
456
- });
457
-
458
- async function run() {
459
- const result = await syllableSDK.tools.delete({
460
- toolName: "<value>",
461
- reason: "<value>",
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 { toolsDelete } from "syllable-sdk/funcs/toolsDelete.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 toolsDelete(syllableSDK, {
486
- toolName: "<value>",
487
- reason: "<value>",
488
- });
489
- if (res.ok) {
490
- const { value: result } = res;
491
- console.log(result);
492
- } else {
493
- console.log("toolsDelete failed:", res.error);
494
- }
495
- }
496
-
497
- run();
498
- ```
499
-
500
- ### Parameters
501
-
502
- | Parameter | Type | Required | Description |
503
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
504
- | `request` | [operations.ToolDeleteRequest](../../models/operations/tooldeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
505
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
506
- | `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. |
507
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
508
-
509
- ### Response
510
-
511
- **Promise\<[any](../../models/.md)\>**
512
-
513
- ### Errors
514
-
515
- | Error Type | Status Code | Content Type |
516
- | -------------------------- | -------------------------- | -------------------------- |
517
- | errors.HTTPValidationError | 422 | application/json |
518
- | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -1,82 +0,0 @@
1
- # Transcript
2
- (*sessions.transcript*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [getById](#getbyid) - Get Session Transcript By Id
9
-
10
- ## getById
11
-
12
- Get Session Transcript By Id
13
-
14
- ### Example Usage
15
-
16
- <!-- UsageSnippet language="typescript" operationID="session_transcript_get_by_id" method="get" path="/api/v1/sessions/transcript/{session_id}" -->
17
- ```typescript
18
- import { SyllableSDK } from "syllable-sdk";
19
-
20
- const syllableSDK = new SyllableSDK({
21
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
22
- });
23
-
24
- async function run() {
25
- const result = await syllableSDK.sessions.transcript.getById({
26
- sessionId: "<id>",
27
- });
28
-
29
- console.log(result);
30
- }
31
-
32
- run();
33
- ```
34
-
35
- ### Standalone function
36
-
37
- The standalone function version of this method:
38
-
39
- ```typescript
40
- import { SyllableSDKCore } from "syllable-sdk/core.js";
41
- import { sessionsTranscriptGetById } from "syllable-sdk/funcs/sessionsTranscriptGetById.js";
42
-
43
- // Use `SyllableSDKCore` for best tree-shaking performance.
44
- // You can create one instance of it to use across an application.
45
- const syllableSDK = new SyllableSDKCore({
46
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
47
- });
48
-
49
- async function run() {
50
- const res = await sessionsTranscriptGetById(syllableSDK, {
51
- sessionId: "<id>",
52
- });
53
- if (res.ok) {
54
- const { value: result } = res;
55
- console.log(result);
56
- } else {
57
- console.log("sessionsTranscriptGetById failed:", res.error);
58
- }
59
- }
60
-
61
- run();
62
- ```
63
-
64
- ### Parameters
65
-
66
- | Parameter | Type | Required | Description |
67
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
68
- | `request` | [operations.SessionTranscriptGetByIdRequest](../../models/operations/sessiontranscriptgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
69
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
70
- | `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. |
71
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
72
-
73
- ### Response
74
-
75
- **Promise\<[components.SessionTranscriptionResponse](../../models/components/sessiontranscriptionresponse.md)\>**
76
-
77
- ### Errors
78
-
79
- | Error Type | Status Code | Content Type |
80
- | -------------------------- | -------------------------- | -------------------------- |
81
- | errors.HTTPValidationError | 422 | application/json |
82
- | errors.SDKError | 4XX, 5XX | \*/\* |