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,481 +0,0 @@
1
- # Dashboards
2
- (*dashboards*)
3
-
4
- ## Overview
5
-
6
- Operations related to dashboards. Currently the API/SDK only supports fetching basic information about dashboards.
7
-
8
- ### Available Operations
9
-
10
- * [postListDashboard](#postlistdashboard) - Post List Dashboards
11
- * [postGetDashboard](#postgetdashboard) - Post Fetch Info
12
- * [~~postSessionEventsDashboard~~](#postsessioneventsdashboard) - Post Session Events :warning: **Deprecated**
13
- * [~~postSessionSummaryDashboard~~](#postsessionsummarydashboard) - Post Session Summary :warning: **Deprecated**
14
- * [~~postSessionTransfersDashboard~~](#postsessiontransfersdashboard) - Post Session Transfers :warning: **Deprecated**
15
- * [~~postSessionsDashboard~~](#postsessionsdashboard) - Post Sessions :warning: **Deprecated**
16
-
17
- ## postListDashboard
18
-
19
- METHOD: POST
20
- URL: /dashboard/list
21
- ARGUMENTS: None
22
- RETURNS: List of dashboards
23
-
24
- ### Example Usage
25
-
26
- <!-- UsageSnippet language="typescript" operationID="post_list_dashboard" method="post" path="/api/v1/dashboards/list" -->
27
- ```typescript
28
- import { SyllableSDK } from "syllable-sdk";
29
-
30
- const syllableSDK = new SyllableSDK({
31
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
32
- });
33
-
34
- async function run() {
35
- const result = await syllableSDK.dashboards.postListDashboard({
36
- page: 0,
37
- searchFields: [
38
- "name",
39
- ],
40
- searchFieldValues: [
41
- "Some Object Name",
42
- ],
43
- startDatetime: "2023-01-01T00:00:00Z",
44
- endDatetime: "2024-01-01T00:00:00Z",
45
- });
46
-
47
- console.log(result);
48
- }
49
-
50
- run();
51
- ```
52
-
53
- ### Standalone function
54
-
55
- The standalone function version of this method:
56
-
57
- ```typescript
58
- import { SyllableSDKCore } from "syllable-sdk/core.js";
59
- import { dashboardsPostListDashboard } from "syllable-sdk/funcs/dashboardsPostListDashboard.js";
60
-
61
- // Use `SyllableSDKCore` for best tree-shaking performance.
62
- // You can create one instance of it to use across an application.
63
- const syllableSDK = new SyllableSDKCore({
64
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
65
- });
66
-
67
- async function run() {
68
- const res = await dashboardsPostListDashboard(syllableSDK, {
69
- page: 0,
70
- searchFields: [
71
- "name",
72
- ],
73
- searchFieldValues: [
74
- "Some Object Name",
75
- ],
76
- startDatetime: "2023-01-01T00:00:00Z",
77
- endDatetime: "2024-01-01T00:00:00Z",
78
- });
79
- if (res.ok) {
80
- const { value: result } = res;
81
- console.log(result);
82
- } else {
83
- console.log("dashboardsPostListDashboard failed:", res.error);
84
- }
85
- }
86
-
87
- run();
88
- ```
89
-
90
- ### Parameters
91
-
92
- | Parameter | Type | Required | Description |
93
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
94
- | `request` | [operations.PostListDashboardRequest](../../models/operations/postlistdashboardrequest.md) | :heavy_check_mark: | The request object to use for the request. |
95
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
96
- | `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. |
97
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
98
-
99
- ### Response
100
-
101
- **Promise\<[components.ListResponseDashboardResponse](../../models/components/listresponsedashboardresponse.md)\>**
102
-
103
- ### Errors
104
-
105
- | Error Type | Status Code | Content Type |
106
- | -------------------------- | -------------------------- | -------------------------- |
107
- | errors.HTTPValidationError | 422 | application/json |
108
- | errors.SDKError | 4XX, 5XX | \*/\* |
109
-
110
- ## postGetDashboard
111
-
112
- METHOD: POST
113
- URL: /dashboard/fetch_info
114
- ARGUMENTS: None
115
- RETURNS: Dashboard info for embedding
116
-
117
- ### Example Usage
118
-
119
- <!-- UsageSnippet language="typescript" operationID="post_get_dashboard" method="post" path="/api/v1/dashboards/fetch_info" -->
120
- ```typescript
121
- import { SyllableSDK } from "syllable-sdk";
122
-
123
- const syllableSDK = new SyllableSDK({
124
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
125
- });
126
-
127
- async function run() {
128
- const result = await syllableSDK.dashboards.postGetDashboard({
129
- dashboardName: "<value>",
130
- });
131
-
132
- console.log(result);
133
- }
134
-
135
- run();
136
- ```
137
-
138
- ### Standalone function
139
-
140
- The standalone function version of this method:
141
-
142
- ```typescript
143
- import { SyllableSDKCore } from "syllable-sdk/core.js";
144
- import { dashboardsPostGetDashboard } from "syllable-sdk/funcs/dashboardsPostGetDashboard.js";
145
-
146
- // Use `SyllableSDKCore` for best tree-shaking performance.
147
- // You can create one instance of it to use across an application.
148
- const syllableSDK = new SyllableSDKCore({
149
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
150
- });
151
-
152
- async function run() {
153
- const res = await dashboardsPostGetDashboard(syllableSDK, {
154
- dashboardName: "<value>",
155
- });
156
- if (res.ok) {
157
- const { value: result } = res;
158
- console.log(result);
159
- } else {
160
- console.log("dashboardsPostGetDashboard failed:", res.error);
161
- }
162
- }
163
-
164
- run();
165
- ```
166
-
167
- ### Parameters
168
-
169
- | Parameter | Type | Required | Description |
170
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
171
- | `request` | [operations.PostGetDashboardRequest](../../models/operations/postgetdashboardrequest.md) | :heavy_check_mark: | The request object to use for the request. |
172
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
173
- | `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. |
174
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
175
-
176
- ### Response
177
-
178
- **Promise\<[components.DashboardTokenResponse](../../models/components/dashboardtokenresponse.md)\>**
179
-
180
- ### Errors
181
-
182
- | Error Type | Status Code | Content Type |
183
- | -------------------------- | -------------------------- | -------------------------- |
184
- | errors.HTTPValidationError | 422 | application/json |
185
- | errors.SDKError | 4XX, 5XX | \*/\* |
186
-
187
- ## ~~postSessionEventsDashboard~~
188
-
189
- METHOD: POST
190
- URL: /dashboard/session_events
191
- ARGUMENTS: None
192
- RETURNS: Dashboard info for embedding
193
- DEPRECATED: This endpoint is deprecated. Please use /dashboard/list instead
194
-
195
- > :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
196
-
197
- ### Example Usage
198
-
199
- <!-- UsageSnippet language="typescript" operationID="post_session_events_dashboard" method="post" path="/api/v1/dashboards/session_events" -->
200
- ```typescript
201
- import { SyllableSDK } from "syllable-sdk";
202
-
203
- const syllableSDK = new SyllableSDK({
204
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
205
- });
206
-
207
- async function run() {
208
- const result = await syllableSDK.dashboards.postSessionEventsDashboard();
209
-
210
- console.log(result);
211
- }
212
-
213
- run();
214
- ```
215
-
216
- ### Standalone function
217
-
218
- The standalone function version of this method:
219
-
220
- ```typescript
221
- import { SyllableSDKCore } from "syllable-sdk/core.js";
222
- import { dashboardsPostSessionEventsDashboard } from "syllable-sdk/funcs/dashboardsPostSessionEventsDashboard.js";
223
-
224
- // Use `SyllableSDKCore` for best tree-shaking performance.
225
- // You can create one instance of it to use across an application.
226
- const syllableSDK = new SyllableSDKCore({
227
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
228
- });
229
-
230
- async function run() {
231
- const res = await dashboardsPostSessionEventsDashboard(syllableSDK);
232
- if (res.ok) {
233
- const { value: result } = res;
234
- console.log(result);
235
- } else {
236
- console.log("dashboardsPostSessionEventsDashboard failed:", res.error);
237
- }
238
- }
239
-
240
- run();
241
- ```
242
-
243
- ### Parameters
244
-
245
- | Parameter | Type | Required | Description |
246
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
247
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
248
- | `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. |
249
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
250
-
251
- ### Response
252
-
253
- **Promise\<[components.Dashboard](../../models/components/dashboard.md)\>**
254
-
255
- ### Errors
256
-
257
- | Error Type | Status Code | Content Type |
258
- | --------------- | --------------- | --------------- |
259
- | errors.SDKError | 4XX, 5XX | \*/\* |
260
-
261
- ## ~~postSessionSummaryDashboard~~
262
-
263
- METHOD: POST
264
- URL: /dashboard/session_summary
265
- ARGUMENTS: None
266
- RETURNS: Dashboard info for embedding
267
- DEPRECATED: This endpoint is deprecated. Please use /dashboard/list instead
268
-
269
- > :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
270
-
271
- ### Example Usage
272
-
273
- <!-- UsageSnippet language="typescript" operationID="post_session_summary_dashboard" method="post" path="/api/v1/dashboards/session_summary" -->
274
- ```typescript
275
- import { SyllableSDK } from "syllable-sdk";
276
-
277
- const syllableSDK = new SyllableSDK({
278
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
279
- });
280
-
281
- async function run() {
282
- const result = await syllableSDK.dashboards.postSessionSummaryDashboard();
283
-
284
- console.log(result);
285
- }
286
-
287
- run();
288
- ```
289
-
290
- ### Standalone function
291
-
292
- The standalone function version of this method:
293
-
294
- ```typescript
295
- import { SyllableSDKCore } from "syllable-sdk/core.js";
296
- import { dashboardsPostSessionSummaryDashboard } from "syllable-sdk/funcs/dashboardsPostSessionSummaryDashboard.js";
297
-
298
- // Use `SyllableSDKCore` for best tree-shaking performance.
299
- // You can create one instance of it to use across an application.
300
- const syllableSDK = new SyllableSDKCore({
301
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
302
- });
303
-
304
- async function run() {
305
- const res = await dashboardsPostSessionSummaryDashboard(syllableSDK);
306
- if (res.ok) {
307
- const { value: result } = res;
308
- console.log(result);
309
- } else {
310
- console.log("dashboardsPostSessionSummaryDashboard failed:", res.error);
311
- }
312
- }
313
-
314
- run();
315
- ```
316
-
317
- ### Parameters
318
-
319
- | Parameter | Type | Required | Description |
320
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
321
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
322
- | `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. |
323
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
324
-
325
- ### Response
326
-
327
- **Promise\<[components.Dashboard](../../models/components/dashboard.md)\>**
328
-
329
- ### Errors
330
-
331
- | Error Type | Status Code | Content Type |
332
- | --------------- | --------------- | --------------- |
333
- | errors.SDKError | 4XX, 5XX | \*/\* |
334
-
335
- ## ~~postSessionTransfersDashboard~~
336
-
337
- METHOD: POST
338
- URL: /dashboard/session_transfers
339
- ARGUMENTS: None
340
- RETURNS: Dashboard info for embedding
341
- DEPRECATED: This endpoint is deprecated. Please use /dashboard/list instead
342
-
343
- > :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
344
-
345
- ### Example Usage
346
-
347
- <!-- UsageSnippet language="typescript" operationID="post_session_transfers_dashboard" method="post" path="/api/v1/dashboards/session_transfers" -->
348
- ```typescript
349
- import { SyllableSDK } from "syllable-sdk";
350
-
351
- const syllableSDK = new SyllableSDK({
352
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
353
- });
354
-
355
- async function run() {
356
- const result = await syllableSDK.dashboards.postSessionTransfersDashboard();
357
-
358
- console.log(result);
359
- }
360
-
361
- run();
362
- ```
363
-
364
- ### Standalone function
365
-
366
- The standalone function version of this method:
367
-
368
- ```typescript
369
- import { SyllableSDKCore } from "syllable-sdk/core.js";
370
- import { dashboardsPostSessionTransfersDashboard } from "syllable-sdk/funcs/dashboardsPostSessionTransfersDashboard.js";
371
-
372
- // Use `SyllableSDKCore` for best tree-shaking performance.
373
- // You can create one instance of it to use across an application.
374
- const syllableSDK = new SyllableSDKCore({
375
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
376
- });
377
-
378
- async function run() {
379
- const res = await dashboardsPostSessionTransfersDashboard(syllableSDK);
380
- if (res.ok) {
381
- const { value: result } = res;
382
- console.log(result);
383
- } else {
384
- console.log("dashboardsPostSessionTransfersDashboard failed:", res.error);
385
- }
386
- }
387
-
388
- run();
389
- ```
390
-
391
- ### Parameters
392
-
393
- | Parameter | Type | Required | Description |
394
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
395
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
396
- | `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. |
397
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
398
-
399
- ### Response
400
-
401
- **Promise\<[components.Dashboard](../../models/components/dashboard.md)\>**
402
-
403
- ### Errors
404
-
405
- | Error Type | Status Code | Content Type |
406
- | --------------- | --------------- | --------------- |
407
- | errors.SDKError | 4XX, 5XX | \*/\* |
408
-
409
- ## ~~postSessionsDashboard~~
410
-
411
- METHOD: POST
412
- URL: /dashboard/sessions
413
- ARGUMENTS: None
414
- RETURNS: Dashboard info for embedding
415
- DEPRECATED: This endpoint is deprecated. Please use /dashboard/list instead
416
-
417
- > :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
418
-
419
- ### Example Usage
420
-
421
- <!-- UsageSnippet language="typescript" operationID="post_sessions_dashboard" method="post" path="/api/v1/dashboards/sessions" -->
422
- ```typescript
423
- import { SyllableSDK } from "syllable-sdk";
424
-
425
- const syllableSDK = new SyllableSDK({
426
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
427
- });
428
-
429
- async function run() {
430
- const result = await syllableSDK.dashboards.postSessionsDashboard();
431
-
432
- console.log(result);
433
- }
434
-
435
- run();
436
- ```
437
-
438
- ### Standalone function
439
-
440
- The standalone function version of this method:
441
-
442
- ```typescript
443
- import { SyllableSDKCore } from "syllable-sdk/core.js";
444
- import { dashboardsPostSessionsDashboard } from "syllable-sdk/funcs/dashboardsPostSessionsDashboard.js";
445
-
446
- // Use `SyllableSDKCore` for best tree-shaking performance.
447
- // You can create one instance of it to use across an application.
448
- const syllableSDK = new SyllableSDKCore({
449
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
450
- });
451
-
452
- async function run() {
453
- const res = await dashboardsPostSessionsDashboard(syllableSDK);
454
- if (res.ok) {
455
- const { value: result } = res;
456
- console.log(result);
457
- } else {
458
- console.log("dashboardsPostSessionsDashboard failed:", res.error);
459
- }
460
- }
461
-
462
- run();
463
- ```
464
-
465
- ### Parameters
466
-
467
- | Parameter | Type | Required | Description |
468
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
469
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
470
- | `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. |
471
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
472
-
473
- ### Response
474
-
475
- **Promise\<[components.Dashboard](../../models/components/dashboard.md)\>**
476
-
477
- ### Errors
478
-
479
- | Error Type | Status Code | Content Type |
480
- | --------------- | --------------- | --------------- |
481
- | errors.SDKError | 4XX, 5XX | \*/\* |