hume 0.9.2 → 0.9.3
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/.mock/definition/api.yml +6 -6
- package/.mock/definition/empathic-voice/__package__.yml +2810 -2703
- package/.mock/definition/empathic-voice/chat.yml +143 -143
- package/.mock/definition/empathic-voice/chatGroups.yml +579 -508
- package/.mock/definition/empathic-voice/chats.yml +490 -449
- package/.mock/definition/empathic-voice/configs.yml +913 -871
- package/.mock/definition/empathic-voice/customVoices.yml +255 -234
- package/.mock/definition/empathic-voice/prompts.yml +523 -526
- package/.mock/definition/empathic-voice/tools.yml +588 -588
- package/.mock/definition/expression-measurement/batch/__package__.yml +1758 -1758
- package/.mock/definition/expression-measurement/stream/__package__.yml +486 -485
- package/.mock/fern.config.json +3 -3
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +11 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +77 -3
- package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +25 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/requests/index.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +10 -0
- package/api/resources/empathicVoice/resources/chats/client/Client.js +63 -2
- package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigsRequest.d.ts +1 -1
- package/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +2 -7
- package/api/resources/empathicVoice/resources/customVoices/client/Client.js +8 -13
- package/api/resources/empathicVoice/resources/customVoices/client/requests/CustomVoicesListCustomVoicesRequest.d.ts +1 -1
- package/api/resources/empathicVoice/resources/customVoices/client/requests/PostedCustomVoiceName.d.ts +0 -6
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptsRequest.d.ts +2 -2
- package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/tools/client/requests/ToolsListToolsRequest.d.ts +1 -1
- package/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -1
- package/api/resources/empathicVoice/types/PostedCustomVoice.d.ts +2 -2
- package/api/resources/empathicVoice/types/PostedCustomVoiceBaseVoice.d.ts +3 -2
- package/api/resources/empathicVoice/types/PostedCustomVoiceBaseVoice.js +2 -1
- package/api/resources/empathicVoice/types/PostedCustomVoiceParameters.d.ts +51 -9
- package/api/resources/empathicVoice/types/PostedVoice.d.ts +1 -1
- package/api/resources/empathicVoice/types/ReturnCustomVoice.d.ts +2 -2
- package/api/resources/empathicVoice/types/ReturnCustomVoiceBaseVoice.d.ts +3 -2
- package/api/resources/empathicVoice/types/ReturnCustomVoiceBaseVoice.js +2 -1
- package/api/resources/empathicVoice/types/ReturnCustomVoiceParameters.d.ts +51 -9
- package/api/resources/empathicVoice/types/ReturnVoice.d.ts +1 -1
- package/api/resources/empathicVoice/types/UserInput.d.ts +3 -1
- package/api/resources/empathicVoice/types/VoiceNameEnum.d.ts +2 -1
- package/api/resources/empathicVoice/types/VoiceNameEnum.js +1 -0
- package/api/resources/empathicVoice/types/index.d.ts +0 -2
- package/api/resources/empathicVoice/types/index.js +0 -2
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
- package/api/resources/index.d.ts +1 -1
- package/api/resources/index.js +2 -2
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +11 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +77 -3
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +25 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/index.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +10 -0
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +63 -2
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigsRequest.d.ts +1 -1
- package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +2 -7
- package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +8 -13
- package/dist/api/resources/empathicVoice/resources/customVoices/client/requests/CustomVoicesListCustomVoicesRequest.d.ts +1 -1
- package/dist/api/resources/empathicVoice/resources/customVoices/client/requests/PostedCustomVoiceName.d.ts +0 -6
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptsRequest.d.ts +2 -2
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/tools/client/requests/ToolsListToolsRequest.d.ts +1 -1
- package/dist/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -1
- package/dist/api/resources/empathicVoice/types/PostedCustomVoice.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/PostedCustomVoiceBaseVoice.d.ts +3 -2
- package/dist/api/resources/empathicVoice/types/PostedCustomVoiceBaseVoice.js +2 -1
- package/dist/api/resources/empathicVoice/types/PostedCustomVoiceParameters.d.ts +51 -9
- package/dist/api/resources/empathicVoice/types/PostedVoice.d.ts +1 -1
- package/dist/api/resources/empathicVoice/types/ReturnCustomVoice.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/ReturnCustomVoiceBaseVoice.d.ts +3 -2
- package/dist/api/resources/empathicVoice/types/ReturnCustomVoiceBaseVoice.js +2 -1
- package/dist/api/resources/empathicVoice/types/ReturnCustomVoiceParameters.d.ts +51 -9
- package/dist/api/resources/empathicVoice/types/ReturnVoice.d.ts +1 -1
- package/dist/api/resources/empathicVoice/types/UserInput.d.ts +3 -1
- package/dist/api/resources/empathicVoice/types/VoiceNameEnum.d.ts +2 -1
- package/dist/api/resources/empathicVoice/types/VoiceNameEnum.js +1 -0
- package/dist/api/resources/empathicVoice/types/index.d.ts +0 -2
- package/dist/api/resources/empathicVoice/types/index.js +0 -2
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
- package/dist/api/resources/index.d.ts +1 -1
- package/dist/api/resources/index.js +2 -2
- package/dist/serialization/resources/empathicVoice/types/PostedCustomVoice.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/PostedCustomVoice.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/PostedCustomVoiceBaseVoice.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/PostedCustomVoiceBaseVoice.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/PostedCustomVoiceParameters.d.ts +9 -2
- package/dist/serialization/resources/empathicVoice/types/PostedCustomVoiceParameters.js +9 -2
- package/dist/serialization/resources/empathicVoice/types/ReturnCustomVoice.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/ReturnCustomVoice.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/ReturnCustomVoiceBaseVoice.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/ReturnCustomVoiceBaseVoice.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/ReturnCustomVoiceParameters.d.ts +9 -2
- package/dist/serialization/resources/empathicVoice/types/ReturnCustomVoiceParameters.js +9 -2
- package/dist/serialization/resources/empathicVoice/types/VoiceNameEnum.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/VoiceNameEnum.js +1 -0
- package/dist/serialization/resources/empathicVoice/types/index.d.ts +0 -2
- package/dist/serialization/resources/empathicVoice/types/index.js +0 -2
- package/dist/serialization/resources/index.d.ts +1 -1
- package/dist/serialization/resources/index.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +573 -607
- package/serialization/resources/empathicVoice/types/PostedCustomVoice.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/PostedCustomVoice.js +1 -1
- package/serialization/resources/empathicVoice/types/PostedCustomVoiceBaseVoice.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/PostedCustomVoiceBaseVoice.js +1 -1
- package/serialization/resources/empathicVoice/types/PostedCustomVoiceParameters.d.ts +9 -2
- package/serialization/resources/empathicVoice/types/PostedCustomVoiceParameters.js +9 -2
- package/serialization/resources/empathicVoice/types/ReturnCustomVoice.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/ReturnCustomVoice.js +1 -1
- package/serialization/resources/empathicVoice/types/ReturnCustomVoiceBaseVoice.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/ReturnCustomVoiceBaseVoice.js +1 -1
- package/serialization/resources/empathicVoice/types/ReturnCustomVoiceParameters.d.ts +9 -2
- package/serialization/resources/empathicVoice/types/ReturnCustomVoiceParameters.js +9 -2
- package/serialization/resources/empathicVoice/types/VoiceNameEnum.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/VoiceNameEnum.js +1 -0
- package/serialization/resources/empathicVoice/types/index.d.ts +0 -2
- package/serialization/resources/empathicVoice/types/index.js +0 -2
- package/serialization/resources/index.d.ts +1 -1
- package/serialization/resources/index.js +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/empathicVoice/types/ExtendedVoiceArgs.d.ts +0 -9
- package/api/resources/empathicVoice/types/VoiceArgs.d.ts +0 -13
- package/dist/api/resources/empathicVoice/types/ExtendedVoiceArgs.d.ts +0 -9
- package/dist/api/resources/empathicVoice/types/ExtendedVoiceArgs.js +0 -5
- package/dist/api/resources/empathicVoice/types/VoiceArgs.d.ts +0 -13
- package/dist/api/resources/empathicVoice/types/VoiceArgs.js +0 -5
- package/dist/serialization/resources/empathicVoice/types/ExtendedVoiceArgs.d.ts +0 -15
- package/dist/serialization/resources/empathicVoice/types/ExtendedVoiceArgs.js +0 -36
- package/dist/serialization/resources/empathicVoice/types/VoiceArgs.d.ts +0 -19
- package/dist/serialization/resources/empathicVoice/types/VoiceArgs.js +0 -40
- package/serialization/resources/empathicVoice/types/ExtendedVoiceArgs.d.ts +0 -15
- package/serialization/resources/empathicVoice/types/ExtendedVoiceArgs.js +0 -36
- package/serialization/resources/empathicVoice/types/VoiceArgs.d.ts +0 -19
- package/serialization/resources/empathicVoice/types/VoiceArgs.js +0 -40
- /package/api/resources/empathicVoice/{types/ExtendedVoiceArgs.js → resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.js} +0 -0
- /package/{api/resources/empathicVoice/types/VoiceArgs.js → dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.js} +0 -0
|
@@ -85,7 +85,7 @@ class ChatGroups {
|
|
|
85
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
86
86
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/chat_groups"),
|
|
87
87
|
method: "GET",
|
|
88
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
88
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
89
89
|
contentType: "application/json",
|
|
90
90
|
queryParameters: _queryParams,
|
|
91
91
|
requestType: "json",
|
|
@@ -165,7 +165,7 @@ class ChatGroups {
|
|
|
165
165
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
166
166
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/chat_groups/${encodeURIComponent(id)}`),
|
|
167
167
|
method: "GET",
|
|
168
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
168
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
169
169
|
contentType: "application/json",
|
|
170
170
|
queryParameters: _queryParams,
|
|
171
171
|
requestType: "json",
|
|
@@ -245,7 +245,7 @@ class ChatGroups {
|
|
|
245
245
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
246
246
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/chat_groups/${encodeURIComponent(id)}/events`),
|
|
247
247
|
method: "GET",
|
|
248
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
248
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
249
249
|
contentType: "application/json",
|
|
250
250
|
queryParameters: _queryParams,
|
|
251
251
|
requestType: "json",
|
|
@@ -292,6 +292,80 @@ class ChatGroups {
|
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* @param {string} id - Identifier for a chat. Formatted as a UUID.
|
|
297
|
+
* @param {Hume.empathicVoice.ChatGroupsGetAudioRequest} request
|
|
298
|
+
* @param {ChatGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
299
|
+
*
|
|
300
|
+
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* await client.empathicVoice.chatGroups.getAudio("id")
|
|
304
|
+
*/
|
|
305
|
+
getAudio(id, request = {}, requestOptions) {
|
|
306
|
+
var _a, _b;
|
|
307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
+
const { pageNumber, pageSize, ascendingOrder } = request;
|
|
309
|
+
const _queryParams = {};
|
|
310
|
+
if (pageNumber != null) {
|
|
311
|
+
_queryParams["page_number"] = pageNumber.toString();
|
|
312
|
+
}
|
|
313
|
+
if (pageSize != null) {
|
|
314
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
315
|
+
}
|
|
316
|
+
if (ascendingOrder != null) {
|
|
317
|
+
_queryParams["ascending_order"] = ascendingOrder.toString();
|
|
318
|
+
}
|
|
319
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
320
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/chat_groups/${encodeURIComponent(id)}/audio`),
|
|
321
|
+
method: "GET",
|
|
322
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
323
|
+
contentType: "application/json",
|
|
324
|
+
queryParameters: _queryParams,
|
|
325
|
+
requestType: "json",
|
|
326
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
327
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
328
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
329
|
+
});
|
|
330
|
+
if (_response.ok) {
|
|
331
|
+
return serializers.empathicVoice.ReturnChatPagedEvents.parseOrThrow(_response.body, {
|
|
332
|
+
unrecognizedObjectKeys: "passthrough",
|
|
333
|
+
allowUnrecognizedUnionMembers: true,
|
|
334
|
+
allowUnrecognizedEnumValues: true,
|
|
335
|
+
breadcrumbsPrefix: ["response"],
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
if (_response.error.reason === "status-code") {
|
|
339
|
+
switch (_response.error.statusCode) {
|
|
340
|
+
case 400:
|
|
341
|
+
throw new Hume.empathicVoice.BadRequestError(serializers.empathicVoice.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
342
|
+
unrecognizedObjectKeys: "passthrough",
|
|
343
|
+
allowUnrecognizedUnionMembers: true,
|
|
344
|
+
allowUnrecognizedEnumValues: true,
|
|
345
|
+
breadcrumbsPrefix: ["response"],
|
|
346
|
+
}));
|
|
347
|
+
default:
|
|
348
|
+
throw new errors.HumeError({
|
|
349
|
+
statusCode: _response.error.statusCode,
|
|
350
|
+
body: _response.error.body,
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
switch (_response.error.reason) {
|
|
355
|
+
case "non-json":
|
|
356
|
+
throw new errors.HumeError({
|
|
357
|
+
statusCode: _response.error.statusCode,
|
|
358
|
+
body: _response.error.rawBody,
|
|
359
|
+
});
|
|
360
|
+
case "timeout":
|
|
361
|
+
throw new errors.HumeTimeoutError();
|
|
362
|
+
case "unknown":
|
|
363
|
+
throw new errors.HumeError({
|
|
364
|
+
message: _response.error.errorMessage,
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
}
|
|
295
369
|
_getCustomAuthorizationHeaders() {
|
|
296
370
|
return __awaiter(this, void 0, void 0, function* () {
|
|
297
371
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface ChatGroupsGetAudioRequest {
|
|
9
|
+
/**
|
|
10
|
+
* Specifies the page number to retrieve, enabling pagination.
|
|
11
|
+
*
|
|
12
|
+
* This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page.
|
|
13
|
+
*/
|
|
14
|
+
pageNumber?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive.
|
|
17
|
+
*
|
|
18
|
+
* For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10.
|
|
19
|
+
*/
|
|
20
|
+
pageSize?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Boolean to indicate if the results should be paginated in chronological order or reverse-chronological order. Defaults to true.
|
|
23
|
+
*/
|
|
24
|
+
ascendingOrder?: boolean;
|
|
25
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type ChatGroupsListChatGroupsRequest } from "./ChatGroupsListChatGroupsRequest";
|
|
2
2
|
export { type ChatGroupsGetChatGroupRequest } from "./ChatGroupsGetChatGroupRequest";
|
|
3
3
|
export { type ChatGroupsListChatGroupEventsRequest } from "./ChatGroupsListChatGroupEventsRequest";
|
|
4
|
+
export { type ChatGroupsGetAudioRequest } from "./ChatGroupsGetAudioRequest";
|
|
@@ -55,6 +55,16 @@ export declare class Chats {
|
|
|
55
55
|
* })
|
|
56
56
|
*/
|
|
57
57
|
listChatEvents(id: string, request?: Hume.empathicVoice.ChatsListChatEventsRequest, requestOptions?: Chats.RequestOptions): Promise<core.Page<Hume.empathicVoice.ReturnChatEvent>>;
|
|
58
|
+
/**
|
|
59
|
+
* @param {string} id - Identifier for a chat. Formatted as a UUID.
|
|
60
|
+
* @param {Chats.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.empathicVoice.chats.getAudio("id")
|
|
66
|
+
*/
|
|
67
|
+
getAudio(id: string, requestOptions?: Chats.RequestOptions): Promise<Hume.empathicVoice.ReturnChatPagedEvents>;
|
|
58
68
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
59
69
|
"X-Hume-Api-Key": string | undefined;
|
|
60
70
|
}>;
|
|
@@ -82,7 +82,7 @@ class Chats {
|
|
|
82
82
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
83
83
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/chats"),
|
|
84
84
|
method: "GET",
|
|
85
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
85
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
86
86
|
contentType: "application/json",
|
|
87
87
|
queryParameters: _queryParams,
|
|
88
88
|
requestType: "json",
|
|
@@ -174,7 +174,7 @@ class Chats {
|
|
|
174
174
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
175
175
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/chats/${encodeURIComponent(id)}`),
|
|
176
176
|
method: "GET",
|
|
177
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
177
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
178
178
|
contentType: "application/json",
|
|
179
179
|
queryParameters: _queryParams,
|
|
180
180
|
requestType: "json",
|
|
@@ -232,6 +232,67 @@ class Chats {
|
|
|
232
232
|
});
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* @param {string} id - Identifier for a chat. Formatted as a UUID.
|
|
237
|
+
* @param {Chats.RequestOptions} requestOptions - Request-specific configuration.
|
|
238
|
+
*
|
|
239
|
+
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* await client.empathicVoice.chats.getAudio("id")
|
|
243
|
+
*/
|
|
244
|
+
getAudio(id, requestOptions) {
|
|
245
|
+
var _a, _b;
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
248
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/chats/${encodeURIComponent(id)}/audio`),
|
|
249
|
+
method: "GET",
|
|
250
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
251
|
+
contentType: "application/json",
|
|
252
|
+
requestType: "json",
|
|
253
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
254
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
255
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
256
|
+
});
|
|
257
|
+
if (_response.ok) {
|
|
258
|
+
return serializers.empathicVoice.ReturnChatPagedEvents.parseOrThrow(_response.body, {
|
|
259
|
+
unrecognizedObjectKeys: "passthrough",
|
|
260
|
+
allowUnrecognizedUnionMembers: true,
|
|
261
|
+
allowUnrecognizedEnumValues: true,
|
|
262
|
+
breadcrumbsPrefix: ["response"],
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
if (_response.error.reason === "status-code") {
|
|
266
|
+
switch (_response.error.statusCode) {
|
|
267
|
+
case 400:
|
|
268
|
+
throw new Hume.empathicVoice.BadRequestError(serializers.empathicVoice.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
269
|
+
unrecognizedObjectKeys: "passthrough",
|
|
270
|
+
allowUnrecognizedUnionMembers: true,
|
|
271
|
+
allowUnrecognizedEnumValues: true,
|
|
272
|
+
breadcrumbsPrefix: ["response"],
|
|
273
|
+
}));
|
|
274
|
+
default:
|
|
275
|
+
throw new errors.HumeError({
|
|
276
|
+
statusCode: _response.error.statusCode,
|
|
277
|
+
body: _response.error.body,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
switch (_response.error.reason) {
|
|
282
|
+
case "non-json":
|
|
283
|
+
throw new errors.HumeError({
|
|
284
|
+
statusCode: _response.error.statusCode,
|
|
285
|
+
body: _response.error.rawBody,
|
|
286
|
+
});
|
|
287
|
+
case "timeout":
|
|
288
|
+
throw new errors.HumeTimeoutError();
|
|
289
|
+
case "unknown":
|
|
290
|
+
throw new errors.HumeError({
|
|
291
|
+
message: _response.error.errorMessage,
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
}
|
|
235
296
|
_getCustomAuthorizationHeaders() {
|
|
236
297
|
return __awaiter(this, void 0, void 0, function* () {
|
|
237
298
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
@@ -85,7 +85,7 @@ class Configs {
|
|
|
85
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
86
86
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/configs"),
|
|
87
87
|
method: "GET",
|
|
88
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
88
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
89
89
|
contentType: "application/json",
|
|
90
90
|
queryParameters: _queryParams,
|
|
91
91
|
requestType: "json",
|
|
@@ -181,7 +181,7 @@ class Configs {
|
|
|
181
181
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
182
182
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/configs"),
|
|
183
183
|
method: "POST",
|
|
184
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
184
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
185
185
|
contentType: "application/json",
|
|
186
186
|
requestType: "json",
|
|
187
187
|
body: serializers.empathicVoice.PostedConfig.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -259,7 +259,7 @@ class Configs {
|
|
|
259
259
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
260
260
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
|
|
261
261
|
method: "GET",
|
|
262
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
262
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
263
263
|
contentType: "application/json",
|
|
264
264
|
queryParameters: _queryParams,
|
|
265
265
|
requestType: "json",
|
|
@@ -359,7 +359,7 @@ class Configs {
|
|
|
359
359
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
360
360
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
|
|
361
361
|
method: "POST",
|
|
362
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
362
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
363
363
|
contentType: "application/json",
|
|
364
364
|
requestType: "json",
|
|
365
365
|
body: serializers.empathicVoice.PostedConfigVersion.jsonOrThrow(request, {
|
|
@@ -427,7 +427,7 @@ class Configs {
|
|
|
427
427
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
428
428
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
|
|
429
429
|
method: "DELETE",
|
|
430
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
430
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
431
431
|
contentType: "application/json",
|
|
432
432
|
requestType: "json",
|
|
433
433
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -490,7 +490,7 @@ class Configs {
|
|
|
490
490
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
491
491
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}`),
|
|
492
492
|
method: "PATCH",
|
|
493
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
493
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
494
494
|
contentType: "application/json",
|
|
495
495
|
requestType: "json",
|
|
496
496
|
body: serializers.empathicVoice.PostedConfigName.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -557,7 +557,7 @@ class Configs {
|
|
|
557
557
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
558
558
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
559
559
|
method: "GET",
|
|
560
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
560
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
561
561
|
contentType: "application/json",
|
|
562
562
|
requestType: "json",
|
|
563
563
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -627,7 +627,7 @@ class Configs {
|
|
|
627
627
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
628
628
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
629
629
|
method: "DELETE",
|
|
630
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
630
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
631
631
|
contentType: "application/json",
|
|
632
632
|
requestType: "json",
|
|
633
633
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -695,7 +695,7 @@ class Configs {
|
|
|
695
695
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
696
696
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/configs/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
697
697
|
method: "PATCH",
|
|
698
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
698
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
699
699
|
contentType: "application/json",
|
|
700
700
|
requestType: "json",
|
|
701
701
|
body: serializers.empathicVoice.PostedConfigVersionDescription.jsonOrThrow(request, {
|
|
@@ -22,7 +22,7 @@ export interface ConfigsListConfigsRequest {
|
|
|
22
22
|
*/
|
|
23
23
|
pageSize?: number;
|
|
24
24
|
/**
|
|
25
|
-
* By default, `restrict_to_most_recent` is set to true, returning only the latest version of each
|
|
25
|
+
* By default, `restrict_to_most_recent` is set to true, returning only the latest version of each tool. To include all versions of each tool in the list, set `restrict_to_most_recent` to false.
|
|
26
26
|
*/
|
|
27
27
|
restrictToMostRecent?: boolean;
|
|
28
28
|
/**
|
|
@@ -50,7 +50,7 @@ export declare class CustomVoices {
|
|
|
50
50
|
* await client.empathicVoice.customVoices.createCustomVoice({
|
|
51
51
|
* name: "name",
|
|
52
52
|
* baseVoice: Hume.empathicVoice.PostedCustomVoiceBaseVoice.Ito,
|
|
53
|
-
* parameterModel: "
|
|
53
|
+
* parameterModel: "20241004-11parameter"
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
56
|
createCustomVoice(request: Hume.empathicVoice.PostedCustomVoice, requestOptions?: CustomVoices.RequestOptions): Promise<Hume.empathicVoice.ReturnCustomVoice>;
|
|
@@ -83,7 +83,7 @@ export declare class CustomVoices {
|
|
|
83
83
|
* await client.empathicVoice.customVoices.createCustomVoiceVersion("id", {
|
|
84
84
|
* name: "name",
|
|
85
85
|
* baseVoice: Hume.empathicVoice.PostedCustomVoiceBaseVoice.Ito,
|
|
86
|
-
* parameterModel: "
|
|
86
|
+
* parameterModel: "20241004-11parameter"
|
|
87
87
|
* })
|
|
88
88
|
*/
|
|
89
89
|
createCustomVoiceVersion(id: string, request: Hume.empathicVoice.PostedCustomVoice, requestOptions?: CustomVoices.RequestOptions): Promise<Hume.empathicVoice.ReturnCustomVoice>;
|
|
@@ -111,11 +111,6 @@ export declare class CustomVoices {
|
|
|
111
111
|
* @param {CustomVoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
112
112
|
*
|
|
113
113
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* await client.empathicVoice.customVoices.updateCustomVoiceName("string", {
|
|
117
|
-
* name: "string"
|
|
118
|
-
* })
|
|
119
114
|
*/
|
|
120
115
|
updateCustomVoiceName(id: string, request: Hume.empathicVoice.PostedCustomVoiceName, requestOptions?: CustomVoices.RequestOptions): Promise<string>;
|
|
121
116
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
@@ -79,7 +79,7 @@ class CustomVoices {
|
|
|
79
79
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
80
80
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/custom_voices"),
|
|
81
81
|
method: "GET",
|
|
82
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
82
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
queryParameters: _queryParams,
|
|
85
85
|
requestType: "json",
|
|
@@ -140,7 +140,7 @@ class CustomVoices {
|
|
|
140
140
|
* await client.empathicVoice.customVoices.createCustomVoice({
|
|
141
141
|
* name: "name",
|
|
142
142
|
* baseVoice: Hume.empathicVoice.PostedCustomVoiceBaseVoice.Ito,
|
|
143
|
-
* parameterModel: "
|
|
143
|
+
* parameterModel: "20241004-11parameter"
|
|
144
144
|
* })
|
|
145
145
|
*/
|
|
146
146
|
createCustomVoice(request, requestOptions) {
|
|
@@ -149,7 +149,7 @@ class CustomVoices {
|
|
|
149
149
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
150
150
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/custom_voices"),
|
|
151
151
|
method: "POST",
|
|
152
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
152
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
153
153
|
contentType: "application/json",
|
|
154
154
|
requestType: "json",
|
|
155
155
|
body: serializers.empathicVoice.PostedCustomVoice.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -215,7 +215,7 @@ class CustomVoices {
|
|
|
215
215
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
216
216
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
|
|
217
217
|
method: "GET",
|
|
218
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
218
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
219
219
|
contentType: "application/json",
|
|
220
220
|
requestType: "json",
|
|
221
221
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -276,7 +276,7 @@ class CustomVoices {
|
|
|
276
276
|
* await client.empathicVoice.customVoices.createCustomVoiceVersion("id", {
|
|
277
277
|
* name: "name",
|
|
278
278
|
* baseVoice: Hume.empathicVoice.PostedCustomVoiceBaseVoice.Ito,
|
|
279
|
-
* parameterModel: "
|
|
279
|
+
* parameterModel: "20241004-11parameter"
|
|
280
280
|
* })
|
|
281
281
|
*/
|
|
282
282
|
createCustomVoiceVersion(id, request, requestOptions) {
|
|
@@ -285,7 +285,7 @@ class CustomVoices {
|
|
|
285
285
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
286
286
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
|
|
287
287
|
method: "POST",
|
|
288
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
288
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
289
289
|
contentType: "application/json",
|
|
290
290
|
requestType: "json",
|
|
291
291
|
body: serializers.empathicVoice.PostedCustomVoice.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -351,7 +351,7 @@ class CustomVoices {
|
|
|
351
351
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
352
352
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
|
|
353
353
|
method: "DELETE",
|
|
354
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
354
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
355
355
|
contentType: "application/json",
|
|
356
356
|
requestType: "json",
|
|
357
357
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -402,11 +402,6 @@ class CustomVoices {
|
|
|
402
402
|
* @param {CustomVoices.RequestOptions} requestOptions - Request-specific configuration.
|
|
403
403
|
*
|
|
404
404
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
405
|
-
*
|
|
406
|
-
* @example
|
|
407
|
-
* await client.empathicVoice.customVoices.updateCustomVoiceName("string", {
|
|
408
|
-
* name: "string"
|
|
409
|
-
* })
|
|
410
405
|
*/
|
|
411
406
|
updateCustomVoiceName(id, request, requestOptions) {
|
|
412
407
|
var _a, _b;
|
|
@@ -414,7 +409,7 @@ class CustomVoices {
|
|
|
414
409
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
415
410
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
|
|
416
411
|
method: "PATCH",
|
|
417
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
412
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
418
413
|
contentType: "application/json",
|
|
419
414
|
requestType: "json",
|
|
420
415
|
body: serializers.empathicVoice.PostedCustomVoiceName.jsonOrThrow(request, {
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* name: "string"
|
|
8
|
-
* }
|
|
9
|
-
*/
|
|
10
4
|
export interface PostedCustomVoiceName {
|
|
11
5
|
/** The name of the Custom Voice. Maximum length of 75 characters. Will be converted to all-uppercase. (e.g., "sample voice" becomes "SAMPLE VOICE") */
|
|
12
6
|
name: string;
|
|
@@ -86,7 +86,7 @@ class Prompts {
|
|
|
86
86
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
87
87
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/prompts"),
|
|
88
88
|
method: "GET",
|
|
89
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
89
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
90
90
|
contentType: "application/json",
|
|
91
91
|
queryParameters: _queryParams,
|
|
92
92
|
requestType: "json",
|
|
@@ -166,7 +166,7 @@ class Prompts {
|
|
|
166
166
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
167
167
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/prompts"),
|
|
168
168
|
method: "POST",
|
|
169
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
169
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
170
170
|
contentType: "application/json",
|
|
171
171
|
requestType: "json",
|
|
172
172
|
body: serializers.empathicVoice.PostedPrompt.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -244,7 +244,7 @@ class Prompts {
|
|
|
244
244
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
245
245
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}`),
|
|
246
246
|
method: "GET",
|
|
247
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
247
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
248
248
|
contentType: "application/json",
|
|
249
249
|
queryParameters: _queryParams,
|
|
250
250
|
requestType: "json",
|
|
@@ -314,7 +314,7 @@ class Prompts {
|
|
|
314
314
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
315
315
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}`),
|
|
316
316
|
method: "POST",
|
|
317
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
317
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
318
318
|
contentType: "application/json",
|
|
319
319
|
requestType: "json",
|
|
320
320
|
body: serializers.empathicVoice.PostedPromptVersion.jsonOrThrow(request, {
|
|
@@ -382,7 +382,7 @@ class Prompts {
|
|
|
382
382
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
383
383
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}`),
|
|
384
384
|
method: "DELETE",
|
|
385
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
385
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
386
386
|
contentType: "application/json",
|
|
387
387
|
requestType: "json",
|
|
388
388
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -445,7 +445,7 @@ class Prompts {
|
|
|
445
445
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
446
446
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}`),
|
|
447
447
|
method: "PATCH",
|
|
448
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
448
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
449
449
|
contentType: "application/json",
|
|
450
450
|
requestType: "json",
|
|
451
451
|
body: serializers.empathicVoice.PostedPromptName.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -512,7 +512,7 @@ class Prompts {
|
|
|
512
512
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
513
513
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
514
514
|
method: "GET",
|
|
515
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
515
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
516
516
|
contentType: "application/json",
|
|
517
517
|
requestType: "json",
|
|
518
518
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -582,7 +582,7 @@ class Prompts {
|
|
|
582
582
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
583
583
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
584
584
|
method: "DELETE",
|
|
585
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
585
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
586
586
|
contentType: "application/json",
|
|
587
587
|
requestType: "json",
|
|
588
588
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -650,7 +650,7 @@ class Prompts {
|
|
|
650
650
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
651
651
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/prompts/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
652
652
|
method: "PATCH",
|
|
653
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.
|
|
653
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.9.3", "User-Agent": "hume/0.9.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
654
654
|
contentType: "application/json",
|
|
655
655
|
requestType: "json",
|
|
656
656
|
body: serializers.empathicVoice.PostedPromptVersionDescription.jsonOrThrow(request, {
|
|
@@ -22,11 +22,11 @@ export interface PromptsListPromptsRequest {
|
|
|
22
22
|
*/
|
|
23
23
|
pageSize?: number;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Only include the most recent version of each prompt in the list.
|
|
26
26
|
*/
|
|
27
27
|
restrictToMostRecent?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
* Filter to only include prompts with
|
|
29
|
+
* Filter to only include prompts with name.
|
|
30
30
|
*/
|
|
31
31
|
name?: string;
|
|
32
32
|
}
|