@nodaro/sdk 2.10.0 → 2.11.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 +76 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +157 -31
- package/dist/index.d.ts +157 -31
- package/dist/index.js +69 -19
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SCENE3D_V2_LIMITS, WORKSPACE_HEADER } from '@nodaro/shared';
|
|
2
|
-
export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, SURROUND_DIRECTIONS, USAGE_GROUP_BYS, WORKSPACE_HEADER } from '@nodaro/shared';
|
|
2
|
+
export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, OUTPUT_BEARING_NODE_STATUSES, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, SURROUND_DIRECTIONS, USAGE_GROUP_BYS, WORKSPACE_HEADER, nodeStateMayCarryOutput } from '@nodaro/shared';
|
|
3
3
|
import { buildPersonHints } from '@nodaro/prompts';
|
|
4
4
|
export { PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, buildPersonHints } from '@nodaro/prompts';
|
|
5
5
|
|
|
@@ -475,8 +475,6 @@ var VideoProResource = class {
|
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
|
-
|
|
479
|
-
// src/resources/executions.ts
|
|
480
478
|
var ExecutionsResource = class {
|
|
481
479
|
constructor(client) {
|
|
482
480
|
this.client = client;
|
|
@@ -625,6 +623,17 @@ var NodesResource = class {
|
|
|
625
623
|
}
|
|
626
624
|
}
|
|
627
625
|
};
|
|
626
|
+
|
|
627
|
+
// src/resources/scene3d-types.ts
|
|
628
|
+
var SCENE3D_DELIVERY_ASSET_USAGE = {
|
|
629
|
+
poster: "poster",
|
|
630
|
+
"validation-report": "validation",
|
|
631
|
+
"shot-still": "shot-still",
|
|
632
|
+
/** The recipe a run that never compiled was refused for. See {@link Scene3DDeliveryAsset}. */
|
|
633
|
+
"source-json": "checkpoint"
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
// src/resources/scene3d.ts
|
|
628
637
|
function newIdempotencyKey() {
|
|
629
638
|
const random = globalThis.crypto?.randomUUID?.();
|
|
630
639
|
return `sdk-pro3d-${random ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`}`;
|
|
@@ -641,8 +650,16 @@ var Scene3DResource = class {
|
|
|
641
650
|
getDelivery(jobId) {
|
|
642
651
|
return this.client.request("GET", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}`);
|
|
643
652
|
}
|
|
653
|
+
/**
|
|
654
|
+
* The bytes of one descriptor the delivery listed.
|
|
655
|
+
*
|
|
656
|
+
* Checked against {@link SCENE3D_DELIVERY_ASSET_USAGE} rather than a hardcoded pair, which
|
|
657
|
+
* is why a `shot-still` now works: the route has served stills since they existed, and this
|
|
658
|
+
* guard refused them. `source-json` — the recipe a refused run was kept for — is on the same
|
|
659
|
+
* map; the server still decides whether THIS caller may read it.
|
|
660
|
+
*/
|
|
644
661
|
deliveryAssetBytes(jobId, asset, options) {
|
|
645
|
-
if (asset.kind !==
|
|
662
|
+
if (SCENE3D_DELIVERY_ASSET_USAGE[asset.kind] !== asset.usage) {
|
|
646
663
|
throw new Error("This asset is not available through the delivery endpoint");
|
|
647
664
|
}
|
|
648
665
|
if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {
|
|
@@ -653,6 +670,29 @@ var Scene3DResource = class {
|
|
|
653
670
|
maxBytes: asset.byteLength
|
|
654
671
|
});
|
|
655
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
* The recipe a 3D Render Pro run was refused for, parsed — or `null` when there is none.
|
|
675
|
+
*
|
|
676
|
+
* The one thing such a run leaves behind. Its recipe never compiled, so there is no scene
|
|
677
|
+
* revision, no poster and no `.blend`: `output_data` carries a `deliveryId`, the compiler's
|
|
678
|
+
* reasons, and `validation.sourceRetained` saying whether the recipe itself was kept. This
|
|
679
|
+
* fetches it in one call — delivery, then the `source-json` descriptor's bytes.
|
|
680
|
+
*
|
|
681
|
+
* `null` means the delivery has no retained recipe to hand back: no pass ever cleared
|
|
682
|
+
* admission, or this caller holds less than `edit` on the job's workflow and the descriptor
|
|
683
|
+
* is therefore not listed for them.
|
|
684
|
+
*
|
|
685
|
+
* Read it to see what was attempted and to inform the next prompt. There is no input that
|
|
686
|
+
* takes a recipe back: a refused run published no revision, so there is no `{kind:"scene"}`
|
|
687
|
+
* source to re-run it from.
|
|
688
|
+
*/
|
|
689
|
+
async retainedRecipe(jobId, options) {
|
|
690
|
+
const delivery = await this.getDelivery(jobId);
|
|
691
|
+
const asset = delivery.assets.find((item) => item.kind === "source-json");
|
|
692
|
+
if (!asset) return null;
|
|
693
|
+
const bytes = await this.deliveryAssetBytes(jobId, asset, options);
|
|
694
|
+
return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
|
|
695
|
+
}
|
|
656
696
|
/** Persist deterministic overlays without an LLM or a generation charge. */
|
|
657
697
|
applyEdits(revisionId, params) {
|
|
658
698
|
return this.client.request("POST", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/edits`, { body: params });
|
|
@@ -725,9 +765,21 @@ var Scene3DResource = class {
|
|
|
725
765
|
*
|
|
726
766
|
* Resolves with the settled result — `videoUrl` (the MP4) and `scenePlan`
|
|
727
767
|
* (the exact composition it was rendered from), plus the revision, poster,
|
|
728
|
-
* validation and renderer metadata.
|
|
729
|
-
*
|
|
730
|
-
*
|
|
768
|
+
* validation and renderer metadata. A run that AUTHORED also reports its own
|
|
769
|
+
* account of the answer — `metadata.summary`, `repairPasses`,
|
|
770
|
+
* `admissionRetries`, `mechanicalPasses` (repairs the engine applied from
|
|
771
|
+
* the compiler's own remedy with no planner call, counted APART from
|
|
772
|
+
* `repairPasses` on their own quoted allowance), `restoredAssertions`, and
|
|
773
|
+
* any `SCENE_AUTHORING_ASSUMPTION` warnings. A
|
|
774
|
+
* completed result whose `metadata.review` is present passed every mandatory
|
|
775
|
+
* assertion but did NOT get the visual reviewer's approval: `verdict:
|
|
776
|
+
* "refused"` means it objected, each objection also a `SCENE_REVIEW_REFUSED`
|
|
777
|
+
* warning; `verdict: "unavailable"` means the review produced no usable
|
|
778
|
+
* verdict in `attempts` asks (`reason: "provider"` — never reached its
|
|
779
|
+
* provider; `"unusable"` — it answered, unusably), so nobody judged the scene and
|
|
780
|
+
* `SCENE_REVIEW_UNAVAILABLE` leads the warnings. Re-render that same
|
|
781
|
+
* `scenePlan` later with {@link render}, or with a `{kind:'scene'}` source;
|
|
782
|
+
* that costs no authoring.
|
|
731
783
|
*/
|
|
732
784
|
async renderProAndWait(params, options) {
|
|
733
785
|
const quoteId = typeof params.quoteId === "string" ? params.quoteId : (await this.quotePro(params)).quoteId;
|
|
@@ -1872,10 +1924,11 @@ var VoicesResource = class {
|
|
|
1872
1924
|
return res.voiceClones;
|
|
1873
1925
|
}
|
|
1874
1926
|
/**
|
|
1875
|
-
*
|
|
1876
|
-
*
|
|
1877
|
-
*
|
|
1878
|
-
*
|
|
1927
|
+
* @deprecated Voice cloning is no longer offered on Nodaro (retired
|
|
1928
|
+
* 2026-09-15). The route answers `410 voice_cloning_retired` and this call
|
|
1929
|
+
* rejects with that error. Clones created before the retirement are still
|
|
1930
|
+
* listed by {@link VoicesResource.listClones} and still work as voice ids.
|
|
1931
|
+
* For a new custom voice use {@link VoicesResource.design}.
|
|
1879
1932
|
*/
|
|
1880
1933
|
createClone(input) {
|
|
1881
1934
|
return this.client.request("POST", "/v1/voice-clones/from-url", { body: input });
|
|
@@ -2009,12 +2062,9 @@ var VoicesResource = class {
|
|
|
2009
2062
|
return this.client.request("POST", "/v1/text-to-dialogue", { body: input });
|
|
2010
2063
|
}
|
|
2011
2064
|
/**
|
|
2012
|
-
*
|
|
2013
|
-
*
|
|
2014
|
-
* {@link VoicesResource.createClone}
|
|
2015
|
-
* URL. Pass the raw audio `file` (a `Blob`/`File` in the browser, or a
|
|
2016
|
-
* `Uint8Array`/`Buffer` in Node) plus a `name`. Costs credits. Returns the new
|
|
2017
|
-
* {@link VoiceClone} (`elevenlabsVoiceId` is the id to recast/synthesize with).
|
|
2065
|
+
* @deprecated Voice cloning is no longer offered on Nodaro (retired
|
|
2066
|
+
* 2026-09-15). The route answers `410 voice_cloning_retired` and this call
|
|
2067
|
+
* rejects with that error. See {@link VoicesResource.createClone}.
|
|
2018
2068
|
*/
|
|
2019
2069
|
createCloneFromFile(input) {
|
|
2020
2070
|
const form = new FormData();
|
|
@@ -3401,7 +3451,7 @@ var WorkspacesResource = class {
|
|
|
3401
3451
|
return this.client.requestText("GET", `/v1/workspaces/${encodeURIComponent(id)}/usage`, { query: { ...opts, format: "csv" } });
|
|
3402
3452
|
}
|
|
3403
3453
|
};
|
|
3404
|
-
var SDK_VERSION = "2.
|
|
3454
|
+
var SDK_VERSION = "2.11.0" ;
|
|
3405
3455
|
var CLIENT_HEADER = "X-Nodaro-Client";
|
|
3406
3456
|
var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
3407
3457
|
var NodaroClient = class _NodaroClient {
|
|
@@ -3662,6 +3712,6 @@ function supabaseAuth(supabase) {
|
|
|
3662
3712
|
};
|
|
3663
3713
|
}
|
|
3664
3714
|
|
|
3665
|
-
export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CatalogsResource, CharactersResource, CommunityResource, CopilotResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, JobsResource, LibraryResource, LlmResource, LocationsResource, MediaResource, ModelsResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, OrganizationsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, RecastResource, ReduceResource, Scene3DResource, ShotsResource, StaticTokenAuth, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, StudioProductionsResource, StudioResource, TemplatesResource, TutorialsResource, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowConflictError, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, isStudioGenerateEstimate, supabaseAuth, throwFromResponse };
|
|
3715
|
+
export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CatalogsResource, CharactersResource, CommunityResource, CopilotResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, JobsResource, LibraryResource, LlmResource, LocationsResource, MediaResource, ModelsResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, OrganizationsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, RecastResource, ReduceResource, SCENE3D_DELIVERY_ASSET_USAGE, Scene3DResource, ShotsResource, StaticTokenAuth, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, StudioProductionsResource, StudioResource, TemplatesResource, TutorialsResource, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowConflictError, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, isStudioGenerateEstimate, supabaseAuth, throwFromResponse };
|
|
3666
3716
|
//# sourceMappingURL=index.js.map
|
|
3667
3717
|
//# sourceMappingURL=index.js.map
|