@byte_fluffy/nexra-sdk 0.1.0-alpha.44 → 0.1.0-alpha.46

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/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 } from './assets-Cusrjj7_.js';
2
- import { H as HttpTransport, M as ModelSearchParams, T as TaskModelSummary, a as TaskModel, b as ModelSchema, c as ModelResourceList, N as NexraClientOptions } from './media-geometry-YD9Y_CFw.js';
3
- export { C as CreateNexraDisplayQuoteBatchRequest, d as CreateNexraQuoteRequest, F as FetchLike, e as MediaGeometryField, f as MediaGeometryProjection, g as ModelCapabilitySummary, h as ModelDateVersion, i as ModelEndpointSummary, j as ModelModality, k as ModelResourceOption, l as NexraBillingCurrency, m as NexraCatalogRevision, n as NexraDisplayQuoteBatch, o as NexraDisplayQuoteBatchEntry, p as NexraModelOperation, q as NexraModelSpec, r as NexraModelSpecFilter, s as NexraQuote, t as NexraSalePrice, u as NexraSalePriceList, v as NexraSettlement, U as UnifiedMediaGeometry, w as applyMediaGeometry, x as decodeMediaGeometry, y as encodeMediaGeometry, z as projectMediaGeometry } from './media-geometry-YD9Y_CFw.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-Co8S2qEM.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-BS4DZh4B.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-BS4DZh4B.js';
4
4
  import { C as CursorPage, J as JsonValue } from './json-Cz0MkWQn.js';
5
5
  export { a as JsonObject, b as JsonPrimitive } from './json-Cz0MkWQn.js';
6
6
  import { N as NexraError, P as PublicErrorFields } from './errors-DJZuAKoO.js';
7
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-BHzDQ5xH.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-BHzDQ5xH.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-Bzt4nV1r.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-Bzt4nV1r.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';
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@ import {
20
20
  projectMediaGeometry,
21
21
  queryString,
22
22
  sleep
23
- } from "./chunk-JJD32I64.js";
23
+ } from "./chunk-ZNPLN7N6.js";
24
24
  import {
25
25
  MEDIA_KINDS,
26
26
  TASK_STATUSES,
27
27
  createTaskRequest,
28
28
  extractUpstreamErrorMessage,
29
29
  isTerminalTaskStatus
30
- } from "./chunk-ESPUF2D4.js";
30
+ } from "./chunk-LXR3MEF3.js";
31
31
 
32
32
  // src/assets.ts
33
33
  var AssetsClient = class {
@@ -1,7 +1,7 @@
1
1
  import { APICallError, LanguageModelV4 } from '@ai-sdk/provider';
2
2
  import { NexraLanguageProtocol } from './catalog.js';
3
3
  export { NexraLanguageModelBinding } from './catalog.js';
4
- import { F as FetchLike } from './media-geometry-YD9Y_CFw.js';
4
+ import { F as FetchLike } from './media-geometry-BS4DZh4B.js';
5
5
  import { N as NexraError } from './errors-DJZuAKoO.js';
6
6
  import './json-Cz0MkWQn.js';
7
7
 
package/dist/language.js CHANGED
@@ -6,12 +6,12 @@ import {
6
6
  jsonBody,
7
7
  parseServerSentEvents,
8
8
  resolveNexraLanguageReasoning
9
- } from "./chunk-JJD32I64.js";
9
+ } from "./chunk-ZNPLN7N6.js";
10
10
  import {
11
11
  isPublicErrorCode,
12
12
  publicErrorMessage,
13
13
  resolvePublicErrorLocale
14
- } from "./chunk-ESPUF2D4.js";
14
+ } from "./chunk-LXR3MEF3.js";
15
15
 
16
16
  // src/language/index.ts
17
17
  import { createAnthropic } from "@ai-sdk/anthropic";
@@ -0,0 +1,328 @@
1
+ import { a as JsonObject } from './json-Cz0MkWQn.js';
2
+
3
+ declare const MEDIA_KINDS: readonly ["image", "video", "audio", "document", "archive", "other"];
4
+ type MediaKind = (typeof MEDIA_KINDS)[number];
5
+ type MediaAssetStatus = "pending" | "ready" | "failed" | "deleted";
6
+ interface MediaAsset {
7
+ id: string;
8
+ kind: MediaKind;
9
+ status: MediaAssetStatus;
10
+ source: "upload" | "generated" | "provider" | "imported";
11
+ name?: string;
12
+ mimeType?: string;
13
+ sizeBytes?: number;
14
+ width?: number;
15
+ height?: number;
16
+ durationMs?: number;
17
+ checksumSha256?: string;
18
+ url?: string;
19
+ downloadUrl?: string;
20
+ expiresAt?: string;
21
+ metadata?: JsonObject;
22
+ createdAt: string;
23
+ }
24
+ interface AssetReference {
25
+ assetId: string;
26
+ }
27
+ type AssetInput = AssetReference | Blob | File | MediaAsset | string | URL;
28
+ interface AssetUploadOptions {
29
+ kind?: MediaKind;
30
+ name?: string;
31
+ signal?: AbortSignal;
32
+ }
33
+ interface AssetImportRequest {
34
+ url: string;
35
+ kind?: MediaKind;
36
+ name?: string;
37
+ }
38
+ type AssetCertificationProvider = "seedance";
39
+ type AssetCertificationStatus = "processing" | "ready" | "failed";
40
+ interface AssetCertification {
41
+ assetId: string;
42
+ provider: AssetCertificationProvider;
43
+ status: AssetCertificationStatus;
44
+ providerAssetId?: string;
45
+ assetUri?: string;
46
+ groupId?: string;
47
+ library: "general" | "liveness";
48
+ error?: string;
49
+ createdAt: string;
50
+ updatedAt: string;
51
+ }
52
+ interface AssetCertificationRequest {
53
+ library?: "general" | "liveness";
54
+ }
55
+ interface AssetCertificationWaitOptions {
56
+ pollIntervalMs?: number;
57
+ timeoutMs?: number;
58
+ signal?: AbortSignal;
59
+ }
60
+
61
+ declare const NEXRA_MEDIA_API_VERSION: 1;
62
+ /** Catalog-level generation taxonomy. Text keeps its native endpoint protocols. */
63
+ declare const NEXRA_GENERATION_OPERATIONS: readonly ["text.generate", "image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale", "video.depth", "video.segment"];
64
+ type NexraGenerationOperation = (typeof NEXRA_GENERATION_OPERATIONS)[number];
65
+ declare const NEXRA_MEDIA_OPERATIONS: readonly ["image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale", "video.depth", "video.segment"];
66
+ type NexraMediaOperation = (typeof NEXRA_MEDIA_OPERATIONS)[number];
67
+ declare const NEXRA_PUBLISHED_MEDIA_OPERATIONS: readonly ["image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale", "video.depth", "video.segment"];
68
+ type NexraPublishedMediaOperation = (typeof NEXRA_PUBLISHED_MEDIA_OPERATIONS)[number];
69
+ declare const NEXRA_MEDIA_FEATURES: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control", "text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference", "tts", "music", "sfx", "voice-reference", "voice-design", "scale-factor", "target-resolution", "video-depth", "video-segment"];
70
+ type NexraMediaFeature = (typeof NEXRA_MEDIA_FEATURES)[number];
71
+ /** JSON wire locator. SDK-only Blob/File support is normalized into one of these forms. */
72
+ type NexraMediaSource = string | AssetReference;
73
+ type NexraTextRole = "prompt" | "negative_prompt" | "script" | "lyrics";
74
+ type NexraImageRole = "source" | "reference" | "first_frame" | "middle_frame" | "last_frame" | "mask" | "control" | "subject" | "background";
75
+ type NexraVideoRole = "source" | "reference" | "edit" | "extend";
76
+ type NexraAudioRole = "source" | "reference" | "voice_reference";
77
+ type NexraTextContentPart = Readonly<{
78
+ type: "text";
79
+ text: string;
80
+ role?: NexraTextRole;
81
+ }>;
82
+ type NexraImageContentPart = Readonly<{
83
+ type: "image";
84
+ source: NexraMediaSource;
85
+ role?: NexraImageRole;
86
+ /** Stable prompt reference name for models that address media as `@name`. */
87
+ name?: string;
88
+ }>;
89
+ /** An image pinned inside a generated video; only models declaring this role accept it. */
90
+ type NexraVideoKeyframeContentPart = Readonly<{
91
+ type: "image";
92
+ source: NexraMediaSource;
93
+ role: "keyframe";
94
+ /** Position in seconds, strictly inside the generated clip. */
95
+ timestamp: number;
96
+ }>;
97
+ type NexraVideoContentPart = Readonly<{
98
+ type: "video";
99
+ source: NexraMediaSource;
100
+ role?: NexraVideoRole;
101
+ name?: string;
102
+ }>;
103
+ type NexraAudioContentPart = Readonly<{
104
+ type: "audio";
105
+ source: NexraMediaSource;
106
+ role?: NexraAudioRole;
107
+ }>;
108
+ type NexraResourceContentPart = Readonly<{
109
+ type: "resource";
110
+ resource: "element" | "voice";
111
+ source: string;
112
+ name: string;
113
+ }>;
114
+ type NexraMediaContentPart = NexraResourceContentPart | NexraTextContentPart | NexraImageContentPart | NexraVideoContentPart | NexraAudioContentPart;
115
+ type NexraDraftContentPart = Readonly<{
116
+ type: "draft_task";
117
+ draft_task: Readonly<{
118
+ id: string;
119
+ }>;
120
+ }>;
121
+ type NexraImageGenerateInput = Readonly<{
122
+ content: readonly (NexraTextContentPart | NexraImageContentPart)[];
123
+ output_mode?: "image" | "layers";
124
+ prompt_optimization?: "standard" | "fast";
125
+ aspect_ratio?: string;
126
+ resolution?: string;
127
+ quality?: string;
128
+ count?: number;
129
+ output_format?: string;
130
+ seed?: number;
131
+ }>;
132
+ type NexraImageLayer = Readonly<{
133
+ image_index: number;
134
+ z_index: number;
135
+ size: string;
136
+ name?: string;
137
+ description?: string;
138
+ output_format?: string;
139
+ bounding_box?: Readonly<{
140
+ absolute: readonly [number, number, number, number];
141
+ normalized: readonly [number, number, number, number];
142
+ }>;
143
+ }>;
144
+ type NexraImageLayerDecompositionOutput = Readonly<{
145
+ images: readonly string[];
146
+ layer_decomposition: Readonly<{
147
+ layers: readonly NexraImageLayer[];
148
+ }>;
149
+ }>;
150
+ type NexraVideoGenerateInput = Readonly<{
151
+ content: readonly (NexraMediaContentPart | NexraDraftContentPart | NexraVideoKeyframeContentPart)[];
152
+ task_type?: string;
153
+ draft?: boolean;
154
+ /** Explicit no-watermark value, only on models whose contract declares it. */
155
+ watermark?: false;
156
+ /** Optional preset or cloned voice used by talking-avatar video models. */
157
+ voice?: string;
158
+ aspect_ratio?: string;
159
+ resolution?: string;
160
+ quality?: string;
161
+ duration?: number;
162
+ fit?: "contain" | "cover";
163
+ title?: string;
164
+ generate_audio?: boolean;
165
+ output_format?: string;
166
+ seed?: number;
167
+ }>;
168
+ type NexraAudioGenerateInput = Readonly<{
169
+ content: readonly (NexraTextContentPart | NexraAudioContentPart)[];
170
+ voice?: string;
171
+ language?: string;
172
+ duration?: number;
173
+ output_format?: string;
174
+ sample_rate?: number;
175
+ speed?: number;
176
+ volume?: number;
177
+ pitch?: number;
178
+ emotion?: string;
179
+ instrumental?: boolean;
180
+ loop?: boolean;
181
+ prompt_influence?: number;
182
+ seed?: number;
183
+ }>;
184
+ type NexraImageUpscaleInput = Readonly<{
185
+ content: readonly [NexraImageContentPart];
186
+ enable_hdr?: boolean;
187
+ enable_wb?: boolean;
188
+ scale?: number;
189
+ resolution?: string;
190
+ output_format?: string;
191
+ preserve_details?: boolean;
192
+ }>;
193
+ type NexraVideoUpscaleInput = Readonly<{
194
+ source_duration: number;
195
+ config?: string;
196
+ scale?: number;
197
+ resolution?: string;
198
+ output_format?: string;
199
+ preserve_details?: boolean;
200
+ }> & (Readonly<{
201
+ content: readonly [NexraVideoContentPart];
202
+ vid?: never;
203
+ }> | Readonly<{
204
+ vid: string;
205
+ content?: never;
206
+ }>);
207
+ type NexraVideoDepthInput = Readonly<{
208
+ content: readonly [NexraVideoContentPart];
209
+ resolution?: string;
210
+ }>;
211
+ type NexraVideoSegmentInput = Readonly<{
212
+ content: readonly [NexraVideoContentPart, NexraTextContentPart] | readonly [NexraTextContentPart, NexraVideoContentPart];
213
+ resolution?: string;
214
+ }>;
215
+ type NexraMediaInputByOperation = Readonly<{
216
+ "image.generate": NexraImageGenerateInput;
217
+ "video.generate": NexraVideoGenerateInput;
218
+ "audio.generate": NexraAudioGenerateInput;
219
+ "image.upscale": NexraImageUpscaleInput;
220
+ "video.upscale": NexraVideoUpscaleInput;
221
+ "video.depth": NexraVideoDepthInput;
222
+ "video.segment": NexraVideoSegmentInput;
223
+ }>;
224
+ type NexraMediaKind = "image" | "video" | "audio";
225
+ type NexraMediaInputSlot = Readonly<{
226
+ mediaKind: NexraMediaKind;
227
+ role: string;
228
+ min?: number;
229
+ max: number;
230
+ maxBytes?: number;
231
+ minDurationSeconds?: number;
232
+ maxDurationSeconds?: number;
233
+ }>;
234
+ type NexraMediaInputMode = Readonly<{
235
+ id: string;
236
+ slots: readonly NexraMediaInputSlot[];
237
+ }>;
238
+ type NexraMediaParameterValue = string | number | boolean;
239
+ type NexraMediaParameter = Readonly<{
240
+ key: string;
241
+ label?: string;
242
+ }> & (Readonly<{
243
+ kind: "enum";
244
+ options: readonly NexraMediaParameterValue[];
245
+ default: NexraMediaParameterValue;
246
+ allowCustom?: boolean;
247
+ }> | Readonly<{
248
+ kind: "range";
249
+ min: number;
250
+ max: number;
251
+ step: number;
252
+ default: number;
253
+ autoValue?: number;
254
+ unit?: string;
255
+ }> | Readonly<{
256
+ kind: "toggle";
257
+ default: boolean;
258
+ }> | Readonly<{
259
+ kind: "resource";
260
+ resource: "voice";
261
+ default?: string;
262
+ allowCustom?: boolean;
263
+ }>);
264
+ type NexraMediaParameterConstraint = Readonly<{
265
+ when: Readonly<Record<string, NexraMediaParameterValue | readonly NexraMediaParameterValue[]>>;
266
+ parameter: string;
267
+ allowedValues?: readonly NexraMediaParameterValue[];
268
+ fixedValue?: NexraMediaParameterValue;
269
+ disabled?: boolean;
270
+ }>;
271
+ type NexraMediaOperationDefinition = Readonly<{
272
+ operation: NexraMediaOperation;
273
+ status: "active" | "hold";
274
+ outputKind: NexraMediaKind;
275
+ features: readonly NexraMediaFeature[];
276
+ parameterKeys: readonly string[];
277
+ }>;
278
+ declare const NEXRA_MEDIA_OPERATION_DEFINITIONS: readonly [{
279
+ readonly operation: "image.generate";
280
+ readonly status: "active";
281
+ readonly outputKind: "image";
282
+ readonly features: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control"];
283
+ readonly parameterKeys: readonly ["aspect_ratio", "resolution", "quality", "count", "output_format", "seed", "output_mode", "prompt_optimization"];
284
+ }, {
285
+ readonly operation: "video.generate";
286
+ readonly status: "active";
287
+ readonly outputKind: "video";
288
+ readonly features: readonly ["text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference"];
289
+ readonly parameterKeys: readonly ["voice", "aspect_ratio", "resolution", "quality", "duration", "fit", "title", "generate_audio", "output_format", "seed", "watermark"];
290
+ }, {
291
+ readonly operation: "audio.generate";
292
+ readonly status: "active";
293
+ readonly outputKind: "audio";
294
+ readonly features: readonly ["tts", "music", "sfx", "voice-reference", "voice-design"];
295
+ readonly parameterKeys: readonly ["voice", "language", "duration", "output_format", "sample_rate", "speed", "volume", "pitch", "emotion", "instrumental", "loop", "prompt_influence", "seed"];
296
+ }, {
297
+ readonly operation: "image.upscale";
298
+ readonly status: "active";
299
+ readonly outputKind: "image";
300
+ readonly features: readonly ["scale-factor", "target-resolution"];
301
+ readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
302
+ }, {
303
+ readonly operation: "video.upscale";
304
+ readonly status: "active";
305
+ readonly outputKind: "video";
306
+ readonly features: readonly ["scale-factor", "target-resolution"];
307
+ readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
308
+ }, {
309
+ readonly operation: "video.depth";
310
+ readonly status: "active";
311
+ readonly outputKind: "video";
312
+ readonly features: readonly ["video-depth"];
313
+ readonly parameterKeys: readonly ["resolution"];
314
+ }, {
315
+ readonly operation: "video.segment";
316
+ readonly status: "active";
317
+ readonly outputKind: "video";
318
+ readonly features: readonly ["video-segment"];
319
+ readonly parameterKeys: readonly ["resolution"];
320
+ }];
321
+ declare const NEXRA_MEDIA_INPUT_SCHEMAS: Readonly<Record<NexraPublishedMediaOperation, JsonObject>>;
322
+ declare function nexraMediaInputSchema(operation: NexraMediaOperation): JsonObject | undefined;
323
+ declare function isNexraMediaInput(value: unknown): value is JsonObject;
324
+ declare function nexraMediaOperationForMode(mode: string): NexraPublishedMediaOperation | undefined;
325
+ /** Narrow the shared category vocabulary for one Experience Center input mode. */
326
+ declare function nexraMediaInputSchemaForMode(mode: string): JsonObject | undefined;
327
+
328
+ export { type AssetImportRequest as A, type NexraMediaInputMode as B, type NexraMediaInputSlot as C, type NexraMediaKind as D, type NexraMediaOperation as E, type NexraMediaOperationDefinition as F, type NexraMediaParameter as G, type NexraMediaParameterConstraint as H, type NexraMediaSource as I, type NexraPublishedMediaOperation as J, type NexraResourceContentPart as K, type NexraTextContentPart as L, MEDIA_KINDS as M, type NexraImageLayer as N, type NexraVideoContentPart as O, type NexraVideoDepthInput as P, type NexraVideoGenerateInput as Q, type NexraVideoKeyframeContentPart as R, type NexraVideoUpscaleInput as S, isNexraMediaInput as T, nexraMediaInputSchema as U, nexraMediaInputSchemaForMode as V, nexraMediaOperationForMode as W, type AssetInput as a, type AssetReference as b, type AssetUploadOptions as c, type MediaAsset as d, type MediaAssetStatus as e, type MediaKind as f, type NexraImageLayerDecompositionOutput as g, type AssetCertificationRequest as h, type AssetCertification as i, type AssetCertificationWaitOptions as j, NEXRA_GENERATION_OPERATIONS as k, NEXRA_MEDIA_API_VERSION as l, NEXRA_MEDIA_FEATURES as m, NEXRA_MEDIA_INPUT_SCHEMAS as n, NEXRA_MEDIA_OPERATIONS as o, NEXRA_MEDIA_OPERATION_DEFINITIONS as p, NEXRA_PUBLISHED_MEDIA_OPERATIONS as q, type NexraAudioContentPart as r, type NexraAudioGenerateInput as s, type NexraGenerationOperation as t, type NexraImageContentPart as u, type NexraImageGenerateInput as v, type NexraImageUpscaleInput as w, type NexraMediaContentPart as x, type NexraMediaFeature as y, type NexraMediaInputByOperation as z };
@@ -109,6 +109,8 @@ interface TaskModelSummary {
109
109
  }
110
110
  interface TaskModel extends TaskModelSummary {
111
111
  description?: string;
112
+ /** Code-owned contracts for documentation; endpoints remains executable supply only. */
113
+ documentedEndpoints?: ModelEndpointSummary[];
112
114
  regions: string[];
113
115
  metadata?: JsonObject;
114
116
  /** Public list and customer-facing sale prices. Channel costs are never exposed here. */
@@ -361,4 +363,4 @@ declare function decodeMediaGeometry(_inputSchema: JsonObject, input: JsonObject
361
363
  /** Normalize the SDK convenience alias `ratio` without producing Native fields. */
362
364
  declare function applyMediaGeometry(inputSchema: JsonObject, input: JsonObject): JsonObject;
363
365
 
364
- export { type NexraCatalogChangeParams as A, type NexraCatalogChangePage as B, type CreateNexraDisplayQuoteBatchRequest as C, type NexraCatalogModelState as D, type NexraModelEndpointSpec as E, type FetchLike as F, type NexraCatalogModelIdentity as G, HttpTransport as H, type ModelSearchParams as M, type NexraClientOptions as N, type TaskModelSummary as T, type UnifiedMediaGeometry as U, type TaskModel as a, type ModelSchema as b, type ModelResourceList as c, type CreateNexraQuoteRequest as d, type MediaGeometryField as e, type MediaGeometryProjection as f, type ModelCapabilitySummary as g, type ModelDateVersion as h, type ModelEndpointSummary as i, type ModelModality as j, type ModelResourceOption as k, type NexraBillingCurrency as l, type NexraCatalogRevision as m, type NexraDisplayQuoteBatch as n, type NexraDisplayQuoteBatchEntry as o, type NexraModelOperation as p, type NexraModelSpec as q, type NexraModelSpecFilter as r, type NexraQuote as s, type NexraSalePrice as t, type NexraSalePriceList as u, type NexraSettlement as v, applyMediaGeometry as w, decodeMediaGeometry as x, encodeMediaGeometry as y, projectMediaGeometry as z };
366
+ export { type ModelDateVersion as A, type ModelEndpointSummary as B, type CreateNexraQuoteRequest as C, type ModelModality as D, type ModelResourceOption as E, type FetchLike as F, type NexraDisplayQuoteBatchEntry as G, HttpTransport as H, type MediaGeometryField as M, type NexraCatalogChangeParams as N, type TaskModelSummary as T, type UnifiedMediaGeometry as U, type NexraCatalogChangePage as a, type NexraCatalogModelState as b, type NexraSalePriceList as c, type NexraQuote as d, type CreateNexraDisplayQuoteBatchRequest as e, type NexraDisplayQuoteBatch as f, type NexraCatalogRevision as g, type NexraModelSpec as h, type NexraModelEndpointSpec as i, type NexraModelSpecFilter as j, type MediaGeometryProjection as k, type NexraBillingCurrency as l, type NexraCatalogModelIdentity as m, type NexraModelOperation as n, type NexraSalePrice as o, type NexraSettlement as p, applyMediaGeometry as q, decodeMediaGeometry as r, encodeMediaGeometry as s, projectMediaGeometry as t, type ModelSearchParams as u, type TaskModel as v, type ModelSchema as w, type ModelResourceList as x, type NexraClientOptions as y, type ModelCapabilitySummary as z };
package/dist/media.d.ts CHANGED
@@ -1,222 +1,2 @@
1
- import { b as AssetReference } from './assets-Cusrjj7_.js';
2
- import { a as JsonObject } from './json-Cz0MkWQn.js';
3
-
4
- declare const NEXRA_MEDIA_API_VERSION: 1;
5
- /** Catalog-level generation taxonomy. Text keeps its native endpoint protocols. */
6
- declare const NEXRA_GENERATION_OPERATIONS: readonly ["text.generate", "image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
7
- type NexraGenerationOperation = (typeof NEXRA_GENERATION_OPERATIONS)[number];
8
- declare const NEXRA_MEDIA_OPERATIONS: readonly ["image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
9
- type NexraMediaOperation = (typeof NEXRA_MEDIA_OPERATIONS)[number];
10
- declare const NEXRA_PUBLISHED_MEDIA_OPERATIONS: readonly ["image.generate", "video.generate", "audio.generate", "image.upscale", "video.upscale"];
11
- type NexraPublishedMediaOperation = (typeof NEXRA_PUBLISHED_MEDIA_OPERATIONS)[number];
12
- declare const NEXRA_MEDIA_FEATURES: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control", "text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference", "tts", "music", "sfx", "voice-reference", "voice-design", "scale-factor", "target-resolution"];
13
- type NexraMediaFeature = (typeof NEXRA_MEDIA_FEATURES)[number];
14
- /** JSON wire locator. SDK-only Blob/File support is normalized into one of these forms. */
15
- type NexraMediaSource = string | AssetReference;
16
- type NexraTextRole = "prompt" | "negative_prompt" | "script" | "lyrics";
17
- type NexraImageRole = "source" | "reference" | "first_frame" | "last_frame" | "mask" | "control" | "subject" | "background";
18
- type NexraVideoRole = "source" | "reference" | "edit" | "extend";
19
- type NexraAudioRole = "source" | "reference" | "voice_reference";
20
- type NexraTextContentPart = Readonly<{
21
- type: "text";
22
- text: string;
23
- role?: NexraTextRole;
24
- }>;
25
- type NexraImageContentPart = Readonly<{
26
- type: "image";
27
- source: NexraMediaSource;
28
- role?: NexraImageRole;
29
- /** Stable prompt reference name for models that address media as `@name`. */
30
- name?: string;
31
- }>;
32
- /** An image pinned inside a generated video; only models declaring this role accept it. */
33
- type NexraVideoKeyframeContentPart = Readonly<{
34
- type: "image";
35
- source: NexraMediaSource;
36
- role: "keyframe";
37
- /** Position in seconds, strictly inside the generated clip. */
38
- timestamp: number;
39
- }>;
40
- type NexraVideoContentPart = Readonly<{
41
- type: "video";
42
- source: NexraMediaSource;
43
- role?: NexraVideoRole;
44
- }>;
45
- type NexraAudioContentPart = Readonly<{
46
- type: "audio";
47
- source: NexraMediaSource;
48
- role?: NexraAudioRole;
49
- }>;
50
- type NexraMediaContentPart = NexraTextContentPart | NexraImageContentPart | NexraVideoContentPart | NexraAudioContentPart;
51
- type NexraDraftContentPart = Readonly<{
52
- type: "draft_task";
53
- draft_task: Readonly<{
54
- id: string;
55
- }>;
56
- }>;
57
- type NexraImageGenerateInput = Readonly<{
58
- content: readonly (NexraTextContentPart | NexraImageContentPart)[];
59
- aspect_ratio?: string;
60
- resolution?: string;
61
- quality?: string;
62
- count?: number;
63
- output_format?: string;
64
- seed?: number;
65
- }>;
66
- type NexraVideoGenerateInput = Readonly<{
67
- content: readonly (NexraMediaContentPart | NexraDraftContentPart | NexraVideoKeyframeContentPart)[];
68
- task_type?: string;
69
- draft?: boolean;
70
- /** Explicit no-watermark value, only on models whose contract declares it. */
71
- watermark?: false;
72
- /** Optional preset or cloned voice used by talking-avatar video models. */
73
- voice?: string;
74
- aspect_ratio?: string;
75
- resolution?: string;
76
- quality?: string;
77
- duration?: number;
78
- fit?: "contain" | "cover";
79
- title?: string;
80
- generate_audio?: boolean;
81
- output_format?: string;
82
- seed?: number;
83
- }>;
84
- type NexraAudioGenerateInput = Readonly<{
85
- content: readonly (NexraTextContentPart | NexraAudioContentPart)[];
86
- voice?: string;
87
- language?: string;
88
- duration?: number;
89
- output_format?: string;
90
- sample_rate?: number;
91
- speed?: number;
92
- volume?: number;
93
- pitch?: number;
94
- emotion?: string;
95
- instrumental?: boolean;
96
- loop?: boolean;
97
- prompt_influence?: number;
98
- seed?: number;
99
- }>;
100
- type NexraImageUpscaleInput = Readonly<{
101
- content: readonly [NexraImageContentPart];
102
- enable_hdr?: boolean;
103
- enable_wb?: boolean;
104
- scale?: number;
105
- resolution?: string;
106
- output_format?: string;
107
- preserve_details?: boolean;
108
- }>;
109
- type NexraVideoUpscaleInput = Readonly<{
110
- source_duration: number;
111
- config?: string;
112
- scale?: number;
113
- resolution?: string;
114
- output_format?: string;
115
- preserve_details?: boolean;
116
- }> & (Readonly<{
117
- content: readonly [NexraVideoContentPart];
118
- vid?: never;
119
- }> | Readonly<{
120
- vid: string;
121
- content?: never;
122
- }>);
123
- type NexraMediaInputByOperation = Readonly<{
124
- "image.generate": NexraImageGenerateInput;
125
- "video.generate": NexraVideoGenerateInput;
126
- "audio.generate": NexraAudioGenerateInput;
127
- "image.upscale": NexraImageUpscaleInput;
128
- "video.upscale": NexraVideoUpscaleInput;
129
- }>;
130
- type NexraMediaKind = "image" | "video" | "audio";
131
- type NexraMediaInputSlot = Readonly<{
132
- mediaKind: NexraMediaKind;
133
- role: string;
134
- min?: number;
135
- max: number;
136
- maxBytes?: number;
137
- minDurationSeconds?: number;
138
- maxDurationSeconds?: number;
139
- }>;
140
- type NexraMediaInputMode = Readonly<{
141
- id: string;
142
- slots: readonly NexraMediaInputSlot[];
143
- }>;
144
- type NexraMediaParameterValue = string | number | boolean;
145
- type NexraMediaParameter = Readonly<{
146
- key: string;
147
- label?: string;
148
- }> & (Readonly<{
149
- kind: "enum";
150
- options: readonly NexraMediaParameterValue[];
151
- default: NexraMediaParameterValue;
152
- allowCustom?: boolean;
153
- }> | Readonly<{
154
- kind: "range";
155
- min: number;
156
- max: number;
157
- step: number;
158
- default: number;
159
- autoValue?: number;
160
- unit?: string;
161
- }> | Readonly<{
162
- kind: "toggle";
163
- default: boolean;
164
- }> | Readonly<{
165
- kind: "resource";
166
- resource: "voice";
167
- default?: string;
168
- allowCustom?: boolean;
169
- }>);
170
- type NexraMediaParameterConstraint = Readonly<{
171
- when: Readonly<Record<string, NexraMediaParameterValue | readonly NexraMediaParameterValue[]>>;
172
- parameter: string;
173
- allowedValues?: readonly NexraMediaParameterValue[];
174
- fixedValue?: NexraMediaParameterValue;
175
- disabled?: boolean;
176
- }>;
177
- type NexraMediaOperationDefinition = Readonly<{
178
- operation: NexraMediaOperation;
179
- status: "active" | "hold";
180
- outputKind: NexraMediaKind;
181
- features: readonly NexraMediaFeature[];
182
- parameterKeys: readonly string[];
183
- }>;
184
- declare const NEXRA_MEDIA_OPERATION_DEFINITIONS: readonly [{
185
- readonly operation: "image.generate";
186
- readonly status: "active";
187
- readonly outputKind: "image";
188
- readonly features: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control"];
189
- readonly parameterKeys: readonly ["aspect_ratio", "resolution", "quality", "count", "output_format", "seed"];
190
- }, {
191
- readonly operation: "video.generate";
192
- readonly status: "active";
193
- readonly outputKind: "video";
194
- readonly features: readonly ["text-to-video", "first-frame", "first-last-frame", "image-to-video", "video-to-video", "audio-to-video", "avatar-video", "reference-image", "reference-video", "reference-audio", "omni-reference"];
195
- readonly parameterKeys: readonly ["voice", "aspect_ratio", "resolution", "quality", "duration", "fit", "title", "generate_audio", "output_format", "seed", "watermark"];
196
- }, {
197
- readonly operation: "audio.generate";
198
- readonly status: "active";
199
- readonly outputKind: "audio";
200
- readonly features: readonly ["tts", "music", "sfx", "voice-reference", "voice-design"];
201
- readonly parameterKeys: readonly ["voice", "language", "duration", "output_format", "sample_rate", "speed", "volume", "pitch", "emotion", "instrumental", "loop", "prompt_influence", "seed"];
202
- }, {
203
- readonly operation: "image.upscale";
204
- readonly status: "active";
205
- readonly outputKind: "image";
206
- readonly features: readonly ["scale-factor", "target-resolution"];
207
- readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
208
- }, {
209
- readonly operation: "video.upscale";
210
- readonly status: "active";
211
- readonly outputKind: "video";
212
- readonly features: readonly ["scale-factor", "target-resolution"];
213
- readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
214
- }];
215
- declare const NEXRA_MEDIA_INPUT_SCHEMAS: Readonly<Record<NexraPublishedMediaOperation, JsonObject>>;
216
- declare function nexraMediaInputSchema(operation: NexraMediaOperation): JsonObject | undefined;
217
- declare function isNexraMediaInput(value: unknown): value is JsonObject;
218
- declare function nexraMediaOperationForMode(mode: string): NexraPublishedMediaOperation | undefined;
219
- /** Narrow the shared category vocabulary for one Experience Center input mode. */
220
- declare function nexraMediaInputSchemaForMode(mode: string): JsonObject | undefined;
221
-
222
- export { NEXRA_GENERATION_OPERATIONS, NEXRA_MEDIA_API_VERSION, NEXRA_MEDIA_FEATURES, NEXRA_MEDIA_INPUT_SCHEMAS, NEXRA_MEDIA_OPERATIONS, NEXRA_MEDIA_OPERATION_DEFINITIONS, NEXRA_PUBLISHED_MEDIA_OPERATIONS, type NexraAudioContentPart, type NexraAudioGenerateInput, type NexraGenerationOperation, type NexraImageContentPart, type NexraImageGenerateInput, type NexraImageUpscaleInput, type NexraMediaContentPart, type NexraMediaFeature, type NexraMediaInputByOperation, type NexraMediaInputMode, type NexraMediaInputSlot, type NexraMediaKind, type NexraMediaOperation, type NexraMediaOperationDefinition, type NexraMediaParameter, type NexraMediaParameterConstraint, type NexraMediaSource, type NexraPublishedMediaOperation, type NexraTextContentPart, type NexraVideoContentPart, type NexraVideoGenerateInput, type NexraVideoKeyframeContentPart, type NexraVideoUpscaleInput, isNexraMediaInput, nexraMediaInputSchema, nexraMediaInputSchemaForMode, nexraMediaOperationForMode };
1
+ export { k as NEXRA_GENERATION_OPERATIONS, l as NEXRA_MEDIA_API_VERSION, m as NEXRA_MEDIA_FEATURES, n as NEXRA_MEDIA_INPUT_SCHEMAS, o as NEXRA_MEDIA_OPERATIONS, p as NEXRA_MEDIA_OPERATION_DEFINITIONS, q as NEXRA_PUBLISHED_MEDIA_OPERATIONS, r as NexraAudioContentPart, s as NexraAudioGenerateInput, t as NexraGenerationOperation, u as NexraImageContentPart, v as NexraImageGenerateInput, N as NexraImageLayer, g as NexraImageLayerDecompositionOutput, w as NexraImageUpscaleInput, x as NexraMediaContentPart, y as NexraMediaFeature, z as NexraMediaInputByOperation, B as NexraMediaInputMode, C as NexraMediaInputSlot, D as NexraMediaKind, E as NexraMediaOperation, F as NexraMediaOperationDefinition, G as NexraMediaParameter, H as NexraMediaParameterConstraint, I as NexraMediaSource, J as NexraPublishedMediaOperation, K as NexraResourceContentPart, L as NexraTextContentPart, O as NexraVideoContentPart, P as NexraVideoDepthInput, Q as NexraVideoGenerateInput, R as NexraVideoKeyframeContentPart, S as NexraVideoUpscaleInput, T as isNexraMediaInput, U as nexraMediaInputSchema, V as nexraMediaInputSchemaForMode, W as nexraMediaOperationForMode } from './media-Co8S2qEM.js';
2
+ import './json-Cz0MkWQn.js';
package/dist/media.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  nexraMediaInputSchema,
11
11
  nexraMediaInputSchemaForMode,
12
12
  nexraMediaOperationForMode
13
- } from "./chunk-ESPUF2D4.js";
13
+ } from "./chunk-LXR3MEF3.js";
14
14
  export {
15
15
  NEXRA_GENERATION_OPERATIONS,
16
16
  NEXRA_MEDIA_API_VERSION,