Skip to content

Commit

Permalink
Release 2.0.4-alpha0
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 11, 2024
1 parent 0ad5c26 commit 8e7e498
Show file tree
Hide file tree
Showing 38 changed files with 855 additions and 84 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cartesia/cartesia-js",
"version": "2.0.3",
"version": "2.0.4-alpha0",
"private": false,
"repository": "https://github.com/cartesia-ai/cartesia-js",
"main": "./index.js",
Expand Down
204 changes: 204 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,210 @@ await client.apiStatus.get();
</dl>
</details>

## Datasets

<details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">list</a>() -> Cartesia.PaginatedDatasets</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.datasets.list();
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**requestOptions:** `Datasets.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

<details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">create</a>({ ...params }) -> Cartesia.Dataset</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.datasets.create({
name: "string",
});
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Cartesia.CreateDatasetRequest`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Datasets.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

<details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">listFiles</a>(id) -> Cartesia.PaginatedDatasetFiles</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.datasets.listFiles("string");
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**id:** `string`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Datasets.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

<details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">uploadFile</a>(file, id, { ...params }) -> void</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.datasets.uploadFile(fs.createReadStream("/path/to/your/file"), "string", {});
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**file:** `File | fs.ReadStream | Blob`

</dd>
</dl>

<dl>
<dd>

**id:** `string`

</dd>
</dl>

<dl>
<dd>

**request:** `Cartesia.UploadDatasetFileRequest`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Datasets.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

## Tts

<details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">bytes</a>({ ...params }) -> stream.Readable</code></summary>
Expand Down
7 changes: 7 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import * as environments from "./environments";
import * as core from "./core";
import { ApiStatus } from "./api/resources/apiStatus/client/Client";
import { Datasets } from "./api/resources/datasets/client/Client";
import { Tts } from "./api/resources/tts/client/Client";
import { VoiceChanger } from "./api/resources/voiceChanger/client/Client";
import { Voices } from "./api/resources/voices/client/Client";
Expand Down Expand Up @@ -39,6 +40,12 @@ export class CartesiaClient {
return (this._apiStatus ??= new ApiStatus(this._options));
}

protected _datasets: Datasets | undefined;

public get datasets(): Datasets {
return (this._datasets ??= new Datasets(this._options));
}

protected _tts: Tts | undefined;

public get tts(): Tts {
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/apiStatus/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export class ApiStatus {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.0.3",
"User-Agent": "@cartesia/cartesia-js/2.0.3",
"X-Fern-SDK-Version": "2.0.4-alpha0",
"User-Agent": "@cartesia/cartesia-js/2.0.4-alpha0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
Loading

0 comments on commit 8e7e498

Please sign in to comment.