@breeze.blue/sdk 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +2 -0
- package/dist/client.d.ts +3 -1
- package/dist/client.js +4 -0
- package/dist/types.d.ts +13 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -530,6 +530,8 @@ language-to-accent cascade at runtime.
|
|
|
530
530
|
```ts
|
|
531
531
|
const models = await client.models.list();
|
|
532
532
|
const balance = await client.account.balance();
|
|
533
|
+
const currentKey = (await client.account.currentApiKey()).apiKey;
|
|
534
|
+
console.log(currentKey.status, currentKey.creditRemaining);
|
|
533
535
|
const usage = await client.account.usage({ days: 7 });
|
|
534
536
|
const keyUsage = await client.account.usage({
|
|
535
537
|
apiKeyId: "key_01hprod",
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AudioResponse } from "./audio.js";
|
|
2
|
-
import type { AudioRequestOptions, BreezeBlueWebSocket, AsyncTextToSpeechJob, Balance, BreezeBlueClientOptions, GenericStatus, GenerationJob, HistoryItem, HistoryList, HistoryListParams, Model, RequestOptions, RealtimeTextToSpeechConnectOptions, RealtimeTextToSpeechEvent, RealtimeTextToSpeechManagedConnectOptions, RealtimeTextToSpeechMessage, RealtimeTextToSpeechSession, RealtimeTextToSpeechSessionRequest, SavedVoice, SaveVoiceRequest, StreamTextToSpeechOptions, TextToSpeechRequest, TtsEnhanceRequest, TtsEnhanceResponse, Usage, UsageParams, Voice, VoiceClonePreview, VoiceClonePreviewRequest, VoiceDesignRequest, VoiceDesignResponse, VoiceDesignStreamRequest, VoiceEditRequest, VoiceList, VoiceMetadataOptions, VoiceRandomParams, VoiceSearchParams, VoiceSettings } from "./types.js";
|
|
2
|
+
import type { AudioRequestOptions, BreezeBlueWebSocket, AsyncTextToSpeechJob, Balance, BreezeBlueClientOptions, CurrentApiKeyResponse, GenericStatus, GenerationJob, HistoryItem, HistoryList, HistoryListParams, Model, RequestOptions, RealtimeTextToSpeechConnectOptions, RealtimeTextToSpeechEvent, RealtimeTextToSpeechManagedConnectOptions, RealtimeTextToSpeechMessage, RealtimeTextToSpeechSession, RealtimeTextToSpeechSessionRequest, SavedVoice, SaveVoiceRequest, StreamTextToSpeechOptions, TextToSpeechRequest, TtsEnhanceRequest, TtsEnhanceResponse, Usage, UsageParams, Voice, VoiceClonePreview, VoiceClonePreviewRequest, VoiceDesignRequest, VoiceDesignResponse, VoiceDesignStreamRequest, VoiceEditRequest, VoiceList, VoiceMetadataOptions, VoiceRandomParams, VoiceSearchParams, VoiceSettings } from "./types.js";
|
|
3
3
|
export declare class BreezeBlueClient {
|
|
4
4
|
readonly apiKey: string | undefined;
|
|
5
5
|
readonly baseUrl: string;
|
|
@@ -267,6 +267,8 @@ declare class AccountResource {
|
|
|
267
267
|
private readonly client;
|
|
268
268
|
constructor(client: BreezeBlueClient);
|
|
269
269
|
balance(options?: RequestOptions): Promise<Balance>;
|
|
270
|
+
/** Return the authenticating API key and its current Key Budget counters. */
|
|
271
|
+
currentApiKey(options?: RequestOptions): Promise<CurrentApiKeyResponse>;
|
|
270
272
|
usage(params?: UsageParams, options?: RequestOptions): Promise<Usage>;
|
|
271
273
|
}
|
|
272
274
|
export {};
|
package/dist/client.js
CHANGED
|
@@ -1625,6 +1625,10 @@ class AccountResource {
|
|
|
1625
1625
|
balance(options) {
|
|
1626
1626
|
return this.client.requestJson("GET", "/v1/balance", undefined, undefined, options);
|
|
1627
1627
|
}
|
|
1628
|
+
/** Return the authenticating API key and its current Key Budget counters. */
|
|
1629
|
+
currentApiKey(options) {
|
|
1630
|
+
return this.client.requestJson("GET", "/v1/api-keys/current", undefined, undefined, options);
|
|
1631
|
+
}
|
|
1628
1632
|
usage(params = {}, options) {
|
|
1629
1633
|
return this.client.requestJson("GET", "/v1/usage", params, undefined, options);
|
|
1630
1634
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -508,6 +508,19 @@ export interface Balance {
|
|
|
508
508
|
topups: BalanceTopup[];
|
|
509
509
|
[key: string]: unknown;
|
|
510
510
|
}
|
|
511
|
+
export interface CurrentApiKey {
|
|
512
|
+
id: string;
|
|
513
|
+
name: string;
|
|
514
|
+
prefix: string;
|
|
515
|
+
status: string;
|
|
516
|
+
creditLimit?: number | null;
|
|
517
|
+
creditUsed?: number;
|
|
518
|
+
creditReserved?: number;
|
|
519
|
+
creditRemaining?: number | null;
|
|
520
|
+
}
|
|
521
|
+
export interface CurrentApiKeyResponse {
|
|
522
|
+
apiKey: CurrentApiKey;
|
|
523
|
+
}
|
|
511
524
|
export interface UsageSummary {
|
|
512
525
|
requestCount: number;
|
|
513
526
|
totalTextCharacters: number;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.14.0";
|
|
2
2
|
export declare const SDK_NAME = "@breeze.blue/sdk";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.
|
|
1
|
+
export const SDK_VERSION = "0.14.0";
|
|
2
2
|
export const SDK_NAME = "@breeze.blue/sdk";
|