@byte_fluffy/nexra-sdk 0.1.0-alpha.2 → 0.1.0-alpha.21

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.
@@ -0,0 +1,11 @@
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
+ }
10
+
11
+ export type { CursorPage as C, JsonObject as J, JsonValue as a, JsonPrimitive as b };
@@ -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, J as JsonObject, a as JsonValue } from './json-Drjj1OKl.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,29 @@ 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
+ schemaProjection: "request" | "bearer-request" | "managed-task-create" | "managed-task-query" | "managed-task-cancel" | "native-task-create" | "native-task-query" | "native-task-delete";
39
+ responseStatus?: number;
40
+ idempotencyKey?: boolean;
41
+ queryParameters?: Readonly<JsonObject>;
42
+ headerParameters?: Readonly<JsonObject>;
43
+ pathParameters?: Readonly<JsonObject>;
44
+ /** Operation-specific body; binary fields describe multipart file parts. */
45
+ bodyParameters?: Readonly<JsonObject>;
46
+ responseBody?: Readonly<JsonObject>;
47
+ requestBody?: Readonly<{
48
+ properties: readonly string[];
49
+ required: readonly string[];
50
+ oneOfRequired?: readonly (readonly string[])[];
51
+ }>;
52
+ }>;
107
53
  interface ModelEndpointSummary {
108
54
  key: string;
109
55
  label: string;
@@ -114,6 +60,8 @@ interface ModelEndpointSummary {
114
60
  capabilities: string[];
115
61
  /** Task execution of this native endpoint, not a second model parameter definition. */
116
62
  sourceEndpointKey?: string | null;
63
+ documentationUrl?: string;
64
+ httpOperations?: readonly ModelHttpOperation[];
117
65
  }
118
66
  interface ModelCapabilitySummary {
119
67
  inputModalities: string[];
@@ -121,6 +69,10 @@ interface ModelCapabilitySummary {
121
69
  /** User-facing input patterns such as text-to-video or image-to-image. */
122
70
  inputModes: string[];
123
71
  features: string[];
72
+ /** Maximum combined input and output context supported by the model. */
73
+ contextWindowTokens?: number;
74
+ /** Maximum generated output tokens supported by the model. */
75
+ maxOutputTokens?: number;
124
76
  }
125
77
  interface ModelDateVersion {
126
78
  id: string;
@@ -181,6 +133,8 @@ interface TaskModel extends TaskModelSummary {
181
133
  interface ModelSchema {
182
134
  model: string;
183
135
  version: number;
136
+ /** Contract owner for the returned schema. Defaults to nexra for older servers. */
137
+ contract?: "nexra" | "native";
184
138
  dialect: "https://json-schema.org/draft/2020-12/schema" | string;
185
139
  inputSchema: JsonObject;
186
140
  outputSchema: JsonObject;
@@ -228,6 +182,15 @@ interface NexraModelOperation {
228
182
  outputSchema: JsonObject;
229
183
  metering: MeteringContract;
230
184
  }
185
+ /** Public native wire endpoint metadata. Provider routing and credentials stay private. */
186
+ interface NexraModelEndpointSpec {
187
+ endpointKey: string;
188
+ operation: string;
189
+ protocol: string;
190
+ method: string;
191
+ path: string;
192
+ capabilities: readonly string[];
193
+ }
231
194
  interface NexraModelSpec {
232
195
  id: string;
233
196
  contractVersion: number;
@@ -240,6 +203,7 @@ interface NexraModelSpec {
240
203
  aliases: readonly string[];
241
204
  capabilities: ModelCapabilitySummary;
242
205
  operations: readonly NexraModelOperation[];
206
+ endpoints: readonly NexraModelEndpointSpec[];
243
207
  }
244
208
  interface NexraModelSpecFilter {
245
209
  kind?: ModelModality;
@@ -253,11 +217,23 @@ interface NexraSalePrice {
253
217
  effectiveFrom: string;
254
218
  rule: PriceRule;
255
219
  }
220
+ interface NexraSalePriceList {
221
+ currency: NexraBillingCurrency;
222
+ prices: readonly NexraSalePrice[];
223
+ }
256
224
  interface CreateNexraQuoteRequest {
257
225
  modelId: string;
258
226
  operation: string;
259
227
  input: JsonObject;
260
228
  }
229
+ interface CreateNexraDisplayQuoteBatchRequest {
230
+ modelId: string;
231
+ operation: string;
232
+ entries: readonly Readonly<{
233
+ key: string;
234
+ input: JsonObject;
235
+ }>[];
236
+ }
261
237
  interface NexraQuote {
262
238
  quoteToken: string;
263
239
  modelId: string;
@@ -269,6 +245,32 @@ interface NexraQuote {
269
245
  accuracy: "exact" | "estimated";
270
246
  expiresAt: string;
271
247
  }
248
+ type NexraDisplayQuoteBatchEntry = Readonly<{
249
+ key: string;
250
+ amount: string;
251
+ maximumAmount: string;
252
+ accuracy: "exact" | "estimated";
253
+ }> | Readonly<{
254
+ key: string;
255
+ error: {
256
+ code: string;
257
+ message: string;
258
+ };
259
+ }>;
260
+ interface NexraDisplayQuoteBatch {
261
+ modelId: string;
262
+ contractVersion: number;
263
+ priceRevision: string;
264
+ pricingPolicyRevision: string;
265
+ quoteContextRevision: string;
266
+ currency: NexraBillingCurrency;
267
+ entries: readonly NexraDisplayQuoteBatchEntry[];
268
+ expiresAt: string;
269
+ }
270
+ interface NexraCatalogRevision {
271
+ revision: string;
272
+ changedAt: string;
273
+ }
272
274
  interface NexraSettlement {
273
275
  amount: string;
274
276
  currency: NexraBillingCurrency;
@@ -298,16 +300,32 @@ declare class HttpTransport {
298
300
  json<T>(path: string, init?: RequestInit, options?: RequestOptions): Promise<T>;
299
301
  response(path: string, init?: RequestInit, options?: RequestOptions): Promise<Response>;
300
302
  }
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
303
 
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[];
304
+ /** UI-friendly view of Nexra's canonical geometry fields. */
305
+ type UnifiedMediaGeometry = {
306
+ resolution?: string;
307
+ ratio?: string;
308
+ quality?: string;
309
+ };
310
+ type MediaGeometryField = {
311
+ field: string;
312
+ options: readonly string[];
313
+ default?: string;
314
+ optionLabels: Readonly<Record<string, string>>;
315
+ };
316
+ type MediaGeometryProjection = {
317
+ kind: "resolution-ratio" | "ratio-only" | "none";
318
+ resolution?: MediaGeometryField;
319
+ ratio?: MediaGeometryField;
320
+ quality?: MediaGeometryField;
321
+ };
322
+ /** Read controls from the Nexra contract. It never exposes provider-native size fields. */
323
+ declare function projectMediaGeometry(inputSchema: JsonObject): MediaGeometryProjection;
324
+ /** UI geometry aliases → canonical Nexra request fields. */
325
+ declare function encodeMediaGeometry(inputSchema: JsonObject, geometry: UnifiedMediaGeometry): JsonObject;
326
+ /** Canonical Nexra request fields → UI geometry aliases. */
327
+ declare function decodeMediaGeometry(_inputSchema: JsonObject, input: JsonObject): UnifiedMediaGeometry;
328
+ /** Normalize the SDK convenience alias `ratio` without producing Native fields. */
329
+ declare function applyMediaGeometry(inputSchema: JsonObject, input: JsonObject): JsonObject;
312
330
 
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 };
331
+ export { type NexraDisplayQuoteBatchEntry as A, type CreateNexraQuoteRequest as C, type FetchLike as F, HttpTransport as H, type MediaGeometryField as M, type NexraSalePriceList as N, type TaskModelSummary as T, type UnifiedMediaGeometry as U, type NexraQuote as a, type CreateNexraDisplayQuoteBatchRequest as b, type NexraDisplayQuoteBatch as c, type NexraCatalogRevision as d, type NexraModelSpec as e, type NexraModelSpecFilter as f, type MediaGeometryProjection as g, type NexraBillingCurrency as h, type NexraModelEndpointSpec as i, type NexraModelOperation as j, type NexraSalePrice as k, type NexraSettlement as l, applyMediaGeometry as m, decodeMediaGeometry as n, encodeMediaGeometry as o, projectMediaGeometry as p, type ModelSearchParams as q, type TaskModel as r, type ModelSchema as s, type NexraClientOptions as t, type ModelCapabilitySummary as u, type ModelDateVersion as v, type ModelEndpointSummary as w, type ModelModality as x, type ModelResourceList as y, type ModelResourceOption as z };
@@ -0,0 +1,200 @@
1
+ import { A as AssetReference } from './assets-dUJMQNJD.js';
2
+ import { J as JsonObject } from './json-Drjj1OKl.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", "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
+ type NexraVideoContentPart = Readonly<{
33
+ type: "video";
34
+ source: NexraMediaSource;
35
+ role?: NexraVideoRole;
36
+ }>;
37
+ type NexraAudioContentPart = Readonly<{
38
+ type: "audio";
39
+ source: NexraMediaSource;
40
+ role?: NexraAudioRole;
41
+ }>;
42
+ type NexraMediaContentPart = NexraTextContentPart | NexraImageContentPart | NexraVideoContentPart | NexraAudioContentPart;
43
+ type NexraDraftContentPart = Readonly<{
44
+ type: "draft_task";
45
+ draft_task: Readonly<{
46
+ id: string;
47
+ }>;
48
+ }>;
49
+ type NexraImageGenerateInput = Readonly<{
50
+ content: readonly (NexraTextContentPart | NexraImageContentPart)[];
51
+ aspect_ratio?: string;
52
+ resolution?: string;
53
+ quality?: string;
54
+ count?: number;
55
+ output_format?: string;
56
+ seed?: number;
57
+ }>;
58
+ type NexraVideoGenerateInput = Readonly<{
59
+ content: readonly (NexraMediaContentPart | NexraDraftContentPart)[];
60
+ draft?: boolean;
61
+ /** Optional preset or cloned voice used by talking-avatar video models. */
62
+ voice?: string;
63
+ aspect_ratio?: string;
64
+ resolution?: string;
65
+ quality?: string;
66
+ duration?: number;
67
+ generate_audio?: boolean;
68
+ output_format?: string;
69
+ seed?: number;
70
+ }>;
71
+ type NexraAudioGenerateInput = Readonly<{
72
+ content: readonly (NexraTextContentPart | NexraAudioContentPart)[];
73
+ voice?: string;
74
+ language?: string;
75
+ duration?: number;
76
+ output_format?: string;
77
+ sample_rate?: number;
78
+ speed?: number;
79
+ volume?: number;
80
+ pitch?: number;
81
+ emotion?: string;
82
+ instrumental?: boolean;
83
+ loop?: boolean;
84
+ prompt_influence?: number;
85
+ seed?: number;
86
+ }>;
87
+ type NexraImageUpscaleInput = Readonly<{
88
+ content: readonly [NexraImageContentPart];
89
+ scale?: number;
90
+ resolution?: string;
91
+ output_format?: string;
92
+ preserve_details?: boolean;
93
+ }>;
94
+ type NexraVideoUpscaleInput = Readonly<{
95
+ content: readonly [NexraVideoContentPart];
96
+ scale?: number;
97
+ resolution?: string;
98
+ output_format?: string;
99
+ preserve_details?: boolean;
100
+ }>;
101
+ type NexraMediaInputByOperation = Readonly<{
102
+ "image.generate": NexraImageGenerateInput;
103
+ "video.generate": NexraVideoGenerateInput;
104
+ "audio.generate": NexraAudioGenerateInput;
105
+ "image.upscale": NexraImageUpscaleInput;
106
+ "video.upscale": NexraVideoUpscaleInput;
107
+ }>;
108
+ type NexraMediaKind = "image" | "video" | "audio";
109
+ type NexraMediaInputSlot = Readonly<{
110
+ mediaKind: NexraMediaKind;
111
+ role: string;
112
+ min?: number;
113
+ max: number;
114
+ maxBytes?: number;
115
+ minDurationSeconds?: number;
116
+ maxDurationSeconds?: number;
117
+ }>;
118
+ type NexraMediaInputMode = Readonly<{
119
+ id: string;
120
+ slots: readonly NexraMediaInputSlot[];
121
+ }>;
122
+ type NexraMediaParameterValue = string | number | boolean;
123
+ type NexraMediaParameter = Readonly<{
124
+ key: string;
125
+ label?: string;
126
+ }> & (Readonly<{
127
+ kind: "enum";
128
+ options: readonly NexraMediaParameterValue[];
129
+ default: NexraMediaParameterValue;
130
+ allowCustom?: boolean;
131
+ }> | Readonly<{
132
+ kind: "range";
133
+ min: number;
134
+ max: number;
135
+ step: number;
136
+ default: number;
137
+ autoValue?: number;
138
+ unit?: string;
139
+ }> | Readonly<{
140
+ kind: "toggle";
141
+ default: boolean;
142
+ }> | Readonly<{
143
+ kind: "resource";
144
+ resource: "voice";
145
+ default?: string;
146
+ allowCustom?: boolean;
147
+ }>);
148
+ type NexraMediaParameterConstraint = Readonly<{
149
+ when: Readonly<Record<string, NexraMediaParameterValue | readonly NexraMediaParameterValue[]>>;
150
+ parameter: string;
151
+ allowedValues?: readonly NexraMediaParameterValue[];
152
+ fixedValue?: NexraMediaParameterValue;
153
+ disabled?: boolean;
154
+ }>;
155
+ type NexraMediaOperationDefinition = Readonly<{
156
+ operation: NexraMediaOperation;
157
+ status: "active" | "hold";
158
+ outputKind: NexraMediaKind;
159
+ features: readonly NexraMediaFeature[];
160
+ parameterKeys: readonly string[];
161
+ }>;
162
+ declare const NEXRA_MEDIA_OPERATION_DEFINITIONS: readonly [{
163
+ readonly operation: "image.generate";
164
+ readonly status: "active";
165
+ readonly outputKind: "image";
166
+ readonly features: readonly ["text-to-image", "image-to-image", "image-reference", "image-edit", "image-inpaint", "image-control"];
167
+ readonly parameterKeys: readonly ["aspect_ratio", "resolution", "quality", "count", "output_format", "seed"];
168
+ }, {
169
+ readonly operation: "video.generate";
170
+ readonly status: "active";
171
+ readonly outputKind: "video";
172
+ 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"];
173
+ readonly parameterKeys: readonly ["voice", "aspect_ratio", "resolution", "quality", "duration", "generate_audio", "output_format", "seed"];
174
+ }, {
175
+ readonly operation: "audio.generate";
176
+ readonly status: "active";
177
+ readonly outputKind: "audio";
178
+ readonly features: readonly ["tts", "music", "sfx", "voice-reference"];
179
+ readonly parameterKeys: readonly ["voice", "language", "duration", "output_format", "sample_rate", "speed", "volume", "pitch", "emotion", "instrumental", "loop", "prompt_influence", "seed"];
180
+ }, {
181
+ readonly operation: "image.upscale";
182
+ readonly status: "active";
183
+ readonly outputKind: "image";
184
+ readonly features: readonly ["scale-factor", "target-resolution"];
185
+ readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
186
+ }, {
187
+ readonly operation: "video.upscale";
188
+ readonly status: "hold";
189
+ readonly outputKind: "video";
190
+ readonly features: readonly ["scale-factor", "target-resolution"];
191
+ readonly parameterKeys: readonly ["scale", "resolution", "output_format", "preserve_details"];
192
+ }];
193
+ declare const NEXRA_MEDIA_INPUT_SCHEMAS: Readonly<Record<NexraPublishedMediaOperation, JsonObject>>;
194
+ declare function nexraMediaInputSchema(operation: NexraMediaOperation): JsonObject | undefined;
195
+ declare function isNexraMediaInput(value: unknown): value is JsonObject;
196
+ declare function nexraMediaOperationForMode(mode: string): NexraPublishedMediaOperation | undefined;
197
+ /** Narrow the shared category vocabulary for one Experience Center input mode. */
198
+ declare function nexraMediaInputSchemaForMode(mode: string): JsonObject | undefined;
199
+
200
+ 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 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-TA3YGQQY.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
+ };