@nodaro/sdk 1.4.0 → 1.6.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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { GenericNode, GenericEdge, WorkflowExport, ConnectedReference, TtsProvider, EntityStyle, CharacterAspectRatio, CharacterAttachColumn, LocationAssetType, LocationAttachColumn, SurroundDirection, ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio, CreatureAttachColumn, PipelineInput, PipelineStatus, PipelineMode, PipelineStageName, SubGateName, ChatEnabledStage, ProposedChange, ReduceStrategyId, ReduceMeta, Voice, VoiceLibraryParams, VoiceLibraryResponse, VoiceClone, AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CommunityCard, CommunityFullDetail, CommunityEntityType, CloneListingResult, FavoriteListingResult, CommunityReportReason, ReportListingResult, PublishListingParams, PublishListingResult, SharedListing } from '@nodaro/shared';
2
- export { BrowseCommunityParams, BrowseCommunityResult, 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, CharacterAspectRatio, CloneListingResult, CommunityCard, CommunityEntityType, CommunityReportReason, CommunitySort, ConnectedReference, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, FavoriteListingResult, GenericEdge, GenericNode, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, PipelineStageName, PublishListingParams, PublishListingResult, ReduceMeta, ReduceStrategyId, ReportListingResult, SURROUND_DIRECTIONS, SharedListing, SharedVoice, SurroundDirection, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse, WorkflowExport, WorkflowExportCharacter, WorkflowExportLocation, WorkflowExportObject } from '@nodaro/shared';
2
+ export { AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, 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, CharacterAspectRatio, CloneListingResult, CommunityCard, CommunityEntityType, CommunityReportReason, CommunitySort, ConnectedReference, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, FavoriteListingResult, GenericEdge, GenericNode, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, PipelineStageName, PublishListingParams, PublishListingResult, ReduceMeta, ReduceStrategyId, ReportListingResult, SURROUND_DIRECTIONS, SharedListing, SharedVoice, SurroundDirection, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse, WorkflowExport, WorkflowExportCharacter, WorkflowExportLocation, WorkflowExportObject } from '@nodaro/shared';
3
3
  import { PersonValue, WizardNodeContext, WizardQuestion, WizardSelection, RecommendedModel, FactoryPreset } from '@nodaro/prompts';
4
4
  export { PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, PersonValue, RecommendedModel, WizardNodeContext, WizardOption, WizardQuestion, WizardSelection, buildPersonHints } from '@nodaro/prompts';
5
5
 
@@ -3387,10 +3387,16 @@ declare class VoicesResource {
3387
3387
  voiceId: string;
3388
3388
  audioUrl?: string;
3389
3389
  videoUrl?: string;
3390
+ /** Speech-to-speech model id. Defaults to the server-configured default when omitted. */
3391
+ model?: string;
3390
3392
  stability?: number;
3391
3393
  similarityBoost?: number;
3392
3394
  /** Style exaggeration (0–1). Default 0; >0 amplifies delivery at the cost of latency/stability. */
3393
3395
  style?: number;
3396
+ /** ElevenLabs speaker boost — sharpens fidelity to the target speaker (small latency cost). */
3397
+ useSpeakerBoost?: boolean;
3398
+ /** Deterministic speech-to-speech seed (integer 0–4294967295) for reproducible output. Omit for random. */
3399
+ seed?: number;
3394
3400
  removeBackgroundNoise?: boolean;
3395
3401
  }): Promise<{
3396
3402
  jobId: string;
@@ -3465,6 +3471,49 @@ declare class VoicesResource {
3465
3471
  exportMix(input: VcpExportInput): Promise<{
3466
3472
  jobId: string;
3467
3473
  }>;
3474
+ /**
3475
+ * Design a brand-new synthetic voice from a text description
3476
+ * (`POST /v1/voice-design`) — ElevenLabs text-to-voice. `text` (100–1000 chars)
3477
+ * is a preview line spoken in the designed voice; `voiceDescription` describes
3478
+ * the voice to create. Costs credits and runs async — poll `jobs.get(jobId)`
3479
+ * for the preview + the reusable voice id.
3480
+ */
3481
+ design(input: VoiceDesignInput): Promise<{
3482
+ jobId: string;
3483
+ }>;
3484
+ /**
3485
+ * Generate speech in a voice described in natural language, without cloning
3486
+ * (`POST /v1/voice-remix`). `text` (1–5000 chars) is spoken in a voice matching
3487
+ * `voiceDescription`. Costs credits and runs async — poll `jobs.get(jobId)`.
3488
+ */
3489
+ remix(input: VoiceRemixInput): Promise<{
3490
+ jobId: string;
3491
+ }>;
3492
+ /**
3493
+ * Dub an audio clip into another language while preserving each speaker's voice
3494
+ * (`POST /v1/dubbing`). `targetLanguage` is an ISO code (e.g. `"es"`, `"fr"`);
3495
+ * `sourceLanguage` is auto-detected when omitted. Costs credits and runs async
3496
+ * — poll `jobs.get(jobId)`.
3497
+ */
3498
+ dub(input: DubbingInput): Promise<{
3499
+ jobId: string;
3500
+ }>;
3501
+ /**
3502
+ * Clone a voice from an audio FILE you hold in memory
3503
+ * (`POST /v1/voice-clones`, multipart) — the counterpart to
3504
+ * {@link VoicesResource.createClone}, which clones from an already-uploaded
3505
+ * URL. Pass the raw audio `file` (a `Blob`/`File` in the browser, or a
3506
+ * `Uint8Array`/`Buffer` in Node) plus a `name`. Costs credits. Returns the new
3507
+ * {@link VoiceClone} (`elevenlabsVoiceId` is the id to recast/synthesize with).
3508
+ */
3509
+ createCloneFromFile(input: {
3510
+ name: string;
3511
+ file: Blob | Uint8Array | ArrayBuffer;
3512
+ /** File name for the upload part (default `sample`). */
3513
+ filename?: string;
3514
+ /** MIME type when `file` is a raw buffer (default `audio/mpeg`). */
3515
+ contentType?: string;
3516
+ }): Promise<VoiceClone>;
3468
3517
  }
3469
3518
  /**
3470
3519
  * One entry in {@link VoiceChangerProInput.orderedVoices}. Either a bare voice id
@@ -3646,6 +3695,257 @@ interface VcpExportInput {
3646
3695
  */
3647
3696
  voiceFx?: VoiceChangerProInput["voiceFx"];
3648
3697
  }
3698
+ /** Input for {@link VoicesResource.design}. */
3699
+ interface VoiceDesignInput {
3700
+ /** A preview line (100–1000 chars) spoken in the designed voice. */
3701
+ text: string;
3702
+ /** Natural-language description of the voice to create. */
3703
+ voiceDescription: string;
3704
+ /** Voice-design model id. Defaults to the server-configured default. */
3705
+ model?: string;
3706
+ /** Output loudness (-1..1). */
3707
+ loudness?: number;
3708
+ /** How strongly the description steers the design (0–100). */
3709
+ guidanceScale?: number;
3710
+ /** Deterministic seed for a reproducible design. */
3711
+ seed?: number;
3712
+ /** Design quality knob (provider-specific). */
3713
+ quality?: number;
3714
+ /** Enhance the generated voice. */
3715
+ shouldEnhance?: boolean;
3716
+ /** Optional extra prompt context (≤8000 chars). */
3717
+ userPrompt?: string;
3718
+ }
3719
+ /** Input for {@link VoicesResource.remix}. */
3720
+ interface VoiceRemixInput {
3721
+ /** The text (1–5000 chars) to speak in the described voice. */
3722
+ text: string;
3723
+ /** Natural-language description of the voice to speak in. */
3724
+ voiceDescription: string;
3725
+ /** Optional extra prompt context (≤8000 chars). */
3726
+ userPrompt?: string;
3727
+ }
3728
+ /** Input for {@link VoicesResource.dub}. */
3729
+ interface DubbingInput {
3730
+ /** URL of the audio to dub. */
3731
+ audioUrl: string;
3732
+ /** Target language ISO code (2–10 chars), e.g. `"es"`, `"pt-BR"`. */
3733
+ targetLanguage: string;
3734
+ /** Source language ISO code; auto-detected when omitted. */
3735
+ sourceLanguage?: string;
3736
+ /** Expected number of speakers (1–20) — improves separation when known. */
3737
+ numSpeakers?: number;
3738
+ /** Keep the original voices instead of cloning them into the target language. */
3739
+ disableVoiceCloning?: boolean;
3740
+ /** Drop the background/music bed from the dubbed output. */
3741
+ dropBackgroundAudio?: boolean;
3742
+ }
3743
+
3744
+ /**
3745
+ * Media ingestion + trimming — the source-preparation steps a Voice Changer Pro
3746
+ * flow (or any pipeline) needs before it has a clip to work on: pull a social
3747
+ * video into storage, copy a remote URL into storage, trim a video/audio to a
3748
+ * range, and probe a video's metadata. Each generation-style op returns a job id
3749
+ * to poll (`jobs.get(jobId)`); `videoMetadata` is a direct read.
3750
+ */
3751
+ declare class MediaResource {
3752
+ private client;
3753
+ constructor(client: NodaroClient);
3754
+ /**
3755
+ * Download a social video (YouTube / TikTok / Instagram / X / Facebook) into
3756
+ * your storage (`POST /v1/download-video`). `maxHeight` caps the resolution
3757
+ * (default "best"); `sectionStartSec` + `sectionEndSec` (both-or-neither) fetch
3758
+ * ONLY that time range instead of the whole video. Returns a `downloadId`;
3759
+ * progress streams from `GET /v1/download-video/progress/:downloadId`
3760
+ * (server-sent events) and the finished file lands in your library.
3761
+ */
3762
+ downloadVideo(input: {
3763
+ url: string;
3764
+ maxHeight?: number;
3765
+ sectionStartSec?: number;
3766
+ sectionEndSec?: number;
3767
+ }): Promise<{
3768
+ downloadId: string;
3769
+ }>;
3770
+ /**
3771
+ * Stream the live progress of a {@link MediaResource.downloadVideo} import
3772
+ * (`GET /v1/download-video/progress/:downloadId`, server-sent events) as an
3773
+ * async iterable. Yields a {@link DownloadVideoProgress} roughly every 500ms
3774
+ * until the download reaches `completed` (its event carries the stored
3775
+ * `videoUrl`) or `failed` (its event carries `error`), then ends. The progress
3776
+ * state expires server-side shortly after the download starts existing, so
3777
+ * start iterating promptly after `downloadVideo` returns.
3778
+ *
3779
+ * No request timeout is applied (a large import legitimately takes minutes) —
3780
+ * pass an `AbortSignal` to cancel from the caller.
3781
+ */
3782
+ downloadVideoProgress(downloadId: string, opts?: {
3783
+ signal?: AbortSignal;
3784
+ }): AsyncGenerator<DownloadVideoProgress, void, undefined>;
3785
+ /**
3786
+ * Copy an external media URL into your Nodaro storage (`POST /v1/save-to-storage`)
3787
+ * — a server-side fetch, so nothing round-trips through the client. Poll
3788
+ * `jobs.get(jobId)`.
3789
+ */
3790
+ saveToStorage(input: {
3791
+ mediaUrl: string;
3792
+ filename?: string;
3793
+ mediaType?: "image" | "video" | "audio";
3794
+ }): Promise<{
3795
+ jobId: string;
3796
+ }>;
3797
+ /**
3798
+ * Trim a video to a range (`POST /v1/trim-video`). Give the range in whichever
3799
+ * unit fits: `startTime`/`endTime` seconds, `trim*Frames`, `trim*Seconds`, or
3800
+ * `keepFirst`/`keepLastSeconds`. Poll `jobs.get(jobId)`.
3801
+ */
3802
+ trimVideo(input: {
3803
+ videoUrl: string;
3804
+ startTime?: number;
3805
+ endTime?: number;
3806
+ trimStartFrames?: number;
3807
+ trimEndFrames?: number;
3808
+ trimStartSeconds?: number;
3809
+ trimEndSeconds?: number;
3810
+ keepFirstSeconds?: number;
3811
+ keepLastSeconds?: number;
3812
+ }): Promise<{
3813
+ jobId: string;
3814
+ }>;
3815
+ /**
3816
+ * Trim (and extract) audio from a video or audio source
3817
+ * (`POST /v1/trim-audio`) to `[startTime, endTime]` seconds, in `audioFormat`
3818
+ * (`mp3` default / `wav` / `aac`). Poll `jobs.get(jobId)`.
3819
+ */
3820
+ trimAudio(input: {
3821
+ videoUrl?: string;
3822
+ audioUrl?: string;
3823
+ audioFormat?: "mp3" | "wav" | "aac";
3824
+ startTime?: number;
3825
+ endTime?: number;
3826
+ }): Promise<{
3827
+ jobId: string;
3828
+ }>;
3829
+ /**
3830
+ * Probe a social video's metadata (`POST /v1/video-metadata`) — duration,
3831
+ * dimensions, title, live status — WITHOUT downloading it. A direct read, not a
3832
+ * job. Use it to decide whether to trim before importing.
3833
+ */
3834
+ videoMetadata(input: {
3835
+ url: string;
3836
+ }): Promise<VideoMetadata>;
3837
+ }
3838
+ /**
3839
+ * One event from {@link MediaResource.downloadVideoProgress}. The stream ends
3840
+ * after a `completed` event (which carries the stored `videoUrl` + an optional
3841
+ * `thumbnailUrl`) or a `failed` event (which carries `error`).
3842
+ */
3843
+ interface DownloadVideoProgress {
3844
+ phase: "downloading" | "processing" | "uploading" | "completed" | "failed";
3845
+ /** Download percent (0–100). Section fetches report jumpy percents — display, don't sum. */
3846
+ percent: number;
3847
+ /** The imported video's storage URL — set on the `completed` event. */
3848
+ videoUrl?: string;
3849
+ /** Thumbnail storage URL — set on the `completed` event when one was captured. */
3850
+ thumbnailUrl?: string;
3851
+ /** What went wrong — set on the `failed` event. */
3852
+ error?: string;
3853
+ }
3854
+ /** Result of {@link MediaResource.videoMetadata}. Fields are best-effort — a probe may omit some. */
3855
+ interface VideoMetadata {
3856
+ durationSec?: number | null;
3857
+ width?: number | null;
3858
+ height?: number | null;
3859
+ title?: string | null;
3860
+ isLive?: boolean;
3861
+ [key: string]: unknown;
3862
+ }
3863
+
3864
+ /**
3865
+ * Audio primitives — the building blocks Voice Changer Pro composes internally
3866
+ * (separation, isolation, effect, mix, level), exposed standalone so a consumer
3867
+ * can run any single step or assemble its own pipeline. Each returns a job id to
3868
+ * poll (`jobs.get(jobId)`).
3869
+ */
3870
+ declare class AudioResource {
3871
+ private client;
3872
+ constructor(client: NodaroClient);
3873
+ /**
3874
+ * Separate an audio track into stems (`POST /v1/audio-separation`, Demucs).
3875
+ * `mode` `"vocal_instrumental"` (default) splits voice from music/SFX;
3876
+ * `"stems"` returns the full drums/bass/other/… breakdown. `quality`
3877
+ * `auto` (default) / `fast` / `best`.
3878
+ */
3879
+ separate(input: {
3880
+ audioUrl: string;
3881
+ mode?: "vocal_instrumental" | "stems";
3882
+ quality?: "auto" | "fast" | "best";
3883
+ }): Promise<{
3884
+ jobId: string;
3885
+ }>;
3886
+ /** Isolate the primary voice and strip background noise (`POST /v1/audio-isolation`, ElevenLabs). */
3887
+ isolate(input: {
3888
+ audioUrl: string;
3889
+ }): Promise<{
3890
+ jobId: string;
3891
+ }>;
3892
+ /**
3893
+ * Apply a reverb / echo / telephone / megaphone effect to an audio track
3894
+ * (`POST /v1/audio-fx`) — the same presets VCP's `voiceFx` uses, standalone.
3895
+ * `mix` (0–100) is the reverb wet/dry; `delayMs` + `decay` drive `echo`/`custom`;
3896
+ * `eqLow`/`eqHigh` (dB) shape telephone/megaphone.
3897
+ */
3898
+ applyFx(input: {
3899
+ audioUrl: string;
3900
+ preset?: AudioFxPreset;
3901
+ mix?: number;
3902
+ delayMs?: number;
3903
+ decay?: number;
3904
+ eqLow?: number;
3905
+ eqHigh?: number;
3906
+ }): Promise<{
3907
+ jobId: string;
3908
+ }>;
3909
+ /**
3910
+ * Layer multiple audio tracks into one (`POST /v1/mix-audio`). `audioUrls`
3911
+ * (2–20) are summed; optional `trackVolumes` (0–200% each, positionally) set
3912
+ * per-track level.
3913
+ */
3914
+ mix(input: {
3915
+ audioUrls: string[];
3916
+ trackVolumes?: number[];
3917
+ }): Promise<{
3918
+ jobId: string;
3919
+ }>;
3920
+ /**
3921
+ * Adjust an audio (or a video's audio) level (`POST /v1/adjust-volume`):
3922
+ * `volume` % (default 100), `normalize` to loudnorm, and `fadeIn`/`fadeOut`
3923
+ * seconds. Provide `audioUrl` or `videoUrl`.
3924
+ */
3925
+ adjustVolume(input: {
3926
+ audioUrl?: string;
3927
+ videoUrl?: string;
3928
+ volume?: number;
3929
+ normalize?: boolean;
3930
+ fadeIn?: number;
3931
+ fadeOut?: number;
3932
+ }): Promise<{
3933
+ jobId: string;
3934
+ }>;
3935
+ /**
3936
+ * Concatenate audio segments end-to-end (`POST /v1/combine-audio`). Each
3937
+ * segment is a `url` with an optional `[startTime, endTime]` sub-range.
3938
+ */
3939
+ combine(input: {
3940
+ segments: Array<{
3941
+ url: string;
3942
+ startTime?: number;
3943
+ endTime?: number;
3944
+ }>;
3945
+ }): Promise<{
3946
+ jobId: string;
3947
+ }>;
3948
+ }
3649
3949
 
3650
3950
  /**
3651
3951
  * Authenticated user's credit balance — the shape of `GET /v1/user/credits`'s
@@ -4082,6 +4382,8 @@ declare class NodaroClient {
4082
4382
  readonly reduce: ReduceResource;
4083
4383
  readonly promptHelper: PromptHelperResource;
4084
4384
  readonly voices: VoicesResource;
4385
+ readonly media: MediaResource;
4386
+ readonly audio: AudioResource;
4085
4387
  readonly credits: CreditsResource;
4086
4388
  readonly uploads: UploadsResource;
4087
4389
  readonly library: LibraryResource;
@@ -4176,4 +4478,4 @@ interface ApiErrorBody {
4176
4478
  }
4177
4479
  declare function throwFromResponse(status: number, body: ApiErrorBody): never;
4178
4480
 
4179
- export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, CommunityResource, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, type CreateWorkflowInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DuplicateCharacterInput, type EnhanceInput, type ExchangeCodeInput, type ExecutionStatus, type ExecutionTriggerType, ExecutionsResource, type FactoryPresetsResult, ForbiddenError, type GenerateAssetInput, type GenerateCharacterInput, type GenerateCharacterResult, type GenerateCreatureAssetInput, type GenerateCreatureAssetResult, type GenerateCreatureInput, type GenerateCreatureMotionInput, type GenerateCreatureMotionResult, type GenerateCreatureResult, type GenerateImageParams, type GenerateInput, type GenerateLocationAssetInput, type GenerateLocationInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type Job, JobAbortedError, JobFailedError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, type ModelCostsResult, NodaroClient, NodaroError, type NodeCategory, type NodeDescriptor, type NodeExecutionState, type NodeInputField, type NodeInputSchema, type NodeJobOutput, type NodePreset, type NodePresetGroup, NodesResource, NotFoundError, type OAuthAppInfo, OAuthResource, type Object$1 as Object, type ObjectCategory, type ObjectDetail, type ObjectReferencePhoto, type ObjectReferencePhotoKind, ObjectsResource, type OutputType, type PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, StaticTokenAuth, StorageExceededError, type StructuredReferenceParams, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UserBalance, type UserIdentity, type VcpAnalysis, type VcpAnalysisSpeaker, type VcpAnalyzeInput, type VcpExportInput, type VcpExportTrack, type VoiceChangerProInput, type VoiceChangerProVoice, VoicesResource, type Workflow, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
4481
+ export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, CommunityResource, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, type CreateWorkflowInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, type EnhanceInput, type ExchangeCodeInput, type ExecutionStatus, type ExecutionTriggerType, ExecutionsResource, type FactoryPresetsResult, ForbiddenError, type GenerateAssetInput, type GenerateCharacterInput, type GenerateCharacterResult, type GenerateCreatureAssetInput, type GenerateCreatureAssetResult, type GenerateCreatureInput, type GenerateCreatureMotionInput, type GenerateCreatureMotionResult, type GenerateCreatureResult, type GenerateImageParams, type GenerateInput, type GenerateLocationAssetInput, type GenerateLocationInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type Job, JobAbortedError, JobFailedError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, NodaroClient, NodaroError, type NodeCategory, type NodeDescriptor, type NodeExecutionState, type NodeInputField, type NodeInputSchema, type NodeJobOutput, type NodePreset, type NodePresetGroup, NodesResource, NotFoundError, type OAuthAppInfo, OAuthResource, type Object$1 as Object, type ObjectCategory, type ObjectDetail, type ObjectReferencePhoto, type ObjectReferencePhotoKind, ObjectsResource, type OutputType, type PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, StaticTokenAuth, StorageExceededError, type StructuredReferenceParams, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UserBalance, type UserIdentity, type VcpAnalysis, type VcpAnalysisSpeaker, type VcpAnalyzeInput, type VcpExportInput, type VcpExportTrack, type VideoMetadata, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
package/dist/index.js CHANGED
@@ -1583,6 +1583,209 @@ var VoicesResource = class {
1583
1583
  exportMix(input) {
1584
1584
  return this.client.request("POST", "/v1/voice-changer-pro/export", { body: input });
1585
1585
  }
1586
+ /**
1587
+ * Design a brand-new synthetic voice from a text description
1588
+ * (`POST /v1/voice-design`) — ElevenLabs text-to-voice. `text` (100–1000 chars)
1589
+ * is a preview line spoken in the designed voice; `voiceDescription` describes
1590
+ * the voice to create. Costs credits and runs async — poll `jobs.get(jobId)`
1591
+ * for the preview + the reusable voice id.
1592
+ */
1593
+ design(input) {
1594
+ return this.client.request("POST", "/v1/voice-design", { body: input });
1595
+ }
1596
+ /**
1597
+ * Generate speech in a voice described in natural language, without cloning
1598
+ * (`POST /v1/voice-remix`). `text` (1–5000 chars) is spoken in a voice matching
1599
+ * `voiceDescription`. Costs credits and runs async — poll `jobs.get(jobId)`.
1600
+ */
1601
+ remix(input) {
1602
+ return this.client.request("POST", "/v1/voice-remix", { body: input });
1603
+ }
1604
+ /**
1605
+ * Dub an audio clip into another language while preserving each speaker's voice
1606
+ * (`POST /v1/dubbing`). `targetLanguage` is an ISO code (e.g. `"es"`, `"fr"`);
1607
+ * `sourceLanguage` is auto-detected when omitted. Costs credits and runs async
1608
+ * — poll `jobs.get(jobId)`.
1609
+ */
1610
+ dub(input) {
1611
+ return this.client.request("POST", "/v1/dubbing", { body: input });
1612
+ }
1613
+ /**
1614
+ * Clone a voice from an audio FILE you hold in memory
1615
+ * (`POST /v1/voice-clones`, multipart) — the counterpart to
1616
+ * {@link VoicesResource.createClone}, which clones from an already-uploaded
1617
+ * URL. Pass the raw audio `file` (a `Blob`/`File` in the browser, or a
1618
+ * `Uint8Array`/`Buffer` in Node) plus a `name`. Costs credits. Returns the new
1619
+ * {@link VoiceClone} (`elevenlabsVoiceId` is the id to recast/synthesize with).
1620
+ */
1621
+ createCloneFromFile(input) {
1622
+ const form = new FormData();
1623
+ form.append("name", input.name);
1624
+ const blob = input.file instanceof Blob ? input.file : new Blob([input.file], { type: input.contentType ?? "audio/mpeg" });
1625
+ form.append("file", blob, input.filename ?? "sample");
1626
+ return this.client.request("POST", "/v1/voice-clones", { body: form });
1627
+ }
1628
+ };
1629
+
1630
+ // src/resources/media.ts
1631
+ var MediaResource = class {
1632
+ constructor(client) {
1633
+ this.client = client;
1634
+ }
1635
+ client;
1636
+ /**
1637
+ * Download a social video (YouTube / TikTok / Instagram / X / Facebook) into
1638
+ * your storage (`POST /v1/download-video`). `maxHeight` caps the resolution
1639
+ * (default "best"); `sectionStartSec` + `sectionEndSec` (both-or-neither) fetch
1640
+ * ONLY that time range instead of the whole video. Returns a `downloadId`;
1641
+ * progress streams from `GET /v1/download-video/progress/:downloadId`
1642
+ * (server-sent events) and the finished file lands in your library.
1643
+ */
1644
+ downloadVideo(input) {
1645
+ return this.client.request("POST", "/v1/download-video", { body: input });
1646
+ }
1647
+ /**
1648
+ * Stream the live progress of a {@link MediaResource.downloadVideo} import
1649
+ * (`GET /v1/download-video/progress/:downloadId`, server-sent events) as an
1650
+ * async iterable. Yields a {@link DownloadVideoProgress} roughly every 500ms
1651
+ * until the download reaches `completed` (its event carries the stored
1652
+ * `videoUrl`) or `failed` (its event carries `error`), then ends. The progress
1653
+ * state expires server-side shortly after the download starts existing, so
1654
+ * start iterating promptly after `downloadVideo` returns.
1655
+ *
1656
+ * No request timeout is applied (a large import legitimately takes minutes) —
1657
+ * pass an `AbortSignal` to cancel from the caller.
1658
+ */
1659
+ async *downloadVideoProgress(downloadId, opts = {}) {
1660
+ const url = `${this.client.baseUrl}/v1/download-video/progress/${encodeURIComponent(downloadId)}`;
1661
+ const token = await this.client.auth.getToken();
1662
+ const res = await this.client.fetch(url, {
1663
+ headers: token ? { Authorization: `Bearer ${token}` } : {},
1664
+ signal: opts.signal
1665
+ });
1666
+ if (!res.ok) {
1667
+ let errBody = {};
1668
+ try {
1669
+ errBody = await res.json();
1670
+ } catch {
1671
+ }
1672
+ throwFromResponse(res.status, errBody);
1673
+ }
1674
+ if (!res.body) {
1675
+ throw new NodaroError("progress stream has no response body", "empty_stream", res.status);
1676
+ }
1677
+ const reader = res.body.getReader();
1678
+ const decoder = new TextDecoder();
1679
+ let buffer = "";
1680
+ try {
1681
+ for (; ; ) {
1682
+ const { done, value } = await reader.read();
1683
+ if (done) break;
1684
+ buffer += decoder.decode(value, { stream: true });
1685
+ let sep;
1686
+ while ((sep = buffer.indexOf("\n\n")) >= 0) {
1687
+ const frame = buffer.slice(0, sep);
1688
+ buffer = buffer.slice(sep + 2);
1689
+ for (const line of frame.split("\n")) {
1690
+ if (!line.startsWith("data:")) continue;
1691
+ try {
1692
+ yield JSON.parse(line.slice(5).trim());
1693
+ } catch {
1694
+ }
1695
+ }
1696
+ }
1697
+ }
1698
+ } finally {
1699
+ reader.releaseLock();
1700
+ await res.body.cancel().catch(() => {
1701
+ });
1702
+ }
1703
+ }
1704
+ /**
1705
+ * Copy an external media URL into your Nodaro storage (`POST /v1/save-to-storage`)
1706
+ * — a server-side fetch, so nothing round-trips through the client. Poll
1707
+ * `jobs.get(jobId)`.
1708
+ */
1709
+ saveToStorage(input) {
1710
+ return this.client.request("POST", "/v1/save-to-storage", { body: input });
1711
+ }
1712
+ /**
1713
+ * Trim a video to a range (`POST /v1/trim-video`). Give the range in whichever
1714
+ * unit fits: `startTime`/`endTime` seconds, `trim*Frames`, `trim*Seconds`, or
1715
+ * `keepFirst`/`keepLastSeconds`. Poll `jobs.get(jobId)`.
1716
+ */
1717
+ trimVideo(input) {
1718
+ return this.client.request("POST", "/v1/trim-video", { body: input });
1719
+ }
1720
+ /**
1721
+ * Trim (and extract) audio from a video or audio source
1722
+ * (`POST /v1/trim-audio`) to `[startTime, endTime]` seconds, in `audioFormat`
1723
+ * (`mp3` default / `wav` / `aac`). Poll `jobs.get(jobId)`.
1724
+ */
1725
+ trimAudio(input) {
1726
+ return this.client.request("POST", "/v1/trim-audio", { body: input });
1727
+ }
1728
+ /**
1729
+ * Probe a social video's metadata (`POST /v1/video-metadata`) — duration,
1730
+ * dimensions, title, live status — WITHOUT downloading it. A direct read, not a
1731
+ * job. Use it to decide whether to trim before importing.
1732
+ */
1733
+ videoMetadata(input) {
1734
+ return this.client.request("POST", "/v1/video-metadata", { body: input });
1735
+ }
1736
+ };
1737
+
1738
+ // src/resources/audio.ts
1739
+ var AudioResource = class {
1740
+ constructor(client) {
1741
+ this.client = client;
1742
+ }
1743
+ client;
1744
+ /**
1745
+ * Separate an audio track into stems (`POST /v1/audio-separation`, Demucs).
1746
+ * `mode` `"vocal_instrumental"` (default) splits voice from music/SFX;
1747
+ * `"stems"` returns the full drums/bass/other/… breakdown. `quality`
1748
+ * `auto` (default) / `fast` / `best`.
1749
+ */
1750
+ separate(input) {
1751
+ return this.client.request("POST", "/v1/audio-separation", { body: input });
1752
+ }
1753
+ /** Isolate the primary voice and strip background noise (`POST /v1/audio-isolation`, ElevenLabs). */
1754
+ isolate(input) {
1755
+ return this.client.request("POST", "/v1/audio-isolation", { body: input });
1756
+ }
1757
+ /**
1758
+ * Apply a reverb / echo / telephone / megaphone effect to an audio track
1759
+ * (`POST /v1/audio-fx`) — the same presets VCP's `voiceFx` uses, standalone.
1760
+ * `mix` (0–100) is the reverb wet/dry; `delayMs` + `decay` drive `echo`/`custom`;
1761
+ * `eqLow`/`eqHigh` (dB) shape telephone/megaphone.
1762
+ */
1763
+ applyFx(input) {
1764
+ return this.client.request("POST", "/v1/audio-fx", { body: input });
1765
+ }
1766
+ /**
1767
+ * Layer multiple audio tracks into one (`POST /v1/mix-audio`). `audioUrls`
1768
+ * (2–20) are summed; optional `trackVolumes` (0–200% each, positionally) set
1769
+ * per-track level.
1770
+ */
1771
+ mix(input) {
1772
+ return this.client.request("POST", "/v1/mix-audio", { body: input });
1773
+ }
1774
+ /**
1775
+ * Adjust an audio (or a video's audio) level (`POST /v1/adjust-volume`):
1776
+ * `volume` % (default 100), `normalize` to loudnorm, and `fadeIn`/`fadeOut`
1777
+ * seconds. Provide `audioUrl` or `videoUrl`.
1778
+ */
1779
+ adjustVolume(input) {
1780
+ return this.client.request("POST", "/v1/adjust-volume", { body: input });
1781
+ }
1782
+ /**
1783
+ * Concatenate audio segments end-to-end (`POST /v1/combine-audio`). Each
1784
+ * segment is a `url` with an optional `[startTime, endTime]` sub-range.
1785
+ */
1786
+ combine(input) {
1787
+ return this.client.request("POST", "/v1/combine-audio", { body: input });
1788
+ }
1586
1789
  };
1587
1790
 
1588
1791
  // src/resources/credits.ts
@@ -1885,6 +2088,8 @@ var NodaroClient = class {
1885
2088
  reduce;
1886
2089
  promptHelper;
1887
2090
  voices;
2091
+ media;
2092
+ audio;
1888
2093
  credits;
1889
2094
  uploads;
1890
2095
  library;
@@ -1912,6 +2117,8 @@ var NodaroClient = class {
1912
2117
  this.reduce = new ReduceResource(this);
1913
2118
  this.promptHelper = new PromptHelperResource(this);
1914
2119
  this.voices = new VoicesResource(this);
2120
+ this.media = new MediaResource(this);
2121
+ this.audio = new AudioResource(this);
1915
2122
  this.credits = new CreditsResource(this);
1916
2123
  this.uploads = new UploadsResource(this);
1917
2124
  this.library = new LibraryResource(this);
@@ -2009,6 +2216,6 @@ function supabaseAuth(supabase) {
2009
2216
  };
2010
2217
  }
2011
2218
 
2012
- export { AppsResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, ReduceResource, StaticTokenAuth, StorageExceededError, UnauthorizedError, UploadsResource, VoicesResource, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
2219
+ export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, MediaResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, ReduceResource, StaticTokenAuth, StorageExceededError, UnauthorizedError, UploadsResource, VoicesResource, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
2013
2220
  //# sourceMappingURL=index.js.map
2014
2221
  //# sourceMappingURL=index.js.map