@byte_fluffy/nexra-sdk 0.1.0-alpha.20 → 0.1.0-alpha.22
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.js
CHANGED
|
@@ -41018,7 +41018,7 @@ var NexraWaitTimeoutError = class extends Error {
|
|
|
41018
41018
|
};
|
|
41019
41019
|
|
|
41020
41020
|
// src/generated/version.generated.ts
|
|
41021
|
-
var SDK_VERSION = "0.1.0-alpha.
|
|
41021
|
+
var SDK_VERSION = "0.1.0-alpha.22";
|
|
41022
41022
|
|
|
41023
41023
|
// src/transport.ts
|
|
41024
41024
|
var DEFAULT_BASE_URL = "https://api.nexra-ai.com/v1";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AssetsClient, T as TasksClient, R as RunTaskOptions, a as RunResult, b as ApiErrorPayload, c as TaskResult } from './types-
|
|
2
|
-
export { d as AssetImportRequest, e as AssetInput, f as AssetReference, g as AssetUploadOptions, C as CreateTaskOptions, h as CreateTaskRequest, M as MEDIA_KINDS, i as MediaAsset, j as MediaAssetStatus, k as MediaKind, l as RequestDetails, m as TASK_STATUSES, n as Task, o as TaskCost, p as TaskError, q as TaskEvent, r as TaskEventType, s as TaskListParams, t as TaskPage, u as TaskProgress, v as TaskReceipt, w as TaskStatus, x as TaskTiming, y as TaskUsage, z as TaskWebhookConfig, B as TerminalTaskStatus, V as VerifyWebhookOptions, W as WaitTaskOptions, D as WatchTaskOptions, E as isTerminalTaskStatus, F as verifyWebhook } from './types-
|
|
1
|
+
import { A as AssetsClient, T as TasksClient, R as RunTaskOptions, a as RunResult, b as ApiErrorPayload, c as TaskResult } from './types-CcYROaH1.js';
|
|
2
|
+
export { d as AssetImportRequest, e as AssetInput, f as AssetReference, g as AssetUploadOptions, C as CreateTaskOptions, h as CreateTaskRequest, M as MEDIA_KINDS, i as MediaAsset, j as MediaAssetStatus, k as MediaKind, l as RequestDetails, m as TASK_STATUSES, n as Task, o as TaskCost, p as TaskError, q as TaskEvent, r as TaskEventType, s as TaskListParams, t as TaskPage, u as TaskProgress, v as TaskReceipt, w as TaskStatus, x as TaskTiming, y as TaskUsage, z as TaskWebhookConfig, B as TerminalTaskStatus, V as VerifyWebhookOptions, W as WaitTaskOptions, D as WatchTaskOptions, E as isTerminalTaskStatus, F as verifyWebhook } from './types-CcYROaH1.js';
|
|
3
3
|
import { H as HttpTransport, q as ModelSearchParams, r as CursorPage, T as TaskModelSummary, s as TaskModel, t as ModelSchema, u as NexraClientOptions, J as JsonValue } from './media-geometry-Ckr1-Mh3.js';
|
|
4
4
|
export { b as CreateNexraDisplayQuoteBatchRequest, C as CreateNexraQuoteRequest, F as FetchLike, v as JsonObject, w as JsonPrimitive, M as MediaGeometryField, g as MediaGeometryProjection, x as ModelCapabilitySummary, y as ModelDateVersion, z as ModelEndpointSummary, A as ModelModality, B as ModelResourceList, D as ModelResourceOption, h as NexraBillingCurrency, d as NexraCatalogRevision, c as NexraDisplayQuoteBatch, E as NexraDisplayQuoteBatchEntry, j as NexraModelOperation, e as NexraModelSpec, f as NexraModelSpecFilter, a as NexraQuote, k as NexraSalePrice, N as NexraSalePriceList, l as NexraSettlement, U as UnifiedMediaGeometry, m as applyMediaGeometry, n as decodeMediaGeometry, o as encodeMediaGeometry, p as projectMediaGeometry } from './media-geometry-Ckr1-Mh3.js';
|
|
5
5
|
import { CatalogClient } from './catalog.js';
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
projectMediaGeometry,
|
|
18
18
|
queryString,
|
|
19
19
|
sleep
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2DKVYO26.js";
|
|
21
21
|
import {
|
|
22
22
|
ceilDecimal,
|
|
23
23
|
multiplyDecimal
|
|
@@ -283,9 +283,17 @@ var TasksClient = class {
|
|
|
283
283
|
const schema = getModelSpec(model)?.operations[0]?.inputSchema;
|
|
284
284
|
const mapped = schema && options.input && typeof options.input === "object" && !Array.isArray(options.input) ? applyNoWatermark(schema, applyMediaGeometry(schema, options.input)) : options.input;
|
|
285
285
|
const input = await normalizeTaskInput(mapped, this.assets, options.signal);
|
|
286
|
+
if (input.model !== void 0 && input.model !== model) {
|
|
287
|
+
throw new TypeError(`Task input model ${String(input.model)} does not match ${model}`);
|
|
288
|
+
}
|
|
289
|
+
const parameters = { ...input };
|
|
290
|
+
delete parameters.model;
|
|
291
|
+
for (const field of ["quoteToken", "submittedAt", "metadata", "callback_url", "webhook", "schemaVersion"]) {
|
|
292
|
+
if (Object.hasOwn(parameters, field)) throw new TypeError(`Task input cannot use reserved field: ${field}`);
|
|
293
|
+
}
|
|
286
294
|
const body = {
|
|
295
|
+
...parameters,
|
|
287
296
|
model,
|
|
288
|
-
input,
|
|
289
297
|
quoteToken: options.quoteToken,
|
|
290
298
|
submittedAt: options.submittedAt,
|
|
291
299
|
metadata: options.metadata,
|
|
@@ -249,22 +249,6 @@ interface TaskWebhookConfig {
|
|
|
249
249
|
secret: string;
|
|
250
250
|
events?: Array<"completed">;
|
|
251
251
|
}
|
|
252
|
-
interface CreateTaskRequest<TInput = Record<string, unknown>> {
|
|
253
|
-
/** @internal Console telemetry only: browser send time before uploads, not execution time. */
|
|
254
|
-
submittedAt?: string;
|
|
255
|
-
model: string;
|
|
256
|
-
input: TInput;
|
|
257
|
-
/** Signed Nexra quote used to lock this input to a sale-price revision. */
|
|
258
|
-
quoteToken?: string;
|
|
259
|
-
/** Optional business identifiers such as orderId, available in request details. Do not include secrets. */
|
|
260
|
-
metadata?: JsonObject;
|
|
261
|
-
/** Platform completion callback, independent of provider callback support. Never sent upstream. */
|
|
262
|
-
callback_url?: string;
|
|
263
|
-
/** @deprecated Use callback_url; do not supply both. */
|
|
264
|
-
webhook?: TaskWebhookConfig;
|
|
265
|
-
/** @deprecated Compatibility check only; the server resolves the current contract. */
|
|
266
|
-
schemaVersion?: number;
|
|
267
|
-
}
|
|
268
252
|
interface TaskListParams {
|
|
269
253
|
status?: TaskStatus;
|
|
270
254
|
model?: string;
|
|
@@ -307,6 +291,15 @@ interface CreateTaskOptions<TInput = Record<string, unknown>> {
|
|
|
307
291
|
idempotencyKey?: string;
|
|
308
292
|
signal?: AbortSignal;
|
|
309
293
|
}
|
|
294
|
+
type CreateTaskRequest<TInput extends Record<string, unknown> = Record<string, unknown>> = TInput & {
|
|
295
|
+
model: string;
|
|
296
|
+
quoteToken?: string;
|
|
297
|
+
submittedAt?: string;
|
|
298
|
+
metadata?: JsonObject;
|
|
299
|
+
callback_url?: string;
|
|
300
|
+
webhook?: TaskWebhookConfig;
|
|
301
|
+
schemaVersion?: number;
|
|
302
|
+
};
|
|
310
303
|
interface WatchTaskOptions {
|
|
311
304
|
signal?: AbortSignal;
|
|
312
305
|
lastEventId?: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { b as ApiErrorPayload, d as AssetImportRequest, e as AssetInput, f as AssetReference, g as AssetUploadOptions, C as CreateTaskOptions, h as CreateTaskRequest, i as MediaAsset, j as MediaAssetStatus, k as MediaKind, l as RequestDetails, a as RunResult, R as RunTaskOptions, n as Task, o as TaskCost, p as TaskError, q as TaskEvent, r as TaskEventType, s as TaskListParams, t as TaskPage, u as TaskProgress, v as TaskReceipt, c as TaskResult, w as TaskStatus, x as TaskTiming, y as TaskUsage, z as TaskWebhookConfig, B as TerminalTaskStatus, V as VerifyWebhookOptions, W as WaitTaskOptions, D as WatchTaskOptions } from './types-
|
|
1
|
+
export { b as ApiErrorPayload, d as AssetImportRequest, e as AssetInput, f as AssetReference, g as AssetUploadOptions, C as CreateTaskOptions, h as CreateTaskRequest, i as MediaAsset, j as MediaAssetStatus, k as MediaKind, l as RequestDetails, a as RunResult, R as RunTaskOptions, n as Task, o as TaskCost, p as TaskError, q as TaskEvent, r as TaskEventType, s as TaskListParams, t as TaskPage, u as TaskProgress, v as TaskReceipt, c as TaskResult, w as TaskStatus, x as TaskTiming, y as TaskUsage, z as TaskWebhookConfig, B as TerminalTaskStatus, V as VerifyWebhookOptions, W as WaitTaskOptions, D as WatchTaskOptions } from './types-CcYROaH1.js';
|
|
2
2
|
export { b as CreateNexraDisplayQuoteBatchRequest, C as CreateNexraQuoteRequest, r as CursorPage, F as FetchLike, v as JsonObject, w as JsonPrimitive, J as JsonValue, M as MediaGeometryField, g as MediaGeometryProjection, x as ModelCapabilitySummary, y as ModelDateVersion, z as ModelEndpointSummary, A as ModelModality, B as ModelResourceList, D as ModelResourceOption, t as ModelSchema, q as ModelSearchParams, h as NexraBillingCurrency, d as NexraCatalogRevision, u as NexraClientOptions, c as NexraDisplayQuoteBatch, E as NexraDisplayQuoteBatchEntry, j as NexraModelOperation, e as NexraModelSpec, f as NexraModelSpecFilter, a as NexraQuote, k as NexraSalePrice, N as NexraSalePriceList, l as NexraSettlement, s as TaskModel, T as TaskModelSummary, U as UnifiedMediaGeometry } from './media-geometry-Ckr1-Mh3.js';
|