syllable-sdk 1.0.8-rc.1 → 1.0.8-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +6 -6
- package/bin/mcp-server.js.map +4 -4
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/openapi.json +33 -33
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/.devcontainer/README.md +0 -35
- package/api-reference/sdks/agents/README.md +0 -224
- package/api-reference/sdks/availabletargets/README.md +0 -49
- package/api-reference/sdks/channels/README.md +0 -92
- package/api-reference/sdks/chats/README.md +0 -55
- package/api-reference/sdks/conversations/README.md +0 -91
- package/api-reference/sdks/dashboards/README.md +0 -321
- package/api-reference/sdks/events/README.md +0 -50
- package/api-reference/sdks/greetings/README.md +0 -223
- package/api-reference/sdks/organizations/README.md +0 -48
- package/api-reference/sdks/prompts/README.md +0 -225
- package/api-reference/sdks/sessions/README.md +0 -50
- package/api-reference/sdks/syllable/README.md +0 -22
- package/api-reference/sdks/targets/README.md +0 -194
- package/api-reference/sdks/tools/README.md +0 -92
- package/docs/sdks/agents/README.md +0 -589
- package/docs/sdks/batches/README.md +0 -742
- package/docs/sdks/campaigns/README.md +0 -526
- package/docs/sdks/channels/README.md +0 -401
- package/docs/sdks/conversations/README.md +0 -100
- package/docs/sdks/custommessages/README.md +0 -496
- package/docs/sdks/dashboards/README.md +0 -481
- package/docs/sdks/datasources/README.md +0 -458
- package/docs/sdks/directory/README.md +0 -727
- package/docs/sdks/events/README.md +0 -100
- package/docs/sdks/folders/README.md +0 -675
- package/docs/sdks/fullsummary/README.md +0 -82
- package/docs/sdks/incidents/README.md +0 -501
- package/docs/sdks/insights/README.md +0 -100
- package/docs/sdks/languagegroups/README.md +0 -565
- package/docs/sdks/latency/README.md +0 -82
- package/docs/sdks/numbers/README.md +0 -250
- package/docs/sdks/organizations/README.md +0 -317
- package/docs/sdks/permissions/README.md +0 -78
- package/docs/sdks/prompts/README.md +0 -592
- package/docs/sdks/pronunciations/README.md +0 -360
- package/docs/sdks/roles/README.md +0 -430
- package/docs/sdks/services/README.md +0 -430
- package/docs/sdks/sessiondebug/README.md +0 -236
- package/docs/sdks/sessionlabels/README.md +0 -262
- package/docs/sdks/sessions/README.md +0 -325
- package/docs/sdks/syllablesdktools/README.md +0 -578
- package/docs/sdks/takeouts/README.md +0 -228
- package/docs/sdks/targets/README.md +0 -454
- package/docs/sdks/test/README.md +0 -92
- package/docs/sdks/tools/README.md +0 -518
- package/docs/sdks/transcript/README.md +0 -82
- package/docs/sdks/twilio/README.md +0 -246
- package/docs/sdks/users/README.md +0 -561
- package/docs/sdks/v1/README.md +0 -561
- package/docs/sdks/voicegroups/README.md +0 -551
- package/docs/sdks/workflows/README.md +0 -781
- package/examples/README.md +0 -31
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
# DataSources
|
|
2
|
-
(*dataSources*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
Operations related to data sources. A data source is a blob of text that can be made available to an agent's general info tools to provide more context to the agent when generating its responses. For more information, see [Console docs](https://docs.syllable.ai/Resources/DataSources).
|
|
7
|
-
|
|
8
|
-
### Available Operations
|
|
9
|
-
|
|
10
|
-
* [list](#list) - List Data Sources
|
|
11
|
-
* [create](#create) - Create Data Source
|
|
12
|
-
* [update](#update) - Update Data Source
|
|
13
|
-
* [getById](#getbyid) - Get Data Source
|
|
14
|
-
* [delete](#delete) - Delete Data Source
|
|
15
|
-
|
|
16
|
-
## list
|
|
17
|
-
|
|
18
|
-
Fetch metadata about all data sources, not including their text.
|
|
19
|
-
|
|
20
|
-
### Example Usage
|
|
21
|
-
|
|
22
|
-
<!-- UsageSnippet language="typescript" operationID="data_sources_list" method="get" path="/api/v1/data_sources/" -->
|
|
23
|
-
```typescript
|
|
24
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
25
|
-
|
|
26
|
-
const syllableSDK = new SyllableSDK({
|
|
27
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
async function run() {
|
|
31
|
-
const result = await syllableSDK.dataSources.list({
|
|
32
|
-
page: 0,
|
|
33
|
-
searchFields: [
|
|
34
|
-
"name",
|
|
35
|
-
],
|
|
36
|
-
searchFieldValues: [
|
|
37
|
-
"Some Object Name",
|
|
38
|
-
],
|
|
39
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
40
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
console.log(result);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
run();
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Standalone function
|
|
50
|
-
|
|
51
|
-
The standalone function version of this method:
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
55
|
-
import { dataSourcesList } from "syllable-sdk/funcs/dataSourcesList.js";
|
|
56
|
-
|
|
57
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
58
|
-
// You can create one instance of it to use across an application.
|
|
59
|
-
const syllableSDK = new SyllableSDKCore({
|
|
60
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
async function run() {
|
|
64
|
-
const res = await dataSourcesList(syllableSDK, {
|
|
65
|
-
page: 0,
|
|
66
|
-
searchFields: [
|
|
67
|
-
"name",
|
|
68
|
-
],
|
|
69
|
-
searchFieldValues: [
|
|
70
|
-
"Some Object Name",
|
|
71
|
-
],
|
|
72
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
73
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
74
|
-
});
|
|
75
|
-
if (res.ok) {
|
|
76
|
-
const { value: result } = res;
|
|
77
|
-
console.log(result);
|
|
78
|
-
} else {
|
|
79
|
-
console.log("dataSourcesList failed:", res.error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
run();
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Parameters
|
|
87
|
-
|
|
88
|
-
| Parameter | Type | Required | Description |
|
|
89
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
90
|
-
| `request` | [operations.DataSourcesListRequest](../../models/operations/datasourceslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
91
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
92
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
93
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
94
|
-
|
|
95
|
-
### Response
|
|
96
|
-
|
|
97
|
-
**Promise\<[components.ListResponseDataSourceMetadataResponse](../../models/components/listresponsedatasourcemetadataresponse.md)\>**
|
|
98
|
-
|
|
99
|
-
### Errors
|
|
100
|
-
|
|
101
|
-
| Error Type | Status Code | Content Type |
|
|
102
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
103
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
104
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
105
|
-
|
|
106
|
-
## create
|
|
107
|
-
|
|
108
|
-
Create a new data source.
|
|
109
|
-
|
|
110
|
-
### Example Usage
|
|
111
|
-
|
|
112
|
-
<!-- UsageSnippet language="typescript" operationID="data_sources_create" method="post" path="/api/v1/data_sources/" -->
|
|
113
|
-
```typescript
|
|
114
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
115
|
-
|
|
116
|
-
const syllableSDK = new SyllableSDK({
|
|
117
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
async function run() {
|
|
121
|
-
const result = await syllableSDK.dataSources.create({
|
|
122
|
-
name: "Rain",
|
|
123
|
-
description: "Information about rain.",
|
|
124
|
-
labels: [
|
|
125
|
-
"Weather Info",
|
|
126
|
-
],
|
|
127
|
-
chunk: false,
|
|
128
|
-
chunkDelimiter: "",
|
|
129
|
-
text: "The following are names and addresses of pizza shops.\n" +
|
|
130
|
-
"\n" +
|
|
131
|
-
"Cool Pizza, 123 Main St.\n" +
|
|
132
|
-
"\n" +
|
|
133
|
-
"Really Good Pizza, 456 Water St.\n" +
|
|
134
|
-
"\n" +
|
|
135
|
-
"The Best Pizza, 789 Circle Dr.",
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
console.log(result);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
run();
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Standalone function
|
|
145
|
-
|
|
146
|
-
The standalone function version of this method:
|
|
147
|
-
|
|
148
|
-
```typescript
|
|
149
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
150
|
-
import { dataSourcesCreate } from "syllable-sdk/funcs/dataSourcesCreate.js";
|
|
151
|
-
|
|
152
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
153
|
-
// You can create one instance of it to use across an application.
|
|
154
|
-
const syllableSDK = new SyllableSDKCore({
|
|
155
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
async function run() {
|
|
159
|
-
const res = await dataSourcesCreate(syllableSDK, {
|
|
160
|
-
name: "Rain",
|
|
161
|
-
description: "Information about rain.",
|
|
162
|
-
labels: [
|
|
163
|
-
"Weather Info",
|
|
164
|
-
],
|
|
165
|
-
chunk: false,
|
|
166
|
-
chunkDelimiter: "",
|
|
167
|
-
text: "The following are names and addresses of pizza shops.\n" +
|
|
168
|
-
"\n" +
|
|
169
|
-
"Cool Pizza, 123 Main St.\n" +
|
|
170
|
-
"\n" +
|
|
171
|
-
"Really Good Pizza, 456 Water St.\n" +
|
|
172
|
-
"\n" +
|
|
173
|
-
"The Best Pizza, 789 Circle Dr.",
|
|
174
|
-
});
|
|
175
|
-
if (res.ok) {
|
|
176
|
-
const { value: result } = res;
|
|
177
|
-
console.log(result);
|
|
178
|
-
} else {
|
|
179
|
-
console.log("dataSourcesCreate failed:", res.error);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
run();
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Parameters
|
|
187
|
-
|
|
188
|
-
| Parameter | Type | Required | Description |
|
|
189
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
190
|
-
| `request` | [components.DataSourceCreateRequest](../../models/components/datasourcecreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
191
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
192
|
-
| `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. |
|
|
193
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
194
|
-
|
|
195
|
-
### Response
|
|
196
|
-
|
|
197
|
-
**Promise\<[components.DataSourceDetailResponse](../../models/components/datasourcedetailresponse.md)\>**
|
|
198
|
-
|
|
199
|
-
### Errors
|
|
200
|
-
|
|
201
|
-
| Error Type | Status Code | Content Type |
|
|
202
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
203
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
204
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
205
|
-
|
|
206
|
-
## update
|
|
207
|
-
|
|
208
|
-
Update an existing data source.
|
|
209
|
-
|
|
210
|
-
### Example Usage
|
|
211
|
-
|
|
212
|
-
<!-- UsageSnippet language="typescript" operationID="data_sources_update" method="put" path="/api/v1/data_sources/" -->
|
|
213
|
-
```typescript
|
|
214
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
215
|
-
|
|
216
|
-
const syllableSDK = new SyllableSDK({
|
|
217
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
async function run() {
|
|
221
|
-
const result = await syllableSDK.dataSources.update({
|
|
222
|
-
name: "Rain",
|
|
223
|
-
description: "Information about rain.",
|
|
224
|
-
labels: [
|
|
225
|
-
"Weather Info",
|
|
226
|
-
],
|
|
227
|
-
chunk: false,
|
|
228
|
-
chunkDelimiter: "",
|
|
229
|
-
id: 1,
|
|
230
|
-
editComments: "Added new info",
|
|
231
|
-
text: "The following are names and addresses of pizza shops.\n" +
|
|
232
|
-
"\n" +
|
|
233
|
-
"Cool Pizza, 123 Main St.\n" +
|
|
234
|
-
"\n" +
|
|
235
|
-
"Really Good Pizza, 456 Water St.\n" +
|
|
236
|
-
"\n" +
|
|
237
|
-
"The Best Pizza, 789 Circle Dr.",
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
console.log(result);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
run();
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
### Standalone function
|
|
247
|
-
|
|
248
|
-
The standalone function version of this method:
|
|
249
|
-
|
|
250
|
-
```typescript
|
|
251
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
252
|
-
import { dataSourcesUpdate } from "syllable-sdk/funcs/dataSourcesUpdate.js";
|
|
253
|
-
|
|
254
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
255
|
-
// You can create one instance of it to use across an application.
|
|
256
|
-
const syllableSDK = new SyllableSDKCore({
|
|
257
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
async function run() {
|
|
261
|
-
const res = await dataSourcesUpdate(syllableSDK, {
|
|
262
|
-
name: "Rain",
|
|
263
|
-
description: "Information about rain.",
|
|
264
|
-
labels: [
|
|
265
|
-
"Weather Info",
|
|
266
|
-
],
|
|
267
|
-
chunk: false,
|
|
268
|
-
chunkDelimiter: "",
|
|
269
|
-
id: 1,
|
|
270
|
-
editComments: "Added new info",
|
|
271
|
-
text: "The following are names and addresses of pizza shops.\n" +
|
|
272
|
-
"\n" +
|
|
273
|
-
"Cool Pizza, 123 Main St.\n" +
|
|
274
|
-
"\n" +
|
|
275
|
-
"Really Good Pizza, 456 Water St.\n" +
|
|
276
|
-
"\n" +
|
|
277
|
-
"The Best Pizza, 789 Circle Dr.",
|
|
278
|
-
});
|
|
279
|
-
if (res.ok) {
|
|
280
|
-
const { value: result } = res;
|
|
281
|
-
console.log(result);
|
|
282
|
-
} else {
|
|
283
|
-
console.log("dataSourcesUpdate failed:", res.error);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
run();
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Parameters
|
|
291
|
-
|
|
292
|
-
| Parameter | Type | Required | Description |
|
|
293
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
294
|
-
| `request` | [components.DataSourceUpdateRequest](../../models/components/datasourceupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
295
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
296
|
-
| `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. |
|
|
297
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
298
|
-
|
|
299
|
-
### Response
|
|
300
|
-
|
|
301
|
-
**Promise\<[components.DataSourceDetailResponse](../../models/components/datasourcedetailresponse.md)\>**
|
|
302
|
-
|
|
303
|
-
### Errors
|
|
304
|
-
|
|
305
|
-
| Error Type | Status Code | Content Type |
|
|
306
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
307
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
308
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
309
|
-
|
|
310
|
-
## getById
|
|
311
|
-
|
|
312
|
-
Fetch a given data source, including its text.
|
|
313
|
-
|
|
314
|
-
### Example Usage
|
|
315
|
-
|
|
316
|
-
<!-- UsageSnippet language="typescript" operationID="data_sources_get_by_id" method="get" path="/api/v1/data_sources/{data_source_id}" -->
|
|
317
|
-
```typescript
|
|
318
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
319
|
-
|
|
320
|
-
const syllableSDK = new SyllableSDK({
|
|
321
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
async function run() {
|
|
325
|
-
const result = await syllableSDK.dataSources.getById({
|
|
326
|
-
dataSourceId: 87219,
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
console.log(result);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
run();
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
### Standalone function
|
|
336
|
-
|
|
337
|
-
The standalone function version of this method:
|
|
338
|
-
|
|
339
|
-
```typescript
|
|
340
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
341
|
-
import { dataSourcesGetById } from "syllable-sdk/funcs/dataSourcesGetById.js";
|
|
342
|
-
|
|
343
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
344
|
-
// You can create one instance of it to use across an application.
|
|
345
|
-
const syllableSDK = new SyllableSDKCore({
|
|
346
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
347
|
-
});
|
|
348
|
-
|
|
349
|
-
async function run() {
|
|
350
|
-
const res = await dataSourcesGetById(syllableSDK, {
|
|
351
|
-
dataSourceId: 87219,
|
|
352
|
-
});
|
|
353
|
-
if (res.ok) {
|
|
354
|
-
const { value: result } = res;
|
|
355
|
-
console.log(result);
|
|
356
|
-
} else {
|
|
357
|
-
console.log("dataSourcesGetById failed:", res.error);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
run();
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
### Parameters
|
|
365
|
-
|
|
366
|
-
| Parameter | Type | Required | Description |
|
|
367
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
368
|
-
| `request` | [operations.DataSourcesGetByIdRequest](../../models/operations/datasourcesgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
369
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
370
|
-
| `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. |
|
|
371
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
372
|
-
|
|
373
|
-
### Response
|
|
374
|
-
|
|
375
|
-
**Promise\<[components.DataSourceDetailResponse](../../models/components/datasourcedetailresponse.md)\>**
|
|
376
|
-
|
|
377
|
-
### Errors
|
|
378
|
-
|
|
379
|
-
| Error Type | Status Code | Content Type |
|
|
380
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
381
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
382
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
383
|
-
|
|
384
|
-
## delete
|
|
385
|
-
|
|
386
|
-
Delete a given data source.
|
|
387
|
-
|
|
388
|
-
### Example Usage
|
|
389
|
-
|
|
390
|
-
<!-- UsageSnippet language="typescript" operationID="data_sources_delete" method="delete" path="/api/v1/data_sources/{data_source_id}" -->
|
|
391
|
-
```typescript
|
|
392
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
393
|
-
|
|
394
|
-
const syllableSDK = new SyllableSDK({
|
|
395
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
396
|
-
});
|
|
397
|
-
|
|
398
|
-
async function run() {
|
|
399
|
-
const result = await syllableSDK.dataSources.delete({
|
|
400
|
-
dataSourceId: 509584,
|
|
401
|
-
reason: "<value>",
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
console.log(result);
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
run();
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
### Standalone function
|
|
411
|
-
|
|
412
|
-
The standalone function version of this method:
|
|
413
|
-
|
|
414
|
-
```typescript
|
|
415
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
416
|
-
import { dataSourcesDelete } from "syllable-sdk/funcs/dataSourcesDelete.js";
|
|
417
|
-
|
|
418
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
419
|
-
// You can create one instance of it to use across an application.
|
|
420
|
-
const syllableSDK = new SyllableSDKCore({
|
|
421
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
422
|
-
});
|
|
423
|
-
|
|
424
|
-
async function run() {
|
|
425
|
-
const res = await dataSourcesDelete(syllableSDK, {
|
|
426
|
-
dataSourceId: 509584,
|
|
427
|
-
reason: "<value>",
|
|
428
|
-
});
|
|
429
|
-
if (res.ok) {
|
|
430
|
-
const { value: result } = res;
|
|
431
|
-
console.log(result);
|
|
432
|
-
} else {
|
|
433
|
-
console.log("dataSourcesDelete failed:", res.error);
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
run();
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
### Parameters
|
|
441
|
-
|
|
442
|
-
| Parameter | Type | Required | Description |
|
|
443
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
444
|
-
| `request` | [operations.DataSourcesDeleteRequest](../../models/operations/datasourcesdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
445
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
446
|
-
| `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. |
|
|
447
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
448
|
-
|
|
449
|
-
### Response
|
|
450
|
-
|
|
451
|
-
**Promise\<[any](../../models/.md)\>**
|
|
452
|
-
|
|
453
|
-
### Errors
|
|
454
|
-
|
|
455
|
-
| Error Type | Status Code | Content Type |
|
|
456
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
457
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
458
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|