Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ src/index.ts

src/api/resources/conversationalAi/conversation
tests/wire/conversationalAi/mcpServers/tools.test.ts
changelog.md
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## v2.31.1 - 2026-01-14
* SDK regeneration
* Unable to analyze changes with AI, incrementing PATCH version.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elevenlabs/elevenlabs-js",
"version": "v2.31.0",
"version": "v2.31.1",
"private": false,
"repository": "github:elevenlabs/elevenlabs-js",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export function normalizeClientOptions<T extends BaseClientOptions>(options: T):
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
"X-Fern-SDK-Version": "v2.31.0",
"User-Agent": "@elevenlabs/elevenlabs-js/v2.31.0",
"X-Fern-SDK-Version": "v2.31.1",
"User-Agent": "@elevenlabs/elevenlabs-js/v2.31.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
"xi-api-key": options?.apiKey,
Expand Down
11 changes: 10 additions & 1 deletion src/api/resources/voices/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
import { type NormalizedClientOptions, normalizeClientOptions } from "../../../../BaseClient";
import * as core from "../../../../core";
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers";
import { toJson } from "../../../../core/json";
import * as environments from "../../../../environments";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError";
import * as errors from "../../../../errors/index";
Expand Down Expand Up @@ -503,7 +504,15 @@ export class VoicesClient {
}

if (request.labels != null) {
_request.append("labels", request.labels);
_request.append(
"labels",
(() => {
const mapped = serializers.VoicesUpdateRequestLabels.jsonOrThrow(request.labels, {
unrecognizedObjectKeys: "strip",
});
return typeof mapped === "string" ? mapped : toJson(mapped);
})(),
);
}

const _maybeEncodedRequest = await _request.getRequest();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file was auto-generated by Fern from our API Definition.

import type * as core from "../../../../../core";
import type * as ElevenLabs from "../../../../index";

/**
* @example
Expand All @@ -17,6 +18,6 @@ export interface BodyEditVoiceV1VoicesVoiceIdEditPost {
removeBackgroundNoise?: boolean;
/** A description of the voice. */
description?: string;
/** Serialized labels dictionary for the voice. */
labels?: string;
/** Labels for the voice. Keys can be language, accent, gender, or age. */
labels?: ElevenLabs.VoicesUpdateRequestLabels;
}
1 change: 1 addition & 0 deletions src/api/resources/voices/resources/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * as ivc from "./ivc";
export * from "./ivc/client/requests";
export * from "./ivc/types";
export * as pvc from "./pvc";
export * from "./pvc/client/requests";
export * as samples from "./samples";
Expand Down
11 changes: 10 additions & 1 deletion src/api/resources/voices/resources/ivc/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../Ba
import { type NormalizedClientOptions, normalizeClientOptions } from "../../../../../../BaseClient";
import * as core from "../../../../../../core";
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers";
import { toJson } from "../../../../../../core/json";
import * as environments from "../../../../../../environments";
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError";
import * as errors from "../../../../../../errors/index";
Expand Down Expand Up @@ -64,7 +65,15 @@ export class IvcClient {
}

if (request.labels != null) {
_request.append("labels", request.labels);
_request.append(
"labels",
(() => {
const mapped = serializers.voices.IvcCreateRequestLabels.jsonOrThrow(request.labels, {
unrecognizedObjectKeys: "strip",
});
return typeof mapped === "string" ? mapped : toJson(mapped);
})(),
);
}

const _maybeEncodedRequest = await _request.getRequest();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file was auto-generated by Fern from our API Definition.

import type * as core from "../../../../../../../core";
import type * as ElevenLabs from "../../../../../../index";

/**
* @example
Expand All @@ -18,6 +19,6 @@ export interface BodyAddVoiceV1VoicesAddPost {
removeBackgroundNoise?: boolean;
/** A description of the voice. */
description?: string;
/** Serialized labels dictionary for the voice. */
labels?: string;
/** Labels for the voice. Keys can be language, accent, gender, or age. */
labels?: ElevenLabs.voices.IvcCreateRequestLabels;
}
1 change: 1 addition & 0 deletions src/api/resources/voices/resources/ivc/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./client";
export * from "./types";
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This file was auto-generated by Fern from our API Definition.

/**
* Labels for the voice. Keys can be language, accent, gender, or age.
*/
export type IvcCreateRequestLabels = Record<string, string> | string;
1 change: 1 addition & 0 deletions src/api/resources/voices/resources/ivc/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./IvcCreateRequestLabels";
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export interface BodyEditPvcVoiceV1VoicesPvcVoiceIdPost {
language?: string;
/** Description to use for the created voice. */
description?: string;
/** Serialized labels dictionary for the voice. */
/** Labels for the voice. Keys can be language, accent, gender, or age. */
labels?: Record<string, string | undefined>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export interface CreatePvcVoiceRequest {
language: string;
/** Description to use for the created voice. */
description?: string;
/** Serialized labels dictionary for the voice. */
/** Labels for the voice. Keys can be language, accent, gender, or age. */
labels?: Record<string, string | undefined>;
}
6 changes: 6 additions & 0 deletions src/api/resources/voices/types/VoicesUpdateRequestLabels.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This file was auto-generated by Fern from our API Definition.

/**
* Labels for the voice. Keys can be language, accent, gender, or age.
*/
export type VoicesUpdateRequestLabels = Record<string, string> | string;
1 change: 1 addition & 0 deletions src/api/resources/voices/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./VoicesGetSharedRequestCategory";
export * from "./VoicesUpdateRequestLabels";
10 changes: 6 additions & 4 deletions src/api/types/DubbingMetadataResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ export interface DubbingMetadataResponse {
dubbingId: string;
/** The name of the dubbing project. */
name: string;
/** The status of the dubbing project. Either 'dubbed', 'dubbing', 'failed', or 'cloning'. */
/** The state this dub is in. */
status: string;
/** The target languages of the dubbing project. */
/** Once dubbing has completed, the ISO-639-1 code of the original media's source language. */
sourceLanguage?: string;
/** The ISO-639-1 code of the languages this media has been dubbed into. */
targetLanguages: string[];
/** Whether this dubbing project is editable in Dubbing Studio. */
editable?: boolean;
/** Timestamp this dub was created. */
createdAt: Date;
/** The media metadata of the dubbing project. */
/** Metadata, such as the length in seconds and content type, of the dubbed content. */
mediaMetadata?: ElevenLabs.DubbingMediaMetadata;
/** Optional error message if the dubbing project failed. */
/** Error message indicate, if this dub has failed, what happened. */
error?: string;
}
4 changes: 3 additions & 1 deletion src/api/types/InvoiceResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export interface InvoiceResponse {
discounts: ElevenLabs.DiscountResponseModel[];
/** The Unix timestamp of the next payment attempt. */
nextPaymentAttemptUnix: number;
/** The status of this invoice's payment intent. None when there is no payment intent. */
/** Deprecated. Use [payment_intent_statusses] instead. The status of this invoice's first payment intent. None when there is no payment intent. */
paymentIntentStatus?: ElevenLabs.InvoiceResponseModelPaymentIntentStatus;
/** The statuses of this invoice's payment intents. Empty list when there are no payment intents. */
paymentIntentStatusses: ElevenLabs.InvoiceResponseModelPaymentIntentStatussesItem[];
}
13 changes: 13 additions & 0 deletions src/api/types/InvoiceResponseModelPaymentIntentStatussesItem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This file was auto-generated by Fern from our API Definition.

export const InvoiceResponseModelPaymentIntentStatussesItem = {
Canceled: "canceled",
Processing: "processing",
RequiresAction: "requires_action",
RequiresCapture: "requires_capture",
RequiresConfirmation: "requires_confirmation",
RequiresPaymentMethod: "requires_payment_method",
Succeeded: "succeeded",
} as const;
export type InvoiceResponseModelPaymentIntentStatussesItem =
(typeof InvoiceResponseModelPaymentIntentStatussesItem)[keyof typeof InvoiceResponseModelPaymentIntentStatussesItem];
8 changes: 8 additions & 0 deletions src/api/types/SpellingPatience.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// This file was auto-generated by Fern from our API Definition.

/** Controls if the agent should be more patient when user is spelling numbers and named entities. */
export const SpellingPatience = {
Auto: "auto",
Off: "off",
} as const;
export type SpellingPatience = (typeof SpellingPatience)[keyof typeof SpellingPatience];
2 changes: 2 additions & 0 deletions src/api/types/TurnConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ export interface TurnConfig {
softTimeoutConfig?: ElevenLabs.SoftTimeoutConfig;
/** Controls how eager the agent is to respond. Low = less eager (waits longer), Standard = default eagerness, High = more eager (responds sooner) */
turnEagerness?: ElevenLabs.TurnEagerness;
/** Controls if the agent should be more patient when user is spelling numbers and named entities. Auto = model based, Off = never wait extra */
spellingPatience?: ElevenLabs.SpellingPatience;
}
2 changes: 2 additions & 0 deletions src/api/types/TurnConfigWorkflowOverride.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ export interface TurnConfigWorkflowOverride {
softTimeoutConfig?: ElevenLabs.SoftTimeoutConfigWorkflowOverride;
/** Controls how eager the agent is to respond. Low = less eager (waits longer), Standard = default eagerness, High = more eager (responds sooner) */
turnEagerness?: ElevenLabs.TurnEagerness;
/** Controls if the agent should be more patient when user is spelling numbers and named entities. Auto = model based, Off = never wait extra */
spellingPatience?: ElevenLabs.SpellingPatience;
}
2 changes: 2 additions & 0 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ export * from "./InboundSipTrunkConfigRequestModel";
export * from "./IntegrationType";
export * from "./InvoiceResponse";
export * from "./InvoiceResponseModelPaymentIntentStatus";
export * from "./InvoiceResponseModelPaymentIntentStatussesItem";
export * from "./KnowledgeBaseDependentType";
export * from "./KnowledgeBaseDocumentChunkResponseModel";
export * from "./KnowledgeBaseDocumentMetadataResponseModel";
Expand Down Expand Up @@ -676,6 +677,7 @@ export * from "./SpeechToTextChunkResponseModel";
export * from "./SpeechToTextWebhookResponseModel";
export * from "./SpeechToTextWordResponseModel";
export * from "./SpeechToTextWordResponseModelType";
export * from "./SpellingPatience";
export * from "./SrtExportOptions";
export * from "./StartPvcVoiceTrainingResponseModel";
export * from "./StartSpeakerSeparationResponseModel";
Expand Down
2 changes: 2 additions & 0 deletions src/serialization/resources/voices/resources/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * as ivc from "./ivc";
export * from "./ivc/types";
export * as pvc from "./pvc";
export * from "./pvc/client/requests";
1 change: 1 addition & 0 deletions src/serialization/resources/voices/resources/ivc/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./types";
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This file was auto-generated by Fern from our API Definition.

import type * as ElevenLabs from "../../../../../../api/index";
import * as core from "../../../../../../core";
import type * as serializers from "../../../../../index";

export const IvcCreateRequestLabels: core.serialization.Schema<
serializers.voices.IvcCreateRequestLabels.Raw,
ElevenLabs.voices.IvcCreateRequestLabels
> = core.serialization.undiscriminatedUnion([
core.serialization.record(core.serialization.string(), core.serialization.string()),
core.serialization.string(),
]);

export declare namespace IvcCreateRequestLabels {
export type Raw = Record<string, string> | string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./IvcCreateRequestLabels";
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This file was auto-generated by Fern from our API Definition.

import type * as ElevenLabs from "../../../../api/index";
import * as core from "../../../../core";
import type * as serializers from "../../../index";

export const VoicesUpdateRequestLabels: core.serialization.Schema<
serializers.VoicesUpdateRequestLabels.Raw,
ElevenLabs.VoicesUpdateRequestLabels
> = core.serialization.undiscriminatedUnion([
core.serialization.record(core.serialization.string(), core.serialization.string()),
core.serialization.string(),
]);

export declare namespace VoicesUpdateRequestLabels {
export type Raw = Record<string, string> | string;
}
1 change: 1 addition & 0 deletions src/serialization/resources/voices/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./VoicesGetSharedRequestCategory";
export * from "./VoicesUpdateRequestLabels";
2 changes: 2 additions & 0 deletions src/serialization/types/DubbingMetadataResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const DubbingMetadataResponse: core.serialization.ObjectSchema<
dubbingId: core.serialization.property("dubbing_id", core.serialization.string()),
name: core.serialization.string(),
status: core.serialization.string(),
sourceLanguage: core.serialization.property("source_language", core.serialization.string().optional()),
targetLanguages: core.serialization.property(
"target_languages",
core.serialization.list(core.serialization.string()),
Expand All @@ -27,6 +28,7 @@ export declare namespace DubbingMetadataResponse {
dubbing_id: string;
name: string;
status: string;
source_language?: string | null;
target_languages: string[];
editable?: boolean | null;
created_at: string;
Expand Down
6 changes: 6 additions & 0 deletions src/serialization/types/InvoiceResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as core from "../../core";
import type * as serializers from "../index";
import { DiscountResponseModel } from "./DiscountResponseModel";
import { InvoiceResponseModelPaymentIntentStatus } from "./InvoiceResponseModelPaymentIntentStatus";
import { InvoiceResponseModelPaymentIntentStatussesItem } from "./InvoiceResponseModelPaymentIntentStatussesItem";

export const InvoiceResponse: core.serialization.ObjectSchema<
serializers.InvoiceResponse.Raw,
Expand All @@ -21,6 +22,10 @@ export const InvoiceResponse: core.serialization.ObjectSchema<
"payment_intent_status",
InvoiceResponseModelPaymentIntentStatus.optional(),
),
paymentIntentStatusses: core.serialization.property(
"payment_intent_statusses",
core.serialization.list(InvoiceResponseModelPaymentIntentStatussesItem),
),
});

export declare namespace InvoiceResponse {
Expand All @@ -33,5 +38,6 @@ export declare namespace InvoiceResponse {
discounts: DiscountResponseModel.Raw[];
next_payment_attempt_unix: number;
payment_intent_status?: InvoiceResponseModelPaymentIntentStatus.Raw | null;
payment_intent_statusses: InvoiceResponseModelPaymentIntentStatussesItem.Raw[];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// This file was auto-generated by Fern from our API Definition.

import type * as ElevenLabs from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";

export const InvoiceResponseModelPaymentIntentStatussesItem: core.serialization.Schema<
serializers.InvoiceResponseModelPaymentIntentStatussesItem.Raw,
ElevenLabs.InvoiceResponseModelPaymentIntentStatussesItem
> = core.serialization.enum_([
"canceled",
"processing",
"requires_action",
"requires_capture",
"requires_confirmation",
"requires_payment_method",
"succeeded",
]);

export declare namespace InvoiceResponseModelPaymentIntentStatussesItem {
export type Raw =
| "canceled"
| "processing"
| "requires_action"
| "requires_capture"
| "requires_confirmation"
| "requires_payment_method"
| "succeeded";
}
14 changes: 14 additions & 0 deletions src/serialization/types/SpellingPatience.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file was auto-generated by Fern from our API Definition.

import type * as ElevenLabs from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";

export const SpellingPatience: core.serialization.Schema<
serializers.SpellingPatience.Raw,
ElevenLabs.SpellingPatience
> = core.serialization.enum_(["auto", "off"]);

export declare namespace SpellingPatience {
export type Raw = "auto" | "off";
}
Loading