@getanyapi/sdk 0.25.0 → 0.26.0
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/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -364,8 +364,9 @@ function parseOffer(value, path) {
|
|
|
364
364
|
const model = stringField(raw, "model", path);
|
|
365
365
|
const unit = stringField(raw, "unit", path);
|
|
366
366
|
const maxUsd = numberField(raw, "maxUsd", path);
|
|
367
|
+
const maxPer1kUsd = numberField(raw, "maxPer1kUsd", path);
|
|
367
368
|
if (model === "flat") {
|
|
368
|
-
return unit === "request" ? { model, unit, maxUsd } : malformed(path);
|
|
369
|
+
return unit === "request" ? { model, unit, maxUsd, maxPer1kUsd } : malformed(path);
|
|
369
370
|
}
|
|
370
371
|
if (model !== "linear") return malformed(`${path}.model`);
|
|
371
372
|
if (unit.length === 0) return malformed(`${path}.unit`);
|
|
@@ -374,14 +375,16 @@ function parseOffer(value, path) {
|
|
|
374
375
|
unit,
|
|
375
376
|
baseUsd: numberField(raw, "baseUsd", path),
|
|
376
377
|
perUnitUsd: numberField(raw, "perUnitUsd", path),
|
|
377
|
-
maxUsd
|
|
378
|
+
maxUsd,
|
|
379
|
+
maxPer1kUsd
|
|
378
380
|
};
|
|
379
381
|
}
|
|
380
382
|
function parsePricing(value, path) {
|
|
381
383
|
const raw = record(value, path);
|
|
382
384
|
return {
|
|
383
385
|
from: parseOffer(raw["from"], `${path}.from`),
|
|
384
|
-
failoverMaxUsd: numberField(raw, "failoverMaxUsd", path)
|
|
386
|
+
failoverMaxUsd: numberField(raw, "failoverMaxUsd", path),
|
|
387
|
+
failoverMaxPer1kUsd: numberField(raw, "failoverMaxPer1kUsd", path)
|
|
385
388
|
};
|
|
386
389
|
}
|
|
387
390
|
function parseExecution(value, path) {
|