@byte_fluffy/nexra-sdk 0.1.0-alpha.52 → 0.1.0-alpha.53

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.
@@ -10,13 +10,13 @@ var MEDIA_KINDS = [
10
10
 
11
11
  // ../contracts/src/public-error-catalog.ts
12
12
  var PUBLIC_ERROR_CATALOG = {
13
- invalid_model_quotation_selection: { "zh-CN": "\u6240\u9009\u6A21\u578B\u6216\u6E20\u9053\u5DF2\u4E0D\u53EF\u5BFC\u51FA\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u540E\u91CD\u8BD5\u3002", en: "The selected models or channels are no longer available for export. Update your selection and try again." },
14
13
  api_key_spending_limit_exceeded: { "zh-CN": "\u5F53\u524D\u5BC6\u94A5\u7684\u5269\u4F59\u6D88\u8D39\u989D\u5EA6\u4E0D\u8DB3\uFF0C\u8BF7\u8054\u7CFB\u7EC4\u7EC7\u7BA1\u7406\u5458\u589E\u52A0\u989D\u5EA6\u3002", en: "This key has insufficient remaining spending allowance. Ask an organization administrator to increase it." },
15
14
  organization_key_limit_invalid: { "zh-CN": "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u6D88\u8D39\u989D\u5EA6\uFF0C\u91D1\u989D\u6700\u591A\u4FDD\u7559 8 \u4F4D\u5C0F\u6570\uFF1B\u8C03\u6574\u91D1\u989D\u987B\u5927\u4E8E 0\u3002", en: "Enter a valid spending allowance with up to 8 decimal places. An adjustment must be greater than zero." },
16
15
  organization_key_limit_unset: { "zh-CN": "\u5F53\u524D\u5BC6\u94A5\u5C1A\u672A\u8BBE\u7F6E\u6D88\u8D39\u989D\u5EA6\uFF0C\u8BF7\u5148\u589E\u52A0\u989D\u5EA6\u540E\u518D\u51CF\u5C11\u3002", en: "This key has no spending allowance configured. Set it with an increase before decreasing it." },
17
16
  organization_key_limit_below_committed: { "zh-CN": "\u8C03\u6574\u540E\u7684\u6D88\u8D39\u989D\u5EA6\u4E0D\u80FD\u4F4E\u4E8E\u5DF2\u6D88\u8D39\u4E0E\u8BF7\u6C42\u9884\u5360\u7684\u5408\u8BA1\u91D1\u989D\u3002", en: "The resulting allowance cannot be less than settled spending plus pending reservations." },
18
17
  organization_key_limit_exceeds_wallet: { "zh-CN": "\u5BC6\u94A5\u53EF\u7528\u6D88\u8D39\u989D\u5EA6\u4E0D\u80FD\u8D85\u8FC7\u94B1\u5305\u5F53\u524D\u53EF\u7528\u4F59\u989D\uFF0C\u8BF7\u8C03\u6574\u989D\u5EA6\u6216\u5145\u503C\u540E\u91CD\u8BD5\u3002", en: "The key's available spending allowance cannot exceed the wallet's current available balance. Reduce it or add funds." },
19
18
  organization_key_limit_conflict: { "zh-CN": "\u8FD9\u6B21\u989D\u5EA6\u64CD\u4F5C\u5DF2\u88AB\u5904\u7406\uFF0C\u8BF7\u5173\u95ED\u540E\u91CD\u65B0\u6253\u5F00\u518D\u8BD5\u3002", en: "This allowance change has already been processed. Close and reopen the form to try again." },
19
+ invalid_model_quotation_selection: { "zh-CN": "\u6240\u9009\u6A21\u578B\u6216\u6E20\u9053\u5DF2\u4E0D\u53EF\u5BFC\u51FA\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u540E\u91CD\u8BD5\u3002", en: "The selected models or channels are no longer available for export. Update your selection and try again." },
20
20
  google_channel_rate_limited: { "zh-CN": "\u5F53\u524D\u6587\u672C\u6A21\u578B\u670D\u52A1\u7E41\u5FD9\u6216\u53D7\u5230\u9650\u6D41\uFF08429\uFF09\u3002\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF1B\u82E5\u6301\u7EED\u51FA\u73B0\uFF0C\u53EF\u5207\u6362\u5176\u4ED6\u6587\u672C\u6A21\u578B\uFF0C\u518D\u53D1\u9001\u6D88\u606F\u7EE7\u7EED\u3002", en: "The current text model service is busy or rate limited (429). Try again later; if the problem persists, switch to another text model and send a message to continue." },
21
21
  queue_wait_timeout: { "zh-CN": "\u4EFB\u52A1\u6392\u961F\u7B49\u5F85\u6267\u884C\u8D85\u8FC7\u65F6\u9650\uFF0C\u5C1A\u672A\u63D0\u4EA4\u7ED9\u6A21\u578B\u670D\u52A1\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF1B\u6301\u7EED\u8D85\u65F6\u65F6\u51ED\u8BF7\u6C42 ID \u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u3002", en: "The task exceeded its queue wait limit before submission to the model service. Try again later; contact a platform administrator with the request ID if queue timeouts persist." },
22
22
  task_execution_timeout: { "zh-CN": "\u4EFB\u52A1\u8D85\u8FC7\u603B\u65F6\u9650\uFF0C\u5DF2\u7ED3\u675F\u3002\u4E0A\u6E38\u53EF\u80FD\u4ECD\u5728\u5904\u7406\uFF0C\u8BF7\u5148\u6838\u5BF9\u539F\u8BF7\u6C42\u7ED3\u679C\uFF0C\u907F\u514D\u91CD\u590D\u63D0\u4EA4\u3002", en: "The task exceeded its total time limit and has ended. The upstream service may still be processing it; check the original request before submitting again." },
@@ -57,9 +57,6 @@ var PUBLIC_ERROR_CATALOG = {
57
57
  organization_invitation_unavailable: { "zh-CN": "\u9080\u8BF7\u94FE\u63A5\u65E0\u6548\u3001\u5DF2\u8FC7\u671F\u6216\u5DF2\u505C\u7528\uFF0C\u8BF7\u8054\u7CFB\u7EC4\u7EC7\u7BA1\u7406\u5458\u83B7\u53D6\u65B0\u94FE\u63A5\u3002", en: "This invitation link is invalid, expired, or disabled. Ask the organization administrator for a new link." },
58
58
  organization_member_removed: { "zh-CN": "\u4F60\u5DF2\u88AB\u79FB\u51FA\u8BE5\u7EC4\u7EC7\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u901A\u8FC7\u7528\u6237 ID \u91CD\u65B0\u6DFB\u52A0\u3002", en: "You were removed from this organization. Ask an administrator to add your user ID again." },
59
59
  organization_default_key_unavailable: { "zh-CN": "\u5F53\u524D\u7EC4\u7EC7\u6CA1\u6709\u53EF\u7528\u7684 API Key\uFF0C\u8BF7\u8054\u7CFB\u7EC4\u7EC7\u7BA1\u7406\u5458\u3002", en: "This organization has no available API key. Contact an organization administrator." },
60
- organization_key_assignment_required: { "zh-CN": "\u6CA1\u6709\u5DF2\u5206\u914D\u7684\u53EF\u7528\u5BC6\u94A5\uFF0C\u8BF7\u8054\u7CFB\u7EC4\u7EC7\u7BA1\u7406\u5458\u5206\u914D\u3002", en: "No available key is assigned to you. Ask an organization administrator to assign one." },
61
- organization_key_selection_required: { "zh-CN": "\u8BF7\u5148\u5728 Nexra \u4E2D\u9009\u62E9\u672C\u6B21\u8C03\u7528\u4F7F\u7528\u7684\u5BC6\u94A5\u3002", en: "Select a key in Nexra before making this request." },
62
- organization_execution_key_unavailable: { "zh-CN": "\u6B64\u524D\u9009\u7528\u7684\u5BC6\u94A5\u5DF2\u4E0D\u53EF\u7528\u6216\u6743\u9650\u5DF2\u64A4\u56DE\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u8054\u7CFB\u7EC4\u7EC7\u7BA1\u7406\u5458\u3002", en: "Your selected key is unavailable or access was withdrawn. Select another key or contact an organization administrator." },
63
60
  organization_default_key_change_unavailable: { "zh-CN": "\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u53EF\u7528\u7684\u7EC4\u7EC7 Key \u624D\u80FD\u66F4\u6539\u9ED8\u8BA4 Key\u3002", en: "At least two available organization keys are required to change the default key." },
64
61
  personal_key_unavailable: { "zh-CN": "\u5F53\u524D\u4E2A\u4EBA\u8EAB\u4EFD\u6CA1\u6709\u53EF\u7528\u7684 API \u5BC6\u94A5\uFF0C\u8BF7\u5148\u521B\u5EFA\u4E2A\u4EBA\u5BC6\u94A5\u3002", en: "Your personal identity has no available API key. Create a personal key first." },
65
62
  api_key_not_found: { "zh-CN": "\u672A\u627E\u5230\u53EF\u64CD\u4F5C\u7684 API Key\uFF0C\u6216\u8BE5 Key \u4E0D\u5C5E\u4E8E\u5F53\u524D\u8BBF\u95EE\u8303\u56F4\u3002\u8BF7\u5237\u65B0 Key \u5217\u8868\u5E76\u6838\u5BF9 Key ID\u3002", en: "No accessible API key was found for this operation. Refresh the key list and check the key ID." },
@@ -694,6 +691,8 @@ var NEXRA_MEDIA_INPUT_SCHEMAS = Object.freeze({
694
691
  "image.upscale": inputSchema(
695
692
  [mediaPartSchema("image", ["source"])],
696
693
  {
694
+ enable_hdr: { type: "boolean", "x-ui": { order: 14, control: "switch" } },
695
+ enable_wb: { type: "boolean", "x-ui": { order: 15, control: "switch" } },
697
696
  scale: { type: "number", exclusiveMinimum: 1, "x-ui": { order: 10, control: "number" } },
698
697
  resolution: { type: "string", minLength: 1, "x-ui": { order: 11 } },
699
698
  output_format: { type: "string", minLength: 1, "x-ui": { order: 12 } },
@@ -704,6 +703,8 @@ var NEXRA_MEDIA_INPUT_SCHEMAS = Object.freeze({
704
703
  "video.upscale": inputSchema(
705
704
  [mediaPartSchema("video", ["source"])],
706
705
  {
706
+ vid: { type: "string", minLength: 1, "x-ui": { order: 14 } },
707
+ config: { type: "string", "x-ui": { order: 15 } },
707
708
  source_duration: { type: "number", exclusiveMinimum: 0, "x-ui": { order: 9, control: "number" } },
708
709
  scale: { type: "number", exclusiveMinimum: 1, "x-ui": { order: 10, control: "number" } },
709
710
  resolution: { type: "string", minLength: 1, "x-ui": { order: 11 } },
@@ -714,7 +715,29 @@ var NEXRA_MEDIA_INPUT_SCHEMAS = Object.freeze({
714
715
  ),
715
716
  "video.segment": inputSchema(
716
717
  [textPartSchema(["prompt"]), mediaPartSchema("video", ["source"])],
717
- { resolution: { type: "string", minLength: 1, "x-ui": { order: 10 } } },
718
+ {
719
+ resolution: { type: "string", minLength: 1, "x-ui": { order: 10 } },
720
+ mode: { type: "string", enum: ["preview", "track"] },
721
+ preview_time_ms: { type: "integer", minimum: 0 },
722
+ prompts: { type: "array", minItems: 1, items: {
723
+ type: "object",
724
+ properties: {
725
+ time_ms: { type: "integer", minimum: 0 },
726
+ points: { type: "array", minItems: 1, items: {
727
+ type: "object",
728
+ properties: {
729
+ x: { type: "number", minimum: 0, maximum: 1 },
730
+ y: { type: "number", minimum: 0, maximum: 1 },
731
+ label: { type: "integer", enum: [0, 1] }
732
+ },
733
+ required: ["x", "y", "label"],
734
+ additionalProperties: false
735
+ } }
736
+ },
737
+ required: ["time_ms", "points"],
738
+ additionalProperties: false
739
+ } }
740
+ },
718
741
  { minItems: 2, maxItems: 2 }
719
742
  ),
720
743
  "video.depth": inputSchema(
@@ -854,6 +877,84 @@ function isTerminalTaskStatus(status) {
854
877
  return status === "succeeded" || status === "failed" || status === "cancelled";
855
878
  }
856
879
 
880
+ // ../contracts/src/volcengine-asr.ts
881
+ var ASR_SENTENCE_MAX_SECONDS = 60;
882
+ function asrInputSecondsLimit(path) {
883
+ return path === "/api/v3/sauc/bigmodel_nostream" ? ASR_SENTENCE_MAX_SECONDS : void 0;
884
+ }
885
+ var ASR_MAX_FRAME_BYTES = 8 * 1024 * 1024;
886
+ function parseVolcengineAsrFrame(bytes) {
887
+ if (bytes.byteLength < 8 || bytes.byteLength > ASR_MAX_FRAME_BYTES) throw new Error("Invalid ASR frame size");
888
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
889
+ const headerSize = (bytes[0] & 15) * 4;
890
+ if (bytes[0] >> 4 !== 1 || headerSize < 4 || headerSize + 4 > bytes.length) throw new Error("Invalid ASR frame header");
891
+ const type = bytes[1] >> 4, flags = bytes[1] & 15, serialization = bytes[2] >> 4, compression = bytes[2] & 15;
892
+ if (![1, 2, 9, 15].includes(type) || flags > 3 || ![0, 1].includes(serialization) || ![0, 1].includes(compression)) throw new Error("Unsupported ASR frame protocol");
893
+ let offset = headerSize, sequence, errorCode;
894
+ if (type === 15 || flags & 1) {
895
+ if (offset + 8 > bytes.length) throw new Error("Truncated ASR sequence/error");
896
+ if (type === 15) errorCode = view.getUint32(offset);
897
+ else sequence = view.getInt32(offset);
898
+ offset += 4;
899
+ }
900
+ const size = view.getUint32(offset);
901
+ offset += 4;
902
+ if (size !== bytes.length - offset) throw new Error("Invalid ASR payload length");
903
+ return { type, flags, serialization, compression, payload: bytes.subarray(offset), ...sequence === void 0 ? {} : { sequence }, ...errorCode === void 0 ? {} : { errorCode } };
904
+ }
905
+ async function decodeVolcengineAsrFrame(bytes) {
906
+ const frame = parseVolcengineAsrFrame(bytes);
907
+ if (frame.compression === 0) return frame;
908
+ const reader = new Blob([new Uint8Array(frame.payload)]).stream().pipeThrough(new DecompressionStream("gzip")).getReader();
909
+ const chunks = [];
910
+ let length = 0;
911
+ try {
912
+ for (; ; ) {
913
+ const chunk = await reader.read();
914
+ if (chunk.done) break;
915
+ length += chunk.value.byteLength;
916
+ if (length > ASR_MAX_FRAME_BYTES) {
917
+ await reader.cancel();
918
+ throw new Error("ASR response is too large");
919
+ }
920
+ chunks.push(chunk.value);
921
+ }
922
+ } finally {
923
+ reader.releaseLock();
924
+ }
925
+ const payload = new Uint8Array(length);
926
+ let offset = 0;
927
+ for (const chunk of chunks) {
928
+ payload.set(chunk, offset);
929
+ offset += chunk.byteLength;
930
+ }
931
+ return { ...frame, payload };
932
+ }
933
+ function volcengineAsrFrameJson(frame) {
934
+ if (frame.serialization !== 1) throw new Error("ASR configuration/result must be JSON");
935
+ const value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(frame.payload));
936
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("ASR JSON must be an object");
937
+ return value;
938
+ }
939
+ function encodeVolcengineAsrFrame(type, payload, options = {}) {
940
+ const bytes = new Uint8Array(8 + (options.sequence === void 0 ? 0 : 4) + payload.length);
941
+ bytes.set([
942
+ 17,
943
+ type << 4 | (options.final ? 2 : 0) | (options.sequence === void 0 ? 0 : 1),
944
+ (options.json ? 16 : 0) | (options.compression ?? 0),
945
+ 0
946
+ ]);
947
+ const view = new DataView(bytes.buffer);
948
+ let offset = 4;
949
+ if (options.sequence !== void 0) {
950
+ view.setInt32(offset, options.sequence);
951
+ offset += 4;
952
+ }
953
+ view.setUint32(offset, payload.length);
954
+ bytes.set(payload, offset + 4);
955
+ return bytes;
956
+ }
957
+
857
958
  // ../contracts/src/usage-query-reference.ts
858
959
  var USAGE_QUERY_LIST_FILTERS = [
859
960
  "userIds",
@@ -916,8 +1017,8 @@ function sortRatioDisplayOrder(values) {
916
1017
  return [...values].sort(compareRatioDisplayOrder);
917
1018
  }
918
1019
 
919
- // ../contracts/src/volcengine-asr.ts
920
- var ASR_MAX_FRAME_BYTES = 8 * 1024 * 1024;
1020
+ // ../contracts/src/index.ts
1021
+ var ORGANIZATION_HEADER = "x-nexra-organization-id";
921
1022
 
922
1023
  export {
923
1024
  MEDIA_KINDS,
@@ -941,5 +1042,11 @@ export {
941
1042
  TASK_STATUSES,
942
1043
  createTaskRequest,
943
1044
  isTerminalTaskStatus,
944
- sortRatioDisplayOrder
1045
+ sortRatioDisplayOrder,
1046
+ asrInputSecondsLimit,
1047
+ ASR_MAX_FRAME_BYTES,
1048
+ decodeVolcengineAsrFrame,
1049
+ volcengineAsrFrameJson,
1050
+ encodeVolcengineAsrFrame,
1051
+ ORGANIZATION_HEADER
945
1052
  };
@@ -1,4 +1,4 @@
1
- import { J as JsonValue } from './json-Cz0MkWQn.js';
1
+ import { b as JsonValue } from './json-dnsDzk-s.js';
2
2
 
3
3
  type PublicUpstreamUnavailableReason = "no_response" | "not_retained" | "unsupported_capture" | "error_not_emitted" | "size_limit";
4
4
  /** Network errors retain unknown codes from older or newer servers. */
@@ -30,4 +30,4 @@ type ApiErrorPayload = PublicError;
30
30
  /** Extracts text only from known provider error fields, never arbitrary metadata. */
31
31
  declare function extractUpstreamErrorMessage(value: unknown): string | undefined;
32
32
 
33
- export { type ApiErrorPayload as A, type NexraError as N, type PublicErrorFields as P, type PublicError as a, type PublicErrorContext as b, extractUpstreamErrorMessage as e };
33
+ export { type ApiErrorPayload as A, type NexraError as N, type PublicError as P, type PublicErrorContext as a, type PublicErrorFields as b, extractUpstreamErrorMessage as e };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, M as MEDIA_KINDS, d as MediaAsset, e as MediaAssetStatus, f as MediaKind, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput } from './media-DzOxLGs-.js';
2
- import { H as HttpTransport, u as ModelSearchParams, T as TaskModelSummary, v as TaskModel, w as ModelSchema, x as ModelResourceList, y as NexraClientOptions } from './media-geometry-COln1N_2.js';
3
- 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, E as ModelResourceOption, l as NexraBillingCurrency, g as NexraCatalogRevision, 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, U as UnifiedMediaGeometry, q as applyMediaGeometry, r as decodeMediaGeometry, s as encodeMediaGeometry, t as projectMediaGeometry } from './media-geometry-COln1N_2.js';
4
- import { C as CursorPage, J as JsonValue } from './json-Cz0MkWQn.js';
5
- export { a as JsonObject, b as JsonPrimitive } from './json-Cz0MkWQn.js';
6
- import { N as NexraError, P as PublicErrorFields } from './errors-DJZuAKoO.js';
7
- export { A as ApiErrorPayload, a as PublicError, b as PublicErrorContext, e as extractUpstreamErrorMessage } from './errors-DJZuAKoO.js';
8
- import { V as Voice, C as CreateVoiceRequest, a as VoiceCreation, A as AssetsClient, T as TasksClient, R as RunTaskOptions, b as RunResult, c as TaskResult } from './voices-xyPqhQqR.js';
9
- export { d as CreateTaskOptions, e as CreateTaskRequest, f as RequestDetails, g as TASK_STATUSES, h as TaskCost, i as TaskError, j as TaskEvent, k as TaskEventType, l as TaskListParams, m as TaskPage, n as TaskProgress, o as TaskReceipt, p as TaskStatus, q as TaskTiming, r as TaskUsage, s as TaskWebhookConfig, t as TerminalTaskStatus, u as VerifyWebhookOptions, W as WaitTaskOptions, v as WatchTaskOptions, w as isTerminalTaskStatus, x as verifyWebhook } from './voices-xyPqhQqR.js';
1
+ export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, M as MEDIA_KINDS, d as MediaAsset, e as MediaAssetStatus, f as MediaKind, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput } from './media-IaOdOMQC.js';
2
+ import { H as HttpTransport, j as ModelSearchParams, v as TaskModelSummary, T as TaskModel, i as ModelSchema, g as ModelResourceList, N as NexraClientOptions } from './media-geometry-B92BvuQL.js';
3
+ 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, h as ModelResourceOption, k as NexraBillingCurrency, l as NexraCatalogRevision, 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, U as UnifiedMediaGeometry, w as applyMediaGeometry, x as decodeMediaGeometry, y as encodeMediaGeometry, z as projectMediaGeometry } from './media-geometry-B92BvuQL.js';
4
+ import { C as CursorPage, b as JsonValue } from './json-dnsDzk-s.js';
5
+ export { J as JsonObject, a as JsonPrimitive } from './json-dnsDzk-s.js';
6
+ import { N as NexraError, b as PublicErrorFields } from './errors-BXPUVOh7.js';
7
+ export { A as ApiErrorPayload, P as PublicError, a as PublicErrorContext, e as extractUpstreamErrorMessage } from './errors-BXPUVOh7.js';
8
+ import { x as Voice, b as CreateVoiceRequest, y as VoiceCreation, A as AssetsClient, r as TasksClient, t as TranscriptionClient, E as TranscriptionSocketFactory, d as RunTaskOptions, c as RunResult, e as TaskResult } from './voices-Dc94LfyS.js';
9
+ export { C as CreateTaskOptions, a as CreateTaskRequest, N as NexraTranscriptionError, R as RequestDetails, T as TASK_STATUSES, f as TaskCost, g as TaskError, h as TaskEvent, i as TaskEventType, j as TaskListParams, k as TaskPage, l as TaskProgress, m as TaskReceipt, 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, W as WaitTaskOptions, z as WatchTaskOptions, B as isTerminalTaskStatus, D as verifyWebhook } from './voices-Dc94LfyS.js';
10
10
  import { CatalogClient } from './catalog.js';
11
11
  export { formatModelDisplayName, getModelSpec, listModelSpecs } from './catalog.js';
12
12
  export { ceilDecimal, multiplyDecimal } from './decimal.js';
@@ -38,7 +38,8 @@ declare class NexraClient {
38
38
  readonly models: ModelsClient;
39
39
  readonly tasks: TasksClient;
40
40
  readonly voices: VoicesClient;
41
- constructor(options?: NexraClientOptions);
41
+ readonly transcription: TranscriptionClient;
42
+ constructor(options?: NexraClientOptions, connect?: TranscriptionSocketFactory);
42
43
  run<TOutput = JsonValue, TInput = Record<string, unknown>>(model: string, input: TInput, options?: RunTaskOptions): Promise<RunResult<TOutput>>;
43
44
  }
44
45
  declare function createNexra(options?: NexraClientOptions): NexraClient;
@@ -111,4 +112,4 @@ declare class NexraWaitTimeoutError extends Error {
111
112
  constructor(taskId: string, timeoutMs: number);
112
113
  }
113
114
 
114
- export { AssetsClient, CatalogClient, type CreateVoiceOptions, CreateVoiceRequest, CursorPage, JsonValue, ModelResourceList, ModelSchema, ModelSearchParams, ModelsClient, NexraApiError, NexraClient, NexraClientOptions, NexraError, NexraTaskError, NexraWaitTimeoutError, PublicErrorFields, RunResult, RunTaskOptions, TaskResult as Task, TaskModel, TaskModelSummary, TaskResult, TasksClient, Voice, VoiceCreation, VoicesClient, createNexra };
115
+ export { AssetsClient, CatalogClient, type CreateVoiceOptions, CreateVoiceRequest, CursorPage, JsonValue, ModelResourceList, ModelSchema, ModelSearchParams, ModelsClient, NexraApiError, NexraClient, NexraClientOptions, NexraError, NexraTaskError, NexraWaitTimeoutError, PublicErrorFields, RunResult, RunTaskOptions, TaskResult as Task, TaskModel, TaskModelSummary, TaskResult, TasksClient, TranscriptionClient, Voice, VoiceCreation, VoicesClient, createNexra };