@byte_fluffy/nexra-sdk 0.1.0-alpha.37 → 0.1.0-alpha.39
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/catalog.d.ts +3 -2
- package/dist/catalog.js +2 -2
- package/dist/{chunk-AAGTZN2G.js → chunk-EFSKJCKB.js} +4 -2
- package/dist/{chunk-ENL3IGRX.js → chunk-ZP34I6D7.js} +1079 -59
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/language.d.ts +1 -1
- package/dist/language.js +34 -10
- package/dist/{media-geometry-DAVFGry1.d.ts → media-geometry-YD9Y_CFw.d.ts} +1 -0
- package/dist/media.d.ts +1 -0
- package/dist/media.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/{voices-CFRCuodH.d.ts → voices-BXToLr8g.d.ts} +8 -2
- package/package.json +1 -1
package/dist/catalog.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as JsonObject } from './json-Cz0MkWQn.js';
|
|
2
|
-
import { H as HttpTransport, A as NexraCatalogChangeParams, B as NexraCatalogChangePage, D as NexraCatalogModelState, u as NexraSalePriceList, d as CreateNexraQuoteRequest, s as NexraQuote, C as CreateNexraDisplayQuoteBatchRequest, n as NexraDisplayQuoteBatch, m as NexraCatalogRevision, q as NexraModelSpec, E as NexraModelEndpointSpec, r as NexraModelSpecFilter } from './media-geometry-
|
|
3
|
-
export { e as MediaGeometryField, f as MediaGeometryProjection, l as NexraBillingCurrency, G as NexraCatalogModelIdentity, p as NexraModelOperation, t as NexraSalePrice, v as NexraSettlement, U as UnifiedMediaGeometry, w as applyMediaGeometry, x as decodeMediaGeometry, y as encodeMediaGeometry, z as projectMediaGeometry } from './media-geometry-
|
|
2
|
+
import { H as HttpTransport, A as NexraCatalogChangeParams, B as NexraCatalogChangePage, D as NexraCatalogModelState, u as NexraSalePriceList, d as CreateNexraQuoteRequest, s as NexraQuote, C as CreateNexraDisplayQuoteBatchRequest, n as NexraDisplayQuoteBatch, m as NexraCatalogRevision, q as NexraModelSpec, E as NexraModelEndpointSpec, r as NexraModelSpecFilter } from './media-geometry-YD9Y_CFw.js';
|
|
3
|
+
export { e as MediaGeometryField, f as MediaGeometryProjection, l as NexraBillingCurrency, G as NexraCatalogModelIdentity, p as NexraModelOperation, t as NexraSalePrice, v as NexraSettlement, U as UnifiedMediaGeometry, w as applyMediaGeometry, x as decodeMediaGeometry, y as encodeMediaGeometry, z as projectMediaGeometry } from './media-geometry-YD9Y_CFw.js';
|
|
4
4
|
|
|
5
5
|
declare function formatModelDisplayName(displayName: string, identity?: {
|
|
6
6
|
modelId: string;
|
|
@@ -33,6 +33,7 @@ type NexraLanguageModelBinding = Readonly<{
|
|
|
33
33
|
}>;
|
|
34
34
|
declare function getLanguageModelBinding(modelId: string, options?: {
|
|
35
35
|
protocol?: NexraLanguageProtocol;
|
|
36
|
+
stream?: boolean;
|
|
36
37
|
}): NexraLanguageModelBinding;
|
|
37
38
|
type NexraLanguageReasoning = Readonly<{
|
|
38
39
|
providerOptions: Record<string, JsonObject>;
|
package/dist/catalog.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
listModelSpecs,
|
|
10
10
|
projectMediaGeometry,
|
|
11
11
|
resolveNexraLanguageReasoning
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-ZP34I6D7.js";
|
|
13
|
+
import "./chunk-EFSKJCKB.js";
|
|
14
14
|
export {
|
|
15
15
|
CatalogClient,
|
|
16
16
|
applyMediaGeometry,
|
|
@@ -176,6 +176,7 @@ var NEXRA_MEDIA_INPUT_SCHEMAS = Object.freeze({
|
|
|
176
176
|
"video.generate": inputSchema(
|
|
177
177
|
[textPartSchema(["prompt", "negative_prompt", "script"]), videoImagePart, videoPart, audioPart, draftPart],
|
|
178
178
|
{
|
|
179
|
+
task_type: { type: "string", minLength: 1, "x-ui": { order: 8, control: "segmented" } },
|
|
179
180
|
voice: { type: "string", minLength: 1, "x-ui": { order: 9, control: "resource", resource: "voice" } },
|
|
180
181
|
draft: { type: "boolean", "x-ui": { control: "switch" } },
|
|
181
182
|
watermark: { type: "boolean", const: false, "x-ui": { hidden: true } },
|
|
@@ -314,13 +315,13 @@ function nexraMediaInputSchemaForMode(mode) {
|
|
|
314
315
|
|
|
315
316
|
// ../contracts/src/public-error-catalog.ts
|
|
316
317
|
var PUBLIC_ERROR_CATALOG = {
|
|
317
|
-
task_execution_timeout: { "zh-CN": "\u4EFB\u52A1\u8D85\u8FC7
|
|
318
|
+
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." },
|
|
318
319
|
authentication_required: { "zh-CN": "\u8BF7\u6C42\u672A\u63D0\u4F9B\u53EF\u7528\u7684 Nexra \u8EAB\u4EFD\u51ED\u8BC1\u3002\u8BF7\u767B\u5F55\u8D26\u6237\uFF0C\u6216\u5728\u8BF7\u6C42\u4E2D\u63D0\u4F9B\u6709\u6548\u7684 Nexra API Key\u3002", en: "The request has no usable Nexra credentials. Sign in or include a valid Nexra API key." },
|
|
319
320
|
invalid_api_key: { "zh-CN": "\u63D0\u4F9B\u7684 Nexra API Key \u672A\u901A\u8FC7\u9A8C\u8BC1\u3002\u8BF7\u68C0\u67E5 Key \u662F\u5426\u6B63\u786E\u3001\u4ECD\u6709\u6548\u4E14\u672A\u88AB\u64A4\u9500\u3002", en: "The Nexra API key could not be verified. Check that it is correct, still valid, and has not been revoked." },
|
|
320
321
|
permission_denied: { "zh-CN": "\u5F53\u524D\u8EAB\u4EFD\u65E0\u6743\u8BBF\u95EE\u8BE5\u8D44\u6E90\u6216\u6267\u884C\u6B64\u64CD\u4F5C\u3002\u8BF7\u786E\u8BA4\u8D44\u6E90\u5F52\u5C5E\uFF0C\u5E76\u8054\u7CFB\u7BA1\u7406\u5458\u6838\u5BF9\u8BBF\u95EE\u6743\u9650\u3002", en: "Your current identity cannot access this resource or perform this operation. Check resource ownership and ask an administrator to review your permissions." },
|
|
321
322
|
insufficient_balance: { "zh-CN": "\u8D26\u6237\u53EF\u7528\u4F59\u989D\u4E0D\u8DB3\u4EE5\u8986\u76D6\u672C\u6B21\u8BF7\u6C42\u3002\u8BF7\u6838\u5BF9\u4F59\u989D\u548C\u5DF2\u5360\u7528\u91D1\u989D\uFF0C\u5145\u503C\u6216\u964D\u4F4E\u8BF7\u6C42\u7528\u91CF\u3002", en: "Your available balance cannot cover this request. Review your balance and reserved funds, then add funds or reduce the requested usage." },
|
|
322
323
|
budget_exceeded: { "zh-CN": "\u9884\u7B97\u9650\u5236\u963B\u6B62\u4E86\u672C\u6B21\u8BF7\u6C42\u3002\u8BF7\u964D\u4F4E\u8BF7\u6C42\u7528\u91CF\uFF0C\u6216\u8054\u7CFB\u9884\u7B97\u7BA1\u7406\u8005\u6838\u5BF9\u9002\u7528\u989D\u5EA6\u3002", en: "A budget limit blocked this request. Reduce the requested usage or ask the budget owner to review the applicable limit." },
|
|
323
|
-
invalid_request: { "zh-CN": "\u8BF7\u6C42\u53C2\u6570\u4E0D\u7B26\u5408\u6B64\u63A5\u53E3\u6216\u6A21\u578B\u7684\u8981\u6C42\u3002\u8BF7\u5BF9\
|
|
324
|
+
invalid_request: { "zh-CN": "\u8BF7\u6C42\u53C2\u6570\u4E0D\u7B26\u5408\u6B64\u63A5\u53E3\u6216\u6A21\u578B\u7684\u8981\u6C42\u3002\u8BF7\u6838\u5BF9\u5FC5\u586B\u5B57\u6BB5\u548C\u53C2\u6570\u53D6\u503C\uFF1B\u542B\u53C2\u8003\u7D20\u6750\u65F6\uFF0C\u68C0\u67E5\u6587\u4EF6\u5927\u5C0F\u3001\u683C\u5F0F\u53CA\u94FE\u63A5\u662F\u5426\u53EF\u8BFB\u53D6\u3002", en: "The request parameters do not meet this endpoint or model's requirements. Check required fields and parameter values; for reference assets, check file size, format, and whether the URL is accessible." },
|
|
324
325
|
input_too_large: { "zh-CN": "\u8BF7\u6C42\u8F93\u5165\u8D85\u8FC7\u4E86\u6A21\u578B\u6216\u63A5\u53E3\u5141\u8BB8\u7684\u5927\u5C0F\u3002\u8BF7\u7F29\u77ED\u6587\u672C\u3001\u51CF\u5C11\u53C2\u8003\u7D20\u6750\u6216\u538B\u7F29\u8F93\u5165\u6587\u4EF6\u3002", en: "The input exceeds the model or endpoint's size limit. Shorten the text, use fewer reference assets, or compress the input files." },
|
|
325
326
|
unsupported_format: { "zh-CN": "\u6A21\u578B\u6216\u63A5\u53E3\u4E0D\u652F\u6301\u5F53\u524D\u8F93\u5165\u683C\u5F0F\u3002\u8BF7\u4F7F\u7528\u53C2\u6570\u6587\u6863\u4E2D\u652F\u6301\u7684\u6587\u4EF6\u683C\u5F0F\u6216\u5185\u5BB9\u7C7B\u578B\u3002", en: "The model or endpoint does not support this input format. Use a file format or content type listed in the parameter documentation." },
|
|
326
327
|
model_not_found: { "zh-CN": "\u6307\u5B9A\u7684\u6A21\u578B\u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u63A5\u53E3\u8BBF\u95EE\u3002\u8BF7\u6838\u5BF9\u8BE5\u63A5\u53E3\u4F7F\u7528\u7684\u5B8C\u6574 Model ID\uFF0C\u4EE5\u53CA\u6A21\u578B\u662F\u5426\u5DF2\u5F00\u653E\u7ED9\u5F53\u524D\u8D26\u6237\u3002", en: "The specified model is not accessible through this endpoint. Check the endpoint's full model ID and whether the model is available to your account." },
|
|
@@ -329,6 +330,7 @@ var PUBLIC_ERROR_CATALOG = {
|
|
|
329
330
|
rate_limited: { "zh-CN": "\u8BF7\u6C42\u89E6\u53D1\u4E86\u670D\u52A1\u7684\u9891\u7387\u9650\u5236\u3002\u8BF7\u964D\u4F4E\u8C03\u7528\u9891\u7387\u6216\u5E76\u53D1\u91CF\u3002", en: "The request hit a service rate limit. Reduce the request frequency or concurrency." },
|
|
330
331
|
capacity_exceeded: { "zh-CN": "\u5F53\u524D\u6CA1\u6709\u8DB3\u591F\u7684\u6267\u884C\u5BB9\u91CF\u5904\u7406\u6B64\u8BF7\u6C42\u3002\u8BF7\u964D\u4F4E\u5E76\u53D1\u91CF\u6216\u7B49\u5F85\u5BB9\u91CF\u91CA\u653E\uFF1B\u5DF2\u6709\u4EFB\u52A1\u8BF7\u67E5\u8BE2\u539F\u4EFB\u52A1\u72B6\u6001\u3002", en: "There is not enough execution capacity for this request. Reduce concurrency or wait for capacity to become available; check the original task if one already exists." },
|
|
331
332
|
upstream_timeout: { "zh-CN": "\u6A21\u578B\u670D\u52A1\u672A\u5728\u89C4\u5B9A\u65F6\u95F4\u5185\u54CD\u5E94\u3002\u5982\u5DF2\u6709\u8BF7\u6C42\u6216\u4EFB\u52A1 ID\uFF0C\u8BF7\u5148\u67E5\u8BE2\u539F\u8BF7\u6C42\u72B6\u6001\uFF0C\u786E\u8BA4\u7ED3\u679C\u524D\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\uFF1B\u6301\u7EED\u8D85\u65F6\u65F6\u51ED\u8BF7\u6C42 ID \u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u3002", en: "The model service did not respond within the time limit. If you have a request or task ID, check its status and do not submit again until the outcome is confirmed. Contact a platform administrator with the request ID if timeouts persist." },
|
|
333
|
+
upstream_busy: { "zh-CN": "\u6A21\u578B\u670D\u52A1\u5F53\u524D\u7E41\u5FD9\u3002\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF1B\u5982\u5DF2\u6709\u8BF7\u6C42\u6216\u4EFB\u52A1 ID\uFF0C\u8BF7\u5148\u6838\u5BF9\u539F\u8BF7\u6C42\u72B6\u6001\uFF0C\u907F\u514D\u91CD\u590D\u63D0\u4EA4\u3002", en: "The model service is currently busy. Try again later; if a request or task ID already exists, check its status first to avoid duplicate submissions." },
|
|
332
334
|
upstream_unavailable: { "zh-CN": "\u672C\u6B21\u6A21\u578B\u670D\u52A1\u8C03\u7528\u6682\u65F6\u4E0D\u53EF\u7528\u3002\u5982\u4EFB\u52A1\u5DF2\u7ECF\u63D0\u4EA4\uFF0C\u8BF7\u5148\u67E5\u8BE2\u539F\u4EFB\u52A1\u72B6\u6001\uFF1B\u6301\u7EED\u5F02\u5E38\u65F6\u51ED\u8BF7\u6C42 ID \u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u6838\u5BF9\u4E0A\u6E38\u670D\u52A1\u3002", en: "This call to the model service is currently unavailable. If a task has already been submitted, check its status first. Contact a platform administrator with the request ID if the problem persists." },
|
|
333
335
|
upstream_response_invalid: { "zh-CN": "\u6A21\u578B\u670D\u52A1\u8FD4\u56DE\u7684\u54CD\u5E94\u4E0D\u7B26\u5408\u63A5\u53E3\u7EA6\u5B9A\uFF0C\u5E73\u53F0\u65E0\u6CD5\u53EF\u9760\u8BFB\u53D6\u7ED3\u679C\u3002\u8BF7\u67E5\u770B\u53EF\u7528\u7684\u4E0A\u6E38\u9519\u8BEF\u8BE6\u60C5\u548C\u539F\u8BF7\u6C42\u72B6\u6001\uFF0C\u5E76\u51ED\u8BF7\u6C42 ID \u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u3002", en: "The model service response does not meet the API contract, so the platform cannot read the result reliably. Check the available upstream error details and original request status, and contact a platform administrator with the request ID." },
|
|
334
336
|
upstream_error: { "zh-CN": "\u672C\u6B21\u6A21\u578B\u670D\u52A1\u8C03\u7528\u51FA\u73B0\u9519\u8BEF\uFF0C\u5177\u4F53\u539F\u56E0\u5C1A\u672A\u786E\u8BA4\u3002\u8BF7\u67E5\u770B\u53EF\u7528\u7684\u9519\u8BEF\u8BE6\u60C5\u548C\u539F\u8BF7\u6C42\u6216\u4EFB\u52A1\u72B6\u6001\uFF1B\u9700\u8981\u534F\u52A9\u65F6\u63D0\u4F9B\u8BF7\u6C42 ID\u3002", en: "This call to the model service encountered an error whose specific cause has not been confirmed. Check the available error details and the original request or task status, and provide the request ID when requesting assistance." },
|