syllable-sdk 0.1.0-alpha.146 → 0.1.0-alpha.149

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 (83) hide show
  1. package/README.md +8 -0
  2. package/docs/sdks/batches/README.md +4 -4
  3. package/docs/sdks/campaigns/README.md +78 -0
  4. package/docs/sdks/folders/README.md +168 -0
  5. package/docs/sdks/numbers/README.md +1 -1
  6. package/docs/sdks/syllablesdktools/README.md +78 -0
  7. package/docs/sdks/workflows/README.md +9 -9
  8. package/funcs/insightsFoldersDelete.d.ts +13 -0
  9. package/funcs/insightsFoldersDelete.d.ts.map +1 -0
  10. package/funcs/insightsFoldersDelete.js +105 -0
  11. package/funcs/insightsFoldersDelete.js.map +1 -0
  12. package/funcs/insightsFoldersMoveFiles.d.ts +14 -0
  13. package/funcs/insightsFoldersMoveFiles.d.ts.map +1 -0
  14. package/funcs/insightsFoldersMoveFiles.js +109 -0
  15. package/funcs/insightsFoldersMoveFiles.js.map +1 -0
  16. package/funcs/insightsToolsDelete.d.ts +16 -0
  17. package/funcs/insightsToolsDelete.d.ts.map +1 -0
  18. package/funcs/insightsToolsDelete.js +108 -0
  19. package/funcs/insightsToolsDelete.js.map +1 -0
  20. package/funcs/outboundCampaignsDelete.d.ts +13 -0
  21. package/funcs/outboundCampaignsDelete.d.ts.map +1 -0
  22. package/funcs/outboundCampaignsDelete.js +105 -0
  23. package/funcs/outboundCampaignsDelete.js.map +1 -0
  24. package/jsr.json +1 -1
  25. package/lib/config.d.ts +2 -2
  26. package/lib/config.js +2 -2
  27. package/models/components/index.d.ts +1 -0
  28. package/models/components/index.d.ts.map +1 -1
  29. package/models/components/index.js +1 -0
  30. package/models/components/index.js.map +1 -1
  31. package/models/components/insightsfolderfilemove.d.ts +40 -0
  32. package/models/components/insightsfolderfilemove.d.ts.map +1 -0
  33. package/models/components/insightsfolderfilemove.js +72 -0
  34. package/models/components/insightsfolderfilemove.js.map +1 -0
  35. package/models/operations/index.d.ts +4 -0
  36. package/models/operations/index.d.ts.map +1 -1
  37. package/models/operations/index.js +4 -0
  38. package/models/operations/index.js.map +1 -1
  39. package/models/operations/insightsfolderdelete.d.ts +29 -0
  40. package/models/operations/insightsfolderdelete.d.ts.map +1 -0
  41. package/models/operations/insightsfolderdelete.js +68 -0
  42. package/models/operations/insightsfolderdelete.js.map +1 -0
  43. package/models/operations/insightstooldelete.d.ts +29 -0
  44. package/models/operations/insightstooldelete.d.ts.map +1 -0
  45. package/models/operations/insightstooldelete.js +68 -0
  46. package/models/operations/insightstooldelete.js.map +1 -0
  47. package/models/operations/insightsuploadmovefiles.d.ts +32 -0
  48. package/models/operations/insightsuploadmovefiles.d.ts.map +1 -0
  49. package/models/operations/insightsuploadmovefiles.js +73 -0
  50. package/models/operations/insightsuploadmovefiles.js.map +1 -0
  51. package/models/operations/outboundcampaigndelete.d.ts +29 -0
  52. package/models/operations/outboundcampaigndelete.d.ts.map +1 -0
  53. package/models/operations/outboundcampaigndelete.js +68 -0
  54. package/models/operations/outboundcampaigndelete.js.map +1 -0
  55. package/openapi.json +275 -35
  56. package/package.json +1 -1
  57. package/sdk/campaigns.d.ts +4 -0
  58. package/sdk/campaigns.d.ts.map +1 -1
  59. package/sdk/campaigns.js +7 -0
  60. package/sdk/campaigns.js.map +1 -1
  61. package/sdk/folders.d.ts +8 -0
  62. package/sdk/folders.d.ts.map +1 -1
  63. package/sdk/folders.js +14 -0
  64. package/sdk/folders.js.map +1 -1
  65. package/sdk/syllablesdktools.d.ts +7 -0
  66. package/sdk/syllablesdktools.d.ts.map +1 -1
  67. package/sdk/syllablesdktools.js +10 -0
  68. package/sdk/syllablesdktools.js.map +1 -1
  69. package/src/funcs/insightsFoldersDelete.ts +140 -0
  70. package/src/funcs/insightsFoldersMoveFiles.ts +146 -0
  71. package/src/funcs/insightsToolsDelete.ts +144 -0
  72. package/src/funcs/outboundCampaignsDelete.ts +142 -0
  73. package/src/lib/config.ts +2 -2
  74. package/src/models/components/index.ts +1 -0
  75. package/src/models/components/insightsfolderfilemove.ts +90 -0
  76. package/src/models/operations/index.ts +4 -0
  77. package/src/models/operations/insightsfolderdelete.ts +77 -0
  78. package/src/models/operations/insightstooldelete.ts +75 -0
  79. package/src/models/operations/insightsuploadmovefiles.ts +84 -0
  80. package/src/models/operations/outboundcampaigndelete.ts +77 -0
  81. package/src/sdk/campaigns.ts +15 -0
  82. package/src/sdk/folders.ts +30 -0
  83. package/src/sdk/syllablesdktools.ts +18 -0
package/README.md CHANGED
@@ -223,15 +223,18 @@ run();
223
223
  * [list](docs/sdks/folders/README.md#list) - List Insights Upload Folders
224
224
  * [create](docs/sdks/folders/README.md#create) - Create Insights Upload Folder
225
225
  * [getById](docs/sdks/folders/README.md#getbyid) - Get Insights Folder Details
226
+ * [delete](docs/sdks/folders/README.md#delete) - Delete Insights Folder
226
227
  * [update](docs/sdks/folders/README.md#update) - Update Insights Folder
227
228
  * [uploadFile](docs/sdks/folders/README.md#uploadfile) - Upload Insights Upload Folder
228
229
  * [listFiles](docs/sdks/folders/README.md#listfiles) - Fetch Insights Upload Files
230
+ * [moveFiles](docs/sdks/folders/README.md#movefiles) - Move Insights Upload Files
229
231
 
230
232
  #### [insights.tools](docs/sdks/syllablesdktools/README.md)
231
233
 
232
234
  * [list](docs/sdks/syllablesdktools/README.md#list) - List Insight Tool Configurations
233
235
  * [create](docs/sdks/syllablesdktools/README.md#create) - Create Insight Tool Configuration
234
236
  * [getById](docs/sdks/syllablesdktools/README.md#getbyid) - Get Insight Tool Config By Id
237
+ * [delete](docs/sdks/syllablesdktools/README.md#delete) - Delete Insight Tool Configuration
235
238
  * [update](docs/sdks/syllablesdktools/README.md#update) - Update Insights Tool Configuration
236
239
  * [insightsToolTest](docs/sdks/syllablesdktools/README.md#insightstooltest) - Test Insights Tool
237
240
  * [insightToolGetDefinitions](docs/sdks/syllablesdktools/README.md#insighttoolgetdefinitions) - Get Insight Tool Definitions
@@ -277,6 +280,7 @@ run();
277
280
  * [create](docs/sdks/campaigns/README.md#create) - Create Outbound Communication Campaign
278
281
  * [getById](docs/sdks/campaigns/README.md#getbyid) - Get Outbound Communication Campaign
279
282
  * [update](docs/sdks/campaigns/README.md#update) - Update Outbound Communication Campaign
283
+ * [delete](docs/sdks/campaigns/README.md#delete) - Delete Outbound Communication Campaign
280
284
 
281
285
  ### [prompts](docs/sdks/prompts/README.md)
282
286
 
@@ -407,13 +411,16 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
407
411
  - [`incidentsList`](docs/sdks/incidents/README.md#list) - List Incidents
408
412
  - [`incidentsUpdate`](docs/sdks/incidents/README.md#update) - Update Incident
409
413
  - [`insightsFoldersCreate`](docs/sdks/folders/README.md#create) - Create Insights Upload Folder
414
+ - [`insightsFoldersDelete`](docs/sdks/folders/README.md#delete) - Delete Insights Folder
410
415
  - [`insightsFoldersGetById`](docs/sdks/folders/README.md#getbyid) - Get Insights Folder Details
411
416
  - [`insightsFoldersList`](docs/sdks/folders/README.md#list) - List Insights Upload Folders
412
417
  - [`insightsFoldersListFiles`](docs/sdks/folders/README.md#listfiles) - Fetch Insights Upload Files
418
+ - [`insightsFoldersMoveFiles`](docs/sdks/folders/README.md#movefiles) - Move Insights Upload Files
413
419
  - [`insightsFoldersUpdate`](docs/sdks/folders/README.md#update) - Update Insights Folder
414
420
  - [`insightsFoldersUploadFile`](docs/sdks/folders/README.md#uploadfile) - Upload Insights Upload Folder
415
421
  - [`insightsList`](docs/sdks/insights/README.md#list) - Insights List
416
422
  - [`insightsToolsCreate`](docs/sdks/syllablesdktools/README.md#create) - Create Insight Tool Configuration
423
+ - [`insightsToolsDelete`](docs/sdks/syllablesdktools/README.md#delete) - Delete Insight Tool Configuration
417
424
  - [`insightsToolsGetById`](docs/sdks/syllablesdktools/README.md#getbyid) - Get Insight Tool Config By Id
418
425
  - [`insightsToolsInsightsToolTest`](docs/sdks/syllablesdktools/README.md#insightstooltest) - Test Insights Tool
419
426
  - [`insightsToolsInsightToolGetDefinitions`](docs/sdks/syllablesdktools/README.md#insighttoolgetdefinitions) - Get Insight Tool Definitions
@@ -443,6 +450,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
443
450
  - [`outboundBatchesUpdate`](docs/sdks/batches/README.md#update) - Update Outbound Communication Batch
444
451
  - [`outboundBatchesUpload`](docs/sdks/batches/README.md#upload) - Upload Outbound Communication Batch
445
452
  - [`outboundCampaignsCreate`](docs/sdks/campaigns/README.md#create) - Create Outbound Communication Campaign
453
+ - [`outboundCampaignsDelete`](docs/sdks/campaigns/README.md#delete) - Delete Outbound Communication Campaign
446
454
  - [`outboundCampaignsGetById`](docs/sdks/campaigns/README.md#getbyid) - Get Outbound Communication Campaign
447
455
  - [`outboundCampaignsList`](docs/sdks/campaigns/README.md#list) - List Outbound Communication Campaigns
448
456
  - [`outboundCampaignsUpdate`](docs/sdks/campaigns/README.md#update) - Update Outbound Communication Campaign
@@ -125,9 +125,9 @@ const syllableSDK = new SyllableSDK({
125
125
 
126
126
  async function run() {
127
127
  const result = await syllableSDK.outbound.batches.create({
128
- batchId: "20250513.9",
128
+ batchId: "20250514.9",
129
129
  campaignId: 1,
130
- expiresOn: new Date("2025-05-14T00:00:00Z"),
130
+ expiresOn: new Date("2025-05-15T00:00:00Z"),
131
131
  paused: true,
132
132
  });
133
133
 
@@ -154,9 +154,9 @@ const syllableSDK = new SyllableSDKCore({
154
154
 
155
155
  async function run() {
156
156
  const res = await outboundBatchesCreate(syllableSDK, {
157
- batchId: "20250513.9",
157
+ batchId: "20250514.9",
158
158
  campaignId: 1,
159
- expiresOn: new Date("2025-05-14T00:00:00Z"),
159
+ expiresOn: new Date("2025-05-15T00:00:00Z"),
160
160
  paused: true,
161
161
  });
162
162
 
@@ -11,6 +11,7 @@ Operations related to outbound message campaigns
11
11
  * [create](#create) - Create Outbound Communication Campaign
12
12
  * [getById](#getbyid) - Get Outbound Communication Campaign
13
13
  * [update](#update) - Update Outbound Communication Campaign
14
+ * [delete](#delete) - Delete Outbound Communication Campaign
14
15
 
15
16
  ## list
16
17
 
@@ -393,6 +394,83 @@ run();
393
394
 
394
395
  ### Errors
395
396
 
397
+ | Error Type | Status Code | Content Type |
398
+ | -------------------------- | -------------------------- | -------------------------- |
399
+ | errors.HTTPValidationError | 422 | application/json |
400
+ | errors.SDKError | 4XX, 5XX | \*/\* |
401
+
402
+ ## delete
403
+
404
+ Delete Outbound Communication Campaign
405
+
406
+ ### Example Usage
407
+
408
+ ```typescript
409
+ import { SyllableSDK } from "syllable-sdk";
410
+
411
+ const syllableSDK = new SyllableSDK({
412
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
413
+ });
414
+
415
+ async function run() {
416
+ const result = await syllableSDK.outbound.campaigns.delete({
417
+ campaignId: 545907,
418
+ });
419
+
420
+ // Handle the result
421
+ console.log(result);
422
+ }
423
+
424
+ run();
425
+ ```
426
+
427
+ ### Standalone function
428
+
429
+ The standalone function version of this method:
430
+
431
+ ```typescript
432
+ import { SyllableSDKCore } from "syllable-sdk/core.js";
433
+ import { outboundCampaignsDelete } from "syllable-sdk/funcs/outboundCampaignsDelete.js";
434
+
435
+ // Use `SyllableSDKCore` for best tree-shaking performance.
436
+ // You can create one instance of it to use across an application.
437
+ const syllableSDK = new SyllableSDKCore({
438
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
439
+ });
440
+
441
+ async function run() {
442
+ const res = await outboundCampaignsDelete(syllableSDK, {
443
+ campaignId: 545907,
444
+ });
445
+
446
+ if (!res.ok) {
447
+ throw res.error;
448
+ }
449
+
450
+ const { value: result } = res;
451
+
452
+ // Handle the result
453
+ console.log(result);
454
+ }
455
+
456
+ run();
457
+ ```
458
+
459
+ ### Parameters
460
+
461
+ | Parameter | Type | Required | Description |
462
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
463
+ | `request` | [operations.OutboundCampaignDeleteRequest](../../models/operations/outboundcampaigndeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
464
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
465
+ | `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. |
466
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
467
+
468
+ ### Response
469
+
470
+ **Promise\<[any](../../models/.md)\>**
471
+
472
+ ### Errors
473
+
396
474
  | Error Type | Status Code | Content Type |
397
475
  | -------------------------- | -------------------------- | -------------------------- |
398
476
  | errors.HTTPValidationError | 422 | application/json |
@@ -10,9 +10,11 @@ Operations related to insights upload folders. An insight folder is used
10
10
  * [list](#list) - List Insights Upload Folders
11
11
  * [create](#create) - Create Insights Upload Folder
12
12
  * [getById](#getbyid) - Get Insights Folder Details
13
+ * [delete](#delete) - Delete Insights Folder
13
14
  * [update](#update) - Update Insights Folder
14
15
  * [uploadFile](#uploadfile) - Upload Insights Upload Folder
15
16
  * [listFiles](#listfiles) - Fetch Insights Upload Files
17
+ * [moveFiles](#movefiles) - Move Insights Upload Files
16
18
 
17
19
  ## list
18
20
 
@@ -265,6 +267,83 @@ run();
265
267
  | errors.HTTPValidationError | 422 | application/json |
266
268
  | errors.SDKError | 4XX, 5XX | \*/\* |
267
269
 
270
+ ## delete
271
+
272
+ Delete Insights Folder
273
+
274
+ ### Example Usage
275
+
276
+ ```typescript
277
+ import { SyllableSDK } from "syllable-sdk";
278
+
279
+ const syllableSDK = new SyllableSDK({
280
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
281
+ });
282
+
283
+ async function run() {
284
+ const result = await syllableSDK.insights.folders.delete({
285
+ folderId: 545907,
286
+ });
287
+
288
+ // Handle the result
289
+ console.log(result);
290
+ }
291
+
292
+ run();
293
+ ```
294
+
295
+ ### Standalone function
296
+
297
+ The standalone function version of this method:
298
+
299
+ ```typescript
300
+ import { SyllableSDKCore } from "syllable-sdk/core.js";
301
+ import { insightsFoldersDelete } from "syllable-sdk/funcs/insightsFoldersDelete.js";
302
+
303
+ // Use `SyllableSDKCore` for best tree-shaking performance.
304
+ // You can create one instance of it to use across an application.
305
+ const syllableSDK = new SyllableSDKCore({
306
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
307
+ });
308
+
309
+ async function run() {
310
+ const res = await insightsFoldersDelete(syllableSDK, {
311
+ folderId: 545907,
312
+ });
313
+
314
+ if (!res.ok) {
315
+ throw res.error;
316
+ }
317
+
318
+ const { value: result } = res;
319
+
320
+ // Handle the result
321
+ console.log(result);
322
+ }
323
+
324
+ run();
325
+ ```
326
+
327
+ ### Parameters
328
+
329
+ | Parameter | Type | Required | Description |
330
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
331
+ | `request` | [operations.InsightsFolderDeleteRequest](../../models/operations/insightsfolderdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
332
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
333
+ | `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. |
334
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
335
+
336
+ ### Response
337
+
338
+ **Promise\<[boolean](../../models/.md)\>**
339
+
340
+ ### Errors
341
+
342
+ | Error Type | Status Code | Content Type |
343
+ | -------------------------- | -------------------------- | -------------------------- |
344
+ | errors.HTTPValidationError | 422 | application/json |
345
+ | errors.SDKError | 4XX, 5XX | \*/\* |
346
+
268
347
  ## update
269
348
 
270
349
  Update Insights Folder
@@ -521,6 +600,95 @@ run();
521
600
 
522
601
  ### Errors
523
602
 
603
+ | Error Type | Status Code | Content Type |
604
+ | -------------------------- | -------------------------- | -------------------------- |
605
+ | errors.HTTPValidationError | 422 | application/json |
606
+ | errors.SDKError | 4XX, 5XX | \*/\* |
607
+
608
+ ## moveFiles
609
+
610
+ Move Insights Upload Files
611
+
612
+ ### Example Usage
613
+
614
+ ```typescript
615
+ import { SyllableSDK } from "syllable-sdk";
616
+
617
+ const syllableSDK = new SyllableSDK({
618
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
619
+ });
620
+
621
+ async function run() {
622
+ const result = await syllableSDK.insights.folders.moveFiles({
623
+ folderId: 623467,
624
+ insightsFolderFileMove: {
625
+ destinationFolderId: 182764,
626
+ fileIdList: [
627
+ [12334,23445,34556],
628
+ ],
629
+ },
630
+ });
631
+
632
+ // Handle the result
633
+ console.log(result);
634
+ }
635
+
636
+ run();
637
+ ```
638
+
639
+ ### Standalone function
640
+
641
+ The standalone function version of this method:
642
+
643
+ ```typescript
644
+ import { SyllableSDKCore } from "syllable-sdk/core.js";
645
+ import { insightsFoldersMoveFiles } from "syllable-sdk/funcs/insightsFoldersMoveFiles.js";
646
+
647
+ // Use `SyllableSDKCore` for best tree-shaking performance.
648
+ // You can create one instance of it to use across an application.
649
+ const syllableSDK = new SyllableSDKCore({
650
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
651
+ });
652
+
653
+ async function run() {
654
+ const res = await insightsFoldersMoveFiles(syllableSDK, {
655
+ folderId: 623467,
656
+ insightsFolderFileMove: {
657
+ destinationFolderId: 182764,
658
+ fileIdList: [
659
+ [12334,23445,34556],
660
+ ],
661
+ },
662
+ });
663
+
664
+ if (!res.ok) {
665
+ throw res.error;
666
+ }
667
+
668
+ const { value: result } = res;
669
+
670
+ // Handle the result
671
+ console.log(result);
672
+ }
673
+
674
+ run();
675
+ ```
676
+
677
+ ### Parameters
678
+
679
+ | Parameter | Type | Required | Description |
680
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
681
+ | `request` | [operations.InsightsUploadMoveFilesRequest](../../models/operations/insightsuploadmovefilesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
682
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
683
+ | `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. |
684
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
685
+
686
+ ### Response
687
+
688
+ **Promise\<[components.InsightsUploadFile[]](../../models/.md)\>**
689
+
690
+ ### Errors
691
+
524
692
  | Error Type | Status Code | Content Type |
525
693
  | -------------------------- | -------------------------- | -------------------------- |
526
694
  | errors.HTTPValidationError | 422 | application/json |
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Overview
5
5
 
6
- Operations related to setting up phone numbers in Twilio for use in channels.
6
+ Operations related to setting up phone numbers in Twilio for use in channels.
7
7
 
8
8
  ### Available Operations
9
9
 
@@ -10,6 +10,7 @@ Operations related to insights tool configurationss. An insight is a tool
10
10
  * [list](#list) - List Insight Tool Configurations
11
11
  * [create](#create) - Create Insight Tool Configuration
12
12
  * [getById](#getbyid) - Get Insight Tool Config By Id
13
+ * [delete](#delete) - Delete Insight Tool Configuration
13
14
  * [update](#update) - Update Insights Tool Configuration
14
15
  * [insightsToolTest](#insightstooltest) - Test Insights Tool
15
16
  * [insightToolGetDefinitions](#insighttoolgetdefinitions) - Get Insight Tool Definitions
@@ -273,6 +274,83 @@ run();
273
274
  | errors.HTTPValidationError | 422 | application/json |
274
275
  | errors.SDKError | 4XX, 5XX | \*/\* |
275
276
 
277
+ ## delete
278
+
279
+ Delete an Insights tool configuration.
280
+
281
+ ### Example Usage
282
+
283
+ ```typescript
284
+ import { SyllableSDK } from "syllable-sdk";
285
+
286
+ const syllableSDK = new SyllableSDK({
287
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
288
+ });
289
+
290
+ async function run() {
291
+ const result = await syllableSDK.insights.tools.delete({
292
+ toolId: 545907,
293
+ });
294
+
295
+ // Handle the result
296
+ console.log(result);
297
+ }
298
+
299
+ run();
300
+ ```
301
+
302
+ ### Standalone function
303
+
304
+ The standalone function version of this method:
305
+
306
+ ```typescript
307
+ import { SyllableSDKCore } from "syllable-sdk/core.js";
308
+ import { insightsToolsDelete } from "syllable-sdk/funcs/insightsToolsDelete.js";
309
+
310
+ // Use `SyllableSDKCore` for best tree-shaking performance.
311
+ // You can create one instance of it to use across an application.
312
+ const syllableSDK = new SyllableSDKCore({
313
+ apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
314
+ });
315
+
316
+ async function run() {
317
+ const res = await insightsToolsDelete(syllableSDK, {
318
+ toolId: 545907,
319
+ });
320
+
321
+ if (!res.ok) {
322
+ throw res.error;
323
+ }
324
+
325
+ const { value: result } = res;
326
+
327
+ // Handle the result
328
+ console.log(result);
329
+ }
330
+
331
+ run();
332
+ ```
333
+
334
+ ### Parameters
335
+
336
+ | Parameter | Type | Required | Description |
337
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
338
+ | `request` | [operations.InsightsToolDeleteRequest](../../models/operations/insightstooldeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
339
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
340
+ | `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. |
341
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
342
+
343
+ ### Response
344
+
345
+ **Promise\<[any](../../models/.md)\>**
346
+
347
+ ### Errors
348
+
349
+ | Error Type | Status Code | Content Type |
350
+ | -------------------------- | -------------------------- | -------------------------- |
351
+ | errors.HTTPValidationError | 422 | application/json |
352
+ | errors.SDKError | 4XX, 5XX | \*/\* |
353
+
276
354
  ## update
277
355
 
278
356
  Update an Insights tool.
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Overview
5
5
 
6
- Operations related to insights workflows. An workflow is series of tool invocations that processes conversation data to extract information and generate reports.
6
+ Operations related to insights workflows. An workflow is series of tool invocations that processes conversation data to extract information and generate reports.
7
7
 
8
8
  ### Available Operations
9
9
 
@@ -131,8 +131,8 @@ async function run() {
131
131
  1,
132
132
  ],
133
133
  conditions: {},
134
- startDatetime: new Date("2025-05-12T00:00:00Z"),
135
- endDatetime: new Date("2025-05-13T00:00:00Z"),
134
+ startDatetime: new Date("2025-05-13T00:00:00Z"),
135
+ endDatetime: new Date("2025-05-14T00:00:00Z"),
136
136
  });
137
137
 
138
138
  // Handle the result
@@ -165,8 +165,8 @@ async function run() {
165
165
  1,
166
166
  ],
167
167
  conditions: {},
168
- startDatetime: new Date("2025-05-12T00:00:00Z"),
169
- endDatetime: new Date("2025-05-13T00:00:00Z"),
168
+ startDatetime: new Date("2025-05-13T00:00:00Z"),
169
+ endDatetime: new Date("2025-05-14T00:00:00Z"),
170
170
  });
171
171
 
172
172
  if (!res.ok) {
@@ -303,8 +303,8 @@ async function run() {
303
303
  1,
304
304
  ],
305
305
  conditions: {},
306
- startDatetime: new Date("2025-05-12T00:00:00Z"),
307
- endDatetime: new Date("2025-05-13T00:00:00Z"),
306
+ startDatetime: new Date("2025-05-13T00:00:00Z"),
307
+ endDatetime: new Date("2025-05-14T00:00:00Z"),
308
308
  },
309
309
  });
310
310
 
@@ -340,8 +340,8 @@ async function run() {
340
340
  1,
341
341
  ],
342
342
  conditions: {},
343
- startDatetime: new Date("2025-05-12T00:00:00Z"),
344
- endDatetime: new Date("2025-05-13T00:00:00Z"),
343
+ startDatetime: new Date("2025-05-13T00:00:00Z"),
344
+ endDatetime: new Date("2025-05-14T00:00:00Z"),
345
345
  },
346
346
  });
347
347
 
@@ -0,0 +1,13 @@
1
+ import { SyllableSDKCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { SDKError } from "../models/errors/sdkerror.js";
6
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
7
+ import * as operations from "../models/operations/index.js";
8
+ import { Result } from "../types/fp.js";
9
+ /**
10
+ * Delete Insights Folder
11
+ */
12
+ export declare function insightsFoldersDelete(client: SyllableSDKCore, request: operations.InsightsFolderDeleteRequest, options?: RequestOptions): Promise<Result<boolean, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
13
+ //# sourceMappingURL=insightsFoldersDelete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insightsFoldersDelete.d.ts","sourceRoot":"","sources":["../src/funcs/insightsFoldersDelete.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAK7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,OAAO,EACL,MAAM,CAAC,mBAAmB,GAC1B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA8FA"}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.insightsFoldersDelete = insightsFoldersDelete;
30
+ const z = __importStar(require("zod"));
31
+ const encodings_js_1 = require("../lib/encodings.js");
32
+ const M = __importStar(require("../lib/matchers.js"));
33
+ const primitives_js_1 = require("../lib/primitives.js");
34
+ const schemas_js_1 = require("../lib/schemas.js");
35
+ const security_js_1 = require("../lib/security.js");
36
+ const url_js_1 = require("../lib/url.js");
37
+ const errors = __importStar(require("../models/errors/index.js"));
38
+ const operations = __importStar(require("../models/operations/index.js"));
39
+ /**
40
+ * Delete Insights Folder
41
+ */
42
+ async function insightsFoldersDelete(client, request, options) {
43
+ const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.InsightsFolderDeleteRequest$outboundSchema.parse(value), "Input validation failed");
44
+ if (!parsed.ok) {
45
+ return parsed;
46
+ }
47
+ const payload = parsed.value;
48
+ const body = null;
49
+ const pathParams = {
50
+ folder_id: (0, encodings_js_1.encodeSimple)("folder_id", payload.folder_id, {
51
+ explode: false,
52
+ charEncoding: "percent",
53
+ }),
54
+ };
55
+ const path = (0, url_js_1.pathToFunc)("/api/v1/insights/folders/{folder_id}")(pathParams);
56
+ const headers = new Headers((0, primitives_js_1.compactMap)({
57
+ Accept: "application/json",
58
+ }));
59
+ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyHeader);
60
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
61
+ const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
62
+ const context = {
63
+ baseURL: options?.serverURL ?? "",
64
+ operationID: "insights_folder_delete",
65
+ oAuth2Scopes: [],
66
+ resolvedSecurity: requestSecurity,
67
+ securitySource: client._options.apiKeyHeader,
68
+ retryConfig: options?.retries
69
+ || client._options.retryConfig
70
+ || { strategy: "none" },
71
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
72
+ };
73
+ const requestRes = client._createRequest(context, {
74
+ security: requestSecurity,
75
+ method: "DELETE",
76
+ baseURL: options?.serverURL,
77
+ path: path,
78
+ headers: headers,
79
+ body: body,
80
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
81
+ }, options);
82
+ if (!requestRes.ok) {
83
+ return requestRes;
84
+ }
85
+ const req = requestRes.value;
86
+ const doResult = await client._do(req, {
87
+ context,
88
+ errorCodes: ["422", "4XX", "5XX"],
89
+ retryConfig: context.retryConfig,
90
+ retryCodes: context.retryCodes,
91
+ });
92
+ if (!doResult.ok) {
93
+ return doResult;
94
+ }
95
+ const response = doResult.value;
96
+ const responseFields = {
97
+ HttpMeta: { Response: response, Request: req },
98
+ };
99
+ const [result] = await M.match(M.json(200, z.boolean()), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, { extraFields: responseFields });
100
+ if (!result.ok) {
101
+ return result;
102
+ }
103
+ return result;
104
+ }
105
+ //# sourceMappingURL=insightsFoldersDelete.js.map