@byte_fluffy/nexra-sdk 0.1.0-alpha.35 → 0.1.0-alpha.37
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/README.md +35 -0
- package/dist/catalog.js +2 -2
- package/dist/{chunk-R4BEO26Q.js → chunk-AAGTZN2G.js} +25 -0
- package/dist/{chunk-HVCSMBOG.js → chunk-ENL3IGRX.js} +1284 -39
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/language.js +2 -2
- package/dist/media.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{voices-bcGBcfH-.d.ts → voices-CFRCuodH.d.ts} +18 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ 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-DZlSwyv8.js';
|
|
7
7
|
export { A as ApiErrorPayload, a as PublicError, b as PublicErrorContext } from './errors-DZlSwyv8.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-
|
|
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-
|
|
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-CFRCuodH.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-CFRCuodH.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,13 +20,13 @@ import {
|
|
|
20
20
|
projectMediaGeometry,
|
|
21
21
|
queryString,
|
|
22
22
|
sleep
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ENL3IGRX.js";
|
|
24
24
|
import {
|
|
25
25
|
MEDIA_KINDS,
|
|
26
26
|
TASK_STATUSES,
|
|
27
27
|
createTaskRequest,
|
|
28
28
|
isTerminalTaskStatus
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-AAGTZN2G.js";
|
|
30
30
|
|
|
31
31
|
// src/assets.ts
|
|
32
32
|
var AssetsClient = class {
|
package/dist/language.js
CHANGED
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
jsonBody,
|
|
7
7
|
parseServerSentEvents,
|
|
8
8
|
resolveNexraLanguageReasoning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ENL3IGRX.js";
|
|
10
10
|
import {
|
|
11
11
|
isPublicErrorCode,
|
|
12
12
|
publicErrorMessage,
|
|
13
13
|
resolvePublicErrorLocale
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AAGTZN2G.js";
|
|
15
15
|
|
|
16
16
|
// src/language/index.ts
|
|
17
17
|
import { createAnthropic } from "@ai-sdk/anthropic";
|
package/dist/media.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { A as AssetImportRequest, a as AssetInput, b as AssetReference, c as Ass
|
|
|
2
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
3
|
export { C as CursorPage, a as JsonObject, b as JsonPrimitive, J as JsonValue } from './json-Cz0MkWQn.js';
|
|
4
4
|
export { A as ApiErrorPayload, N as NexraError, a as PublicError, b as PublicErrorContext, P as PublicErrorFields } from './errors-DZlSwyv8.js';
|
|
5
|
-
export { d as CreateTaskOptions, e as CreateTaskRequest, C as CreateVoiceRequest, f as RequestDetails, b as RunResult, R as RunTaskOptions, c as Task, h as TaskCost, i as TaskError, j as TaskEvent, k as TaskEventType, l as TaskListParams, m as TaskPage, n as TaskProgress, o as TaskReceipt, c as TaskResult, p as TaskStatus, q as TaskTiming, r as TaskUsage, s as TaskWebhookConfig, t as TerminalTaskStatus, u as VerifyWebhookOptions, V as Voice, a as VoiceCreation, W as WaitTaskOptions, v as WatchTaskOptions } from './voices-
|
|
5
|
+
export { d as CreateTaskOptions, e as CreateTaskRequest, C as CreateVoiceRequest, f as RequestDetails, b as RunResult, R as RunTaskOptions, c as Task, h as TaskCost, i as TaskError, j as TaskEvent, k as TaskEventType, l as TaskListParams, m as TaskPage, n as TaskProgress, o as TaskReceipt, c as TaskResult, p as TaskStatus, q as TaskTiming, r as TaskUsage, s as TaskWebhookConfig, t as TerminalTaskStatus, u as VerifyWebhookOptions, V as Voice, a as VoiceCreation, W as WaitTaskOptions, v as WatchTaskOptions } from './voices-CFRCuodH.js';
|
|
@@ -62,6 +62,16 @@ declare function verifyWebhook(request: Request, secret: string, options?: Verif
|
|
|
62
62
|
|
|
63
63
|
type TaskPage<TOutput = JsonValue> = CursorPage<TaskResult<TOutput>>;
|
|
64
64
|
|
|
65
|
+
declare const REQUEST_HISTORY_MODALITIES: readonly ["image", "video", "audio", "language"];
|
|
66
|
+
declare const REQUEST_HISTORY_KINDS: readonly ["task", "api"];
|
|
67
|
+
declare const REQUEST_HISTORY_DISPLAY_STATUSES: readonly ["succeeded", "failed", "delivery_failed", "running"];
|
|
68
|
+
type RequestHistoryFilters = Readonly<{
|
|
69
|
+
query?: string;
|
|
70
|
+
modality?: typeof REQUEST_HISTORY_MODALITIES[number];
|
|
71
|
+
kind?: typeof REQUEST_HISTORY_KINDS[number];
|
|
72
|
+
displayStatus?: typeof REQUEST_HISTORY_DISPLAY_STATUSES[number];
|
|
73
|
+
}>;
|
|
74
|
+
|
|
65
75
|
declare const TASK_STATUSES: readonly ["queued", "running", "succeeded", "failed", "cancelling", "cancelled"];
|
|
66
76
|
type TaskStatus = (typeof TASK_STATUSES)[number];
|
|
67
77
|
type TerminalTaskStatus = "succeeded" | "failed" | "cancelled";
|
|
@@ -83,6 +93,7 @@ interface TaskCost {
|
|
|
83
93
|
amount: string;
|
|
84
94
|
currency: string;
|
|
85
95
|
}
|
|
96
|
+
type TaskBillingReason = "request_failed" | "request_cancelled" | "billing_usage_unavailable" | "billing_usage_invalid" | "billing_usage_incomplete" | "billing_evidence_invalid" | "billing_evidence_incomplete" | "billing_hold_unavailable" | "billing_price_unavailable" | "billing_pricing_unavailable";
|
|
86
97
|
interface TaskQueueSnapshot {
|
|
87
98
|
phase: "waiting_capacity" | "waiting_channel" | "dispatch_pending";
|
|
88
99
|
since: string;
|
|
@@ -154,6 +165,8 @@ interface Task<TOutput = JsonValue> extends PublicErrorFields {
|
|
|
154
165
|
cost?: TaskCost;
|
|
155
166
|
/** Customer billing state; absent on older servers. */
|
|
156
167
|
billingStatus?: "pending" | "succeeded" | "failed" | "refunded" | "unavailable";
|
|
168
|
+
/** Safe read-only cause; execution failures release authorization rather than failing settlement. */
|
|
169
|
+
billingReason?: TaskBillingReason;
|
|
157
170
|
/** Final customer sale settlement. Provider procurement cost is never exposed here. */
|
|
158
171
|
settlement?: NexraSettlement;
|
|
159
172
|
/**
|
|
@@ -207,10 +220,13 @@ interface RequestDetails extends PublicErrorFields {
|
|
|
207
220
|
timing?: TaskTiming;
|
|
208
221
|
cost?: TaskCost;
|
|
209
222
|
billingStatus?: Task["billingStatus"];
|
|
223
|
+
billingReason?: Task["billingReason"];
|
|
210
224
|
settlement?: NexraSettlement;
|
|
211
225
|
metadata?: JsonObject;
|
|
212
226
|
/** Caller-asserted origin extracted from metadata.callerUrl; diagnostics display only. */
|
|
213
227
|
callerUrl?: string | null;
|
|
228
|
+
/** Client address recorded at the trusted HTTP ingress; absent on historical requests. */
|
|
229
|
+
clientIp?: string | null;
|
|
214
230
|
/** Caller-asserted end-user identifier extracted from metadata.endUserId; diagnostics display only. */
|
|
215
231
|
endUserId?: string | null;
|
|
216
232
|
/** Name of the API key that authenticated this request; diagnostics display only. */
|
|
@@ -269,11 +285,12 @@ type CreateTaskControls = Readonly<{
|
|
|
269
285
|
* is deliberately not an envelope. Persistent Task records still retain their
|
|
270
286
|
* own `input` snapshot after the HTTP boundary separates control fields. */
|
|
271
287
|
type CreateTaskRequest<TInput extends JsonObject = JsonObject> = TInput & CreateTaskControls;
|
|
272
|
-
interface TaskListParams {
|
|
288
|
+
interface TaskListParams extends RequestHistoryFilters {
|
|
273
289
|
status?: TaskStatus;
|
|
274
290
|
model?: string;
|
|
275
291
|
limit?: number;
|
|
276
292
|
cursor?: string;
|
|
293
|
+
orphanOnly?: boolean;
|
|
277
294
|
}
|
|
278
295
|
interface RunResult<TOutput = JsonValue> {
|
|
279
296
|
taskId: string;
|