Skip to content

Commit cdb1940

Browse files
SDK regeneration (#338)
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 5be6e59 commit cdb1940

File tree

103 files changed

+804
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+804
-418
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@elevenlabs/elevenlabs-js",
3-
"version": "v2.33.0",
3+
"version": "v2.34.0",
44
"private": false,
55
"repository": "github:elevenlabs/elevenlabs-js",
66
"license": "MIT",

reference.md

Lines changed: 40 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ Generate dialogue from text with precise character-level timing information for
10731073

10741074
```typescript
10751075
await client.textToDialogue.convertWithTimestamps({
1076-
outputFormat: "mp3_22050_32",
1076+
outputFormat: "alaw_8000",
10771077
inputs: [{
10781078
text: "Hello, how are you?",
10791079
voiceId: "bYTqZQo3Jz7LQtmGTgwi"
@@ -6832,7 +6832,7 @@ await client.conversationalAi.settings.update();
68326832
</details>
68336833

68346834
## ConversationalAi Secrets
6835-
<details><summary><code>client.conversationalAi.secrets.<a href="/src/api/resources/conversationalAi/resources/secrets/client/Client.ts">list</a>() -> ElevenLabs.GetWorkspaceSecretsResponseModel</code></summary>
6835+
<details><summary><code>client.conversationalAi.secrets.<a href="/src/api/resources/conversationalAi/resources/secrets/client/Client.ts">list</a>({ ...params }) -> ElevenLabs.GetWorkspaceSecretsResponseModel</code></summary>
68366836
<dl>
68376837
<dd>
68386838

@@ -6859,7 +6859,10 @@ Get all workspace secrets for the user
68596859
<dd>
68606860

68616861
```typescript
6862-
await client.conversationalAi.secrets.list();
6862+
await client.conversationalAi.secrets.list({
6863+
pageSize: 1,
6864+
cursor: "cursor"
6865+
});
68636866

68646867
```
68656868
</dd>
@@ -6875,6 +6878,14 @@ await client.conversationalAi.secrets.list();
68756878
<dl>
68766879
<dd>
68776880

6881+
**request:** `ElevenLabs.conversationalAi.SecretsListRequest`
6882+
6883+
</dd>
6884+
</dl>
6885+
6886+
<dl>
6887+
<dd>
6888+
68786889
**requestOptions:** `SecretsClient.RequestOptions`
68796890

68806891
</dd>
@@ -7866,62 +7877,7 @@ await client.conversationalAi.mcpServers.update("mcp_server_id");
78667877
</details>
78677878

78687879
## ConversationalAi WhatsappAccounts
7869-
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">list</a>() -> ElevenLabs.ListWhatsAppAccountsResponse</code></summary>
7870-
<dl>
7871-
<dd>
7872-
7873-
#### 📝 Description
7874-
7875-
<dl>
7876-
<dd>
7877-
7878-
<dl>
7879-
<dd>
7880-
7881-
List all WhatsApp accounts
7882-
</dd>
7883-
</dl>
7884-
</dd>
7885-
</dl>
7886-
7887-
#### 🔌 Usage
7888-
7889-
<dl>
7890-
<dd>
7891-
7892-
<dl>
7893-
<dd>
7894-
7895-
```typescript
7896-
await client.conversationalAi.whatsappAccounts.list();
7897-
7898-
```
7899-
</dd>
7900-
</dl>
7901-
</dd>
7902-
</dl>
7903-
7904-
#### ⚙️ Parameters
7905-
7906-
<dl>
7907-
<dd>
7908-
7909-
<dl>
7910-
<dd>
7911-
7912-
**requestOptions:** `WhatsappAccountsClient.RequestOptions`
7913-
7914-
</dd>
7915-
</dl>
7916-
</dd>
7917-
</dl>
7918-
7919-
7920-
</dd>
7921-
</dl>
7922-
</details>
7923-
7924-
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">import</a>({ ...params }) -> ElevenLabs.ImportWhatsAppAccountResponse</code></summary>
7880+
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">get</a>(phone_number_id) -> ElevenLabs.GetWhatsAppAccountResponse</code></summary>
79257881
<dl>
79267882
<dd>
79277883

@@ -7933,7 +7889,7 @@ await client.conversationalAi.whatsappAccounts.list();
79337889
<dl>
79347890
<dd>
79357891

7936-
Import a WhatsApp account
7892+
Get a WhatsApp account
79377893
</dd>
79387894
</dl>
79397895
</dd>
@@ -7948,11 +7904,7 @@ Import a WhatsApp account
79487904
<dd>
79497905

79507906
```typescript
7951-
await client.conversationalAi.whatsappAccounts.import({
7952-
businessAccountId: "business_account_id",
7953-
phoneNumberId: "phone_number_id",
7954-
tokenCode: "token_code"
7955-
});
7907+
await client.conversationalAi.whatsappAccounts.get("phone_number_id");
79567908

79577909
```
79587910
</dd>
@@ -7968,7 +7920,7 @@ await client.conversationalAi.whatsappAccounts.import({
79687920
<dl>
79697921
<dd>
79707922

7971-
**request:** `ElevenLabs.conversationalAi.ImportWhatsAppAccountRequest`
7923+
**phone_number_id:** `string`
79727924

79737925
</dd>
79747926
</dl>
@@ -7988,7 +7940,7 @@ await client.conversationalAi.whatsappAccounts.import({
79887940
</dl>
79897941
</details>
79907942

7991-
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">get</a>(phone_number_id) -> ElevenLabs.GetWhatsAppAccountResponse</code></summary>
7943+
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">delete</a>(phone_number_id) -> unknown</code></summary>
79927944
<dl>
79937945
<dd>
79947946

@@ -8000,7 +7952,7 @@ await client.conversationalAi.whatsappAccounts.import({
80007952
<dl>
80017953
<dd>
80027954

8003-
Get a WhatsApp account
7955+
Delete a WhatsApp account
80047956
</dd>
80057957
</dl>
80067958
</dd>
@@ -8015,7 +7967,7 @@ Get a WhatsApp account
80157967
<dd>
80167968

80177969
```typescript
8018-
await client.conversationalAi.whatsappAccounts.get("phone_number_id");
7970+
await client.conversationalAi.whatsappAccounts.delete("phone_number_id");
80197971

80207972
```
80217973
</dd>
@@ -8051,7 +8003,7 @@ await client.conversationalAi.whatsappAccounts.get("phone_number_id");
80518003
</dl>
80528004
</details>
80538005

8054-
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">delete</a>(phone_number_id) -> unknown</code></summary>
8006+
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">update</a>(phone_number_id, { ...params }) -> unknown</code></summary>
80558007
<dl>
80568008
<dd>
80578009

@@ -8063,7 +8015,7 @@ await client.conversationalAi.whatsappAccounts.get("phone_number_id");
80638015
<dl>
80648016
<dd>
80658017

8066-
Delete a WhatsApp account
8018+
Update a WhatsApp account
80678019
</dd>
80688020
</dl>
80698021
</dd>
@@ -8078,7 +8030,7 @@ Delete a WhatsApp account
80788030
<dd>
80798031

80808032
```typescript
8081-
await client.conversationalAi.whatsappAccounts.delete("phone_number_id");
8033+
await client.conversationalAi.whatsappAccounts.update("phone_number_id");
80828034

80838035
```
80848036
</dd>
@@ -8102,6 +8054,14 @@ await client.conversationalAi.whatsappAccounts.delete("phone_number_id");
81028054
<dl>
81038055
<dd>
81048056

8057+
**request:** `ElevenLabs.conversationalAi.UpdateWhatsAppAccountRequest`
8058+
8059+
</dd>
8060+
</dl>
8061+
8062+
<dl>
8063+
<dd>
8064+
81058065
**requestOptions:** `WhatsappAccountsClient.RequestOptions`
81068066

81078067
</dd>
@@ -8114,7 +8074,7 @@ await client.conversationalAi.whatsappAccounts.delete("phone_number_id");
81148074
</dl>
81158075
</details>
81168076

8117-
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">update</a>(phone_number_id, { ...params }) -> unknown</code></summary>
8077+
<details><summary><code>client.conversationalAi.whatsappAccounts.<a href="/src/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.ts">list</a>() -> ElevenLabs.ListWhatsAppAccountsResponse</code></summary>
81188078
<dl>
81198079
<dd>
81208080

@@ -8126,7 +8086,7 @@ await client.conversationalAi.whatsappAccounts.delete("phone_number_id");
81268086
<dl>
81278087
<dd>
81288088

8129-
Update a WhatsApp account
8089+
List all WhatsApp accounts
81308090
</dd>
81318091
</dl>
81328092
</dd>
@@ -8141,7 +8101,7 @@ Update a WhatsApp account
81418101
<dd>
81428102

81438103
```typescript
8144-
await client.conversationalAi.whatsappAccounts.update("phone_number_id");
8104+
await client.conversationalAi.whatsappAccounts.list();
81458105

81468106
```
81478107
</dd>
@@ -8157,22 +8117,6 @@ await client.conversationalAi.whatsappAccounts.update("phone_number_id");
81578117
<dl>
81588118
<dd>
81598119

8160-
**phone_number_id:** `string`
8161-
8162-
</dd>
8163-
</dl>
8164-
8165-
<dl>
8166-
<dd>
8167-
8168-
**request:** `ElevenLabs.conversationalAi.UpdateWhatsAppAccountRequest`
8169-
8170-
</dd>
8171-
</dl>
8172-
8173-
<dl>
8174-
<dd>
8175-
81768120
**requestOptions:** `WhatsappAccountsClient.RequestOptions`
81778121

81788122
</dd>
@@ -16437,7 +16381,7 @@ await client.workspace.groups.search({
1643716381
<dl>
1643816382
<dd>
1643916383

16440-
Sends an email invitation to join your workspace to the provided email. If the user doesn't have an account they will be prompted to create one. If the user accepts this invite they will be added as a user to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace administrators. If the user is already in the workspace a 400 error will be returned.
16384+
Sends an email invitation to join your workspace to the provided email. If the user doesn't have an account they will be prompted to create one. If the user accepts this invite they will be added as a user to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission. If the user is already in the workspace a 400 error will be returned.
1644116385
</dd>
1644216386
</dl>
1644316387
</dd>
@@ -16502,7 +16446,7 @@ await client.workspace.invites.create({
1650216446
<dl>
1650316447
<dd>
1650416448

16505-
Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace administrators.
16449+
Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission.
1650616450
</dd>
1650716451
</dl>
1650816452
</dd>
@@ -16567,7 +16511,7 @@ await client.workspace.invites.createBatch({
1656716511
<dl>
1656816512
<dd>
1656916513

16570-
Invalidates an existing email invitation. The invitation will still show up in the inbox it has been delivered to, but activating it to join the workspace won't work. This endpoint may only be called by workspace administrators.
16514+
Invalidates an existing email invitation. The invitation will still show up in the inbox it has been delivered to, but activating it to join the workspace won't work. This endpoint may only be called by workspace members with the WORKSPACE_MEMBERS_INVITE permission.
1657116515
</dd>
1657216516
</dl>
1657316517
</dd>
@@ -16920,7 +16864,7 @@ await client.workspace.resources.unshare("resource_id", {
1692016864
<dl>
1692116865
<dd>
1692216866

16923-
Removes a member from the specified group. This endpoint may only be called by workspace administrators.
16867+
Removes a member from the specified group. Requires `group_members_manage` permission.
1692416868
</dd>
1692516869
</dl>
1692616870
</dd>
@@ -16993,7 +16937,7 @@ await client.workspace.groups.members.remove("group_id", {
1699316937
<dl>
1699416938
<dd>
1699516939

16996-
Adds a member of your workspace to the specified group. This endpoint may only be called by workspace administrators.
16940+
Adds a member of your workspace to the specified group. Requires `group_members_manage` permission.
1699716941
</dd>
1699816942
</dl>
1699916943
</dd>

src/BaseClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export function normalizeClientOptions<T extends BaseClientOptions>(options: T):
4747
{
4848
"X-Fern-Language": "JavaScript",
4949
"X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
50-
"X-Fern-SDK-Version": "v2.33.0",
51-
"User-Agent": "@elevenlabs/elevenlabs-js/v2.33.0",
50+
"X-Fern-SDK-Version": "v2.34.0",
51+
"User-Agent": "@elevenlabs/elevenlabs-js/v2.34.0",
5252
"X-Fern-Runtime": core.RUNTIME.type,
5353
"X-Fern-Runtime-Version": core.RUNTIME.version,
5454
"xi-api-key": options?.apiKey,

src/Client.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,57 @@ export class ElevenLabsClient {
165165
return (this._workspace ??= new WorkspaceClient(this._options));
166166
}
167167

168+
/**
169+
* @param {ElevenLabsClient.RequestOptions} requestOptions - Request-specific configuration.
170+
*
171+
* @example
172+
* await client.postV1ConvaiWhatsappAccounts()
173+
*/
174+
public postV1ConvaiWhatsappAccounts(
175+
requestOptions?: ElevenLabsClient.RequestOptions,
176+
): core.HttpResponsePromise<void> {
177+
return core.HttpResponsePromise.fromPromise(this.__postV1ConvaiWhatsappAccounts(requestOptions));
178+
}
179+
180+
private async __postV1ConvaiWhatsappAccounts(
181+
requestOptions?: ElevenLabsClient.RequestOptions,
182+
): Promise<core.WithRawResponse<void>> {
183+
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
184+
this._options?.headers,
185+
mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
186+
requestOptions?.headers,
187+
);
188+
const _response = await (this._options.fetcher ?? core.fetcher)({
189+
url: core.url.join(
190+
(await core.Supplier.get(this._options.baseUrl)) ??
191+
(await core.Supplier.get(this._options.environment)) ??
192+
environments.ElevenLabsEnvironment.Production,
193+
"v1/convai/whatsapp-accounts",
194+
),
195+
method: "POST",
196+
headers: _headers,
197+
queryParameters: requestOptions?.queryParams,
198+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
199+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
200+
abortSignal: requestOptions?.abortSignal,
201+
fetchFn: this._options?.fetch,
202+
logging: this._options.logging,
203+
});
204+
if (_response.ok) {
205+
return { data: undefined, rawResponse: _response.rawResponse };
206+
}
207+
208+
if (_response.error.reason === "status-code") {
209+
throw new errors.ElevenLabsError({
210+
statusCode: _response.error.statusCode,
211+
body: _response.error.body,
212+
rawResponse: _response.rawResponse,
213+
});
214+
}
215+
216+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/convai/whatsapp-accounts");
217+
}
218+
168219
/**
169220
* @param {string} agent_id
170221
* @param {string} branch_id

src/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ export interface UpdateAgentRequest {
1919
tags?: string[];
2020
/** Description for this version when publishing changes (only applicable for versioned agents) */
2121
versionDescription?: string;
22+
/** List of procedure refs used for this agent version. */
23+
procedureRefs?: ElevenLabs.conversationalAi.BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem[];
2224
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from "./client";
22
export * from "./resources";
3+
export * from "./types";

0 commit comments

Comments
 (0)