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,742 +0,0 @@
1
- # Batches
2
- (*outbound.batches*)
3
-
4
- ## Overview
5
-
6
- Operations related to outbound campaign batches
7
-
8
- ### Available Operations
9
-
10
- * [list](#list) - List Outbound Communication Batches
11
- * [create](#create) - Create Outbound Communication Batch
12
- * [getById](#getbyid) - Get Outbound Communication Batch
13
- * [update](#update) - Update Outbound Communication Batch
14
- * [delete](#delete) - Delete Outbound Communication Batch
15
- * [upload](#upload) - Upload Outbound Communication Batch
16
- * [results](#results) - Fetch Outbound Communication Batch Results
17
- * [add](#add) - Create Outbound Communication Request
18
- * [remove](#remove) - Delete Requests By List Of Reference Ids
19
-
20
- ## list
21
-
22
- List Outbound Communication Batches
23
-
24
- ### Example Usage
25
-
26
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_list" method="get" path="/api/v1/outbound/batches" -->
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.outbound.batches.list({
36
- page: 0,
37
- searchFields: [
38
- "last_updated_at",
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 { outboundBatchesList } from "syllable-sdk/funcs/outboundBatchesList.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 outboundBatchesList(syllableSDK, {
69
- page: 0,
70
- searchFields: [
71
- "last_updated_at",
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("outboundBatchesList failed:", res.error);
84
- }
85
- }
86
-
87
- run();
88
- ```
89
-
90
- ### Parameters
91
-
92
- | Parameter | Type | Required | Description |
93
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
94
- | `request` | [operations.OutboundBatchListRequest](../../models/operations/outboundbatchlistrequest.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.ListResponseCommunicationBatch](../../models/components/listresponsecommunicationbatch.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
- ## create
111
-
112
- Create Outbound Communication Batch
113
-
114
- ### Example Usage
115
-
116
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_create" method="post" path="/api/v1/outbound/batches" -->
117
- ```typescript
118
- import { SyllableSDK } from "syllable-sdk";
119
-
120
- const syllableSDK = new SyllableSDK({
121
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
122
- });
123
-
124
- async function run() {
125
- const result = await syllableSDK.outbound.batches.create({
126
- batchId: "20251029.9",
127
- campaignId: 1,
128
- expiresOn: new Date("2025-10-30T00:00:00Z"),
129
- paused: true,
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 { outboundBatchesCreate } from "syllable-sdk/funcs/outboundBatchesCreate.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 outboundBatchesCreate(syllableSDK, {
154
- batchId: "20251029.9",
155
- campaignId: 1,
156
- expiresOn: new Date("2025-10-30T00:00:00Z"),
157
- paused: true,
158
- });
159
- if (res.ok) {
160
- const { value: result } = res;
161
- console.log(result);
162
- } else {
163
- console.log("outboundBatchesCreate failed:", res.error);
164
- }
165
- }
166
-
167
- run();
168
- ```
169
-
170
- ### Parameters
171
-
172
- | Parameter | Type | Required | Description |
173
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
174
- | `request` | [components.CommunicationBatchInput](../../models/components/communicationbatchinput.md) | :heavy_check_mark: | The request object to use for the request. |
175
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
176
- | `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. |
177
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
178
-
179
- ### Response
180
-
181
- **Promise\<[components.CommunicationBatch](../../models/components/communicationbatch.md)\>**
182
-
183
- ### Errors
184
-
185
- | Error Type | Status Code | Content Type |
186
- | -------------------------- | -------------------------- | -------------------------- |
187
- | errors.HTTPValidationError | 422 | application/json |
188
- | errors.SDKError | 4XX, 5XX | \*/\* |
189
-
190
- ## getById
191
-
192
- Get Outbound Communication Batch
193
-
194
- ### Example Usage
195
-
196
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_get_by_id" method="get" path="/api/v1/outbound/batches/{batch_id}" -->
197
- ```typescript
198
- import { SyllableSDK } from "syllable-sdk";
199
-
200
- const syllableSDK = new SyllableSDK({
201
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
202
- });
203
-
204
- async function run() {
205
- const result = await syllableSDK.outbound.batches.getById({
206
- batchId: "<id>",
207
- });
208
-
209
- console.log(result);
210
- }
211
-
212
- run();
213
- ```
214
-
215
- ### Standalone function
216
-
217
- The standalone function version of this method:
218
-
219
- ```typescript
220
- import { SyllableSDKCore } from "syllable-sdk/core.js";
221
- import { outboundBatchesGetById } from "syllable-sdk/funcs/outboundBatchesGetById.js";
222
-
223
- // Use `SyllableSDKCore` for best tree-shaking performance.
224
- // You can create one instance of it to use across an application.
225
- const syllableSDK = new SyllableSDKCore({
226
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
227
- });
228
-
229
- async function run() {
230
- const res = await outboundBatchesGetById(syllableSDK, {
231
- batchId: "<id>",
232
- });
233
- if (res.ok) {
234
- const { value: result } = res;
235
- console.log(result);
236
- } else {
237
- console.log("outboundBatchesGetById failed:", res.error);
238
- }
239
- }
240
-
241
- run();
242
- ```
243
-
244
- ### Parameters
245
-
246
- | Parameter | Type | Required | Description |
247
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
248
- | `request` | [operations.OutboundBatchGetByIdRequest](../../models/operations/outboundbatchgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
249
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
250
- | `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. |
251
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
252
-
253
- ### Response
254
-
255
- **Promise\<[components.BatchDetails](../../models/components/batchdetails.md)\>**
256
-
257
- ### Errors
258
-
259
- | Error Type | Status Code | Content Type |
260
- | -------------------------- | -------------------------- | -------------------------- |
261
- | errors.HTTPValidationError | 422 | application/json |
262
- | errors.SDKError | 4XX, 5XX | \*/\* |
263
-
264
- ## update
265
-
266
- Update Outbound Communication Batch
267
-
268
- ### Example Usage
269
-
270
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_update" method="put" path="/api/v1/outbound/batches/{batch_id}" -->
271
- ```typescript
272
- import { SyllableSDK } from "syllable-sdk";
273
-
274
- const syllableSDK = new SyllableSDK({
275
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
276
- });
277
-
278
- async function run() {
279
- const result = await syllableSDK.outbound.batches.update({
280
- batchId: "<id>",
281
- communicationBatchUpdate: {
282
- paused: true,
283
- expiresOn: new Date("2027-01-01T06:00:00Z"),
284
- },
285
- });
286
-
287
- console.log(result);
288
- }
289
-
290
- run();
291
- ```
292
-
293
- ### Standalone function
294
-
295
- The standalone function version of this method:
296
-
297
- ```typescript
298
- import { SyllableSDKCore } from "syllable-sdk/core.js";
299
- import { outboundBatchesUpdate } from "syllable-sdk/funcs/outboundBatchesUpdate.js";
300
-
301
- // Use `SyllableSDKCore` for best tree-shaking performance.
302
- // You can create one instance of it to use across an application.
303
- const syllableSDK = new SyllableSDKCore({
304
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
305
- });
306
-
307
- async function run() {
308
- const res = await outboundBatchesUpdate(syllableSDK, {
309
- batchId: "<id>",
310
- communicationBatchUpdate: {
311
- paused: true,
312
- expiresOn: new Date("2027-01-01T06:00:00Z"),
313
- },
314
- });
315
- if (res.ok) {
316
- const { value: result } = res;
317
- console.log(result);
318
- } else {
319
- console.log("outboundBatchesUpdate failed:", res.error);
320
- }
321
- }
322
-
323
- run();
324
- ```
325
-
326
- ### Parameters
327
-
328
- | Parameter | Type | Required | Description |
329
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
330
- | `request` | [operations.OutboundBatchUpdateRequest](../../models/operations/outboundbatchupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
331
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
332
- | `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. |
333
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
334
-
335
- ### Response
336
-
337
- **Promise\<[components.CommunicationBatch](../../models/components/communicationbatch.md)\>**
338
-
339
- ### Errors
340
-
341
- | Error Type | Status Code | Content Type |
342
- | -------------------------- | -------------------------- | -------------------------- |
343
- | errors.HTTPValidationError | 422 | application/json |
344
- | errors.SDKError | 4XX, 5XX | \*/\* |
345
-
346
- ## delete
347
-
348
- Delete Outbound Communication Batch
349
-
350
- ### Example Usage
351
-
352
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_delete" method="delete" path="/api/v1/outbound/batches/{batch_id}" -->
353
- ```typescript
354
- import { SyllableSDK } from "syllable-sdk";
355
-
356
- const syllableSDK = new SyllableSDK({
357
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
358
- });
359
-
360
- async function run() {
361
- const result = await syllableSDK.outbound.batches.delete({
362
- batchId: "<id>",
363
- bodyOutboundBatchDelete: {
364
- deleteReason: "<value>",
365
- },
366
- });
367
-
368
- console.log(result);
369
- }
370
-
371
- run();
372
- ```
373
-
374
- ### Standalone function
375
-
376
- The standalone function version of this method:
377
-
378
- ```typescript
379
- import { SyllableSDKCore } from "syllable-sdk/core.js";
380
- import { outboundBatchesDelete } from "syllable-sdk/funcs/outboundBatchesDelete.js";
381
-
382
- // Use `SyllableSDKCore` for best tree-shaking performance.
383
- // You can create one instance of it to use across an application.
384
- const syllableSDK = new SyllableSDKCore({
385
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
386
- });
387
-
388
- async function run() {
389
- const res = await outboundBatchesDelete(syllableSDK, {
390
- batchId: "<id>",
391
- bodyOutboundBatchDelete: {
392
- deleteReason: "<value>",
393
- },
394
- });
395
- if (res.ok) {
396
- const { value: result } = res;
397
- console.log(result);
398
- } else {
399
- console.log("outboundBatchesDelete failed:", res.error);
400
- }
401
- }
402
-
403
- run();
404
- ```
405
-
406
- ### Parameters
407
-
408
- | Parameter | Type | Required | Description |
409
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
410
- | `request` | [operations.OutboundBatchDeleteRequest](../../models/operations/outboundbatchdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
411
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
412
- | `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. |
413
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
414
-
415
- ### Response
416
-
417
- **Promise\<[any](../../models/.md)\>**
418
-
419
- ### Errors
420
-
421
- | Error Type | Status Code | Content Type |
422
- | -------------------------- | -------------------------- | -------------------------- |
423
- | errors.HTTPValidationError | 422 | application/json |
424
- | errors.SDKError | 4XX, 5XX | \*/\* |
425
-
426
- ## upload
427
-
428
- Upload Outbound Communication Batch
429
-
430
- ### Example Usage
431
-
432
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_upload" method="post" path="/api/v1/outbound/batches/{batch_id}/upload_batch" -->
433
- ```typescript
434
- import { SyllableSDK } from "syllable-sdk";
435
-
436
- const syllableSDK = new SyllableSDK({
437
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
438
- });
439
-
440
- async function run() {
441
- const result = await syllableSDK.outbound.batches.upload({
442
- batchId: "<id>",
443
- });
444
-
445
- console.log(result);
446
- }
447
-
448
- run();
449
- ```
450
-
451
- ### Standalone function
452
-
453
- The standalone function version of this method:
454
-
455
- ```typescript
456
- import { SyllableSDKCore } from "syllable-sdk/core.js";
457
- import { outboundBatchesUpload } from "syllable-sdk/funcs/outboundBatchesUpload.js";
458
-
459
- // Use `SyllableSDKCore` for best tree-shaking performance.
460
- // You can create one instance of it to use across an application.
461
- const syllableSDK = new SyllableSDKCore({
462
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
463
- });
464
-
465
- async function run() {
466
- const res = await outboundBatchesUpload(syllableSDK, {
467
- batchId: "<id>",
468
- });
469
- if (res.ok) {
470
- const { value: result } = res;
471
- console.log(result);
472
- } else {
473
- console.log("outboundBatchesUpload failed:", res.error);
474
- }
475
- }
476
-
477
- run();
478
- ```
479
-
480
- ### Parameters
481
-
482
- | Parameter | Type | Required | Description |
483
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
484
- | `request` | [operations.OutboundBatchUploadRequest](../../models/operations/outboundbatchuploadrequest.md) | :heavy_check_mark: | The request object to use for the request. |
485
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
486
- | `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. |
487
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
488
-
489
- ### Response
490
-
491
- **Promise\<[any](../../models/.md)\>**
492
-
493
- ### Errors
494
-
495
- | Error Type | Status Code | Content Type |
496
- | -------------------------- | -------------------------- | -------------------------- |
497
- | errors.HTTPValidationError | 422 | application/json |
498
- | errors.SDKError | 4XX, 5XX | \*/\* |
499
-
500
- ## results
501
-
502
- Fetch Outbound Communication Batch Results
503
-
504
- ### Example Usage
505
-
506
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_results" method="get" path="/api/v1/outbound/batches/{batch_id}/results" -->
507
- ```typescript
508
- import { SyllableSDK } from "syllable-sdk";
509
-
510
- const syllableSDK = new SyllableSDK({
511
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
512
- });
513
-
514
- async function run() {
515
- const result = await syllableSDK.outbound.batches.results({
516
- batchId: "<id>",
517
- });
518
-
519
- console.log(result);
520
- }
521
-
522
- run();
523
- ```
524
-
525
- ### Standalone function
526
-
527
- The standalone function version of this method:
528
-
529
- ```typescript
530
- import { SyllableSDKCore } from "syllable-sdk/core.js";
531
- import { outboundBatchesResults } from "syllable-sdk/funcs/outboundBatchesResults.js";
532
-
533
- // Use `SyllableSDKCore` for best tree-shaking performance.
534
- // You can create one instance of it to use across an application.
535
- const syllableSDK = new SyllableSDKCore({
536
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
537
- });
538
-
539
- async function run() {
540
- const res = await outboundBatchesResults(syllableSDK, {
541
- batchId: "<id>",
542
- });
543
- if (res.ok) {
544
- const { value: result } = res;
545
- console.log(result);
546
- } else {
547
- console.log("outboundBatchesResults failed:", res.error);
548
- }
549
- }
550
-
551
- run();
552
- ```
553
-
554
- ### Parameters
555
-
556
- | Parameter | Type | Required | Description |
557
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
558
- | `request` | [operations.OutboundBatchResultsRequest](../../models/operations/outboundbatchresultsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
559
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
560
- | `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. |
561
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
562
-
563
- ### Response
564
-
565
- **Promise\<[components.CommunicationRequestResult[]](../../models/.md)\>**
566
-
567
- ### Errors
568
-
569
- | Error Type | Status Code | Content Type |
570
- | -------------------------- | -------------------------- | -------------------------- |
571
- | errors.HTTPValidationError | 422 | application/json |
572
- | errors.SDKError | 4XX, 5XX | \*/\* |
573
-
574
- ## add
575
-
576
- Create Outbound Communication Request
577
-
578
- ### Example Usage
579
-
580
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_add" method="post" path="/api/v1/outbound/batches/{batch_id}/requests" -->
581
- ```typescript
582
- import { SyllableSDK } from "syllable-sdk";
583
-
584
- const syllableSDK = new SyllableSDK({
585
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
586
- });
587
-
588
- async function run() {
589
- const result = await syllableSDK.outbound.batches.add({
590
- batchId: "<id>",
591
- communicationRequest: {
592
- referenceId: "12345",
593
- target: "512-555-1234",
594
- requestVariables: {
595
-
596
- },
597
- },
598
- });
599
-
600
- console.log(result);
601
- }
602
-
603
- run();
604
- ```
605
-
606
- ### Standalone function
607
-
608
- The standalone function version of this method:
609
-
610
- ```typescript
611
- import { SyllableSDKCore } from "syllable-sdk/core.js";
612
- import { outboundBatchesAdd } from "syllable-sdk/funcs/outboundBatchesAdd.js";
613
-
614
- // Use `SyllableSDKCore` for best tree-shaking performance.
615
- // You can create one instance of it to use across an application.
616
- const syllableSDK = new SyllableSDKCore({
617
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
618
- });
619
-
620
- async function run() {
621
- const res = await outboundBatchesAdd(syllableSDK, {
622
- batchId: "<id>",
623
- communicationRequest: {
624
- referenceId: "12345",
625
- target: "512-555-1234",
626
- requestVariables: {
627
-
628
- },
629
- },
630
- });
631
- if (res.ok) {
632
- const { value: result } = res;
633
- console.log(result);
634
- } else {
635
- console.log("outboundBatchesAdd failed:", res.error);
636
- }
637
- }
638
-
639
- run();
640
- ```
641
-
642
- ### Parameters
643
-
644
- | Parameter | Type | Required | Description |
645
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
646
- | `request` | [operations.OutboundBatchAddRequest](../../models/operations/outboundbatchaddrequest.md) | :heavy_check_mark: | The request object to use for the request. |
647
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
648
- | `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. |
649
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
650
-
651
- ### Response
652
-
653
- **Promise\<[any](../../models/.md)\>**
654
-
655
- ### Errors
656
-
657
- | Error Type | Status Code | Content Type |
658
- | -------------------------- | -------------------------- | -------------------------- |
659
- | errors.HTTPValidationError | 422 | application/json |
660
- | errors.SDKError | 4XX, 5XX | \*/\* |
661
-
662
- ## remove
663
-
664
- Delete Requests By List Of Reference Ids
665
-
666
- ### Example Usage
667
-
668
- <!-- UsageSnippet language="typescript" operationID="outbound_batch_remove" method="post" path="/api/v1/outbound/batches/{batch_id}/remove-requests" -->
669
- ```typescript
670
- import { SyllableSDK } from "syllable-sdk";
671
-
672
- const syllableSDK = new SyllableSDK({
673
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
674
- });
675
-
676
- async function run() {
677
- const result = await syllableSDK.outbound.batches.remove({
678
- batchId: "<id>",
679
- requestBody: [
680
- "<value 1>",
681
- "<value 2>",
682
- ],
683
- });
684
-
685
- console.log(result);
686
- }
687
-
688
- run();
689
- ```
690
-
691
- ### Standalone function
692
-
693
- The standalone function version of this method:
694
-
695
- ```typescript
696
- import { SyllableSDKCore } from "syllable-sdk/core.js";
697
- import { outboundBatchesRemove } from "syllable-sdk/funcs/outboundBatchesRemove.js";
698
-
699
- // Use `SyllableSDKCore` for best tree-shaking performance.
700
- // You can create one instance of it to use across an application.
701
- const syllableSDK = new SyllableSDKCore({
702
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
703
- });
704
-
705
- async function run() {
706
- const res = await outboundBatchesRemove(syllableSDK, {
707
- batchId: "<id>",
708
- requestBody: [
709
- "<value 1>",
710
- "<value 2>",
711
- ],
712
- });
713
- if (res.ok) {
714
- const { value: result } = res;
715
- console.log(result);
716
- } else {
717
- console.log("outboundBatchesRemove failed:", res.error);
718
- }
719
- }
720
-
721
- run();
722
- ```
723
-
724
- ### Parameters
725
-
726
- | Parameter | Type | Required | Description |
727
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
728
- | `request` | [operations.OutboundBatchRemoveRequest](../../models/operations/outboundbatchremoverequest.md) | :heavy_check_mark: | The request object to use for the request. |
729
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
730
- | `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. |
731
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
732
-
733
- ### Response
734
-
735
- **Promise\<[any](../../models/.md)\>**
736
-
737
- ### Errors
738
-
739
- | Error Type | Status Code | Content Type |
740
- | -------------------------- | -------------------------- | -------------------------- |
741
- | errors.HTTPValidationError | 422 | application/json |
742
- | errors.SDKError | 4XX, 5XX | \*/\* |