@byte_fluffy/nexra-sdk 0.1.0-alpha.7 → 0.1.0-alpha.8

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.
@@ -121,6 +121,10 @@ interface ModelCapabilitySummary {
121
121
  /** User-facing input patterns such as text-to-video or image-to-image. */
122
122
  inputModes: string[];
123
123
  features: string[];
124
+ /** Maximum combined input and output context supported by the model. */
125
+ contextWindowTokens?: number;
126
+ /** Maximum generated output tokens supported by the model. */
127
+ maxOutputTokens?: number;
124
128
  }
125
129
  interface ModelDateVersion {
126
130
  id: string;
@@ -228,6 +232,15 @@ interface NexraModelOperation {
228
232
  outputSchema: JsonObject;
229
233
  metering: MeteringContract;
230
234
  }
235
+ /** Public native wire endpoint metadata. Provider routing and credentials stay private. */
236
+ interface NexraModelEndpointSpec {
237
+ endpointKey: string;
238
+ operation: string;
239
+ protocol: string;
240
+ method: string;
241
+ path: string;
242
+ capabilities: readonly string[];
243
+ }
231
244
  interface NexraModelSpec {
232
245
  id: string;
233
246
  contractVersion: number;
@@ -240,6 +253,7 @@ interface NexraModelSpec {
240
253
  aliases: readonly string[];
241
254
  capabilities: ModelCapabilitySummary;
242
255
  operations: readonly NexraModelOperation[];
256
+ endpoints: readonly NexraModelEndpointSpec[];
243
257
  }
244
258
  interface NexraModelSpecFilter {
245
259
  kind?: ModelModality;
@@ -262,6 +276,14 @@ interface CreateNexraQuoteRequest {
262
276
  operation: string;
263
277
  input: JsonObject;
264
278
  }
279
+ interface CreateNexraDisplayQuoteBatchRequest {
280
+ modelId: string;
281
+ operation: string;
282
+ entries: readonly Readonly<{
283
+ key: string;
284
+ input: JsonObject;
285
+ }>[];
286
+ }
265
287
  interface NexraQuote {
266
288
  quoteToken: string;
267
289
  modelId: string;
@@ -273,6 +295,32 @@ interface NexraQuote {
273
295
  accuracy: "exact" | "estimated";
274
296
  expiresAt: string;
275
297
  }
298
+ type NexraDisplayQuoteBatchEntry = Readonly<{
299
+ key: string;
300
+ amount: string;
301
+ maximumAmount: string;
302
+ accuracy: "exact" | "estimated";
303
+ }> | Readonly<{
304
+ key: string;
305
+ error: {
306
+ code: string;
307
+ message: string;
308
+ };
309
+ }>;
310
+ interface NexraDisplayQuoteBatch {
311
+ modelId: string;
312
+ contractVersion: number;
313
+ priceRevision: string;
314
+ pricingPolicyRevision: string;
315
+ quoteContextRevision: string;
316
+ currency: NexraBillingCurrency;
317
+ entries: readonly NexraDisplayQuoteBatchEntry[];
318
+ expiresAt: string;
319
+ }
320
+ interface NexraCatalogRevision {
321
+ revision: string;
322
+ changedAt: string;
323
+ }
276
324
  interface NexraSettlement {
277
325
  amount: string;
278
326
  currency: NexraBillingCurrency;
@@ -342,8 +390,10 @@ declare class CatalogClient {
342
390
  constructor(transport: HttpTransport);
343
391
  listPrices(signal?: AbortSignal): Promise<NexraSalePriceList>;
344
392
  quote(request: CreateNexraQuoteRequest, signal?: AbortSignal): Promise<NexraQuote>;
393
+ quoteBatch(request: CreateNexraDisplayQuoteBatchRequest, signal?: AbortSignal): Promise<NexraDisplayQuoteBatch>;
394
+ revision(signal?: AbortSignal): Promise<NexraCatalogRevision>;
345
395
  }
346
396
  declare function getModelSpec(modelId: string): NexraModelSpec | undefined;
347
397
  declare function listModelSpecs(filter?: NexraModelSpecFilter): readonly NexraModelSpec[];
348
398
 
349
- export { jsonBody as $, type NexraQuote as A, type BillingMetric as B, type CursorPage as C, type NexraSalePrice as D, type NexraSalePriceList as E, type FetchLike as F, type NormalizedUsageV1 as G, HttpTransport as H, type PriceEvaluationIssue as I, type JsonObject as J, type PriceEvaluationLine as K, type PriceRule as L, type ModelSchema as M, type NexraSettlement as N, type UsageComponentEvidence as O, type PriceEvaluation as P, type UsageEvidenceAssessment as Q, type UsageEvidenceStatus as R, allocateDiscountedPriceLines as S, type TaskModelSummary as T, type UnifiedMediaGeometry as U, applyMediaGeometry as V, assessUsageEvidence as W, decodeMediaGeometry as X, encodeMediaGeometry as Y, evaluatePriceRule as Z, getModelSpec as _, type JsonValue as a, listModelSpecs as a0, projectMediaGeometry as a1, queryString as a2, sleep as a3, validateMeteringContract as a4, validateNormalizedUsage as a5, validatePriceRule as a6, type ModelSearchParams as b, type TaskModel 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 MediaGeometryField as j, type MediaGeometryProjection as k, type MeteredPriceRate as l, type MeteredPriceRuleV1 as m, type MeteredUsageComponent as n, type MeteringContract as o, type MeteringKind as p, type ModelCapabilitySummary as q, type ModelDateVersion as r, type ModelEndpointSummary as s, type ModelModality as t, type ModelResourceList as u, type ModelResourceOption as v, type NexraBillingCurrency as w, type NexraModelOperation as x, type NexraModelSpec as y, type NexraModelSpecFilter as z };
399
+ export { assessUsageEvidence as $, type NexraDisplayQuoteBatchEntry as A, type BillingMetric as B, type CursorPage as C, type NexraModelEndpointSpec as D, type NexraModelOperation as E, type FetchLike as F, type NexraModelSpec as G, HttpTransport as H, type NexraModelSpecFilter as I, type JsonObject as J, type NexraQuote as K, type NexraSalePrice as L, type ModelSchema as M, type NexraSettlement as N, type NexraSalePriceList as O, type NormalizedUsageV1 as P, type PriceEvaluation as Q, type PriceEvaluationIssue as R, type PriceEvaluationLine as S, type TaskModelSummary as T, type PriceRule as U, type UnifiedMediaGeometry as V, type UsageComponentEvidence as W, type UsageEvidenceAssessment as X, type UsageEvidenceStatus as Y, allocateDiscountedPriceLines as Z, applyMediaGeometry as _, type JsonValue as a, decodeMediaGeometry as a0, encodeMediaGeometry as a1, evaluatePriceRule as a2, getModelSpec as a3, jsonBody as a4, listModelSpecs as a5, projectMediaGeometry as a6, queryString as a7, sleep as a8, validateMeteringContract as a9, validateNormalizedUsage as aa, validatePriceRule as ab, type ModelSearchParams as b, type TaskModel as c, CatalogClient as d, type NexraClientOptions as e, BILLING_EXPORT_DIMENSIONS as f, BILLING_METRICS as g, type CreateNexraDisplayQuoteBatchRequest as h, type CreateNexraQuoteRequest as i, type JsonPrimitive as j, type MediaGeometryField as k, type MediaGeometryProjection as l, type MeteredPriceRate as m, type MeteredPriceRuleV1 as n, type MeteredUsageComponent as o, type MeteringContract as p, type MeteringKind as q, type ModelCapabilitySummary as r, type ModelDateVersion as s, type ModelEndpointSummary as t, type ModelModality as u, type ModelResourceList as v, type ModelResourceOption as w, type NexraBillingCurrency as x, type NexraCatalogRevision as y, type NexraDisplayQuoteBatch as z };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { J as JsonObject, B as BillingMetric, a as JsonValue, N as NexraSettlement, C as CursorPage, M as ModelSchema, T as TaskModelSummary, H as HttpTransport, b as ModelSearchParams, c as TaskModel, d as CatalogClient, e as NexraClientOptions } from './index-DLTP5_Ri.js';
2
- export { f as BILLING_EXPORT_DIMENSIONS, g as BILLING_METRICS, h as CreateNexraQuoteRequest, F as FetchLike, i as JsonPrimitive, j as MediaGeometryField, k as MediaGeometryProjection, l as MeteredPriceRate, m as MeteredPriceRuleV1, n as MeteredUsageComponent, o as MeteringContract, p as MeteringKind, q as ModelCapabilitySummary, r as ModelDateVersion, s as ModelEndpointSummary, t as ModelModality, u as ModelResourceList, v as ModelResourceOption, w as NexraBillingCurrency, x as NexraModelOperation, y as NexraModelSpec, z as NexraModelSpecFilter, A as NexraQuote, D as NexraSalePrice, E as NexraSalePriceList, G as NormalizedUsageV1, P as PriceEvaluation, I as PriceEvaluationIssue, K as PriceEvaluationLine, L as PriceRule, U as UnifiedMediaGeometry, O as UsageComponentEvidence, Q as UsageEvidenceAssessment, R as UsageEvidenceStatus, S as allocateDiscountedPriceLines, V as applyMediaGeometry, W as assessUsageEvidence, X as decodeMediaGeometry, Y as encodeMediaGeometry, Z as evaluatePriceRule, _ as getModelSpec, $ as jsonBody, a0 as listModelSpecs, a1 as projectMediaGeometry, a2 as queryString, a3 as sleep, a4 as validateMeteringContract, a5 as validateNormalizedUsage, a6 as validatePriceRule } from './index-DLTP5_Ri.js';
1
+ import { J as JsonObject, B as BillingMetric, a as JsonValue, N as NexraSettlement, C as CursorPage, M as ModelSchema, T as TaskModelSummary, H as HttpTransport, b as ModelSearchParams, c as TaskModel, d as CatalogClient, e as NexraClientOptions } from './index-CAi88bUo.js';
2
+ export { f as BILLING_EXPORT_DIMENSIONS, g as BILLING_METRICS, h as CreateNexraDisplayQuoteBatchRequest, i as CreateNexraQuoteRequest, F as FetchLike, j as JsonPrimitive, k as MediaGeometryField, l as MediaGeometryProjection, m as MeteredPriceRate, n as MeteredPriceRuleV1, o as MeteredUsageComponent, p as MeteringContract, q as MeteringKind, r as ModelCapabilitySummary, s as ModelDateVersion, t as ModelEndpointSummary, u as ModelModality, v as ModelResourceList, w as ModelResourceOption, x as NexraBillingCurrency, y as NexraCatalogRevision, z as NexraDisplayQuoteBatch, A as NexraDisplayQuoteBatchEntry, D as NexraModelEndpointSpec, E as NexraModelOperation, G as NexraModelSpec, I as NexraModelSpecFilter, K as NexraQuote, L as NexraSalePrice, O as NexraSalePriceList, P as NormalizedUsageV1, Q as PriceEvaluation, R as PriceEvaluationIssue, S as PriceEvaluationLine, U as PriceRule, V as UnifiedMediaGeometry, W as UsageComponentEvidence, X as UsageEvidenceAssessment, Y as UsageEvidenceStatus, Z as allocateDiscountedPriceLines, _ as applyMediaGeometry, $ as assessUsageEvidence, a0 as decodeMediaGeometry, a1 as encodeMediaGeometry, a2 as evaluatePriceRule, a3 as getModelSpec, a4 as jsonBody, a5 as listModelSpecs, a6 as projectMediaGeometry, a7 as queryString, a8 as sleep, a9 as validateMeteringContract, aa as validateNormalizedUsage, ab as validatePriceRule } from './index-CAi88bUo.js';
3
3
  export { ceilDecimal, multiplyDecimal } from './decimal.js';
4
4
 
5
5
  declare const MEDIA_KINDS: readonly ["image", "video", "audio", "document", "archive", "other"];
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  validateUsageFilterOptionsQuery,
92
92
  validateUsageFilters,
93
93
  validateUsageSummaryQuery
94
- } from "./chunk-3ZBQVBMA.js";
94
+ } from "./chunk-IUUMCS7F.js";
95
95
  import {
96
96
  ceilDecimal,
97
97
  multiplyDecimal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byte_fluffy/nexra-sdk",
3
- "version": "0.1.0-alpha.7",
3
+ "version": "0.1.0-alpha.8",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "repository": {