diff --git a/package.json b/package.json index ba55ed6d..196000ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hume", - "version": "0.0.9", + "version": "0.5.0", "private": false, "repository": "https://github.com/HumeAI/hume-typescript-sdk", "main": "./index.js", @@ -17,9 +17,9 @@ "node-fetch": "2.7.0", "qs": "6.11.2", "ws": "^8.14.2", + "@types/ws": "^8.5.9", "uuid": "9.0.1", - "command-exists": "^1.2.9", - "execa": "^5.1.1" + "@types/uuid": "9.0.7" }, "devDependencies": { "@types/url-join": "4.0.1", @@ -30,9 +30,6 @@ "ts-jest": "^29.1.1", "@types/node": "17.0.33", "prettier": "2.7.1", - "typescript": "4.6.4", - "@types/ws": "^8.5.9", - "@types/uuid": "9.0.7", - "@types/command-exists": "^1.2.3" + "typescript": "4.6.4" } } \ No newline at end of file diff --git a/src/Client.ts b/src/Client.ts index c681665b..b55f8c11 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -5,7 +5,6 @@ import * as environments from "./environments"; import * as core from "./core"; import { CustomModels } from "./api/resources/customModels/client/Client"; -import { EmpathicVoice } from "./api/resources/empathicVoice/client/Client"; import { ExpressionMeasurement } from "./api/resources/expressionMeasurement/client/Client"; export declare namespace HumeClient { @@ -31,12 +30,6 @@ export class HumeClient { return (this._customModels ??= new CustomModels(this._options)); } - protected _empathicVoice: EmpathicVoice | undefined; - - public get empathicVoice(): EmpathicVoice { - return (this._empathicVoice ??= new EmpathicVoice(this._options)); - } - protected _expressionMeasurement: ExpressionMeasurement | undefined; public get expressionMeasurement(): ExpressionMeasurement { diff --git a/src/api/resources/customModels/resources/datasets/client/Client.ts b/src/api/resources/customModels/resources/datasets/client/Client.ts index 3fa12b59..a5b84caf 100644 --- a/src/api/resources/customModels/resources/datasets/client/Client.ts +++ b/src/api/resources/customModels/resources/datasets/client/Client.ts @@ -69,7 +69,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -140,7 +140,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -205,7 +205,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -274,7 +274,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -336,7 +336,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -409,7 +409,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -489,7 +489,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -557,7 +557,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -636,7 +636,7 @@ export class Datasets { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/customModels/resources/files/client/Client.ts b/src/api/resources/customModels/resources/files/client/Client.ts index 0ddc3be0..eec238ab 100644 --- a/src/api/resources/customModels/resources/files/client/Client.ts +++ b/src/api/resources/customModels/resources/files/client/Client.ts @@ -65,7 +65,7 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -136,7 +136,7 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -207,7 +207,7 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -272,7 +272,7 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -333,7 +333,7 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -397,7 +397,7 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -459,7 +459,7 @@ export class Files { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/customModels/resources/jobs/client/Client.ts b/src/api/resources/customModels/resources/jobs/client/Client.ts index c242fa78..8d8b0fd2 100644 --- a/src/api/resources/customModels/resources/jobs/client/Client.ts +++ b/src/api/resources/customModels/resources/jobs/client/Client.ts @@ -56,7 +56,7 @@ export class Jobs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -127,7 +127,7 @@ export class Jobs { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/customModels/resources/models/client/Client.ts b/src/api/resources/customModels/resources/models/client/Client.ts index 505de0a7..5799b097 100644 --- a/src/api/resources/customModels/resources/models/client/Client.ts +++ b/src/api/resources/customModels/resources/models/client/Client.ts @@ -49,7 +49,7 @@ export class Models { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -119,7 +119,7 @@ export class Models { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -191,7 +191,7 @@ export class Models { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -257,7 +257,7 @@ export class Models { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -342,7 +342,7 @@ export class Models { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -429,7 +429,7 @@ export class Models { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/empathicVoice/client/Client.ts b/src/api/resources/empathicVoice/client/Client.ts deleted file mode 100644 index 6dd2eef3..00000000 --- a/src/api/resources/empathicVoice/client/Client.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../environments"; -import * as core from "../../../../core"; -import { Prompts } from "../resources/prompts/client/Client"; -import { Configs } from "../resources/configs/client/Client"; -import { Chats } from "../resources/chats/client/Client"; - -export declare namespace EmpathicVoice { - interface Options { - environment?: core.Supplier; - apiKey?: core.Supplier; - accountToken?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - timeoutInSeconds?: number; - maxRetries?: number; - } -} - -export class EmpathicVoice { - constructor(protected readonly _options: EmpathicVoice.Options = {}) {} - - protected _prompts: Prompts | undefined; - - public get prompts(): Prompts { - return (this._prompts ??= new Prompts(this._options)); - } - - protected _configs: Configs | undefined; - - public get configs(): Configs { - return (this._configs ??= new Configs(this._options)); - } - - protected _chats: Chats | undefined; - - public get chats(): Chats { - return (this._chats ??= new Chats(this._options)); - } -} diff --git a/src/api/resources/empathicVoice/client/index.ts b/src/api/resources/empathicVoice/client/index.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/api/resources/empathicVoice/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/api/resources/empathicVoice/index.ts b/src/api/resources/empathicVoice/index.ts index d3c50802..3e15e290 100644 --- a/src/api/resources/empathicVoice/index.ts +++ b/src/api/resources/empathicVoice/index.ts @@ -1,3 +1,2 @@ export * from "./resources"; export * from "./types"; -export * from "./client"; diff --git a/src/api/resources/empathicVoice/resources/chat/types/PublishEvent.ts b/src/api/resources/empathicVoice/resources/chat/types/PublishEvent.ts index 0b0d74da..0811229a 100644 --- a/src/api/resources/empathicVoice/resources/chat/types/PublishEvent.ts +++ b/src/api/resources/empathicVoice/resources/chat/types/PublishEvent.ts @@ -6,6 +6,6 @@ import * as Hume from "../../../../.."; export type PublishEvent = | Hume.empathicVoice.AudioInput - | Hume.empathicVoice.SessionSettings + | Hume.empathicVoice.Configuration | Hume.empathicVoice.TextInput | Hume.empathicVoice.TtsInput; diff --git a/src/api/resources/empathicVoice/resources/chats/client/Client.ts b/src/api/resources/empathicVoice/resources/chats/client/Client.ts deleted file mode 100644 index 5c6b5672..00000000 --- a/src/api/resources/empathicVoice/resources/chats/client/Client.ts +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../../../environments"; -import * as core from "../../../../../../core"; -import * as Hume from "../../../../.."; -import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; - -export declare namespace Chats { - interface Options { - environment?: core.Supplier; - apiKey?: core.Supplier; - accountToken?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - timeoutInSeconds?: number; - maxRetries?: number; - } -} - -export class Chats { - constructor(protected readonly _options: Chats.Options = {}) {} - - public async getReturnChatsForUser( - request: Hume.empathicVoice.GetReturnChatsForUserRequest = {}, - requestOptions?: Chats.RequestOptions - ): Promise { - const { pageNumber, pageSize } = request; - const _queryParams: Record = {}; - if (pageNumber != null) { - _queryParams["page_number"] = pageNumber.toString(); - } - - if (pageSize != null) { - _queryParams["page_size"] = pageSize.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - "chats" - ), - method: "GET", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - queryParameters: _queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPagedChats.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async getChatByChatId( - id: string, - request: Hume.empathicVoice.GetChatByChatIdRequest = {}, - requestOptions?: Chats.RequestOptions - ): Promise { - const { pageSize, pageNumber } = request; - const _queryParams: Record = {}; - if (pageSize != null) { - _queryParams["page_size"] = pageSize.toString(); - } - - if (pageNumber != null) { - _queryParams["page_number"] = pageNumber.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `chats/${id}` - ), - method: "GET", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - queryParameters: _queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnChatWithPagedEvents.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getCustomAuthorizationHeaders() { - const apiKeyValue = await core.Supplier.get(this._options.apiKey); - return { "X-Hume-Api-Key": apiKeyValue }; - } -} diff --git a/src/api/resources/empathicVoice/resources/chats/client/index.ts b/src/api/resources/empathicVoice/resources/chats/client/index.ts deleted file mode 100644 index 415726b7..00000000 --- a/src/api/resources/empathicVoice/resources/chats/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/api/resources/empathicVoice/resources/chats/client/requests/GetChatByChatIdRequest.ts b/src/api/resources/empathicVoice/resources/chats/client/requests/GetChatByChatIdRequest.ts deleted file mode 100644 index 951157ec..00000000 --- a/src/api/resources/empathicVoice/resources/chats/client/requests/GetChatByChatIdRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetChatByChatIdRequest { - /** - * The maximum number of results to include per page. - */ - pageSize?: number; - /** - * The page number of the results to return. - */ - pageNumber?: number; -} diff --git a/src/api/resources/empathicVoice/resources/chats/client/requests/GetReturnChatsForUserRequest.ts b/src/api/resources/empathicVoice/resources/chats/client/requests/GetReturnChatsForUserRequest.ts deleted file mode 100644 index 12fb59bd..00000000 --- a/src/api/resources/empathicVoice/resources/chats/client/requests/GetReturnChatsForUserRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetReturnChatsForUserRequest { - /** - * The page number of the results to return. - */ - pageNumber?: number; - /** - * The maximum number of results to include per page. - */ - pageSize?: number; -} diff --git a/src/api/resources/empathicVoice/resources/chats/client/requests/index.ts b/src/api/resources/empathicVoice/resources/chats/client/requests/index.ts deleted file mode 100644 index 0d39040f..00000000 --- a/src/api/resources/empathicVoice/resources/chats/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { GetReturnChatsForUserRequest } from "./GetReturnChatsForUserRequest"; -export { GetChatByChatIdRequest } from "./GetChatByChatIdRequest"; diff --git a/src/api/resources/empathicVoice/resources/chats/index.ts b/src/api/resources/empathicVoice/resources/chats/index.ts deleted file mode 100644 index 5ec76921..00000000 --- a/src/api/resources/empathicVoice/resources/chats/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/src/api/resources/empathicVoice/resources/configs/client/Client.ts b/src/api/resources/empathicVoice/resources/configs/client/Client.ts deleted file mode 100644 index ba007352..00000000 --- a/src/api/resources/empathicVoice/resources/configs/client/Client.ts +++ /dev/null @@ -1,583 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../../../environments"; -import * as core from "../../../../../../core"; -import * as Hume from "../../../../.."; -import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; - -export declare namespace Configs { - interface Options { - environment?: core.Supplier; - apiKey?: core.Supplier; - accountToken?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - timeoutInSeconds?: number; - maxRetries?: number; - } -} - -export class Configs { - constructor(protected readonly _options: Configs.Options = {}) {} - - public async getReturnConfigsForUser( - request: Hume.empathicVoice.GetReturnConfigsForUserRequest = {}, - requestOptions?: Configs.RequestOptions - ): Promise { - const { pageNumber, pageSize, restrictToMostRecent } = request; - const _queryParams: Record = {}; - if (pageNumber != null) { - _queryParams["page_number"] = pageNumber.toString(); - } - - if (pageSize != null) { - _queryParams["page_size"] = pageSize.toString(); - } - - if (restrictToMostRecent != null) { - _queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - "configs" - ), - method: "GET", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - queryParameters: _queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async createNewConfig( - request: Hume.empathicVoice.PostedConfig, - requestOptions?: Configs.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - "configs" - ), - method: "POST", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - body: await serializers.empathicVoice.PostedConfig.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async getReturnConfigByVersionId( - id: string, - request: Hume.empathicVoice.GetReturnConfigByVersionIdRequest = {}, - requestOptions?: Configs.RequestOptions - ): Promise { - const { pageNumber, pageSize, restrictToMostRecent } = request; - const _queryParams: Record = {}; - if (pageNumber != null) { - _queryParams["page_number"] = pageNumber.toString(); - } - - if (pageSize != null) { - _queryParams["page_size"] = pageSize.toString(); - } - - if (restrictToMostRecent != null) { - _queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `configs/${id}` - ), - method: "GET", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - queryParameters: _queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPagedConfigs.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async addNewConfigVersion( - id: string, - request: Hume.empathicVoice.PostedConfig, - requestOptions?: Configs.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `configs/${id}` - ), - method: "POST", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - body: await serializers.empathicVoice.PostedConfig.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async deleteConfig(id: string, requestOptions?: Configs.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `configs/${id}` - ), - method: "DELETE", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async updateConfigName( - id: string, - request: Hume.empathicVoice.PostedConfigName = {}, - requestOptions?: Configs.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `configs/${id}` - ), - method: "PATCH", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - body: await serializers.empathicVoice.PostedConfigName.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async getReturnPromptByRevisionId( - id: string, - version: number, - requestOptions?: Configs.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `configs/${id}/version/${version}` - ), - method: "GET", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async deleteConfigVersion( - id: string, - version: number, - requestOptions?: Configs.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `configs/${id}/version/${version}` - ), - method: "DELETE", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async updateConfigVersionDescription( - id: string, - version: number, - request: Hume.empathicVoice.PostedConfigVersionDescription = {}, - requestOptions?: Configs.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `configs/${id}/version/${version}` - ), - method: "PATCH", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - body: await serializers.empathicVoice.PostedConfigVersionDescription.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnConfig.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getCustomAuthorizationHeaders() { - const apiKeyValue = await core.Supplier.get(this._options.apiKey); - return { "X-Hume-Api-Key": apiKeyValue }; - } -} diff --git a/src/api/resources/empathicVoice/resources/configs/client/index.ts b/src/api/resources/empathicVoice/resources/configs/client/index.ts deleted file mode 100644 index 415726b7..00000000 --- a/src/api/resources/empathicVoice/resources/configs/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/GetReturnConfigByVersionIdRequest.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/GetReturnConfigByVersionIdRequest.ts deleted file mode 100644 index 7ba6d39c..00000000 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/GetReturnConfigByVersionIdRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetReturnConfigByVersionIdRequest { - /** - * The page number of the results to return. - */ - pageNumber?: number; - /** - * The maximum number of results to include per page. - */ - pageSize?: number; - /** - * Only include the most recent version of each config in the list. - */ - restrictToMostRecent?: boolean; -} diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/GetReturnConfigsForUserRequest.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/GetReturnConfigsForUserRequest.ts deleted file mode 100644 index f23be851..00000000 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/GetReturnConfigsForUserRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetReturnConfigsForUserRequest { - /** - * The page number of the results to return. - */ - pageNumber?: number; - /** - * The maximum number of results to include per page. - */ - pageSize?: number; - /** - * Only include the most recent version of each config in the list. - */ - restrictToMostRecent?: boolean; -} diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.ts deleted file mode 100644 index dbaa6ec4..00000000 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface PostedConfigName { - /** Name applied to all versions of a particular Config. */ - name?: string; -} diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts deleted file mode 100644 index f65758cf..00000000 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface PostedConfigVersionDescription { - /** Description that is appended to a specific version of a Config. */ - versionDescription?: string; -} diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/index.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/index.ts deleted file mode 100644 index 763fb644..00000000 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { GetReturnConfigsForUserRequest } from "./GetReturnConfigsForUserRequest"; -export { GetReturnConfigByVersionIdRequest } from "./GetReturnConfigByVersionIdRequest"; -export { PostedConfigName } from "./PostedConfigName"; -export { PostedConfigVersionDescription } from "./PostedConfigVersionDescription"; diff --git a/src/api/resources/empathicVoice/resources/configs/index.ts b/src/api/resources/empathicVoice/resources/configs/index.ts deleted file mode 100644 index 5ec76921..00000000 --- a/src/api/resources/empathicVoice/resources/configs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/src/api/resources/empathicVoice/resources/index.ts b/src/api/resources/empathicVoice/resources/index.ts index 22f1d115..8bd1e644 100644 --- a/src/api/resources/empathicVoice/resources/index.ts +++ b/src/api/resources/empathicVoice/resources/index.ts @@ -1,8 +1,2 @@ export * as chat from "./chat"; export * from "./chat/types"; -export * as prompts from "./prompts"; -export * as configs from "./configs"; -export * as chats from "./chats"; -export * from "./prompts/client/requests"; -export * from "./configs/client/requests"; -export * from "./chats/client/requests"; diff --git a/src/api/resources/empathicVoice/resources/prompts/client/Client.ts b/src/api/resources/empathicVoice/resources/prompts/client/Client.ts deleted file mode 100644 index 34b37233..00000000 --- a/src/api/resources/empathicVoice/resources/prompts/client/Client.ts +++ /dev/null @@ -1,583 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../../../environments"; -import * as core from "../../../../../../core"; -import * as Hume from "../../../../.."; -import urlJoin from "url-join"; -import * as serializers from "../../../../../../serialization"; -import * as errors from "../../../../../../errors"; - -export declare namespace Prompts { - interface Options { - environment?: core.Supplier; - apiKey?: core.Supplier; - accountToken?: core.Supplier; - fetcher?: core.FetchFunction; - } - - interface RequestOptions { - timeoutInSeconds?: number; - maxRetries?: number; - } -} - -export class Prompts { - constructor(protected readonly _options: Prompts.Options = {}) {} - - public async getReturnPromptsForUser( - request: Hume.empathicVoice.GetReturnPromptsForUserRequest = {}, - requestOptions?: Prompts.RequestOptions - ): Promise { - const { pageNumber, pageSize, restrictToMostRecent } = request; - const _queryParams: Record = {}; - if (pageNumber != null) { - _queryParams["page_number"] = pageNumber.toString(); - } - - if (pageSize != null) { - _queryParams["page_size"] = pageSize.toString(); - } - - if (restrictToMostRecent != null) { - _queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - "prompts" - ), - method: "GET", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - queryParameters: _queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPagedPrompts.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async createNewPrompt( - request: Hume.empathicVoice.PostedPrompt, - requestOptions?: Prompts.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - "prompts" - ), - method: "POST", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - body: await serializers.empathicVoice.PostedPrompt.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPrompt.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async getReturnPromptByPromptId( - id: string, - request: Hume.empathicVoice.GetReturnPromptByPromptIdRequest = {}, - requestOptions?: Prompts.RequestOptions - ): Promise { - const { pageNumber, pageSize, restrictToMostRecent } = request; - const _queryParams: Record = {}; - if (pageNumber != null) { - _queryParams["page_number"] = pageNumber.toString(); - } - - if (pageSize != null) { - _queryParams["page_size"] = pageSize.toString(); - } - - if (restrictToMostRecent != null) { - _queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString(); - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `prompts/${id}` - ), - method: "GET", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - queryParameters: _queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPagedPrompts.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async addNewPromptVersion( - id: string, - request: Hume.empathicVoice.PostedPrompt, - requestOptions?: Prompts.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `prompts/${id}` - ), - method: "POST", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - body: await serializers.empathicVoice.PostedPrompt.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPrompt.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async deletePromptVersion(id: string, requestOptions?: Prompts.RequestOptions): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `prompts/${id}` - ), - method: "DELETE", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async updatePromptName( - id: string, - request: Hume.empathicVoice.PostedPromptName = {}, - requestOptions?: Prompts.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `prompts/${id}` - ), - method: "PATCH", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - body: await serializers.empathicVoice.PostedPromptName.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async getReturnPromptByVersionNumber( - id: string, - version: number, - requestOptions?: Prompts.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `prompts/${id}/version/${version}` - ), - method: "GET", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPrompt.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async deletePromptVersion1( - id: string, - version: number, - requestOptions?: Prompts.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `prompts/${id}/version/${version}` - ), - method: "DELETE", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return; - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - public async updatePromptVersionDescription( - id: string, - version: number, - request: Hume.empathicVoice.PostedPromptVersionDescription = {}, - requestOptions?: Prompts.RequestOptions - ): Promise { - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Production, - `prompts/${id}/version/${version}` - ), - method: "PATCH", - headers: { - "X-Account-Token": - (await core.Supplier.get(this._options.accountToken)) != null - ? await core.Supplier.get(this._options.accountToken) - : undefined, - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...(await this._getCustomAuthorizationHeaders()), - }, - contentType: "application/json", - body: await serializers.empathicVoice.PostedPromptVersionDescription.jsonOrThrow(request, { - unrecognizedObjectKeys: "strip", - }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - }); - if (_response.ok) { - return await serializers.empathicVoice.ReturnPrompt.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.HumeError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.HumeTimeoutError(); - case "unknown": - throw new errors.HumeError({ - message: _response.error.errorMessage, - }); - } - } - - protected async _getCustomAuthorizationHeaders() { - const apiKeyValue = await core.Supplier.get(this._options.apiKey); - return { "X-Hume-Api-Key": apiKeyValue }; - } -} diff --git a/src/api/resources/empathicVoice/resources/prompts/client/index.ts b/src/api/resources/empathicVoice/resources/prompts/client/index.ts deleted file mode 100644 index 415726b7..00000000 --- a/src/api/resources/empathicVoice/resources/prompts/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/GetReturnPromptByPromptIdRequest.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/GetReturnPromptByPromptIdRequest.ts deleted file mode 100644 index e33d2dd8..00000000 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/GetReturnPromptByPromptIdRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetReturnPromptByPromptIdRequest { - /** - * The page number of the results to return. - */ - pageNumber?: number; - /** - * The maximum number of results to include per page. - */ - pageSize?: number; - /** - * Only include the most recent version of each prompt in the list. - */ - restrictToMostRecent?: boolean; -} diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/GetReturnPromptsForUserRequest.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/GetReturnPromptsForUserRequest.ts deleted file mode 100644 index 6bbca231..00000000 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/GetReturnPromptsForUserRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetReturnPromptsForUserRequest { - /** - * The page number of the results to return. - */ - pageNumber?: number; - /** - * The maximum number of results to include per page. - */ - pageSize?: number; - /** - * Only include the most recent version of each prompt in the list. - */ - restrictToMostRecent?: boolean; -} diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.ts deleted file mode 100644 index 68938da4..00000000 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface PostedPromptName { - /** Name applied to all versions of a particular Prompt. */ - name?: string; -} diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts deleted file mode 100644 index f4df5387..00000000 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface PostedPromptVersionDescription { - /** Description that is appended to a specific version of a Prompt. */ - versionDescription?: string; -} diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/index.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/index.ts deleted file mode 100644 index a31155c5..00000000 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { GetReturnPromptsForUserRequest } from "./GetReturnPromptsForUserRequest"; -export { GetReturnPromptByPromptIdRequest } from "./GetReturnPromptByPromptIdRequest"; -export { PostedPromptName } from "./PostedPromptName"; -export { PostedPromptVersionDescription } from "./PostedPromptVersionDescription"; diff --git a/src/api/resources/empathicVoice/resources/prompts/index.ts b/src/api/resources/empathicVoice/resources/prompts/index.ts deleted file mode 100644 index 5ec76921..00000000 --- a/src/api/resources/empathicVoice/resources/prompts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/src/api/resources/empathicVoice/types/AssistantEnd.ts b/src/api/resources/empathicVoice/types/AssistantEnd.ts index 10d4ad8b..0bb3a34a 100644 --- a/src/api/resources/empathicVoice/types/AssistantEnd.ts +++ b/src/api/resources/empathicVoice/types/AssistantEnd.ts @@ -3,5 +3,5 @@ */ export interface AssistantEnd { - type: "assistant_end"; + type?: "assistant_end"; } diff --git a/src/api/resources/empathicVoice/types/AssistantMessage.ts b/src/api/resources/empathicVoice/types/AssistantMessage.ts index 5d7b4268..4eeacc5a 100644 --- a/src/api/resources/empathicVoice/types/AssistantMessage.ts +++ b/src/api/resources/empathicVoice/types/AssistantMessage.ts @@ -5,13 +5,11 @@ import * as Hume from "../../.."; export interface AssistantMessage { - /** Indicates if this message was constructed from a TtsInput message. */ - fromTts: boolean; /** ID of the assistant message. */ id?: string; /** Transcript of the message. */ message: Hume.empathicVoice.ChatMessage; /** Inference model results. */ models: Hume.empathicVoice.Inference; - type: "assistant_message"; + type?: "assistant_message"; } diff --git a/src/api/resources/empathicVoice/types/AudioConfiguration.ts b/src/api/resources/empathicVoice/types/AudioConfiguration.ts deleted file mode 100644 index 3ed893d6..00000000 --- a/src/api/resources/empathicVoice/types/AudioConfiguration.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -export interface AudioConfiguration { - /** Number of channels. */ - channels: number; - /** Audio encoding. */ - encoding: Hume.empathicVoice.Encoding; - /** Audio sample rate. */ - sampleRate: number; -} diff --git a/src/api/resources/empathicVoice/types/AudioInput.ts b/src/api/resources/empathicVoice/types/AudioInput.ts index b482aa6f..03827612 100644 --- a/src/api/resources/empathicVoice/types/AudioInput.ts +++ b/src/api/resources/empathicVoice/types/AudioInput.ts @@ -3,7 +3,7 @@ */ export interface AudioInput { - /** Base64 encoded audio input. */ + /** Base64 encoded Linear16 PCM input. */ data: string; - type: "audio_input"; + type?: "audio_input"; } diff --git a/src/api/resources/empathicVoice/types/AudioOutput.ts b/src/api/resources/empathicVoice/types/AudioOutput.ts index 23ca12c7..3a0aaf48 100644 --- a/src/api/resources/empathicVoice/types/AudioOutput.ts +++ b/src/api/resources/empathicVoice/types/AudioOutput.ts @@ -7,5 +7,5 @@ export interface AudioOutput { data: string; /** ID of the audio output. */ id: string; - type: "audio_output"; + type?: "audio_output"; } diff --git a/src/api/resources/empathicVoice/types/ChatMessage.ts b/src/api/resources/empathicVoice/types/ChatMessage.ts index b788a414..afb4bf67 100644 --- a/src/api/resources/empathicVoice/types/ChatMessage.ts +++ b/src/api/resources/empathicVoice/types/ChatMessage.ts @@ -5,7 +5,8 @@ import * as Hume from "../../.."; export interface ChatMessage { - content?: string; + /** Transcript of the message. */ + content: string; /** Role of who is providing the message. */ role: Hume.empathicVoice.Role; } diff --git a/src/api/resources/empathicVoice/types/Configuration.ts b/src/api/resources/empathicVoice/types/Configuration.ts new file mode 100644 index 00000000..e4ef3dd1 --- /dev/null +++ b/src/api/resources/empathicVoice/types/Configuration.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface Configuration { + systemPrompt?: string; + type?: unknown; +} diff --git a/src/api/resources/empathicVoice/types/Error_.ts b/src/api/resources/empathicVoice/types/Error_.ts index 873125be..7b52bbae 100644 --- a/src/api/resources/empathicVoice/types/Error_.ts +++ b/src/api/resources/empathicVoice/types/Error_.ts @@ -9,5 +9,5 @@ export interface Error_ { message: string; /** Error slug. */ slug: string; - type: "error"; + type?: unknown; } diff --git a/src/api/resources/empathicVoice/types/FunctionCallResponseInput.ts b/src/api/resources/empathicVoice/types/FunctionCallResponseInput.ts deleted file mode 100644 index 7c666d09..00000000 --- a/src/api/resources/empathicVoice/types/FunctionCallResponseInput.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface FunctionCallResponseInput { - type?: "function_call_response"; -} diff --git a/src/api/resources/empathicVoice/types/PostedConfig.ts b/src/api/resources/empathicVoice/types/PostedConfig.ts deleted file mode 100644 index ea95bb7a..00000000 --- a/src/api/resources/empathicVoice/types/PostedConfig.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A configuration to be posted to the server - */ -export interface PostedConfig { - /** Name applied to all versions of a particular Config. */ - name?: string; - /** Description that is appended to a specific version of a Config. */ - versionDescription?: string; - prompt?: Hume.empathicVoice.PostedPromptSpec; - languageModel?: Hume.empathicVoice.PostedLanguageModel; -} diff --git a/src/api/resources/empathicVoice/types/PostedLanguageModel.ts b/src/api/resources/empathicVoice/types/PostedLanguageModel.ts deleted file mode 100644 index ce692a7c..00000000 --- a/src/api/resources/empathicVoice/types/PostedLanguageModel.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A LanguageModel to be posted to the server - */ -export interface PostedLanguageModel { - /** The provider of this model. Based on the enum modelProvider. */ - modelProvider?: Hume.empathicVoice.PostedLanguageModelModelProvider; - /** String that specifies the model to use with modelProvider. */ - modelResource?: string; - /** Model temperature. */ - temperature?: number; -} diff --git a/src/api/resources/empathicVoice/types/PostedLanguageModelModelProvider.ts b/src/api/resources/empathicVoice/types/PostedLanguageModelModelProvider.ts deleted file mode 100644 index 76d85874..00000000 --- a/src/api/resources/empathicVoice/types/PostedLanguageModelModelProvider.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * The provider of this model. Based on the enum modelProvider. - */ -export type PostedLanguageModelModelProvider = "OPEN_AI" | "BYO_TEXT" | "ANTHROPIC" | "FIREWORKS"; - -export const PostedLanguageModelModelProvider = { - OpenAi: "OPEN_AI", - ByoText: "BYO_TEXT", - Anthropic: "ANTHROPIC", - Fireworks: "FIREWORKS", -} as const; diff --git a/src/api/resources/empathicVoice/types/PostedPrompt.ts b/src/api/resources/empathicVoice/types/PostedPrompt.ts deleted file mode 100644 index ddd6c96f..00000000 --- a/src/api/resources/empathicVoice/types/PostedPrompt.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A prompt to be posted to the server - */ -export interface PostedPrompt { - /** Name applied to all versions of a particular Prompt. */ - name?: string; - /** Description that is appended to a specific version of a Prompt. */ - versionDescription?: string; - /** Text used for this version of the Prompt. */ - text?: string; -} diff --git a/src/api/resources/empathicVoice/types/PostedPromptSpec.ts b/src/api/resources/empathicVoice/types/PostedPromptSpec.ts deleted file mode 100644 index 322cc8cc..00000000 --- a/src/api/resources/empathicVoice/types/PostedPromptSpec.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A specific prompt identifier to be posted to the server - */ -export interface PostedPromptSpec { - /** Identifier for a Prompt. Formatted as a UUID. */ - id?: string; - /** Version number for a Prompt. Version numbers should be integers. The combination of configId and version number is unique. */ - version?: number; -} diff --git a/src/api/resources/empathicVoice/types/PostedTool.ts b/src/api/resources/empathicVoice/types/PostedTool.ts deleted file mode 100644 index 215dfa7f..00000000 --- a/src/api/resources/empathicVoice/types/PostedTool.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A tool to be posted to the server - */ -export interface PostedTool { - /** Name applied to all versions of a particular Tool. */ - name?: string; - /** Description that is appended to a specific version of a Tool. */ - versionDescription?: string; - /** Text describing what the tool does. */ - docstring?: string; - /** Stringified JSON defining the schema for this version of the Tool. */ - schema?: string; -} diff --git a/src/api/resources/empathicVoice/types/PostedToolName.ts b/src/api/resources/empathicVoice/types/PostedToolName.ts deleted file mode 100644 index 323341e7..00000000 --- a/src/api/resources/empathicVoice/types/PostedToolName.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A tool name change to be posted to the server - */ -export interface PostedToolName { - /** Name applied to all versions of a particular Tool. */ - name?: string; -} diff --git a/src/api/resources/empathicVoice/types/PostedToolSpec.ts b/src/api/resources/empathicVoice/types/PostedToolSpec.ts deleted file mode 100644 index 7cce818c..00000000 --- a/src/api/resources/empathicVoice/types/PostedToolSpec.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A specific tool identifier to be posted to the server - */ -export interface PostedToolSpec { - /** Identifier for a Tool. Formatted as a UUID. */ - id?: string; - /** Version number for a Tool. Version numbers should be integers. The combination of configId and version number is unique. */ - version?: number; -} diff --git a/src/api/resources/empathicVoice/types/PostedToolVersionDescription.ts b/src/api/resources/empathicVoice/types/PostedToolVersionDescription.ts deleted file mode 100644 index fbe57c54..00000000 --- a/src/api/resources/empathicVoice/types/PostedToolVersionDescription.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A tool version description to be posted to the server - */ -export interface PostedToolVersionDescription { - /** Description that is appended to a specific version of a Tool. */ - versionDescription?: string; -} diff --git a/src/api/resources/empathicVoice/types/ReturnActiveChatCount.ts b/src/api/resources/empathicVoice/types/ReturnActiveChatCount.ts deleted file mode 100644 index e969f7f0..00000000 --- a/src/api/resources/empathicVoice/types/ReturnActiveChatCount.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A description of current chat chat sessions for a user - */ -export interface ReturnActiveChatCount { - /** The timestamp for when chat status was measured. Formatted as a Unix epoch milliseconds. */ - timestamp?: number; - /** The total number of active chats for this user. */ - totalUserActiveChats?: number; - /** The maximum number of concurrent active chats for this user. */ - maxAllowedActiveChats?: number; - /** Boolean indicating if the user is allowed to start more chats. */ - moreActiveChatsAllowed?: boolean; - /** Optional List of chat counts per tag. */ - perTag?: Hume.empathicVoice.ReturnActiveChatCountPerTag[]; -} diff --git a/src/api/resources/empathicVoice/types/ReturnActiveChatCountPerTag.ts b/src/api/resources/empathicVoice/types/ReturnActiveChatCountPerTag.ts deleted file mode 100644 index 28e2bcd7..00000000 --- a/src/api/resources/empathicVoice/types/ReturnActiveChatCountPerTag.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A description of current chat chat sessions per tag - */ -export interface ReturnActiveChatCountPerTag { - /** User tag applied to a chat. */ - tag?: string; - /** The total number of active chats for this user with the specified tag. */ - totalTagActiveChats?: number; -} diff --git a/src/api/resources/empathicVoice/types/ReturnChat.ts b/src/api/resources/empathicVoice/types/ReturnChat.ts deleted file mode 100644 index 068dc214..00000000 --- a/src/api/resources/empathicVoice/types/ReturnChat.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A description of chat and its status - */ -export interface ReturnChat { - /** Identifier for a chat. Formatted as a UUID. */ - id?: string; - /** Optional Identifier for the chatId that this chat was resumed from. Formatted as a UUID. */ - resumedFromId?: string; - /** Optional tag applied to this chat used to group chats by user, application, etc. */ - tag?: string; - /** The status of the chat. Values from the ChatStatus enum. */ - status?: string; - /** The timestamp when the chat started, formatted as a Unix epoch milliseconds. */ - startTimestamp?: number; - /** The timestamp when the chat ended, formatted as a Unix epoch milliseconds. */ - endTimestamp?: number; - /** Stringified JSON with additional metadata about the chat. */ - metadata?: string; - config?: Hume.empathicVoice.ReturnConfigSpec; -} diff --git a/src/api/resources/empathicVoice/types/ReturnChatEvent.ts b/src/api/resources/empathicVoice/types/ReturnChatEvent.ts deleted file mode 100644 index 9a497946..00000000 --- a/src/api/resources/empathicVoice/types/ReturnChatEvent.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A description of a single event in a chat returned from the server - */ -export interface ReturnChatEvent { - /** Identifier for a chat event. Formatted as a UUID. */ - id?: string; - /** The timestamp when the chat event occurred, formatted as a Unix epoch milliseconds. */ - timestamp?: number; - /** The role of the user who generated the chat event. Values from the Role enum. */ - role?: string; - /** The type of chat event. Values from the ChatEventType enum. */ - type?: string; - /** The text of the chat message, either transcribed from speaker audio or generated by the agent. */ - messageText?: string; - /** Stringified JSON with data about emotional content/prosody of the event. */ - emotionFeatures?: string; - /** Stringified JSON with additional metadata about the chat event. */ - metadata?: string; -} diff --git a/src/api/resources/empathicVoice/types/ReturnChatWithPagedEvents.ts b/src/api/resources/empathicVoice/types/ReturnChatWithPagedEvents.ts deleted file mode 100644 index 94257b5c..00000000 --- a/src/api/resources/empathicVoice/types/ReturnChatWithPagedEvents.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A description of chat status with a paginated list of chat events returned from the server - */ -export interface ReturnChatWithPagedEvents { - /** Identifier for a chat. Formatted as a UUID. */ - id?: string; - /** Optional Identifier for the chatId that this chat was resumed from. Formatted as a UUID. */ - resumedFromId?: string; - /** Optional tag applied to this chat used to group chats by user, application, etc. */ - tag?: string; - /** The status of the chat. Values from the ChatStatus enum. */ - status?: string; - /** The timestamp when the chat started, formatted as a Unix epoch milliseconds. */ - startTimestamp?: number; - /** The timestamp when the chat ended, formatted as a Unix epoch milliseconds. */ - endTimestamp?: number; - /** List of chat events with the specified page number and page size. */ - eventsPage?: Hume.empathicVoice.ReturnChatEvent[]; - /** Stringified JSON with additional metadata about the chat. */ - metadata?: string; - /** The page number of the returned results. */ - pageNumber?: number; - /** The number of results returned per page. */ - pageSize?: number; - config?: Hume.empathicVoice.ReturnConfigSpec; -} diff --git a/src/api/resources/empathicVoice/types/ReturnConfig.ts b/src/api/resources/empathicVoice/types/ReturnConfig.ts deleted file mode 100644 index 5f7342da..00000000 --- a/src/api/resources/empathicVoice/types/ReturnConfig.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A specific config version returned from the server - */ -export interface ReturnConfig { - /** Identifier for a Config. Formatted as a UUID. */ - id?: string; - /** Version number for a Config. Version numbers should be integers. The combination of configId and version number is unique. */ - version?: number; - /** Description that is appended to a specific version of a Config. */ - versionDescription?: string; - /** Name applied to all versions of a particular Config. */ - name?: string; - /** The timestamp when the first version of this config was created. */ - createdOn?: number; - /** The timestamp when this version of the config was created. */ - modifiedOn?: number; - prompt?: Hume.empathicVoice.ReturnPrompt; - languageModel?: Hume.empathicVoice.ReturnLanguageModel; -} diff --git a/src/api/resources/empathicVoice/types/ReturnConfigSpec.ts b/src/api/resources/empathicVoice/types/ReturnConfigSpec.ts deleted file mode 100644 index 1a325955..00000000 --- a/src/api/resources/empathicVoice/types/ReturnConfigSpec.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * An id/version number for a specific config version - */ -export interface ReturnConfigSpec { - /** Identifier for a Config. Formatted as a UUID. */ - id?: string; - /** Version number for a Config. Version numbers should be integers. The combination of configId and version number is unique. */ - version?: number; -} diff --git a/src/api/resources/empathicVoice/types/ReturnLanguageModel.ts b/src/api/resources/empathicVoice/types/ReturnLanguageModel.ts deleted file mode 100644 index f1df2998..00000000 --- a/src/api/resources/empathicVoice/types/ReturnLanguageModel.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A specific LanguageModel - */ -export interface ReturnLanguageModel { - /** The provider of this model. Based on the enum modelProvider. */ - modelProvider?: string; - /** String that specifies the model to use with modelProvider. */ - modelResource?: string; - /** Model temperature. */ - temperature?: number; -} diff --git a/src/api/resources/empathicVoice/types/ReturnPagedChats.ts b/src/api/resources/empathicVoice/types/ReturnPagedChats.ts deleted file mode 100644 index 358620c6..00000000 --- a/src/api/resources/empathicVoice/types/ReturnPagedChats.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A paginated list of chats returned from the server - */ -export interface ReturnPagedChats { - /** The page number of the returned results. */ - pageNumber?: number; - /** The number of results returned per page. */ - pageSize?: number; - /** List of chats and their metadata returned for the specified page number and page size. */ - chatsPage?: Hume.empathicVoice.ReturnChat[]; -} diff --git a/src/api/resources/empathicVoice/types/ReturnPagedConfigs.ts b/src/api/resources/empathicVoice/types/ReturnPagedConfigs.ts deleted file mode 100644 index 36a49336..00000000 --- a/src/api/resources/empathicVoice/types/ReturnPagedConfigs.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A paginated list of config versions returned from the server - */ -export interface ReturnPagedConfigs { - /** The page number of the returned results. */ - pageNumber?: number; - /** The number of results returned per page. */ - pageSize?: number; - /** List of prompts returned for the specified page number and page size. */ - configsPage?: Hume.empathicVoice.ReturnConfig[]; -} diff --git a/src/api/resources/empathicVoice/types/ReturnPagedPrompts.ts b/src/api/resources/empathicVoice/types/ReturnPagedPrompts.ts deleted file mode 100644 index 240d248d..00000000 --- a/src/api/resources/empathicVoice/types/ReturnPagedPrompts.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -/** - * A paginated list of prompt versions returned from the server - */ -export interface ReturnPagedPrompts { - /** The page number of the returned results. */ - pageNumber?: number; - /** The number of results returned per page. */ - pageSize?: number; - /** List of prompts returned for the specified page number and page size. */ - promptsPage?: Hume.empathicVoice.ReturnPrompt[]; -} diff --git a/src/api/resources/empathicVoice/types/ReturnPrompt.ts b/src/api/resources/empathicVoice/types/ReturnPrompt.ts deleted file mode 100644 index 76aebb7d..00000000 --- a/src/api/resources/empathicVoice/types/ReturnPrompt.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A specific prompt version returned from the server - */ -export interface ReturnPrompt { - /** Identifier for a Prompt. Formatted as a UUID. */ - id?: string; - /** Version number for a Prompt. Version numbers should be integers. The combination of configId and version number is unique. */ - version?: number; - /** Description that is appended to a specific version of a Prompt. */ - versionDescription?: string; - /** Name applied to all versions of a particular Prompt. */ - name?: string; - /** The timestamp when the first version of this prompt was created. */ - createdOn?: number; - /** The timestamp when this version of the prompt was created. */ - modifiedOn?: number; - /** Text used for this version of the Prompt. */ - text?: string; -} diff --git a/src/api/resources/empathicVoice/types/ReturnTool.ts b/src/api/resources/empathicVoice/types/ReturnTool.ts deleted file mode 100644 index 24b1906a..00000000 --- a/src/api/resources/empathicVoice/types/ReturnTool.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * A specific tool version returned from the server - */ -export interface ReturnTool { - /** Identifier for a Tool. Formatted as a UUID. */ - id?: string; - /** Version number for a Tool. Version numbers should be integers. The combination of configId and version number is unique. */ - version?: number; - /** Description that is appended to a specific version of a Tool. */ - versionDescription?: string; - /** Name applied to all versions of a particular Tool. */ - name?: string; - /** The timestamp when the first version of this tool was created. */ - createdOn?: number; - /** The timestamp when this version of the tool was created. */ - modifiedOn?: number; - /** Text describing what the tool does. */ - docstring?: string; - /** Stringified JSON defining the schema for this version of the Tool. */ - schema?: string; -} diff --git a/src/api/resources/empathicVoice/types/Role.ts b/src/api/resources/empathicVoice/types/Role.ts index ffbd54ad..e57e6499 100644 --- a/src/api/resources/empathicVoice/types/Role.ts +++ b/src/api/resources/empathicVoice/types/Role.ts @@ -2,11 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ -export type Role = "assistant" | "system" | "user" | "all"; +export type Role = "assistant" | "system" | "user"; export const Role = { Assistant: "assistant", System: "system", User: "user", - All: "all", } as const; diff --git a/src/api/resources/empathicVoice/types/SessionSettings.ts b/src/api/resources/empathicVoice/types/SessionSettings.ts deleted file mode 100644 index 97bbcedf..00000000 --- a/src/api/resources/empathicVoice/types/SessionSettings.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Hume from "../../.."; - -export interface SessionSettings { - audio?: Hume.empathicVoice.AudioConfiguration; - languageModelApiKey?: string; - type?: "session_settings"; -} diff --git a/src/api/resources/empathicVoice/types/TextInput.ts b/src/api/resources/empathicVoice/types/TextInput.ts index c5d5e995..7236928b 100644 --- a/src/api/resources/empathicVoice/types/TextInput.ts +++ b/src/api/resources/empathicVoice/types/TextInput.ts @@ -5,5 +5,5 @@ export interface TextInput { /** Text to insert into the conversation. */ text: string; - type: "user_input"; + type?: "text"; } diff --git a/src/api/resources/empathicVoice/types/TtsInput.ts b/src/api/resources/empathicVoice/types/TtsInput.ts index d1e7a900..8e33c3a7 100644 --- a/src/api/resources/empathicVoice/types/TtsInput.ts +++ b/src/api/resources/empathicVoice/types/TtsInput.ts @@ -3,7 +3,11 @@ */ export interface TtsInput { + /** Sample ID for the TTS system. */ + sampleId?: number; + /** Speaker for the TTS system. */ + speaker?: string; /** Text to be synthesized. */ text: string; - type: "assistant_input"; + type?: "tts"; } diff --git a/src/api/resources/empathicVoice/types/UserInterruption.ts b/src/api/resources/empathicVoice/types/UserInterruption.ts index 2d7266c1..a702f1fc 100644 --- a/src/api/resources/empathicVoice/types/UserInterruption.ts +++ b/src/api/resources/empathicVoice/types/UserInterruption.ts @@ -4,5 +4,5 @@ export interface UserInterruption { time: number; - type: "user_interruption"; + type?: unknown; } diff --git a/src/api/resources/empathicVoice/types/UserMessage.ts b/src/api/resources/empathicVoice/types/UserMessage.ts index 48785d3e..3c37d919 100644 --- a/src/api/resources/empathicVoice/types/UserMessage.ts +++ b/src/api/resources/empathicVoice/types/UserMessage.ts @@ -5,15 +5,11 @@ import * as Hume from "../../.."; export interface UserMessage { - /** Indicates if this message was constructed from a text input message. */ - fromText: boolean; /** Transcript of the message. */ message: Hume.empathicVoice.ChatMessage; /** Inference model results. */ models: Hume.empathicVoice.Inference; - /** Segments of the user message. */ - serializedSegments: Record[]; /** Start and End time of user message. */ time: Hume.empathicVoice.MillisecondInterval; - type: "user_message"; + type?: unknown; } diff --git a/src/api/resources/empathicVoice/types/index.ts b/src/api/resources/empathicVoice/types/index.ts index 19a1f6ce..1243efb6 100644 --- a/src/api/resources/empathicVoice/types/index.ts +++ b/src/api/resources/empathicVoice/types/index.ts @@ -1,31 +1,9 @@ -export * from "./PostedTool"; -export * from "./ReturnTool"; -export * from "./PostedPrompt"; -export * from "./ReturnPrompt"; -export * from "./PostedConfig"; -export * from "./PostedLanguageModelModelProvider"; -export * from "./PostedLanguageModel"; -export * from "./PostedPromptSpec"; -export * from "./PostedToolSpec"; -export * from "./ReturnConfig"; -export * from "./ReturnLanguageModel"; -export * from "./PostedToolName"; -export * from "./PostedToolVersionDescription"; -export * from "./ReturnPagedPrompts"; -export * from "./ReturnPagedConfigs"; -export * from "./ReturnChat"; -export * from "./ReturnConfigSpec"; -export * from "./ReturnPagedChats"; -export * from "./ReturnChatEvent"; -export * from "./ReturnChatWithPagedEvents"; -export * from "./ReturnActiveChatCount"; -export * from "./ReturnActiveChatCountPerTag"; export * from "./AssistantEnd"; export * from "./AssistantMessage"; -export * from "./AudioConfiguration"; export * from "./AudioInput"; export * from "./AudioOutput"; export * from "./ChatMessage"; +export * from "./Configuration"; export * from "./EmotionScores"; export * from "./Encoding"; export * from "./Error_"; @@ -33,9 +11,7 @@ export * from "./Inference"; export * from "./MillisecondInterval"; export * from "./ProsodyInference"; export * from "./Role"; -export * from "./SessionSettings"; export * from "./TextInput"; export * from "./TtsInput"; export * from "./UserInterruption"; export * from "./UserMessage"; -export * from "./FunctionCallResponseInput"; diff --git a/src/api/resources/expressionMeasurement/resources/batch/client/Client.ts b/src/api/resources/expressionMeasurement/resources/batch/client/Client.ts index ae62dd52..ebaf3eaa 100644 --- a/src/api/resources/expressionMeasurement/resources/batch/client/Client.ts +++ b/src/api/resources/expressionMeasurement/resources/batch/client/Client.ts @@ -90,7 +90,7 @@ export class Batch { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -158,7 +158,7 @@ export class Batch { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -228,7 +228,7 @@ export class Batch { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -292,7 +292,7 @@ export class Batch { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -353,7 +353,7 @@ export class Batch { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -416,7 +416,7 @@ export class Batch { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.0.9", + "X-Fern-SDK-Version": "0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index b3d4203d..5c8a6f07 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,3 +1,3 @@ -export * as customModels from "./customModels"; export * as empathicVoice from "./empathicVoice"; +export * as customModels from "./customModels"; export * as expressionMeasurement from "./expressionMeasurement"; diff --git a/src/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.ts b/src/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.ts index a2d80cdb..d883a9e6 100644 --- a/src/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.ts +++ b/src/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.ts @@ -6,15 +6,15 @@ import * as serializers from "../../../../.."; import * as Hume from "../../../../../../api"; import * as core from "../../../../../../core"; import { AudioInput } from "../../../types/AudioInput"; -import { SessionSettings } from "../../../types/SessionSettings"; +import { Configuration } from "../../../types/Configuration"; import { TextInput } from "../../../types/TextInput"; import { TtsInput } from "../../../types/TtsInput"; export const PublishEvent: core.serialization.Schema< serializers.empathicVoice.PublishEvent.Raw, Hume.empathicVoice.PublishEvent -> = core.serialization.undiscriminatedUnion([AudioInput, SessionSettings, TextInput, TtsInput]); +> = core.serialization.undiscriminatedUnion([AudioInput, Configuration, TextInput, TtsInput]); export declare namespace PublishEvent { - type Raw = AudioInput.Raw | SessionSettings.Raw | TextInput.Raw | TtsInput.Raw; + type Raw = AudioInput.Raw | Configuration.Raw | TextInput.Raw | TtsInput.Raw; } diff --git a/src/serialization/resources/empathicVoice/resources/configs/client/index.ts b/src/serialization/resources/empathicVoice/resources/configs/client/index.ts deleted file mode 100644 index 415726b7..00000000 --- a/src/serialization/resources/empathicVoice/resources/configs/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.ts b/src/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.ts deleted file mode 100644 index 35563461..00000000 --- a/src/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../.."; -import * as Hume from "../../../../../../../api"; -import * as core from "../../../../../../../core"; - -export const PostedConfigName: core.serialization.Schema< - serializers.empathicVoice.PostedConfigName.Raw, - Hume.empathicVoice.PostedConfigName -> = core.serialization.object({ - name: core.serialization.string().optional(), -}); - -export declare namespace PostedConfigName { - interface Raw { - name?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts b/src/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts deleted file mode 100644 index 110dd774..00000000 --- a/src/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../.."; -import * as Hume from "../../../../../../../api"; -import * as core from "../../../../../../../core"; - -export const PostedConfigVersionDescription: core.serialization.Schema< - serializers.empathicVoice.PostedConfigVersionDescription.Raw, - Hume.empathicVoice.PostedConfigVersionDescription -> = core.serialization.object({ - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), -}); - -export declare namespace PostedConfigVersionDescription { - interface Raw { - version_description?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/resources/configs/client/requests/index.ts b/src/serialization/resources/empathicVoice/resources/configs/client/requests/index.ts deleted file mode 100644 index 7f3ae24e..00000000 --- a/src/serialization/resources/empathicVoice/resources/configs/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { PostedConfigName } from "./PostedConfigName"; -export { PostedConfigVersionDescription } from "./PostedConfigVersionDescription"; diff --git a/src/serialization/resources/empathicVoice/resources/configs/index.ts b/src/serialization/resources/empathicVoice/resources/configs/index.ts deleted file mode 100644 index 5ec76921..00000000 --- a/src/serialization/resources/empathicVoice/resources/configs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/src/serialization/resources/empathicVoice/resources/index.ts b/src/serialization/resources/empathicVoice/resources/index.ts index 0314e97e..8bd1e644 100644 --- a/src/serialization/resources/empathicVoice/resources/index.ts +++ b/src/serialization/resources/empathicVoice/resources/index.ts @@ -1,6 +1,2 @@ export * as chat from "./chat"; export * from "./chat/types"; -export * as prompts from "./prompts"; -export * from "./prompts/client/requests"; -export * as configs from "./configs"; -export * from "./configs/client/requests"; diff --git a/src/serialization/resources/empathicVoice/resources/prompts/client/index.ts b/src/serialization/resources/empathicVoice/resources/prompts/client/index.ts deleted file mode 100644 index 415726b7..00000000 --- a/src/serialization/resources/empathicVoice/resources/prompts/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.ts b/src/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.ts deleted file mode 100644 index 20a84177..00000000 --- a/src/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../.."; -import * as Hume from "../../../../../../../api"; -import * as core from "../../../../../../../core"; - -export const PostedPromptName: core.serialization.Schema< - serializers.empathicVoice.PostedPromptName.Raw, - Hume.empathicVoice.PostedPromptName -> = core.serialization.object({ - name: core.serialization.string().optional(), -}); - -export declare namespace PostedPromptName { - interface Raw { - name?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts b/src/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts deleted file mode 100644 index 0437b7d9..00000000 --- a/src/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../.."; -import * as Hume from "../../../../../../../api"; -import * as core from "../../../../../../../core"; - -export const PostedPromptVersionDescription: core.serialization.Schema< - serializers.empathicVoice.PostedPromptVersionDescription.Raw, - Hume.empathicVoice.PostedPromptVersionDescription -> = core.serialization.object({ - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), -}); - -export declare namespace PostedPromptVersionDescription { - interface Raw { - version_description?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/resources/prompts/client/requests/index.ts b/src/serialization/resources/empathicVoice/resources/prompts/client/requests/index.ts deleted file mode 100644 index 946bc1a8..00000000 --- a/src/serialization/resources/empathicVoice/resources/prompts/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { PostedPromptName } from "./PostedPromptName"; -export { PostedPromptVersionDescription } from "./PostedPromptVersionDescription"; diff --git a/src/serialization/resources/empathicVoice/resources/prompts/index.ts b/src/serialization/resources/empathicVoice/resources/prompts/index.ts deleted file mode 100644 index 5ec76921..00000000 --- a/src/serialization/resources/empathicVoice/resources/prompts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client"; diff --git a/src/serialization/resources/empathicVoice/types/AssistantEnd.ts b/src/serialization/resources/empathicVoice/types/AssistantEnd.ts index 33a13a62..b3a97192 100644 --- a/src/serialization/resources/empathicVoice/types/AssistantEnd.ts +++ b/src/serialization/resources/empathicVoice/types/AssistantEnd.ts @@ -10,11 +10,11 @@ export const AssistantEnd: core.serialization.ObjectSchema< serializers.empathicVoice.AssistantEnd.Raw, Hume.empathicVoice.AssistantEnd > = core.serialization.object({ - type: core.serialization.stringLiteral("assistant_end"), + type: core.serialization.stringLiteral("assistant_end").optional(), }); export declare namespace AssistantEnd { interface Raw { - type: "assistant_end"; + type?: "assistant_end" | null; } } diff --git a/src/serialization/resources/empathicVoice/types/AssistantMessage.ts b/src/serialization/resources/empathicVoice/types/AssistantMessage.ts index f5862352..df827712 100644 --- a/src/serialization/resources/empathicVoice/types/AssistantMessage.ts +++ b/src/serialization/resources/empathicVoice/types/AssistantMessage.ts @@ -12,19 +12,17 @@ export const AssistantMessage: core.serialization.ObjectSchema< serializers.empathicVoice.AssistantMessage.Raw, Hume.empathicVoice.AssistantMessage > = core.serialization.object({ - fromTts: core.serialization.property("from_tts", core.serialization.boolean()), id: core.serialization.string().optional(), message: ChatMessage, models: Inference, - type: core.serialization.stringLiteral("assistant_message"), + type: core.serialization.stringLiteral("assistant_message").optional(), }); export declare namespace AssistantMessage { interface Raw { - from_tts: boolean; id?: string | null; message: ChatMessage.Raw; models: Inference.Raw; - type: "assistant_message"; + type?: "assistant_message" | null; } } diff --git a/src/serialization/resources/empathicVoice/types/AudioConfiguration.ts b/src/serialization/resources/empathicVoice/types/AudioConfiguration.ts deleted file mode 100644 index 834fccc3..00000000 --- a/src/serialization/resources/empathicVoice/types/AudioConfiguration.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { Encoding } from "./Encoding"; - -export const AudioConfiguration: core.serialization.ObjectSchema< - serializers.empathicVoice.AudioConfiguration.Raw, - Hume.empathicVoice.AudioConfiguration -> = core.serialization.object({ - channels: core.serialization.number(), - encoding: Encoding, - sampleRate: core.serialization.property("sample_rate", core.serialization.number()), -}); - -export declare namespace AudioConfiguration { - interface Raw { - channels: number; - encoding: Encoding.Raw; - sample_rate: number; - } -} diff --git a/src/serialization/resources/empathicVoice/types/AudioInput.ts b/src/serialization/resources/empathicVoice/types/AudioInput.ts index 86202d1d..f94a613f 100644 --- a/src/serialization/resources/empathicVoice/types/AudioInput.ts +++ b/src/serialization/resources/empathicVoice/types/AudioInput.ts @@ -11,12 +11,12 @@ export const AudioInput: core.serialization.ObjectSchema< Hume.empathicVoice.AudioInput > = core.serialization.object({ data: core.serialization.string(), - type: core.serialization.stringLiteral("audio_input"), + type: core.serialization.stringLiteral("audio_input").optional(), }); export declare namespace AudioInput { interface Raw { data: string; - type: "audio_input"; + type?: "audio_input" | null; } } diff --git a/src/serialization/resources/empathicVoice/types/AudioOutput.ts b/src/serialization/resources/empathicVoice/types/AudioOutput.ts index be856272..60e67798 100644 --- a/src/serialization/resources/empathicVoice/types/AudioOutput.ts +++ b/src/serialization/resources/empathicVoice/types/AudioOutput.ts @@ -12,13 +12,13 @@ export const AudioOutput: core.serialization.ObjectSchema< > = core.serialization.object({ data: core.serialization.string(), id: core.serialization.string(), - type: core.serialization.stringLiteral("audio_output"), + type: core.serialization.stringLiteral("audio_output").optional(), }); export declare namespace AudioOutput { interface Raw { data: string; id: string; - type: "audio_output"; + type?: "audio_output" | null; } } diff --git a/src/serialization/resources/empathicVoice/types/ChatMessage.ts b/src/serialization/resources/empathicVoice/types/ChatMessage.ts index e75dbc65..30ed0968 100644 --- a/src/serialization/resources/empathicVoice/types/ChatMessage.ts +++ b/src/serialization/resources/empathicVoice/types/ChatMessage.ts @@ -11,13 +11,13 @@ export const ChatMessage: core.serialization.ObjectSchema< serializers.empathicVoice.ChatMessage.Raw, Hume.empathicVoice.ChatMessage > = core.serialization.object({ - content: core.serialization.string().optional(), + content: core.serialization.string(), role: Role, }); export declare namespace ChatMessage { interface Raw { - content?: string | null; + content: string; role: Role.Raw; } } diff --git a/src/serialization/resources/empathicVoice/types/Configuration.ts b/src/serialization/resources/empathicVoice/types/Configuration.ts new file mode 100644 index 00000000..56459618 --- /dev/null +++ b/src/serialization/resources/empathicVoice/types/Configuration.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../.."; +import * as Hume from "../../../../api"; +import * as core from "../../../../core"; + +export const Configuration: core.serialization.ObjectSchema< + serializers.empathicVoice.Configuration.Raw, + Hume.empathicVoice.Configuration +> = core.serialization.object({ + systemPrompt: core.serialization.property("system_prompt", core.serialization.string().optional()), + type: core.serialization.unknown().optional(), +}); + +export declare namespace Configuration { + interface Raw { + system_prompt?: string | null; + type?: unknown | null; + } +} diff --git a/src/serialization/resources/empathicVoice/types/Error_.ts b/src/serialization/resources/empathicVoice/types/Error_.ts index 1e58e706..7b3a0bec 100644 --- a/src/serialization/resources/empathicVoice/types/Error_.ts +++ b/src/serialization/resources/empathicVoice/types/Error_.ts @@ -11,7 +11,7 @@ export const Error_: core.serialization.ObjectSchema = core.serialization.object({ - type: core.serialization.stringLiteral("function_call_response").optional(), -}); - -export declare namespace FunctionCallResponseInput { - interface Raw { - type?: "function_call_response" | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/PostedConfig.ts b/src/serialization/resources/empathicVoice/types/PostedConfig.ts deleted file mode 100644 index ebcdac01..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedConfig.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { PostedPromptSpec } from "./PostedPromptSpec"; -import { PostedLanguageModel } from "./PostedLanguageModel"; - -export const PostedConfig: core.serialization.ObjectSchema< - serializers.empathicVoice.PostedConfig.Raw, - Hume.empathicVoice.PostedConfig -> = core.serialization.object({ - name: core.serialization.string().optional(), - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), - prompt: PostedPromptSpec.optional(), - languageModel: core.serialization.property("language_model", PostedLanguageModel.optional()), -}); - -export declare namespace PostedConfig { - interface Raw { - name?: string | null; - version_description?: string | null; - prompt?: PostedPromptSpec.Raw | null; - language_model?: PostedLanguageModel.Raw | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/PostedLanguageModel.ts b/src/serialization/resources/empathicVoice/types/PostedLanguageModel.ts deleted file mode 100644 index c5181131..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedLanguageModel.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { PostedLanguageModelModelProvider } from "./PostedLanguageModelModelProvider"; - -export const PostedLanguageModel: core.serialization.ObjectSchema< - serializers.empathicVoice.PostedLanguageModel.Raw, - Hume.empathicVoice.PostedLanguageModel -> = core.serialization.object({ - modelProvider: core.serialization.property("model_provider", PostedLanguageModelModelProvider.optional()), - modelResource: core.serialization.property("model_resource", core.serialization.string().optional()), - temperature: core.serialization.number().optional(), -}); - -export declare namespace PostedLanguageModel { - interface Raw { - model_provider?: PostedLanguageModelModelProvider.Raw | null; - model_resource?: string | null; - temperature?: number | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/PostedLanguageModelModelProvider.ts b/src/serialization/resources/empathicVoice/types/PostedLanguageModelModelProvider.ts deleted file mode 100644 index 5d7d1d48..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedLanguageModelModelProvider.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const PostedLanguageModelModelProvider: core.serialization.Schema< - serializers.empathicVoice.PostedLanguageModelModelProvider.Raw, - Hume.empathicVoice.PostedLanguageModelModelProvider -> = core.serialization.enum_(["OPEN_AI", "BYO_TEXT", "ANTHROPIC", "FIREWORKS"]); - -export declare namespace PostedLanguageModelModelProvider { - type Raw = "OPEN_AI" | "BYO_TEXT" | "ANTHROPIC" | "FIREWORKS"; -} diff --git a/src/serialization/resources/empathicVoice/types/PostedPrompt.ts b/src/serialization/resources/empathicVoice/types/PostedPrompt.ts deleted file mode 100644 index 1a3fe7af..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedPrompt.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const PostedPrompt: core.serialization.ObjectSchema< - serializers.empathicVoice.PostedPrompt.Raw, - Hume.empathicVoice.PostedPrompt -> = core.serialization.object({ - name: core.serialization.string().optional(), - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), - text: core.serialization.string().optional(), -}); - -export declare namespace PostedPrompt { - interface Raw { - name?: string | null; - version_description?: string | null; - text?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/PostedPromptSpec.ts b/src/serialization/resources/empathicVoice/types/PostedPromptSpec.ts deleted file mode 100644 index d5f56370..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedPromptSpec.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const PostedPromptSpec: core.serialization.ObjectSchema< - serializers.empathicVoice.PostedPromptSpec.Raw, - Hume.empathicVoice.PostedPromptSpec -> = core.serialization.object({ - id: core.serialization.string().optional(), - version: core.serialization.number().optional(), -}); - -export declare namespace PostedPromptSpec { - interface Raw { - id?: string | null; - version?: number | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/PostedTool.ts b/src/serialization/resources/empathicVoice/types/PostedTool.ts deleted file mode 100644 index a533a137..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedTool.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const PostedTool: core.serialization.ObjectSchema< - serializers.empathicVoice.PostedTool.Raw, - Hume.empathicVoice.PostedTool -> = core.serialization.object({ - name: core.serialization.string().optional(), - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), - docstring: core.serialization.string().optional(), - schema: core.serialization.string().optional(), -}); - -export declare namespace PostedTool { - interface Raw { - name?: string | null; - version_description?: string | null; - docstring?: string | null; - schema?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/PostedToolName.ts b/src/serialization/resources/empathicVoice/types/PostedToolName.ts deleted file mode 100644 index 0223643e..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedToolName.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const PostedToolName: core.serialization.ObjectSchema< - serializers.empathicVoice.PostedToolName.Raw, - Hume.empathicVoice.PostedToolName -> = core.serialization.object({ - name: core.serialization.string().optional(), -}); - -export declare namespace PostedToolName { - interface Raw { - name?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/PostedToolSpec.ts b/src/serialization/resources/empathicVoice/types/PostedToolSpec.ts deleted file mode 100644 index 40c96d16..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedToolSpec.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const PostedToolSpec: core.serialization.ObjectSchema< - serializers.empathicVoice.PostedToolSpec.Raw, - Hume.empathicVoice.PostedToolSpec -> = core.serialization.object({ - id: core.serialization.string().optional(), - version: core.serialization.number().optional(), -}); - -export declare namespace PostedToolSpec { - interface Raw { - id?: string | null; - version?: number | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/PostedToolVersionDescription.ts b/src/serialization/resources/empathicVoice/types/PostedToolVersionDescription.ts deleted file mode 100644 index 004f6ba5..00000000 --- a/src/serialization/resources/empathicVoice/types/PostedToolVersionDescription.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const PostedToolVersionDescription: core.serialization.ObjectSchema< - serializers.empathicVoice.PostedToolVersionDescription.Raw, - Hume.empathicVoice.PostedToolVersionDescription -> = core.serialization.object({ - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), -}); - -export declare namespace PostedToolVersionDescription { - interface Raw { - version_description?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnActiveChatCount.ts b/src/serialization/resources/empathicVoice/types/ReturnActiveChatCount.ts deleted file mode 100644 index 82f77185..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnActiveChatCount.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { ReturnActiveChatCountPerTag } from "./ReturnActiveChatCountPerTag"; - -export const ReturnActiveChatCount: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnActiveChatCount.Raw, - Hume.empathicVoice.ReturnActiveChatCount -> = core.serialization.object({ - timestamp: core.serialization.number().optional(), - totalUserActiveChats: core.serialization.property( - "total_user_active_chats", - core.serialization.number().optional() - ), - maxAllowedActiveChats: core.serialization.property( - "max_allowed_active_chats", - core.serialization.number().optional() - ), - moreActiveChatsAllowed: core.serialization.property( - "more_active_chats_allowed", - core.serialization.boolean().optional() - ), - perTag: core.serialization.property("per_tag", core.serialization.list(ReturnActiveChatCountPerTag).optional()), -}); - -export declare namespace ReturnActiveChatCount { - interface Raw { - timestamp?: number | null; - total_user_active_chats?: number | null; - max_allowed_active_chats?: number | null; - more_active_chats_allowed?: boolean | null; - per_tag?: ReturnActiveChatCountPerTag.Raw[] | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnActiveChatCountPerTag.ts b/src/serialization/resources/empathicVoice/types/ReturnActiveChatCountPerTag.ts deleted file mode 100644 index 64c644df..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnActiveChatCountPerTag.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const ReturnActiveChatCountPerTag: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnActiveChatCountPerTag.Raw, - Hume.empathicVoice.ReturnActiveChatCountPerTag -> = core.serialization.object({ - tag: core.serialization.string().optional(), - totalTagActiveChats: core.serialization.property("total_tag_active_chats", core.serialization.number().optional()), -}); - -export declare namespace ReturnActiveChatCountPerTag { - interface Raw { - tag?: string | null; - total_tag_active_chats?: number | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnChat.ts b/src/serialization/resources/empathicVoice/types/ReturnChat.ts deleted file mode 100644 index 85c98a35..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnChat.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { ReturnConfigSpec } from "./ReturnConfigSpec"; - -export const ReturnChat: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnChat.Raw, - Hume.empathicVoice.ReturnChat -> = core.serialization.object({ - id: core.serialization.string().optional(), - resumedFromId: core.serialization.property("resumed_from_id", core.serialization.string().optional()), - tag: core.serialization.string().optional(), - status: core.serialization.string().optional(), - startTimestamp: core.serialization.property("start_timestamp", core.serialization.number().optional()), - endTimestamp: core.serialization.property("end_timestamp", core.serialization.number().optional()), - metadata: core.serialization.string().optional(), - config: ReturnConfigSpec.optional(), -}); - -export declare namespace ReturnChat { - interface Raw { - id?: string | null; - resumed_from_id?: string | null; - tag?: string | null; - status?: string | null; - start_timestamp?: number | null; - end_timestamp?: number | null; - metadata?: string | null; - config?: ReturnConfigSpec.Raw | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnChatEvent.ts b/src/serialization/resources/empathicVoice/types/ReturnChatEvent.ts deleted file mode 100644 index ad954dc7..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnChatEvent.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const ReturnChatEvent: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnChatEvent.Raw, - Hume.empathicVoice.ReturnChatEvent -> = core.serialization.object({ - id: core.serialization.string().optional(), - timestamp: core.serialization.number().optional(), - role: core.serialization.string().optional(), - type: core.serialization.string().optional(), - messageText: core.serialization.property("message_text", core.serialization.string().optional()), - emotionFeatures: core.serialization.property("emotion_features", core.serialization.string().optional()), - metadata: core.serialization.string().optional(), -}); - -export declare namespace ReturnChatEvent { - interface Raw { - id?: string | null; - timestamp?: number | null; - role?: string | null; - type?: string | null; - message_text?: string | null; - emotion_features?: string | null; - metadata?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnChatWithPagedEvents.ts b/src/serialization/resources/empathicVoice/types/ReturnChatWithPagedEvents.ts deleted file mode 100644 index 90c3f43b..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnChatWithPagedEvents.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { ReturnChatEvent } from "./ReturnChatEvent"; -import { ReturnConfigSpec } from "./ReturnConfigSpec"; - -export const ReturnChatWithPagedEvents: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnChatWithPagedEvents.Raw, - Hume.empathicVoice.ReturnChatWithPagedEvents -> = core.serialization.object({ - id: core.serialization.string().optional(), - resumedFromId: core.serialization.property("resumed_from_id", core.serialization.string().optional()), - tag: core.serialization.string().optional(), - status: core.serialization.string().optional(), - startTimestamp: core.serialization.property("start_timestamp", core.serialization.number().optional()), - endTimestamp: core.serialization.property("end_timestamp", core.serialization.number().optional()), - eventsPage: core.serialization.property("events_page", core.serialization.list(ReturnChatEvent).optional()), - metadata: core.serialization.string().optional(), - pageNumber: core.serialization.property("page_number", core.serialization.number().optional()), - pageSize: core.serialization.property("page_size", core.serialization.number().optional()), - config: ReturnConfigSpec.optional(), -}); - -export declare namespace ReturnChatWithPagedEvents { - interface Raw { - id?: string | null; - resumed_from_id?: string | null; - tag?: string | null; - status?: string | null; - start_timestamp?: number | null; - end_timestamp?: number | null; - events_page?: ReturnChatEvent.Raw[] | null; - metadata?: string | null; - page_number?: number | null; - page_size?: number | null; - config?: ReturnConfigSpec.Raw | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnConfig.ts b/src/serialization/resources/empathicVoice/types/ReturnConfig.ts deleted file mode 100644 index 989ce588..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnConfig.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { ReturnPrompt } from "./ReturnPrompt"; -import { ReturnLanguageModel } from "./ReturnLanguageModel"; - -export const ReturnConfig: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnConfig.Raw, - Hume.empathicVoice.ReturnConfig -> = core.serialization.object({ - id: core.serialization.string().optional(), - version: core.serialization.number().optional(), - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), - name: core.serialization.string().optional(), - createdOn: core.serialization.property("created_on", core.serialization.number().optional()), - modifiedOn: core.serialization.property("modified_on", core.serialization.number().optional()), - prompt: ReturnPrompt.optional(), - languageModel: core.serialization.property("language_model", ReturnLanguageModel.optional()), -}); - -export declare namespace ReturnConfig { - interface Raw { - id?: string | null; - version?: number | null; - version_description?: string | null; - name?: string | null; - created_on?: number | null; - modified_on?: number | null; - prompt?: ReturnPrompt.Raw | null; - language_model?: ReturnLanguageModel.Raw | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnConfigSpec.ts b/src/serialization/resources/empathicVoice/types/ReturnConfigSpec.ts deleted file mode 100644 index f9a95e1e..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnConfigSpec.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const ReturnConfigSpec: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnConfigSpec.Raw, - Hume.empathicVoice.ReturnConfigSpec -> = core.serialization.object({ - id: core.serialization.string().optional(), - version: core.serialization.number().optional(), -}); - -export declare namespace ReturnConfigSpec { - interface Raw { - id?: string | null; - version?: number | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnLanguageModel.ts b/src/serialization/resources/empathicVoice/types/ReturnLanguageModel.ts deleted file mode 100644 index d162cd10..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnLanguageModel.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const ReturnLanguageModel: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnLanguageModel.Raw, - Hume.empathicVoice.ReturnLanguageModel -> = core.serialization.object({ - modelProvider: core.serialization.property("model_provider", core.serialization.string().optional()), - modelResource: core.serialization.property("model_resource", core.serialization.string().optional()), - temperature: core.serialization.number().optional(), -}); - -export declare namespace ReturnLanguageModel { - interface Raw { - model_provider?: string | null; - model_resource?: string | null; - temperature?: number | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnPagedChats.ts b/src/serialization/resources/empathicVoice/types/ReturnPagedChats.ts deleted file mode 100644 index 58bbaec8..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnPagedChats.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { ReturnChat } from "./ReturnChat"; - -export const ReturnPagedChats: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnPagedChats.Raw, - Hume.empathicVoice.ReturnPagedChats -> = core.serialization.object({ - pageNumber: core.serialization.property("page_number", core.serialization.number().optional()), - pageSize: core.serialization.property("page_size", core.serialization.number().optional()), - chatsPage: core.serialization.property("chats_page", core.serialization.list(ReturnChat).optional()), -}); - -export declare namespace ReturnPagedChats { - interface Raw { - page_number?: number | null; - page_size?: number | null; - chats_page?: ReturnChat.Raw[] | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnPagedConfigs.ts b/src/serialization/resources/empathicVoice/types/ReturnPagedConfigs.ts deleted file mode 100644 index 29739454..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnPagedConfigs.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { ReturnConfig } from "./ReturnConfig"; - -export const ReturnPagedConfigs: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnPagedConfigs.Raw, - Hume.empathicVoice.ReturnPagedConfigs -> = core.serialization.object({ - pageNumber: core.serialization.property("page_number", core.serialization.number().optional()), - pageSize: core.serialization.property("page_size", core.serialization.number().optional()), - configsPage: core.serialization.property("configs_page", core.serialization.list(ReturnConfig).optional()), -}); - -export declare namespace ReturnPagedConfigs { - interface Raw { - page_number?: number | null; - page_size?: number | null; - configs_page?: ReturnConfig.Raw[] | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnPagedPrompts.ts b/src/serialization/resources/empathicVoice/types/ReturnPagedPrompts.ts deleted file mode 100644 index 925eb46a..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnPagedPrompts.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { ReturnPrompt } from "./ReturnPrompt"; - -export const ReturnPagedPrompts: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnPagedPrompts.Raw, - Hume.empathicVoice.ReturnPagedPrompts -> = core.serialization.object({ - pageNumber: core.serialization.property("page_number", core.serialization.number().optional()), - pageSize: core.serialization.property("page_size", core.serialization.number().optional()), - promptsPage: core.serialization.property("prompts_page", core.serialization.list(ReturnPrompt).optional()), -}); - -export declare namespace ReturnPagedPrompts { - interface Raw { - page_number?: number | null; - page_size?: number | null; - prompts_page?: ReturnPrompt.Raw[] | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnPrompt.ts b/src/serialization/resources/empathicVoice/types/ReturnPrompt.ts deleted file mode 100644 index f46ba686..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnPrompt.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const ReturnPrompt: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnPrompt.Raw, - Hume.empathicVoice.ReturnPrompt -> = core.serialization.object({ - id: core.serialization.string().optional(), - version: core.serialization.number().optional(), - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), - name: core.serialization.string().optional(), - createdOn: core.serialization.property("created_on", core.serialization.number().optional()), - modifiedOn: core.serialization.property("modified_on", core.serialization.number().optional()), - text: core.serialization.string().optional(), -}); - -export declare namespace ReturnPrompt { - interface Raw { - id?: string | null; - version?: number | null; - version_description?: string | null; - name?: string | null; - created_on?: number | null; - modified_on?: number | null; - text?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/ReturnTool.ts b/src/serialization/resources/empathicVoice/types/ReturnTool.ts deleted file mode 100644 index a38eddc2..00000000 --- a/src/serialization/resources/empathicVoice/types/ReturnTool.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; - -export const ReturnTool: core.serialization.ObjectSchema< - serializers.empathicVoice.ReturnTool.Raw, - Hume.empathicVoice.ReturnTool -> = core.serialization.object({ - id: core.serialization.string().optional(), - version: core.serialization.number().optional(), - versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), - name: core.serialization.string().optional(), - createdOn: core.serialization.property("created_on", core.serialization.number().optional()), - modifiedOn: core.serialization.property("modified_on", core.serialization.number().optional()), - docstring: core.serialization.string().optional(), - schema: core.serialization.string().optional(), -}); - -export declare namespace ReturnTool { - interface Raw { - id?: string | null; - version?: number | null; - version_description?: string | null; - name?: string | null; - created_on?: number | null; - modified_on?: number | null; - docstring?: string | null; - schema?: string | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/Role.ts b/src/serialization/resources/empathicVoice/types/Role.ts index ffff6aac..12cd5c42 100644 --- a/src/serialization/resources/empathicVoice/types/Role.ts +++ b/src/serialization/resources/empathicVoice/types/Role.ts @@ -7,8 +7,8 @@ import * as Hume from "../../../../api"; import * as core from "../../../../core"; export const Role: core.serialization.Schema = - core.serialization.enum_(["assistant", "system", "user", "all"]); + core.serialization.enum_(["assistant", "system", "user"]); export declare namespace Role { - type Raw = "assistant" | "system" | "user" | "all"; + type Raw = "assistant" | "system" | "user"; } diff --git a/src/serialization/resources/empathicVoice/types/SessionSettings.ts b/src/serialization/resources/empathicVoice/types/SessionSettings.ts deleted file mode 100644 index edad0802..00000000 --- a/src/serialization/resources/empathicVoice/types/SessionSettings.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../.."; -import * as Hume from "../../../../api"; -import * as core from "../../../../core"; -import { AudioConfiguration } from "./AudioConfiguration"; - -export const SessionSettings: core.serialization.ObjectSchema< - serializers.empathicVoice.SessionSettings.Raw, - Hume.empathicVoice.SessionSettings -> = core.serialization.object({ - audio: AudioConfiguration.optional(), - languageModelApiKey: core.serialization.property("language_model_api_key", core.serialization.string().optional()), - type: core.serialization.stringLiteral("session_settings").optional(), -}); - -export declare namespace SessionSettings { - interface Raw { - audio?: AudioConfiguration.Raw | null; - language_model_api_key?: string | null; - type?: "session_settings" | null; - } -} diff --git a/src/serialization/resources/empathicVoice/types/TextInput.ts b/src/serialization/resources/empathicVoice/types/TextInput.ts index 6fdd6b0b..45657614 100644 --- a/src/serialization/resources/empathicVoice/types/TextInput.ts +++ b/src/serialization/resources/empathicVoice/types/TextInput.ts @@ -11,12 +11,12 @@ export const TextInput: core.serialization.ObjectSchema< Hume.empathicVoice.TextInput > = core.serialization.object({ text: core.serialization.string(), - type: core.serialization.stringLiteral("user_input"), + type: core.serialization.stringLiteral("text").optional(), }); export declare namespace TextInput { interface Raw { text: string; - type: "user_input"; + type?: "text" | null; } } diff --git a/src/serialization/resources/empathicVoice/types/TtsInput.ts b/src/serialization/resources/empathicVoice/types/TtsInput.ts index 3dce542d..16c4182f 100644 --- a/src/serialization/resources/empathicVoice/types/TtsInput.ts +++ b/src/serialization/resources/empathicVoice/types/TtsInput.ts @@ -10,13 +10,17 @@ export const TtsInput: core.serialization.ObjectSchema< serializers.empathicVoice.TtsInput.Raw, Hume.empathicVoice.TtsInput > = core.serialization.object({ + sampleId: core.serialization.property("sample_id", core.serialization.number().optional()), + speaker: core.serialization.string().optional(), text: core.serialization.string(), - type: core.serialization.stringLiteral("assistant_input"), + type: core.serialization.stringLiteral("tts").optional(), }); export declare namespace TtsInput { interface Raw { + sample_id?: number | null; + speaker?: string | null; text: string; - type: "assistant_input"; + type?: "tts" | null; } } diff --git a/src/serialization/resources/empathicVoice/types/UserInterruption.ts b/src/serialization/resources/empathicVoice/types/UserInterruption.ts index 5205b5a5..46cd3872 100644 --- a/src/serialization/resources/empathicVoice/types/UserInterruption.ts +++ b/src/serialization/resources/empathicVoice/types/UserInterruption.ts @@ -11,12 +11,12 @@ export const UserInterruption: core.serialization.ObjectSchema< Hume.empathicVoice.UserInterruption > = core.serialization.object({ time: core.serialization.number(), - type: core.serialization.stringLiteral("user_interruption"), + type: core.serialization.unknown().optional(), }); export declare namespace UserInterruption { interface Raw { time: number; - type: "user_interruption"; + type?: unknown | null; } } diff --git a/src/serialization/resources/empathicVoice/types/UserMessage.ts b/src/serialization/resources/empathicVoice/types/UserMessage.ts index 0a8ff55b..87ed3bf3 100644 --- a/src/serialization/resources/empathicVoice/types/UserMessage.ts +++ b/src/serialization/resources/empathicVoice/types/UserMessage.ts @@ -13,24 +13,17 @@ export const UserMessage: core.serialization.ObjectSchema< serializers.empathicVoice.UserMessage.Raw, Hume.empathicVoice.UserMessage > = core.serialization.object({ - fromText: core.serialization.property("from_text", core.serialization.boolean()), message: ChatMessage, models: Inference, - serializedSegments: core.serialization.property( - "serialized_segments", - core.serialization.list(core.serialization.record(core.serialization.string(), core.serialization.unknown())) - ), time: MillisecondInterval, - type: core.serialization.stringLiteral("user_message"), + type: core.serialization.unknown().optional(), }); export declare namespace UserMessage { interface Raw { - from_text: boolean; message: ChatMessage.Raw; models: Inference.Raw; - serialized_segments: Record[]; time: MillisecondInterval.Raw; - type: "user_message"; + type?: unknown | null; } } diff --git a/src/serialization/resources/empathicVoice/types/index.ts b/src/serialization/resources/empathicVoice/types/index.ts index 19a1f6ce..1243efb6 100644 --- a/src/serialization/resources/empathicVoice/types/index.ts +++ b/src/serialization/resources/empathicVoice/types/index.ts @@ -1,31 +1,9 @@ -export * from "./PostedTool"; -export * from "./ReturnTool"; -export * from "./PostedPrompt"; -export * from "./ReturnPrompt"; -export * from "./PostedConfig"; -export * from "./PostedLanguageModelModelProvider"; -export * from "./PostedLanguageModel"; -export * from "./PostedPromptSpec"; -export * from "./PostedToolSpec"; -export * from "./ReturnConfig"; -export * from "./ReturnLanguageModel"; -export * from "./PostedToolName"; -export * from "./PostedToolVersionDescription"; -export * from "./ReturnPagedPrompts"; -export * from "./ReturnPagedConfigs"; -export * from "./ReturnChat"; -export * from "./ReturnConfigSpec"; -export * from "./ReturnPagedChats"; -export * from "./ReturnChatEvent"; -export * from "./ReturnChatWithPagedEvents"; -export * from "./ReturnActiveChatCount"; -export * from "./ReturnActiveChatCountPerTag"; export * from "./AssistantEnd"; export * from "./AssistantMessage"; -export * from "./AudioConfiguration"; export * from "./AudioInput"; export * from "./AudioOutput"; export * from "./ChatMessage"; +export * from "./Configuration"; export * from "./EmotionScores"; export * from "./Encoding"; export * from "./Error_"; @@ -33,9 +11,7 @@ export * from "./Inference"; export * from "./MillisecondInterval"; export * from "./ProsodyInference"; export * from "./Role"; -export * from "./SessionSettings"; export * from "./TextInput"; export * from "./TtsInput"; export * from "./UserInterruption"; export * from "./UserMessage"; -export * from "./FunctionCallResponseInput"; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index b3d4203d..5c8a6f07 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -1,3 +1,3 @@ -export * as customModels from "./customModels"; export * as empathicVoice from "./empathicVoice"; +export * as customModels from "./customModels"; export * as expressionMeasurement from "./expressionMeasurement"; diff --git a/yarn.lock b/yarn.lock index 6cdaca4a..029cce14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -590,11 +590,6 @@ dependencies: "@babel/types" "^7.20.7" -"@types/command-exists@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@types/command-exists/-/command-exists-1.2.3.tgz#b83f6a0b4d5aa2765f39950bca90c8d4203528e0" - integrity sha512-PpbaE2XWLaWYboXD6k70TcXO/OdOyyRFq5TVpmlUELNxdkkmXU9fkImNosmXU1DtsNrqdUgWd/nJQYXgwmtdXQ== - "@types/graceful-fs@^4.1.3": version "4.1.9" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" @@ -961,11 +956,6 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -command-exists@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" - integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1093,7 +1083,7 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -execa@^5.0.0, execa@^5.1.1: +execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==