@byte_fluffy/nexra-sdk 0.1.0-alpha.3 → 0.1.0-alpha.30

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.
@@ -1,37 +1,7 @@
1
- type JsonPrimitive = boolean | number | string | null;
2
- type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
3
- interface JsonObject {
4
- [key: string]: JsonValue;
5
- }
6
- interface CursorPage<T> {
7
- data: T[];
8
- nextCursor?: string;
9
- }
1
+ import { b as JsonPrimitive, a as JsonObject, J as JsonValue } from './json-Cz0MkWQn.js';
10
2
 
11
3
  declare const BILLING_METRICS: readonly ["requests", "input_tokens", "cached_input_tokens", "cache_write_tokens", "cache_creation_5m_input_tokens", "cache_creation_1h_input_tokens", "cache_read_input_tokens", "output_tokens", "input_characters", "input_utf8_bytes", "input_images", "output_images", "input_audio_seconds", "output_audio_seconds", "input_video_seconds", "output_video_seconds", "provider_credits", "web_search_requests"];
12
4
  type BillingMetric = (typeof BILLING_METRICS)[number];
13
- declare const BILLING_EXPORT_DIMENSIONS: readonly ["resolution", "duration", "layer_decomposition", "with_audio", "has_input_video", "hd", "prompt_extend", "modality", "tier", "quality", "image_count", "input_token_tier", "input_modality", "service_tier", "inference_geo", "speed", "region_scope", "has_reference_image", "mode"];
14
- type UsageComponentEvidence = {
15
- source: "provider_native" | "request_derived" | "response_derived" | "tariff_equivalent" | "unknown";
16
- paths?: string[];
17
- calculation?: string;
18
- };
19
- interface MeteredUsageComponent {
20
- metric: BillingMetric;
21
- quantity: number;
22
- dimensions?: Record<string, JsonPrimitive>;
23
- evidence?: UsageComponentEvidence;
24
- }
25
- /**
26
- * Provider evidence is normalized into independent metered components instead
27
- * of one canonical model response. This keeps protocol conversion separate
28
- * from billing and allows one request to carry differently-dimensioned usage.
29
- */
30
- interface NormalizedUsageV1 {
31
- schemaVersion: 1;
32
- components: MeteredUsageComponent[];
33
- billingEvidenceComplete?: boolean;
34
- }
35
5
  interface MeteredPriceRate {
36
6
  metric: BillingMetric;
37
7
  unitSize: number;
@@ -46,42 +16,8 @@ interface MeteredPriceRuleV1 {
46
16
  rates: MeteredPriceRate[];
47
17
  }
48
18
  type PriceRule = MeteredPriceRuleV1;
49
- interface PriceEvaluationLine {
50
- evidence?: UsageComponentEvidence;
51
- metric: BillingMetric;
52
- quantity: number;
53
- unitSize: number;
54
- unitPrice: string;
55
- rounding: "proportional" | "ceil";
56
- includedQuantity: number;
57
- dimensions?: Record<string, JsonPrimitive>;
58
- amount: string;
59
- discountedAmount?: string;
60
- }
61
- /** Preserve frozen row order when distributing the eight-decimal remainder. */
62
- declare function allocateDiscountedPriceLines(lines: readonly PriceEvaluationLine[], saleAmount: string): PriceEvaluationLine[];
63
- interface PriceEvaluationIssue {
64
- code: "dimension_mismatch" | "ambiguous_rate" | "missing_usage";
65
- metric: BillingMetric;
66
- componentIndex: number;
67
- }
68
- interface PriceEvaluation {
69
- status: "rated" | "incomplete";
70
- amount: string;
71
- lines: PriceEvaluationLine[];
72
- issues: PriceEvaluationIssue[];
73
- }
74
- declare function validateNormalizedUsage(value: unknown): asserts value is NormalizedUsageV1;
75
- /**
76
- * Deterministically rates normalized usage without mutating wallets or billing
77
- * records. Amounts are rounded half-up to the database's eight-decimal money
78
- * scale per line; ceil rates round usage units before multiplying the price.
79
- */
80
- declare function evaluatePriceRule(ruleValue: unknown, usageValue: unknown): PriceEvaluation;
81
- declare function validatePriceRule(value: unknown): asserts value is PriceRule;
82
19
 
83
20
  type MeteringKind = "token" | "non_token" | "mixed";
84
- type UsageEvidenceStatus = "complete" | "partial" | "missing" | "invalid" | "not_expected";
85
21
  interface MeteringContract {
86
22
  schemaVersion: 1;
87
23
  kind: MeteringKind;
@@ -91,19 +27,30 @@ interface MeteringContract {
91
27
  whenFeature?: string;
92
28
  }>;
93
29
  }
94
- interface UsageEvidenceAssessment {
95
- kind: MeteringKind | "unknown";
96
- evidenceStatus: UsageEvidenceStatus;
97
- expectedMetrics: BillingMetric[];
98
- observedMetrics: BillingMetric[];
99
- missingMetrics: BillingMetric[];
100
- issues: string[];
101
- }
102
- declare function validateMeteringContract(value: unknown): asserts value is MeteringContract;
103
- /** Evidence completeness is independent of sale/cost prices and delivery success. */
104
- declare function assessUsageEvidence(contract: unknown, usage: unknown, features?: Readonly<Record<string, boolean>>): UsageEvidenceAssessment;
105
30
 
106
31
  type ModelModality = "language" | "embedding" | "reranker" | "image" | "video" | "audio" | "world" | "multimodal" | "other";
32
+ /** A concrete operation of a code-owned endpoint contract, shared by API and UI. */
33
+ type ModelHttpOperation = Readonly<{
34
+ key: string;
35
+ kind: "request" | "create" | "query" | "cancel" | "delete" | "stream" | "generate" | "edit";
36
+ httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
37
+ pathTemplate: string;
38
+ documentationUrl?: string;
39
+ schemaProjection: "request" | "bearer-request" | "managed-task-create" | "managed-task-query" | "managed-task-cancel" | "native-task-create" | "native-task-query" | "native-task-delete";
40
+ responseStatus?: number;
41
+ idempotencyKey?: boolean;
42
+ queryParameters?: Readonly<JsonObject>;
43
+ headerParameters?: Readonly<JsonObject>;
44
+ pathParameters?: Readonly<JsonObject>;
45
+ /** Operation-specific body; binary fields describe multipart file parts. */
46
+ bodyParameters?: Readonly<JsonObject>;
47
+ responseBody?: Readonly<JsonObject>;
48
+ requestBody?: Readonly<{
49
+ properties: readonly string[];
50
+ required: readonly string[];
51
+ oneOfRequired?: readonly (readonly string[])[];
52
+ }>;
53
+ }>;
107
54
  interface ModelEndpointSummary {
108
55
  key: string;
109
56
  label: string;
@@ -114,6 +61,8 @@ interface ModelEndpointSummary {
114
61
  capabilities: string[];
115
62
  /** Task execution of this native endpoint, not a second model parameter definition. */
116
63
  sourceEndpointKey?: string | null;
64
+ documentationUrl?: string;
65
+ httpOperations?: readonly ModelHttpOperation[];
117
66
  }
118
67
  interface ModelCapabilitySummary {
119
68
  inputModalities: string[];
@@ -121,6 +70,10 @@ interface ModelCapabilitySummary {
121
70
  /** User-facing input patterns such as text-to-video or image-to-image. */
122
71
  inputModes: string[];
123
72
  features: string[];
73
+ /** Maximum combined input and output context supported by the model. */
74
+ contextWindowTokens?: number;
75
+ /** Maximum generated output tokens supported by the model. */
76
+ maxOutputTokens?: number;
124
77
  }
125
78
  interface ModelDateVersion {
126
79
  id: string;
@@ -181,6 +134,8 @@ interface TaskModel extends TaskModelSummary {
181
134
  interface ModelSchema {
182
135
  model: string;
183
136
  version: number;
137
+ /** Contract owner for the returned schema. Defaults to nexra for older servers. */
138
+ contract?: "nexra" | "native";
184
139
  dialect: "https://json-schema.org/draft/2020-12/schema" | string;
185
140
  inputSchema: JsonObject;
186
141
  outputSchema: JsonObject;
@@ -228,6 +183,17 @@ interface NexraModelOperation {
228
183
  outputSchema: JsonObject;
229
184
  metering: MeteringContract;
230
185
  }
186
+ /** Public native wire endpoint metadata. Provider routing and credentials stay private. */
187
+ interface NexraModelEndpointSpec {
188
+ endpointKey: string;
189
+ operation: string;
190
+ protocol: string;
191
+ method: string;
192
+ path: string;
193
+ capabilities: readonly string[];
194
+ inputSchema?: JsonObject;
195
+ outputSchema?: JsonObject;
196
+ }
231
197
  interface NexraModelSpec {
232
198
  id: string;
233
199
  contractVersion: number;
@@ -240,6 +206,7 @@ interface NexraModelSpec {
240
206
  aliases: readonly string[];
241
207
  capabilities: ModelCapabilitySummary;
242
208
  operations: readonly NexraModelOperation[];
209
+ endpoints: readonly NexraModelEndpointSpec[];
243
210
  }
244
211
  interface NexraModelSpecFilter {
245
212
  kind?: ModelModality;
@@ -252,12 +219,32 @@ interface NexraSalePrice {
252
219
  priceRevision: string;
253
220
  effectiveFrom: string;
254
221
  rule: PriceRule;
222
+ displayEstimates?: readonly Readonly<{
223
+ parameters: JsonObject;
224
+ inputImageCounts: readonly number[];
225
+ amount: string;
226
+ maximumAmount: string;
227
+ }>[];
228
+ displayEstimatesValidUntil?: string;
229
+ }
230
+ interface NexraSalePriceList {
231
+ quoteContextRevision?: string;
232
+ currency: NexraBillingCurrency;
233
+ prices: readonly NexraSalePrice[];
255
234
  }
256
235
  interface CreateNexraQuoteRequest {
257
236
  modelId: string;
258
237
  operation: string;
259
238
  input: JsonObject;
260
239
  }
240
+ interface CreateNexraDisplayQuoteBatchRequest {
241
+ modelId: string;
242
+ operation: string;
243
+ entries: readonly Readonly<{
244
+ key: string;
245
+ input: JsonObject;
246
+ }>[];
247
+ }
261
248
  interface NexraQuote {
262
249
  quoteToken: string;
263
250
  modelId: string;
@@ -269,6 +256,53 @@ interface NexraQuote {
269
256
  accuracy: "exact" | "estimated";
270
257
  expiresAt: string;
271
258
  }
259
+ type NexraDisplayQuoteBatchEntry = Readonly<{
260
+ key: string;
261
+ amount: string;
262
+ maximumAmount: string;
263
+ accuracy: "exact" | "estimated";
264
+ }> | Readonly<{
265
+ key: string;
266
+ error: {
267
+ code: string;
268
+ message: string;
269
+ };
270
+ }>;
271
+ interface NexraDisplayQuoteBatch {
272
+ modelId: string;
273
+ contractVersion: number;
274
+ priceRevision: string;
275
+ pricingPolicyRevision: string;
276
+ quoteContextRevision: string;
277
+ currency: NexraBillingCurrency;
278
+ entries: readonly NexraDisplayQuoteBatchEntry[];
279
+ expiresAt: string;
280
+ }
281
+ interface NexraCatalogRevision {
282
+ revision: string;
283
+ changedAt: string;
284
+ }
285
+ interface NexraCatalogModelIdentity {
286
+ modelId: string;
287
+ operation: string;
288
+ revision: string;
289
+ available: boolean;
290
+ }
291
+ interface NexraCatalogChangeParams {
292
+ after?: string;
293
+ upper?: string;
294
+ cursor?: string;
295
+ limit?: number;
296
+ }
297
+ interface NexraCatalogChangePage extends NexraCatalogRevision {
298
+ data: readonly NexraCatalogModelIdentity[];
299
+ nextCursor?: string;
300
+ }
301
+ interface NexraCatalogModelState extends NexraCatalogModelIdentity {
302
+ displayName?: string;
303
+ inputSchema?: JsonObject;
304
+ prices: readonly NexraSalePrice[];
305
+ }
272
306
  interface NexraSettlement {
273
307
  amount: string;
274
308
  currency: NexraBillingCurrency;
@@ -298,16 +332,32 @@ declare class HttpTransport {
298
332
  json<T>(path: string, init?: RequestInit, options?: RequestOptions): Promise<T>;
299
333
  response(path: string, init?: RequestInit, options?: RequestOptions): Promise<Response>;
300
334
  }
301
- declare function jsonBody(value: unknown): Pick<RequestInit, "body" | "headers">;
302
- declare function queryString(values: Record<string, string | number | undefined>): string;
303
- declare function sleep(milliseconds: number, signal?: AbortSignal | null): Promise<void>;
304
335
 
305
- declare class CatalogClient {
306
- private readonly transport;
307
- constructor(transport: HttpTransport);
308
- quote(request: CreateNexraQuoteRequest, signal?: AbortSignal): Promise<NexraQuote>;
309
- }
310
- declare function getModelSpec(modelId: string): NexraModelSpec | undefined;
311
- declare function listModelSpecs(filter?: NexraModelSpecFilter): readonly NexraModelSpec[];
336
+ /** UI-friendly view of Nexra's canonical geometry fields. */
337
+ type UnifiedMediaGeometry = {
338
+ resolution?: string;
339
+ ratio?: string;
340
+ quality?: string;
341
+ };
342
+ type MediaGeometryField = {
343
+ field: string;
344
+ options: readonly string[];
345
+ default?: string;
346
+ optionLabels: Readonly<Record<string, string>>;
347
+ };
348
+ type MediaGeometryProjection = {
349
+ kind: "resolution-ratio" | "ratio-only" | "none";
350
+ resolution?: MediaGeometryField;
351
+ ratio?: MediaGeometryField;
352
+ quality?: MediaGeometryField;
353
+ };
354
+ /** Read controls from the Nexra contract. It never exposes provider-native size fields. */
355
+ declare function projectMediaGeometry(inputSchema: JsonObject): MediaGeometryProjection;
356
+ /** UI geometry aliases → canonical Nexra request fields. */
357
+ declare function encodeMediaGeometry(inputSchema: JsonObject, geometry: UnifiedMediaGeometry): JsonObject;
358
+ /** Canonical Nexra request fields → UI geometry aliases. */
359
+ declare function decodeMediaGeometry(_inputSchema: JsonObject, input: JsonObject): UnifiedMediaGeometry;
360
+ /** Normalize the SDK convenience alias `ratio` without producing Native fields. */
361
+ declare function applyMediaGeometry(inputSchema: JsonObject, input: JsonObject): JsonObject;
312
362
 
313
- export { type NormalizedUsageV1 as A, type BillingMetric as B, type CursorPage as C, type PriceEvaluationIssue as D, type PriceEvaluationLine as E, type FetchLike as F, type PriceRule as G, HttpTransport as H, type UsageEvidenceAssessment as I, type JsonObject as J, type UsageEvidenceStatus as K, allocateDiscountedPriceLines as L, type ModelSearchParams as M, type NexraSettlement as N, assessUsageEvidence as O, type PriceEvaluation as P, evaluatePriceRule as Q, getModelSpec as R, jsonBody as S, type TaskModelSummary as T, type UsageComponentEvidence as U, listModelSpecs as V, queryString as W, sleep as X, validateMeteringContract as Y, validateNormalizedUsage as Z, validatePriceRule as _, type JsonValue as a, type TaskModel as b, type ModelSchema as c, CatalogClient as d, type NexraClientOptions as e, BILLING_EXPORT_DIMENSIONS as f, BILLING_METRICS as g, type CreateNexraQuoteRequest as h, type JsonPrimitive as i, type MeteredPriceRate as j, type MeteredPriceRuleV1 as k, type MeteredUsageComponent as l, type MeteringContract as m, type MeteringKind as n, type ModelCapabilitySummary as o, type ModelDateVersion as p, type ModelEndpointSummary as q, type ModelModality as r, type ModelResourceList as s, type ModelResourceOption as t, type NexraBillingCurrency as u, type NexraModelOperation as v, type NexraModelSpec as w, type NexraModelSpecFilter as x, type NexraQuote as y, type NexraSalePrice as z };
363
+ 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 };
@@ -0,0 +1,212 @@
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"];
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
+ draft?: boolean;
69
+ /** Explicit no-watermark value, only on models whose contract declares it. */
70
+ watermark?: false;
71
+ /** Optional preset or cloned voice used by talking-avatar video models. */
72
+ voice?: string;
73
+ aspect_ratio?: string;
74
+ resolution?: string;
75
+ quality?: string;
76
+ duration?: number;
77
+ fit?: "contain" | "cover";
78
+ title?: string;
79
+ generate_audio?: boolean;
80
+ output_format?: string;
81
+ seed?: number;
82
+ }>;
83
+ type NexraAudioGenerateInput = Readonly<{
84
+ content: readonly (NexraTextContentPart | NexraAudioContentPart)[];
85
+ voice?: string;
86
+ language?: string;
87
+ duration?: number;
88
+ output_format?: string;
89
+ sample_rate?: number;
90
+ speed?: number;
91
+ volume?: number;
92
+ pitch?: number;
93
+ emotion?: string;
94
+ instrumental?: boolean;
95
+ loop?: boolean;
96
+ prompt_influence?: number;
97
+ seed?: number;
98
+ }>;
99
+ type NexraImageUpscaleInput = Readonly<{
100
+ content: readonly [NexraImageContentPart];
101
+ scale?: number;
102
+ resolution?: string;
103
+ output_format?: string;
104
+ preserve_details?: boolean;
105
+ }>;
106
+ type NexraVideoUpscaleInput = Readonly<{
107
+ content: readonly [NexraVideoContentPart];
108
+ scale?: number;
109
+ resolution?: string;
110
+ output_format?: string;
111
+ preserve_details?: boolean;
112
+ }>;
113
+ type NexraMediaInputByOperation = Readonly<{
114
+ "image.generate": NexraImageGenerateInput;
115
+ "video.generate": NexraVideoGenerateInput;
116
+ "audio.generate": NexraAudioGenerateInput;
117
+ "image.upscale": NexraImageUpscaleInput;
118
+ "video.upscale": NexraVideoUpscaleInput;
119
+ }>;
120
+ type NexraMediaKind = "image" | "video" | "audio";
121
+ type NexraMediaInputSlot = Readonly<{
122
+ mediaKind: NexraMediaKind;
123
+ role: string;
124
+ min?: number;
125
+ max: number;
126
+ maxBytes?: number;
127
+ minDurationSeconds?: number;
128
+ maxDurationSeconds?: number;
129
+ }>;
130
+ type NexraMediaInputMode = Readonly<{
131
+ id: string;
132
+ slots: readonly NexraMediaInputSlot[];
133
+ }>;
134
+ type NexraMediaParameterValue = string | number | boolean;
135
+ type NexraMediaParameter = Readonly<{
136
+ key: string;
137
+ label?: string;
138
+ }> & (Readonly<{
139
+ kind: "enum";
140
+ options: readonly NexraMediaParameterValue[];
141
+ default: NexraMediaParameterValue;
142
+ allowCustom?: boolean;
143
+ }> | Readonly<{
144
+ kind: "range";
145
+ min: number;
146
+ max: number;
147
+ step: number;
148
+ default: number;
149
+ autoValue?: number;
150
+ unit?: string;
151
+ }> | Readonly<{
152
+ kind: "toggle";
153
+ default: boolean;
154
+ }> | Readonly<{
155
+ kind: "resource";
156
+ resource: "voice";
157
+ default?: string;
158
+ allowCustom?: boolean;
159
+ }>);
160
+ type NexraMediaParameterConstraint = Readonly<{
161
+ when: Readonly<Record<string, NexraMediaParameterValue | readonly NexraMediaParameterValue[]>>;
162
+ parameter: string;
163
+ allowedValues?: readonly NexraMediaParameterValue[];
164
+ fixedValue?: NexraMediaParameterValue;
165
+ disabled?: boolean;
166
+ }>;
167
+ type NexraMediaOperationDefinition = Readonly<{
168
+ operation: NexraMediaOperation;
169
+ status: "active" | "hold";
170
+ outputKind: NexraMediaKind;
171
+ features: readonly NexraMediaFeature[];
172
+ parameterKeys: readonly string[];
173
+ }>;
174
+ declare const NEXRA_MEDIA_OPERATION_DEFINITIONS: readonly [{
175
+ readonly operation: "image.generate";
176
+ readonly status: "active";
177
+ readonly outputKind: "image";
178
+ readonly features: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control"];
179
+ readonly parameterKeys: readonly ["aspect_ratio", "resolution", "quality", "count", "output_format", "seed"];
180
+ }, {
181
+ readonly operation: "video.generate";
182
+ readonly status: "active";
183
+ readonly outputKind: "video";
184
+ 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"];
185
+ readonly parameterKeys: readonly ["voice", "aspect_ratio", "resolution", "quality", "duration", "fit", "title", "generate_audio", "output_format", "seed", "watermark"];
186
+ }, {
187
+ readonly operation: "audio.generate";
188
+ readonly status: "active";
189
+ readonly outputKind: "audio";
190
+ readonly features: readonly ["tts", "music", "sfx", "voice-reference", "voice-design"];
191
+ readonly parameterKeys: readonly ["voice", "language", "duration", "output_format", "sample_rate", "speed", "volume", "pitch", "emotion", "instrumental", "loop", "prompt_influence", "seed"];
192
+ }, {
193
+ readonly operation: "image.upscale";
194
+ readonly status: "active";
195
+ readonly outputKind: "image";
196
+ readonly features: readonly ["scale-factor", "target-resolution"];
197
+ readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
198
+ }, {
199
+ readonly operation: "video.upscale";
200
+ readonly status: "hold";
201
+ readonly outputKind: "video";
202
+ readonly features: readonly ["scale-factor", "target-resolution"];
203
+ readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
204
+ }];
205
+ declare const NEXRA_MEDIA_INPUT_SCHEMAS: Readonly<Record<NexraPublishedMediaOperation, JsonObject>>;
206
+ declare function nexraMediaInputSchema(operation: NexraMediaOperation): JsonObject | undefined;
207
+ declare function isNexraMediaInput(value: unknown): value is JsonObject;
208
+ declare function nexraMediaOperationForMode(mode: string): NexraPublishedMediaOperation | undefined;
209
+ /** Narrow the shared category vocabulary for one Experience Center input mode. */
210
+ declare function nexraMediaInputSchemaForMode(mode: string): JsonObject | undefined;
211
+
212
+ 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 };
package/dist/media.js ADDED
@@ -0,0 +1,26 @@
1
+ import {
2
+ NEXRA_GENERATION_OPERATIONS,
3
+ NEXRA_MEDIA_API_VERSION,
4
+ NEXRA_MEDIA_FEATURES,
5
+ NEXRA_MEDIA_INPUT_SCHEMAS,
6
+ NEXRA_MEDIA_OPERATIONS,
7
+ NEXRA_MEDIA_OPERATION_DEFINITIONS,
8
+ NEXRA_PUBLISHED_MEDIA_OPERATIONS,
9
+ isNexraMediaInput,
10
+ nexraMediaInputSchema,
11
+ nexraMediaInputSchemaForMode,
12
+ nexraMediaOperationForMode
13
+ } from "./chunk-DKQZWIQ7.js";
14
+ export {
15
+ NEXRA_GENERATION_OPERATIONS,
16
+ NEXRA_MEDIA_API_VERSION,
17
+ NEXRA_MEDIA_FEATURES,
18
+ NEXRA_MEDIA_INPUT_SCHEMAS,
19
+ NEXRA_MEDIA_OPERATIONS,
20
+ NEXRA_MEDIA_OPERATION_DEFINITIONS,
21
+ NEXRA_PUBLISHED_MEDIA_OPERATIONS,
22
+ isNexraMediaInput,
23
+ nexraMediaInputSchema,
24
+ nexraMediaInputSchemaForMode,
25
+ nexraMediaOperationForMode
26
+ };
@@ -0,0 +1,4 @@
1
+ export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as AssetUploadOptions, d as MediaAsset, e as MediaAssetStatus, f as MediaKind } from './assets-Cusrjj7_.js';
2
+ 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, c as ModelResourceList, k as ModelResourceOption, b as ModelSchema, M as ModelSearchParams, l as NexraBillingCurrency, m as NexraCatalogRevision, N as NexraClientOptions, 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, a as TaskModel, T as TaskModelSummary, U as UnifiedMediaGeometry } from './media-geometry-DAVFGry1.js';
3
+ export { C as CursorPage, a as JsonObject, b as JsonPrimitive, J as JsonValue } from './json-Cz0MkWQn.js';
4
+ export { d as ApiErrorPayload, e as CreateTaskOptions, f as CreateTaskRequest, C as CreateVoiceRequest, N as NexraError, g as PublicError, h as PublicErrorContext, P as PublicErrorFields, i as RequestDetails, b as RunResult, R as RunTaskOptions, c as Task, k as TaskCost, l as TaskError, m as TaskEvent, n as TaskEventType, o as TaskListParams, p as TaskPage, q as TaskProgress, r as TaskReceipt, c as TaskResult, s as TaskStatus, t as TaskTiming, u as TaskUsage, v as TaskWebhookConfig, w as TerminalTaskStatus, x as VerifyWebhookOptions, V as Voice, a as VoiceCreation, W as WaitTaskOptions, y as WatchTaskOptions } from './voices-Cl4ygZHV.js';
package/dist/types.js ADDED
File without changes