@byte_fluffy/nexra-sdk 0.1.0-alpha.52 → 0.1.0-alpha.54
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/README.md +15 -110
- package/dist/catalog.d.ts +3 -3
- package/dist/catalog.js +2 -2
- package/dist/{chunk-LEZWVFQH.js → chunk-IOGCXMW3.js} +115 -8
- package/dist/{chunk-V3KBU3J5.js → chunk-MLDFBO2A.js} +10828 -11220
- package/dist/chunk-ZTRVMQMH.js +745 -0
- package/dist/{errors-DJZuAKoO.d.ts → errors-BXPUVOh7.d.ts} +2 -2
- package/dist/index.d.ts +12 -11
- package/dist/index.js +16 -466
- package/dist/{json-Cz0MkWQn.d.ts → json-dnsDzk-s.d.ts} +1 -1
- package/dist/language.d.ts +3 -3
- package/dist/language.js +73 -247
- package/dist/{media-DzOxLGs-.d.ts → media-IaOdOMQC.d.ts} +14 -2
- package/dist/{media-geometry-COln1N_2.d.ts → media-geometry-z7fXaDSN.d.ts} +5 -2
- package/dist/media.d.ts +2 -2
- package/dist/media.js +1 -1
- package/dist/node.d.ts +17 -0
- package/dist/node.js +78 -0
- package/dist/types.d.ts +5 -5
- package/dist/{voices-xyPqhQqR.d.ts → voices-BrCaiHnb.d.ts} +53 -5
- package/package.json +13 -7
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, d as MediaAsset, e as MediaAssetStatus, f as MediaKind, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput } from './media-
|
|
2
|
-
export {
|
|
3
|
-
export { C as CursorPage,
|
|
4
|
-
export { A as ApiErrorPayload, N as NexraError,
|
|
5
|
-
export {
|
|
1
|
+
export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, d as MediaAsset, e as MediaAssetStatus, f as MediaKind, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput } from './media-IaOdOMQC.js';
|
|
2
|
+
export { C as CreateNexraDisplayQuoteBatchRequest, a as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, b as MediaGeometryProjection, c as ModelCapabilitySummary, d as ModelDateVersion, e as ModelEndpointSummary, f as ModelModality, g as ModelResourceList, h as ModelResourceOption, i as ModelSchema, j as ModelSearchParams, k as NexraBillingCurrency, l as NexraCatalogRevision, N as NexraClientOptions, m as NexraDisplayQuoteBatch, n as NexraDisplayQuoteBatchEntry, o as NexraModelOperation, p as NexraModelSpec, q as NexraModelSpecFilter, r as NexraQuote, s as NexraSalePrice, t as NexraSalePriceList, u as NexraSettlement, T as TaskModel, v as TaskModelSummary, U as UnifiedMediaGeometry } from './media-geometry-z7fXaDSN.js';
|
|
3
|
+
export { C as CursorPage, J as JsonObject, a as JsonPrimitive, b as JsonValue } from './json-dnsDzk-s.js';
|
|
4
|
+
export { A as ApiErrorPayload, N as NexraError, P as PublicError, a as PublicErrorContext, b as PublicErrorFields } from './errors-BXPUVOh7.js';
|
|
5
|
+
export { C as CreateTaskOptions, a as CreateTaskRequest, b as CreateVoiceRequest, R as RequestDetails, c as RunResult, d as RunTaskOptions, e as Task, f as TaskCost, g as TaskError, h as TaskEvent, i as TaskEventType, j as TaskListParams, k as TaskPage, l as TaskProgress, m as TaskReceipt, e as TaskResult, n as TaskStatus, o as TaskTiming, p as TaskUsage, q as TaskWebhookConfig, s as TerminalTaskStatus, u as TranscriptionEvent, v as TranscriptionResponse, w as TranscriptionStreamOptions, V as VerifyWebhookOptions, x as Voice, y as VoiceCreation, W as WaitTaskOptions, z as WatchTaskOptions } from './voices-BrCaiHnb.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as AssetUploadOptions, d as MediaAsset, A as AssetImportRequest, h as AssetCertificationRequest, i as AssetCertification, j as AssetCertificationWaitOptions } from './media-
|
|
2
|
-
import { H as HttpTransport,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { c as AssetUploadOptions, d as MediaAsset, A as AssetImportRequest, h as AssetCertificationRequest, i as AssetCertification, j as AssetCertificationWaitOptions } from './media-IaOdOMQC.js';
|
|
2
|
+
import { H as HttpTransport, u as NexraSettlement } from './media-geometry-z7fXaDSN.js';
|
|
3
|
+
import { J as JsonObject, b as JsonValue, C as CursorPage } from './json-dnsDzk-s.js';
|
|
4
|
+
import { b as PublicErrorFields, P as PublicError, a as PublicErrorContext, N as NexraError } from './errors-BXPUVOh7.js';
|
|
5
5
|
|
|
6
6
|
declare class AssetsClient {
|
|
7
7
|
private readonly transport;
|
|
@@ -53,6 +53,43 @@ declare class TasksClient {
|
|
|
53
53
|
run<TOutput = JsonValue, TInput = Record<string, unknown>>(model: string, input: TInput, options?: RunTaskOptions): Promise<RunResult<TOutput>>;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
interface TranscriptionStreamOptions {
|
|
57
|
+
model: string;
|
|
58
|
+
mode?: "realtime" | "sentence";
|
|
59
|
+
audio: AsyncIterable<Uint8Array>;
|
|
60
|
+
configuration: JsonObject;
|
|
61
|
+
organizationId?: string;
|
|
62
|
+
signal?: AbortSignal;
|
|
63
|
+
onConnected?: () => void;
|
|
64
|
+
}
|
|
65
|
+
type TranscriptionResponse = JsonObject & {
|
|
66
|
+
result?: JsonObject & {
|
|
67
|
+
text?: string;
|
|
68
|
+
};
|
|
69
|
+
audio_info?: JsonObject & {
|
|
70
|
+
duration?: number;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
interface TranscriptionEvent {
|
|
74
|
+
final: boolean;
|
|
75
|
+
response: TranscriptionResponse;
|
|
76
|
+
}
|
|
77
|
+
declare class NexraTranscriptionError extends Error {
|
|
78
|
+
readonly code: string;
|
|
79
|
+
readonly nexraRequestId?: string | undefined;
|
|
80
|
+
readonly closeCode?: number | undefined;
|
|
81
|
+
readonly upstreamCode?: number | undefined;
|
|
82
|
+
constructor(code: string, message: string, nexraRequestId?: string | undefined, closeCode?: number | undefined, upstreamCode?: number | undefined);
|
|
83
|
+
}
|
|
84
|
+
type TranscriptionSocket = Pick<WebSocket, "readyState" | "bufferedAmount" | "binaryType" | "send" | "close" | "addEventListener" | "removeEventListener" | "onmessage" | "onerror" | "onclose">;
|
|
85
|
+
type TranscriptionSocketFactory = (url: URL, headers: Headers) => TranscriptionSocket;
|
|
86
|
+
declare class TranscriptionClient {
|
|
87
|
+
private readonly transport;
|
|
88
|
+
private readonly connect;
|
|
89
|
+
constructor(transport: HttpTransport, connect?: TranscriptionSocketFactory);
|
|
90
|
+
stream(options: TranscriptionStreamOptions): AsyncGenerator<TranscriptionEvent>;
|
|
91
|
+
}
|
|
92
|
+
|
|
56
93
|
interface VerifyWebhookOptions {
|
|
57
94
|
toleranceSeconds?: number;
|
|
58
95
|
now?: Date;
|
|
@@ -205,7 +242,18 @@ type TaskReceipt = Pick<Task, "id" | "status"> & PublicErrorContext;
|
|
|
205
242
|
/** Public Task result; platform diagnostics and business tags live in RequestDetails. */
|
|
206
243
|
type TaskResult<TOutput = JsonValue> = Pick<Task<TOutput>, "id" | "model" | "status"> & Partial<Pick<Task<TOutput>, "output" | "assets" | "persistPolicy" | "deliveryStatus" | "settlement" | "queue">> & PublicErrorFields;
|
|
207
244
|
/** Platform request details, used by both managed Tasks and native proxy requests. */
|
|
245
|
+
/** Recorded execution only; never inferred from the current model catalog. */
|
|
246
|
+
interface LanguageRequestExecution {
|
|
247
|
+
isStream: boolean;
|
|
248
|
+
attempts: ReadonlyArray<Readonly<{
|
|
249
|
+
requestId?: string;
|
|
250
|
+
attempt: number;
|
|
251
|
+
strategy: "passthrough" | "bridge";
|
|
252
|
+
upstreamProtocol: string;
|
|
253
|
+
}>>;
|
|
254
|
+
}
|
|
208
255
|
interface RequestDetails extends PublicErrorFields {
|
|
256
|
+
execution?: LanguageRequestExecution;
|
|
209
257
|
id: string;
|
|
210
258
|
/** Owning Nexra account, used to separate users in system request history. */
|
|
211
259
|
accountId?: string | null;
|
|
@@ -345,4 +393,4 @@ type VoiceCreation = Readonly<{
|
|
|
345
393
|
voice: Voice;
|
|
346
394
|
}>;
|
|
347
395
|
|
|
348
|
-
export { AssetsClient as A, type
|
|
396
|
+
export { AssetsClient as A, isTerminalTaskStatus as B, type CreateTaskOptions as C, verifyWebhook as D, type TranscriptionSocketFactory as E, NexraTranscriptionError as N, type RequestDetails as R, TASK_STATUSES as T, type VerifyWebhookOptions as V, type WaitTaskOptions as W, type CreateTaskRequest as a, type CreateVoiceRequest as b, type RunResult as c, type RunTaskOptions as d, type TaskResult as e, type TaskCost as f, type TaskError as g, type TaskEvent as h, type TaskEventType as i, type TaskListParams as j, type TaskPage as k, type TaskProgress as l, type TaskReceipt as m, type TaskStatus as n, type TaskTiming as o, type TaskUsage as p, type TaskWebhookConfig as q, TasksClient as r, type TerminalTaskStatus as s, TranscriptionClient as t, type TranscriptionEvent as u, type TranscriptionResponse as v, type TranscriptionStreamOptions as w, type Voice as x, type VoiceCreation as y, type WatchTaskOptions as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byte_fluffy/nexra-sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.54",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
|
+
"browser": "./dist/index.js",
|
|
23
|
+
"node": "./dist/node.js",
|
|
22
24
|
"import": "./dist/index.js"
|
|
23
25
|
},
|
|
24
26
|
"./catalog": {
|
|
@@ -55,21 +57,22 @@
|
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
57
59
|
"@ai-sdk/anthropic": "4.0.30",
|
|
58
|
-
"@ai-sdk/google": "4.0.
|
|
60
|
+
"@ai-sdk/google": "4.0.119",
|
|
59
61
|
"@ai-sdk/openai": "4.0.11",
|
|
60
|
-
"@ai-sdk/provider": "4.0.
|
|
61
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
62
|
+
"@ai-sdk/provider": "4.0.38",
|
|
63
|
+
"@ai-sdk/provider-utils": "5.0.80",
|
|
62
64
|
"@nexra/contracts": "workspace:*",
|
|
63
65
|
"@nexra/models": "workspace:*",
|
|
66
|
+
"@types/ws": "8.18.2",
|
|
64
67
|
"tsup": "8.5.1",
|
|
65
68
|
"typescript": "5.9.3"
|
|
66
69
|
},
|
|
67
70
|
"peerDependencies": {
|
|
68
71
|
"@ai-sdk/anthropic": "^4.0.30",
|
|
69
|
-
"@ai-sdk/google": "^4.0.
|
|
72
|
+
"@ai-sdk/google": "^4.0.119",
|
|
70
73
|
"@ai-sdk/openai": "^4.0.11",
|
|
71
|
-
"@ai-sdk/provider": "^4.0.
|
|
72
|
-
"@ai-sdk/provider-utils": "^5.0.
|
|
74
|
+
"@ai-sdk/provider": "^4.0.38",
|
|
75
|
+
"@ai-sdk/provider-utils": "^5.0.80"
|
|
73
76
|
},
|
|
74
77
|
"peerDependenciesMeta": {
|
|
75
78
|
"@ai-sdk/anthropic": {
|
|
@@ -87,5 +90,8 @@
|
|
|
87
90
|
"@ai-sdk/provider-utils": {
|
|
88
91
|
"optional": true
|
|
89
92
|
}
|
|
93
|
+
},
|
|
94
|
+
"dependencies": {
|
|
95
|
+
"ws": "8.22.2"
|
|
90
96
|
}
|
|
91
97
|
}
|