Skip to content

Commit

Permalink
Release 2.0.0-alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 5, 2024
1 parent 1374155 commit 071cc14
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 106 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.0-alpha",
"version": "2.0.0-alpha2",
"private": false,
"repository": "https://github.com/cartesia-ai/cartesia-js",
"main": "./index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Voices } from "./api/resources/voices/client/Client";
export declare namespace CartesiaClient {
interface Options {
environment?: core.Supplier<environments.CartesiaEnvironment | string>;
apiKeyHeader?: core.Supplier<string | undefined>;
apiKey?: core.Supplier<string | undefined>;
/** Override the Cartesia-Version header */
cartesiaVersion?: "2024-06-10";
fetcher?: core.FetchFunction;
Expand Down
10 changes: 5 additions & 5 deletions src/api/resources/apiStatus/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as errors from "../../../../errors/index";
export declare namespace ApiStatus {
interface Options {
environment?: core.Supplier<environments.CartesiaEnvironment | string>;
apiKeyHeader?: core.Supplier<string | undefined>;
apiKey?: core.Supplier<string | undefined>;
/** Override the Cartesia-Version header */
cartesiaVersion?: "2024-06-10";
fetcher?: core.FetchFunction;
Expand Down 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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -91,7 +91,7 @@ export class ApiStatus {
}

protected async _getCustomAuthorizationHeaders() {
const apiKeyHeaderValue = await core.Supplier.get(this._options.apiKeyHeader);
return { "X-API-Key": apiKeyHeaderValue };
const apiKeyValue = await core.Supplier.get(this._options.apiKey);
return { "X-API-Key": apiKeyValue };
}
}
14 changes: 7 additions & 7 deletions src/api/resources/tts/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as errors from "../../../../errors/index";
export declare namespace Tts {
interface Options {
environment?: core.Supplier<environments.CartesiaEnvironment | string>;
apiKeyHeader?: core.Supplier<string | undefined>;
apiKey?: core.Supplier<string | undefined>;
/** Override the Cartesia-Version header */
cartesiaVersion?: "2024-06-10";
fetcher?: core.FetchFunction;
Expand Down Expand Up @@ -45,8 +45,8 @@ export class Tts {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -99,8 +99,8 @@ export class Tts {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -156,7 +156,7 @@ export class Tts {
}

protected async _getCustomAuthorizationHeaders() {
const apiKeyHeaderValue = await core.Supplier.get(this._options.apiKeyHeader);
return { "X-API-Key": apiKeyHeaderValue };
const apiKeyValue = await core.Supplier.get(this._options.apiKey);
return { "X-API-Key": apiKeyValue };
}
}
14 changes: 7 additions & 7 deletions src/api/resources/voiceChanger/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as serializers from "../../../../serialization/index";
export declare namespace VoiceChanger {
interface Options {
environment?: core.Supplier<environments.CartesiaEnvironment | string>;
apiKeyHeader?: core.Supplier<string | undefined>;
apiKey?: core.Supplier<string | undefined>;
/** Override the Cartesia-Version header */
cartesiaVersion?: "2024-06-10";
fetcher?: core.FetchFunction;
Expand Down Expand Up @@ -70,8 +70,8 @@ export class VoiceChanger {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -140,8 +140,8 @@ export class VoiceChanger {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -198,7 +198,7 @@ export class VoiceChanger {
}

protected async _getCustomAuthorizationHeaders() {
const apiKeyHeaderValue = await core.Supplier.get(this._options.apiKeyHeader);
return { "X-API-Key": apiKeyHeaderValue };
const apiKeyValue = await core.Supplier.get(this._options.apiKey);
return { "X-API-Key": apiKeyValue };
}
}
38 changes: 19 additions & 19 deletions src/api/resources/voices/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Blob } from "buffer";
export declare namespace Voices {
interface Options {
environment?: core.Supplier<environments.CartesiaEnvironment | string>;
apiKeyHeader?: core.Supplier<string | undefined>;
apiKey?: core.Supplier<string | undefined>;
/** Override the Cartesia-Version header */
cartesiaVersion?: "2024-06-10";
fetcher?: core.FetchFunction;
Expand Down Expand Up @@ -52,8 +52,8 @@ export class Voices {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -123,8 +123,8 @@ export class Voices {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -186,8 +186,8 @@ export class Voices {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -250,8 +250,8 @@ export class Voices {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -313,8 +313,8 @@ export class Voices {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -383,8 +383,8 @@ export class Voices {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -454,8 +454,8 @@ export class Voices {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -559,8 +559,8 @@ export class Voices {
"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.0-alpha",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha",
"X-Fern-SDK-Version": "2.0.0-alpha2",
"User-Agent": "@cartesia/cartesia-js/2.0.0-alpha2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -606,7 +606,7 @@ export class Voices {
}

protected async _getCustomAuthorizationHeaders() {
const apiKeyHeaderValue = await core.Supplier.get(this._options.apiKeyHeader);
return { "X-API-Key": apiKeyHeaderValue };
const apiKeyValue = await core.Supplier.get(this._options.apiKey);
return { "X-API-Key": apiKeyValue };
}
}
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = "2.0.0-alpha";
export const SDK_VERSION = "2.0.0-alpha2";
Loading

0 comments on commit 071cc14

Please sign in to comment.