@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/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-DzOxLGs-.js';
2
- export { e as CreateNexraDisplayQuoteBatchRequest, C as CreateNexraQuoteRequest, F as FetchLike, M as MediaGeometryField, k as MediaGeometryProjection, z as ModelCapabilitySummary, A as ModelDateVersion, B as ModelEndpointSummary, D as ModelModality, x as ModelResourceList, E as ModelResourceOption, w as ModelSchema, u as ModelSearchParams, l as NexraBillingCurrency, g as NexraCatalogRevision, y as NexraClientOptions, f as NexraDisplayQuoteBatch, G as NexraDisplayQuoteBatchEntry, n as NexraModelOperation, h as NexraModelSpec, j as NexraModelSpecFilter, d as NexraQuote, o as NexraSalePrice, c as NexraSalePriceList, p as NexraSettlement, v as TaskModel, T as TaskModelSummary, U as UnifiedMediaGeometry } from './media-geometry-COln1N_2.js';
3
- export { C as CursorPage, a as JsonObject, b as JsonPrimitive, J as JsonValue } from './json-Cz0MkWQn.js';
4
- export { A as ApiErrorPayload, N as NexraError, a as PublicError, b as PublicErrorContext, P as PublicErrorFields } from './errors-DJZuAKoO.js';
5
- export { d as CreateTaskOptions, e as CreateTaskRequest, C as CreateVoiceRequest, f as RequestDetails, b as RunResult, R as RunTaskOptions, c as Task, h as TaskCost, i as TaskError, j as TaskEvent, k as TaskEventType, l as TaskListParams, m as TaskPage, n as TaskProgress, o as TaskReceipt, c as TaskResult, p as TaskStatus, q as TaskTiming, r as TaskUsage, s as TaskWebhookConfig, t as TerminalTaskStatus, u as VerifyWebhookOptions, V as Voice, a as VoiceCreation, W as WaitTaskOptions, v as WatchTaskOptions } from './voices-xyPqhQqR.js';
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-DzOxLGs-.js';
2
- import { H as HttpTransport, p as NexraSettlement } from './media-geometry-COln1N_2.js';
3
- import { a as JsonObject, J as JsonValue, C as CursorPage } from './json-Cz0MkWQn.js';
4
- import { P as PublicErrorFields, a as PublicError, b as PublicErrorContext, N as NexraError } from './errors-DJZuAKoO.js';
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 CreateVoiceRequest as C, type RunTaskOptions as R, TasksClient as T, type Voice as V, type WaitTaskOptions as W, type VoiceCreation as a, type RunResult as b, type TaskResult as c, type CreateTaskOptions as d, type CreateTaskRequest as e, type RequestDetails as f, TASK_STATUSES as g, type TaskCost as h, type TaskError as i, type TaskEvent as j, type TaskEventType as k, type TaskListParams as l, type TaskPage as m, type TaskProgress as n, type TaskReceipt as o, type TaskStatus as p, type TaskTiming as q, type TaskUsage as r, type TaskWebhookConfig as s, type TerminalTaskStatus as t, type VerifyWebhookOptions as u, type WatchTaskOptions as v, isTerminalTaskStatus as w, verifyWebhook as x };
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.52",
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.12",
60
+ "@ai-sdk/google": "4.0.119",
59
61
  "@ai-sdk/openai": "4.0.11",
60
- "@ai-sdk/provider": "4.0.2",
61
- "@ai-sdk/provider-utils": "5.0.21",
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.12",
72
+ "@ai-sdk/google": "^4.0.119",
70
73
  "@ai-sdk/openai": "^4.0.11",
71
- "@ai-sdk/provider": "^4.0.2",
72
- "@ai-sdk/provider-utils": "^5.0.21"
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
  }