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.
- package/bin/mcp-server.js +54 -17
- package/bin/mcp-server.js.map +11 -10
- package/examples/package-lock.json +1 -1
- package/funcs/directoryUpdate.js +3 -1
- package/funcs/directoryUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/server.js.map +1 -1
- package/models/components/directorymember.d.ts +4 -4
- package/models/components/directorymember.d.ts.map +1 -1
- package/models/components/directorymember.js +4 -4
- package/models/components/directorymember.js.map +1 -1
- package/models/components/directorymemberupdate.d.ts +60 -0
- package/models/components/directorymemberupdate.d.ts.map +1 -0
- package/models/components/directorymemberupdate.js +87 -0
- package/models/components/directorymemberupdate.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/directorymemberupdate.d.ts +2 -2
- package/models/operations/directorymemberupdate.d.ts.map +1 -1
- package/models/operations/directorymemberupdate.js +4 -4
- package/models/operations/directorymemberupdate.js.map +1 -1
- package/openapi.json +136 -52
- package/package.json +1 -1
- package/src/funcs/directoryUpdate.ts +3 -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/src/models/components/directorymember.ts +8 -10
- package/src/models/components/directorymemberupdate.ts +115 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/directorymemberupdate.ts +6 -6
- 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 -731
- 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,565 +0,0 @@
|
|
|
1
|
-
# LanguageGroups
|
|
2
|
-
(*languageGroups*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
Operations related to language groups. A language group is a collection of language, voice, and DTMF configuration that can be linked to an agent to define the languages and voices it supports. For more information, see [Console docs](https://docs.syllable.ai/Resources/LanguageGroups).
|
|
7
|
-
|
|
8
|
-
### Available Operations
|
|
9
|
-
|
|
10
|
-
* [~~list~~](#list) - List Language Groups :warning: **Deprecated**
|
|
11
|
-
* [~~create~~](#create) - Create Language Group :warning: **Deprecated**
|
|
12
|
-
* [~~update~~](#update) - Update Language Group :warning: **Deprecated**
|
|
13
|
-
* [~~getById~~](#getbyid) - Get Language Group :warning: **Deprecated**
|
|
14
|
-
* [~~delete~~](#delete) - Delete Language Group :warning: **Deprecated**
|
|
15
|
-
* [~~languageGroupsCreateVoiceSample~~](#languagegroupscreatevoicesample) - Create Voice Sample :warning: **Deprecated**
|
|
16
|
-
|
|
17
|
-
## ~~list~~
|
|
18
|
-
|
|
19
|
-
Deprecated alias for `GET /api/v1/voice_groups/`.
|
|
20
|
-
|
|
21
|
-
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
22
|
-
|
|
23
|
-
### Example Usage
|
|
24
|
-
|
|
25
|
-
<!-- UsageSnippet language="typescript" operationID="language_groups_list" method="get" path="/api/v1/language_groups/" -->
|
|
26
|
-
```typescript
|
|
27
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
28
|
-
|
|
29
|
-
const syllableSDK = new SyllableSDK({
|
|
30
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
async function run() {
|
|
34
|
-
const result = await syllableSDK.languageGroups.list({
|
|
35
|
-
page: 0,
|
|
36
|
-
searchFields: [
|
|
37
|
-
"name",
|
|
38
|
-
],
|
|
39
|
-
searchFieldValues: [
|
|
40
|
-
"Some Object Name",
|
|
41
|
-
],
|
|
42
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
43
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
console.log(result);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
run();
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Standalone function
|
|
53
|
-
|
|
54
|
-
The standalone function version of this method:
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
58
|
-
import { languageGroupsList } from "syllable-sdk/funcs/languageGroupsList.js";
|
|
59
|
-
|
|
60
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
61
|
-
// You can create one instance of it to use across an application.
|
|
62
|
-
const syllableSDK = new SyllableSDKCore({
|
|
63
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
async function run() {
|
|
67
|
-
const res = await languageGroupsList(syllableSDK, {
|
|
68
|
-
page: 0,
|
|
69
|
-
searchFields: [
|
|
70
|
-
"name",
|
|
71
|
-
],
|
|
72
|
-
searchFieldValues: [
|
|
73
|
-
"Some Object Name",
|
|
74
|
-
],
|
|
75
|
-
startDatetime: "2023-01-01T00:00:00Z",
|
|
76
|
-
endDatetime: "2024-01-01T00:00:00Z",
|
|
77
|
-
});
|
|
78
|
-
if (res.ok) {
|
|
79
|
-
const { value: result } = res;
|
|
80
|
-
console.log(result);
|
|
81
|
-
} else {
|
|
82
|
-
console.log("languageGroupsList failed:", res.error);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
run();
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Parameters
|
|
90
|
-
|
|
91
|
-
| Parameter | Type | Required | Description |
|
|
92
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
93
|
-
| `request` | [operations.LanguageGroupsListRequest](../../models/operations/languagegroupslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
94
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
95
|
-
| `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. |
|
|
96
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
97
|
-
|
|
98
|
-
### Response
|
|
99
|
-
|
|
100
|
-
**Promise\<[components.ListResponseLanguageGroupResponse](../../models/components/listresponselanguagegroupresponse.md)\>**
|
|
101
|
-
|
|
102
|
-
### Errors
|
|
103
|
-
|
|
104
|
-
| Error Type | Status Code | Content Type |
|
|
105
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
106
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
107
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
108
|
-
|
|
109
|
-
## ~~create~~
|
|
110
|
-
|
|
111
|
-
Deprecated alias for `POST /api/v1/voice_groups/`.
|
|
112
|
-
|
|
113
|
-
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
114
|
-
|
|
115
|
-
### Example Usage
|
|
116
|
-
|
|
117
|
-
<!-- UsageSnippet language="typescript" operationID="language_groups_create" method="post" path="/api/v1/language_groups/" -->
|
|
118
|
-
```typescript
|
|
119
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
120
|
-
|
|
121
|
-
const syllableSDK = new SyllableSDK({
|
|
122
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
async function run() {
|
|
126
|
-
const result = await syllableSDK.languageGroups.create({
|
|
127
|
-
name: "Call Center 1 Languages",
|
|
128
|
-
description: "Languages spoken by operators at Call Center 1",
|
|
129
|
-
languageConfigs: [
|
|
130
|
-
{
|
|
131
|
-
languageCode: "en-US",
|
|
132
|
-
voiceProvider: "OpenAI",
|
|
133
|
-
voiceDisplayName: "Alloy",
|
|
134
|
-
dtmfCode: 1,
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
languageCode: "es-US",
|
|
138
|
-
voiceProvider: "Google",
|
|
139
|
-
voiceDisplayName: "es-US-Neural2-B",
|
|
140
|
-
dtmfCode: 2,
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
skipCurrentLanguageInMessage: true,
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
console.log(result);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
run();
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### Standalone function
|
|
153
|
-
|
|
154
|
-
The standalone function version of this method:
|
|
155
|
-
|
|
156
|
-
```typescript
|
|
157
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
158
|
-
import { languageGroupsCreate } from "syllable-sdk/funcs/languageGroupsCreate.js";
|
|
159
|
-
|
|
160
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
161
|
-
// You can create one instance of it to use across an application.
|
|
162
|
-
const syllableSDK = new SyllableSDKCore({
|
|
163
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
async function run() {
|
|
167
|
-
const res = await languageGroupsCreate(syllableSDK, {
|
|
168
|
-
name: "Call Center 1 Languages",
|
|
169
|
-
description: "Languages spoken by operators at Call Center 1",
|
|
170
|
-
languageConfigs: [
|
|
171
|
-
{
|
|
172
|
-
languageCode: "en-US",
|
|
173
|
-
voiceProvider: "OpenAI",
|
|
174
|
-
voiceDisplayName: "Alloy",
|
|
175
|
-
dtmfCode: 1,
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
languageCode: "es-US",
|
|
179
|
-
voiceProvider: "Google",
|
|
180
|
-
voiceDisplayName: "es-US-Neural2-B",
|
|
181
|
-
dtmfCode: 2,
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
skipCurrentLanguageInMessage: true,
|
|
185
|
-
});
|
|
186
|
-
if (res.ok) {
|
|
187
|
-
const { value: result } = res;
|
|
188
|
-
console.log(result);
|
|
189
|
-
} else {
|
|
190
|
-
console.log("languageGroupsCreate failed:", res.error);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
run();
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### Parameters
|
|
198
|
-
|
|
199
|
-
| Parameter | Type | Required | Description |
|
|
200
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
201
|
-
| `request` | [components.LanguageGroupCreateRequest](../../models/components/languagegroupcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
202
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
203
|
-
| `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. |
|
|
204
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
205
|
-
|
|
206
|
-
### Response
|
|
207
|
-
|
|
208
|
-
**Promise\<[components.LanguageGroupResponse](../../models/components/languagegroupresponse.md)\>**
|
|
209
|
-
|
|
210
|
-
### Errors
|
|
211
|
-
|
|
212
|
-
| Error Type | Status Code | Content Type |
|
|
213
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
214
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
215
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
216
|
-
|
|
217
|
-
## ~~update~~
|
|
218
|
-
|
|
219
|
-
Deprecated alias for `PUT /api/v1/voice_groups/`.
|
|
220
|
-
|
|
221
|
-
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
222
|
-
|
|
223
|
-
### Example Usage
|
|
224
|
-
|
|
225
|
-
<!-- UsageSnippet language="typescript" operationID="language_groups_update" method="put" path="/api/v1/language_groups/" -->
|
|
226
|
-
```typescript
|
|
227
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
228
|
-
|
|
229
|
-
const syllableSDK = new SyllableSDK({
|
|
230
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
async function run() {
|
|
234
|
-
const result = await syllableSDK.languageGroups.update({
|
|
235
|
-
name: "Call Center 1 Languages",
|
|
236
|
-
description: "Languages spoken by operators at Call Center 1",
|
|
237
|
-
languageConfigs: [
|
|
238
|
-
{
|
|
239
|
-
languageCode: "en-US",
|
|
240
|
-
voiceProvider: "OpenAI",
|
|
241
|
-
voiceDisplayName: "Alloy",
|
|
242
|
-
dtmfCode: 1,
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
languageCode: "es-US",
|
|
246
|
-
voiceProvider: "Google",
|
|
247
|
-
voiceDisplayName: "es-US-Neural2-B",
|
|
248
|
-
dtmfCode: 2,
|
|
249
|
-
},
|
|
250
|
-
],
|
|
251
|
-
skipCurrentLanguageInMessage: true,
|
|
252
|
-
id: 1,
|
|
253
|
-
editComments: "Added Spanish support.",
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
console.log(result);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
run();
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
### Standalone function
|
|
263
|
-
|
|
264
|
-
The standalone function version of this method:
|
|
265
|
-
|
|
266
|
-
```typescript
|
|
267
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
268
|
-
import { languageGroupsUpdate } from "syllable-sdk/funcs/languageGroupsUpdate.js";
|
|
269
|
-
|
|
270
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
271
|
-
// You can create one instance of it to use across an application.
|
|
272
|
-
const syllableSDK = new SyllableSDKCore({
|
|
273
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
async function run() {
|
|
277
|
-
const res = await languageGroupsUpdate(syllableSDK, {
|
|
278
|
-
name: "Call Center 1 Languages",
|
|
279
|
-
description: "Languages spoken by operators at Call Center 1",
|
|
280
|
-
languageConfigs: [
|
|
281
|
-
{
|
|
282
|
-
languageCode: "en-US",
|
|
283
|
-
voiceProvider: "OpenAI",
|
|
284
|
-
voiceDisplayName: "Alloy",
|
|
285
|
-
dtmfCode: 1,
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
languageCode: "es-US",
|
|
289
|
-
voiceProvider: "Google",
|
|
290
|
-
voiceDisplayName: "es-US-Neural2-B",
|
|
291
|
-
dtmfCode: 2,
|
|
292
|
-
},
|
|
293
|
-
],
|
|
294
|
-
skipCurrentLanguageInMessage: true,
|
|
295
|
-
id: 1,
|
|
296
|
-
editComments: "Added Spanish support.",
|
|
297
|
-
});
|
|
298
|
-
if (res.ok) {
|
|
299
|
-
const { value: result } = res;
|
|
300
|
-
console.log(result);
|
|
301
|
-
} else {
|
|
302
|
-
console.log("languageGroupsUpdate failed:", res.error);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
run();
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
### Parameters
|
|
310
|
-
|
|
311
|
-
| Parameter | Type | Required | Description |
|
|
312
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
313
|
-
| `request` | [components.LanguageGroupUpdateRequest](../../models/components/languagegroupupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
314
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
315
|
-
| `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. |
|
|
316
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
317
|
-
|
|
318
|
-
### Response
|
|
319
|
-
|
|
320
|
-
**Promise\<[components.LanguageGroupResponse](../../models/components/languagegroupresponse.md)\>**
|
|
321
|
-
|
|
322
|
-
### Errors
|
|
323
|
-
|
|
324
|
-
| Error Type | Status Code | Content Type |
|
|
325
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
326
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
327
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
328
|
-
|
|
329
|
-
## ~~getById~~
|
|
330
|
-
|
|
331
|
-
Deprecated alias for `GET /api/v1/voice_groups/{voice_group_id}`.
|
|
332
|
-
|
|
333
|
-
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
334
|
-
|
|
335
|
-
### Example Usage
|
|
336
|
-
|
|
337
|
-
<!-- UsageSnippet language="typescript" operationID="language_groups_get_by_id" method="get" path="/api/v1/language_groups/{language_group_id}" -->
|
|
338
|
-
```typescript
|
|
339
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
340
|
-
|
|
341
|
-
const syllableSDK = new SyllableSDK({
|
|
342
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
async function run() {
|
|
346
|
-
const result = await syllableSDK.languageGroups.getById({
|
|
347
|
-
languageGroupId: 453313,
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
console.log(result);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
run();
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Standalone function
|
|
357
|
-
|
|
358
|
-
The standalone function version of this method:
|
|
359
|
-
|
|
360
|
-
```typescript
|
|
361
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
362
|
-
import { languageGroupsGetById } from "syllable-sdk/funcs/languageGroupsGetById.js";
|
|
363
|
-
|
|
364
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
365
|
-
// You can create one instance of it to use across an application.
|
|
366
|
-
const syllableSDK = new SyllableSDKCore({
|
|
367
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
async function run() {
|
|
371
|
-
const res = await languageGroupsGetById(syllableSDK, {
|
|
372
|
-
languageGroupId: 453313,
|
|
373
|
-
});
|
|
374
|
-
if (res.ok) {
|
|
375
|
-
const { value: result } = res;
|
|
376
|
-
console.log(result);
|
|
377
|
-
} else {
|
|
378
|
-
console.log("languageGroupsGetById failed:", res.error);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
run();
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
### Parameters
|
|
386
|
-
|
|
387
|
-
| Parameter | Type | Required | Description |
|
|
388
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
389
|
-
| `request` | [operations.LanguageGroupsGetByIdRequest](../../models/operations/languagegroupsgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
390
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
391
|
-
| `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. |
|
|
392
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
393
|
-
|
|
394
|
-
### Response
|
|
395
|
-
|
|
396
|
-
**Promise\<[components.LanguageGroupResponse](../../models/components/languagegroupresponse.md)\>**
|
|
397
|
-
|
|
398
|
-
### Errors
|
|
399
|
-
|
|
400
|
-
| Error Type | Status Code | Content Type |
|
|
401
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
402
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
403
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
404
|
-
|
|
405
|
-
## ~~delete~~
|
|
406
|
-
|
|
407
|
-
Deprecated alias for `DELETE /api/v1/voice_groups/{voice_group_id}`.
|
|
408
|
-
|
|
409
|
-
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
410
|
-
|
|
411
|
-
### Example Usage
|
|
412
|
-
|
|
413
|
-
<!-- UsageSnippet language="typescript" operationID="language_groups_delete" method="delete" path="/api/v1/language_groups/{language_group_id}" -->
|
|
414
|
-
```typescript
|
|
415
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
416
|
-
|
|
417
|
-
const syllableSDK = new SyllableSDK({
|
|
418
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
async function run() {
|
|
422
|
-
const result = await syllableSDK.languageGroups.delete({
|
|
423
|
-
languageGroupId: 572805,
|
|
424
|
-
reason: "<value>",
|
|
425
|
-
});
|
|
426
|
-
|
|
427
|
-
console.log(result);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
run();
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
### Standalone function
|
|
434
|
-
|
|
435
|
-
The standalone function version of this method:
|
|
436
|
-
|
|
437
|
-
```typescript
|
|
438
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
439
|
-
import { languageGroupsDelete } from "syllable-sdk/funcs/languageGroupsDelete.js";
|
|
440
|
-
|
|
441
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
442
|
-
// You can create one instance of it to use across an application.
|
|
443
|
-
const syllableSDK = new SyllableSDKCore({
|
|
444
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
445
|
-
});
|
|
446
|
-
|
|
447
|
-
async function run() {
|
|
448
|
-
const res = await languageGroupsDelete(syllableSDK, {
|
|
449
|
-
languageGroupId: 572805,
|
|
450
|
-
reason: "<value>",
|
|
451
|
-
});
|
|
452
|
-
if (res.ok) {
|
|
453
|
-
const { value: result } = res;
|
|
454
|
-
console.log(result);
|
|
455
|
-
} else {
|
|
456
|
-
console.log("languageGroupsDelete failed:", res.error);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
run();
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
### Parameters
|
|
464
|
-
|
|
465
|
-
| Parameter | Type | Required | Description |
|
|
466
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
467
|
-
| `request` | [operations.LanguageGroupsDeleteRequest](../../models/operations/languagegroupsdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
468
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
469
|
-
| `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. |
|
|
470
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
471
|
-
|
|
472
|
-
### Response
|
|
473
|
-
|
|
474
|
-
**Promise\<[any](../../models/.md)\>**
|
|
475
|
-
|
|
476
|
-
### Errors
|
|
477
|
-
|
|
478
|
-
| Error Type | Status Code | Content Type |
|
|
479
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
480
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
481
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
482
|
-
|
|
483
|
-
## ~~languageGroupsCreateVoiceSample~~
|
|
484
|
-
|
|
485
|
-
Deprecated alias for `POST /api/v1/voice_groups/voices/sample`.
|
|
486
|
-
|
|
487
|
-
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
488
|
-
|
|
489
|
-
### Example Usage
|
|
490
|
-
|
|
491
|
-
<!-- UsageSnippet language="typescript" operationID="language_groups_create_voice_sample" method="post" path="/api/v1/language_groups/voices/sample" -->
|
|
492
|
-
```typescript
|
|
493
|
-
import { SyllableSDK } from "syllable-sdk";
|
|
494
|
-
|
|
495
|
-
const syllableSDK = new SyllableSDK({
|
|
496
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
497
|
-
});
|
|
498
|
-
|
|
499
|
-
async function run() {
|
|
500
|
-
const result = await syllableSDK.languageGroups.languageGroupsCreateVoiceSample({
|
|
501
|
-
languageCode: "es-US",
|
|
502
|
-
voiceProvider: "Google",
|
|
503
|
-
voiceDisplayName: "en-US-Neural2-D",
|
|
504
|
-
voiceSpeed: 1,
|
|
505
|
-
voicePitch: 0,
|
|
506
|
-
});
|
|
507
|
-
|
|
508
|
-
console.log(result);
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
run();
|
|
512
|
-
```
|
|
513
|
-
|
|
514
|
-
### Standalone function
|
|
515
|
-
|
|
516
|
-
The standalone function version of this method:
|
|
517
|
-
|
|
518
|
-
```typescript
|
|
519
|
-
import { SyllableSDKCore } from "syllable-sdk/core.js";
|
|
520
|
-
import { languageGroupsLanguageGroupsCreateVoiceSample } from "syllable-sdk/funcs/languageGroupsLanguageGroupsCreateVoiceSample.js";
|
|
521
|
-
|
|
522
|
-
// Use `SyllableSDKCore` for best tree-shaking performance.
|
|
523
|
-
// You can create one instance of it to use across an application.
|
|
524
|
-
const syllableSDK = new SyllableSDKCore({
|
|
525
|
-
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
|
|
526
|
-
});
|
|
527
|
-
|
|
528
|
-
async function run() {
|
|
529
|
-
const res = await languageGroupsLanguageGroupsCreateVoiceSample(syllableSDK, {
|
|
530
|
-
languageCode: "es-US",
|
|
531
|
-
voiceProvider: "Google",
|
|
532
|
-
voiceDisplayName: "en-US-Neural2-D",
|
|
533
|
-
voiceSpeed: 1,
|
|
534
|
-
voicePitch: 0,
|
|
535
|
-
});
|
|
536
|
-
if (res.ok) {
|
|
537
|
-
const { value: result } = res;
|
|
538
|
-
console.log(result);
|
|
539
|
-
} else {
|
|
540
|
-
console.log("languageGroupsLanguageGroupsCreateVoiceSample failed:", res.error);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
run();
|
|
545
|
-
```
|
|
546
|
-
|
|
547
|
-
### Parameters
|
|
548
|
-
|
|
549
|
-
| Parameter | Type | Required | Description |
|
|
550
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
551
|
-
| `request` | [components.LanguageSampleCreateRequest](../../models/components/languagesamplecreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
552
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
553
|
-
| `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. |
|
|
554
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
555
|
-
|
|
556
|
-
### Response
|
|
557
|
-
|
|
558
|
-
**Promise\<[ReadableStream<Uint8Array>](../../models/.md)\>**
|
|
559
|
-
|
|
560
|
-
### Errors
|
|
561
|
-
|
|
562
|
-
| Error Type | Status Code | Content Type |
|
|
563
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
564
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
565
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|