@nodaro/sdk 2.24.0 → 2.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/README.md +2 -1
- package/dist/index.cjs +46 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +174 -16
- package/dist/index.d.ts +174 -16
- package/dist/index.js +47 -7
- package/dist/index.js.map +1 -1
- package/dist/signup-signals.cjs +88 -0
- package/dist/signup-signals.cjs.map +1 -0
- package/dist/signup-signals.d.cts +55 -0
- package/dist/signup-signals.d.ts +55 -0
- package/dist/signup-signals.js +82 -0
- package/dist/signup-signals.js.map +1 -0
- package/package.json +13 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nodaro_shared from '@nodaro/shared';
|
|
2
|
-
import { CollaboratorRole, GenericNode, GenericEdge, WorkflowExport, WorkflowImportReport, WorkflowVisibility, ExecutionOutcome, NodeExecutionStateWire, Scene3DReference, Scene3DPlan, Scene3DEditOperation, Scene3DV2EditOperation, Pro3DRenderSource, Pro3DRenderEngine, Pro3DRenderQuality, Pro3DRenderStyle, Scene3DJobOutputAny, Pro3DRenderJobOutput as Pro3DRenderJobOutput$1, Pro3DRenderCapabilities, Scene3DPlanV2, Pro3DRenderQuote as Pro3DRenderQuote$1, ModelInputAdjustment, ConnectedReference, DescribedReference, VideoCharacterReference, SocialSearchParams, SocialPost, SocialPlatform, SocialSearchMode, Scene3DAssetRef, OAuthScope, TtsProvider, EntityStyle, CharacterAspectRatio, CharacterAttachColumn, LocationAssetType, LocationAttachColumn, SurroundDirection, ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio, CreatureAttachColumn, PipelineInput, PipelineStatus, PipelineMode, PipelineStageName, AnimateSubGate, ChatEnabledStage, ProposedChange, ReduceStrategyId, ReduceMeta, Voice, VoiceLibraryParams, VoiceLibraryResponse, VoiceClone, AudioFxPreset, DialogueProvider, CaptionLookId, SupportedFontName, TranscribeLane, CaptionStyle, OverlayAnchor, VideoOverlayRequest, VideoMaskRequest, MaskCompositeRequest, TranscribeProvider, Transcript, ListSavedPostsParams, ListSavedPostsResult, SavePostInput, SavedPost, SavedPostsLookupResult, UpdateSavedPostInput, ListCollectionsResult, Collection, CreateCollectionInput, UpdateCollectionInput, ListCollectionRecordsParams, ListCollectionRecordsResult, CollectionRecord, BulkCollectionRecordsInput, BulkCollectionRecordsResult, CollectionRecordSource, AddCollectionRecordInput, AddCollectionRecordResult, CollectionExportFormat, CollectionUsage, TrackedCompetitor, CompetitorListResult, CompetitorDetail, CompetitorHistory, CompetitorCompareInput, CompetitorCompareResult, CreateCompetitorInput, UpdateCompetitorInput, CompetitorCardsResult, CompetitorLessonsResult, CompetitorActionsResult, CardActionResult, CompetitorDiscovery, CharacterMotionMetadata, RecastSegmentPack, BrowseCommunityParams, BrowseCommunityResult, CommunityCard, CommunityFullDetail, CommunityEntityType, CloneListingResult, FavoriteListingResult, CommunityReportReason, ReportListingResult, PublishListingParams, PublishListingResult, SharedListing, OrganizationView, OrgKind, OrgSettings, OrgPage, OrgMemberView, MemberStatus, WorkspaceRole, InvitationDelivery, InvitationState, InvitationView, InvitationPreview, OrgAuditEntry, UsageQuery, UsageReport, UsageLogEntry, WorkspaceSummary, WorkspaceView, WorkspaceSettings, WorkspaceMemberView, JoinCodeView, Edl, EditPlanMode, EditPlanTier, MeOrganizations } from '@nodaro/shared';
|
|
3
|
-
export { ActionCard, ActionCardKind, ActionCardPriority, AddCollectionRecordInput, AddCollectionRecordResult, AdviceFamily, AdviceRecord, AnimateSubGate, AudioFxPreset, BrandLesson, BrandLessonKind, BrandLessons, BrandPlatformLessons, 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, CardAction, CardActionResult, CardOutcome, CardOutcomeState, CardSnapshot, CardVerdict, ChapterSet, CharacterAspectRatio, ChatEnabledStage, CloneListingResult, Collection, CollectionCaps, CollectionDigestFormat, CollectionExportFormat, CollectionFieldValue, CollectionLimits, CollectionMedia, CollectionMediaType, CollectionRecord, CollectionRecordSource, CollectionWriteOutcome, CommunityCard, CommunityEntityType, CommunityFullDetail, CommunityReportReason, CommunitySort, CompetitorAboutPlatform, CompetitorAccountKey, CompetitorAccounts, CompetitorActionsResult, CompetitorBrandTally, CompetitorCardsResult, CompetitorCompareInput, CompetitorCompareResult, CompetitorDetail, CompetitorDiscovery, CompetitorHistory, CompetitorHistoryPlatform, CompetitorHistoryPoint, CompetitorLessonsResult, CompetitorListResult, CompetitorPeriod, CompetitorPeriodFollowers, CompetitorPeriodPlatform, CompetitorPlatformTally, CompetitorPost, CompetitorScan, CompetitorScanCounts, CompetitorScanSummary, CompetitorSchedule, CompetitorSearch, CompetitorSearchKind, ConnectedReference, CreateCollectionInput, CreateCompetitorInput, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, DescribedReference, EditPlanMode, EditPlanTier, Edl, EdlClipSet, EntityStyle, ExecutionOutcome, FavoriteListingResult, GeminiOmniVoicePresetId, GenericEdge, GenericNode, InvitationDelivery, InvitationPreview, InvitationState, InvitationView, JoinCodeView, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, ListCollectionRecordsParams, ListCollectionRecordsResult, ListCollectionsResult, ListSavedPostsParams, ListSavedPostsResult, LocationAssetType, LocationAttachColumn, MarkCardInput, MeOrganizations, MemberStatus, NodeExecutionStatus, NodeSkipReason, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, OUTPUT_BEARING_NODE_STATUSES, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, OrgAuditEntry, OrgErrorCode, OrgKind, OrgMemberView, OrgPage, OrgRole, OrgSettings, OrgStatus, OrganizationSummary, OrganizationView, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, PipelineInput, PipelineMode, PipelineStageName, PipelineStatus, PromptAffixFields, ProposedChange, PublishListingParams, PublishListingResult, RECAST_SEGMENT_PACKS, RecastSegmentPack, ReduceMeta, ReduceStrategyId, ReportListingResult, SURROUND_DIRECTIONS, SavePostInput, SavedPost, SavedPostSource, SavedPostsLookupResult, SharedListing, SharedVoice, SocialPlatform, SocialPost, SocialPostAuthor, SocialPostMedia, SocialPostMetrics, SocialSearchCount, SocialSearchMode, SocialSearchParams, SocialSearchPeriod, SocialSearchSort, SocialSearchVideoKind, SubGateName, SurroundDirection, TrackedCompetitor, TranscribeLane, TranscribeProvider, Transcript, USAGE_GROUP_BYS, UpdateCardActionInput, UpdateCollectionInput, UpdateCompetitorInput, UpdateSavedPostInput, UsageGroupBy, UsageLogEntry, UsageQuery, UsageReport, UsageReportRow, UsageReportTotals, UsageVarianceRow, VideoCharacterReference, VideoCharacterVoice, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse, WORKSPACE_HEADER, WorkflowExport, WorkflowExportCharacter, WorkflowExportLocation, WorkflowExportObject, WorkspaceMemberView, WorkspaceRole, WorkspaceSettings, WorkspaceSummary, WorkspaceView, nodeStateMayCarryOutput, unwrapEditPlanOutput } from '@nodaro/shared';
|
|
2
|
+
import { CollaboratorRole, GenericNode, GenericEdge, WorkflowExport, WorkflowImportReport, WorkflowVisibility, ExecutionOutcome, NodeExecutionStateWire, Scene3DReference, Scene3DPlan, Scene3DEditOperation, Scene3DV2EditOperation, Pro3DRenderSource, Pro3DRenderEngine, Pro3DRenderQuality, Pro3DRenderStyle, Scene3DJobOutputAny, Pro3DRenderJobOutput as Pro3DRenderJobOutput$1, Pro3DRenderCapabilities, Scene3DPlanV2, Pro3DRenderQuote as Pro3DRenderQuote$1, ModelInputAdjustment, ConnectedReference, DescribedReference, VideoCharacterReference, SocialSearchParams, VideoDepthProvider, VideoDepthModelSize, VideoDepthColormap, VideoDepthResolution, SocialPost, SocialPlatform, SocialSearchMode, Scene3DAssetRef, OAuthScope, TtsProvider, EntityStyle, CharacterAspectRatio, CharacterAttachColumn, LocationAssetType, LocationAttachColumn, SurroundDirection, ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio, CreatureAttachColumn, PipelineInput, PipelineStatus, PipelineMode, PipelineStageName, AnimateSubGate, ChatEnabledStage, ProposedChange, ReduceStrategyId, ReduceMeta, Voice, VoiceLibraryParams, VoiceLibraryResponse, VoiceClone, AudioFxPreset, DialogueProvider, CaptionLookId, SupportedFontName, TranscribeLane, CaptionStyle, OverlayAnchor, VideoOverlayRequest, VideoMaskRequest, MaskCompositeRequest, TranscribeProvider, Transcript, ListSavedPostsParams, ListSavedPostsResult, SavePostInput, SavedPost, SavedPostsLookupResult, UpdateSavedPostInput, ListCollectionsResult, Collection, CreateCollectionInput, UpdateCollectionInput, ListCollectionRecordsParams, ListCollectionRecordsResult, CollectionRecord, BulkCollectionRecordsInput, BulkCollectionRecordsResult, CollectionRecordSource, AddCollectionRecordInput, AddCollectionRecordResult, CollectionExportFormat, CollectionUsage, TrackedCompetitor, CompetitorListResult, CompetitorDetail, CompetitorHistory, CompetitorCompareInput, CompetitorCompareResult, CreateCompetitorInput, UpdateCompetitorInput, CompetitorCardsResult, CompetitorLessonsResult, CompetitorActionsResult, CardActionResult, CompetitorDiscovery, CharacterMotionMetadata, RecastSegmentPack, BrowseCommunityParams, BrowseCommunityResult, CommunityCard, CommunityFullDetail, CommunityEntityType, CloneListingResult, FavoriteListingResult, CommunityReportReason, ReportListingResult, PublishListingParams, PublishListingResult, SharedListing, OrganizationView, OrgKind, OrgSettings, OrgPage, OrgMemberView, MemberStatus, WorkspaceRole, InvitationDelivery, InvitationState, InvitationView, InvitationPreview, OrgAuditEntry, UsageQuery, UsageReport, UsageLogEntry, WorkspaceSummary, WorkspaceView, WorkspaceSettings, WorkspaceMemberView, JoinCodeView, Edl, EditPlanMode, EditPlanTier, MeOrganizations } from '@nodaro/shared';
|
|
3
|
+
export { ActionCard, ActionCardKind, ActionCardPriority, AddCollectionRecordInput, AddCollectionRecordResult, AdviceFamily, AdviceRecord, AnimateSubGate, AudioFxPreset, BrandLesson, BrandLessonKind, BrandLessons, BrandPlatformLessons, 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, CardAction, CardActionResult, CardOutcome, CardOutcomeState, CardSnapshot, CardVerdict, ChapterSet, CharacterAspectRatio, ChatEnabledStage, CloneListingResult, Collection, CollectionCaps, CollectionDigestFormat, CollectionExportFormat, CollectionFieldValue, CollectionLimits, CollectionMedia, CollectionMediaType, CollectionRecord, CollectionRecordSource, CollectionWriteOutcome, CommunityCard, CommunityEntityType, CommunityFullDetail, CommunityReportReason, CommunitySort, CompetitorAboutPlatform, CompetitorAccountKey, CompetitorAccounts, CompetitorActionsResult, CompetitorBrandTally, CompetitorCardsResult, CompetitorCompareInput, CompetitorCompareResult, CompetitorDetail, CompetitorDiscovery, CompetitorHistory, CompetitorHistoryPlatform, CompetitorHistoryPoint, CompetitorLessonsResult, CompetitorListResult, CompetitorPeriod, CompetitorPeriodFollowers, CompetitorPeriodPlatform, CompetitorPlatformTally, CompetitorPost, CompetitorScan, CompetitorScanCounts, CompetitorScanSummary, CompetitorSchedule, CompetitorSearch, CompetitorSearchKind, ConnectedReference, CreateCollectionInput, CreateCompetitorInput, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, DescribedReference, EditPlanMode, EditPlanTier, Edl, EdlClipSet, EntityStyle, ExecutionOutcome, FavoriteListingResult, GeminiOmniVoicePresetId, GenericEdge, GenericNode, InvitationDelivery, InvitationPreview, InvitationState, InvitationView, JoinCodeView, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, ListCollectionRecordsParams, ListCollectionRecordsResult, ListCollectionsResult, ListSavedPostsParams, ListSavedPostsResult, LocationAssetType, LocationAttachColumn, MarkCardInput, MeOrganizations, MemberStatus, NodeExecutionStatus, NodeSkipReason, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, OUTPUT_BEARING_NODE_STATUSES, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, OrgAuditEntry, OrgErrorCode, OrgKind, OrgMemberView, OrgPage, OrgRole, OrgSettings, OrgStatus, OrganizationSummary, OrganizationView, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, PipelineInput, PipelineMode, PipelineStageName, PipelineStatus, PromptAffixFields, ProposedChange, PublishListingParams, PublishListingResult, RECAST_SEGMENT_PACKS, RecastSegmentPack, ReduceMeta, ReduceStrategyId, ReportListingResult, SURROUND_DIRECTIONS, SavePostInput, SavedPost, SavedPostSource, SavedPostsLookupResult, SharedListing, SharedVoice, SocialPlatform, SocialPost, SocialPostAuthor, SocialPostMedia, SocialPostMetrics, SocialSearchCount, SocialSearchMode, SocialSearchParams, SocialSearchPeriod, SocialSearchSort, SocialSearchVideoKind, SubGateName, SurroundDirection, TrackedCompetitor, TranscribeLane, TranscribeProvider, Transcript, USAGE_GROUP_BYS, UpdateCardActionInput, UpdateCollectionInput, UpdateCompetitorInput, UpdateSavedPostInput, UsageGroupBy, UsageLogEntry, UsageQuery, UsageReport, UsageReportRow, UsageReportTotals, UsageVarianceRow, VideoCharacterReference, VideoCharacterVoice, VideoDepthColormap, VideoDepthModelSize, VideoDepthProvider, VideoDepthResolution, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse, WORKSPACE_HEADER, WorkflowExport, WorkflowExportCharacter, WorkflowExportLocation, WorkflowExportObject, WorkspaceMemberView, WorkspaceRole, WorkspaceSettings, WorkspaceSummary, WorkspaceView, nodeStateMayCarryOutput, unwrapEditPlanOutput } from '@nodaro/shared';
|
|
4
4
|
import { DirectionFields, SubjectFields, PersonValue, WizardNodeContext, WizardQuestion, WizardSelection, RecommendedModel, FactoryPreset } from '@nodaro/prompts';
|
|
5
5
|
export { PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, PersonValue, RecommendedModel, WizardNodeContext, WizardOption, WizardQuestion, WizardSelection, buildPersonHints } from '@nodaro/prompts';
|
|
6
6
|
|
|
@@ -530,9 +530,9 @@ interface ListJobsPage {
|
|
|
530
530
|
}
|
|
531
531
|
/**
|
|
532
532
|
* Lean job status returned by `GET /v1/jobs/:id/status`. Skips the
|
|
533
|
-
* `input_data` JSONB and cost
|
|
533
|
+
* `input_data` JSONB and cost columns. Its `output_data` still goes
|
|
534
534
|
* through the server-only nested-field redaction. Intended for poll loops that
|
|
535
|
-
* only need progress/output/error.
|
|
535
|
+
* only need progress/output/error, and when the job finished.
|
|
536
536
|
*/
|
|
537
537
|
interface JobStatusResult {
|
|
538
538
|
id: string;
|
|
@@ -544,6 +544,8 @@ interface JobStatusResult {
|
|
|
544
544
|
error_hint?: JobErrorHint | null;
|
|
545
545
|
/** PR9: see {@link Job.credit_status}. */
|
|
546
546
|
credit_status?: CreditStatus | null;
|
|
547
|
+
/** When the job finished, on the server's clock; null until it has. */
|
|
548
|
+
completed_at?: string | null;
|
|
547
549
|
}
|
|
548
550
|
declare class JobsResource {
|
|
549
551
|
private client;
|
|
@@ -1065,10 +1067,9 @@ interface NodeDescriptor {
|
|
|
1065
1067
|
* are processed asynchronously by a worker — the caller polls
|
|
1066
1068
|
* `client.jobs.get(jobId)` until status is `completed`/`failed`.
|
|
1067
1069
|
*
|
|
1068
|
-
*
|
|
1069
|
-
*
|
|
1070
|
-
*
|
|
1071
|
-
* presence of `jobId`.
|
|
1070
|
+
* Some node types (`meta-ads-scrape`, for one) answer synchronously and
|
|
1071
|
+
* return their full result body. The shape is route-specific; consumers
|
|
1072
|
+
* should branch on the presence of `jobId`.
|
|
1072
1073
|
*/
|
|
1073
1074
|
/**
|
|
1074
1075
|
* One parameter the server corrected because the chosen model does not accept
|
|
@@ -1196,6 +1197,12 @@ interface GenerateVideoParams extends StructuredReferenceParams, ReferenceCaptio
|
|
|
1196
1197
|
* bound in the prompt as the opening frame. Default `"auto"`, which picks per
|
|
1197
1198
|
* model. Ignored by models that take no reference images. */
|
|
1198
1199
|
frameDelivery?: "auto" | "frame" | "reference";
|
|
1200
|
+
/** Seedance Draft (`seedance-2-5` only; ignored elsewhere): render a 480p
|
|
1201
|
+
* DRAFT — it costs the same as a 480p run and any `resolution` is replaced
|
|
1202
|
+
* by 480p. Finalize the take you like with `nodes.run("video-upscale",
|
|
1203
|
+
* { provider: "seedance-2-5-hd", sourceJobId })`: the same take, frame for
|
|
1204
|
+
* frame, at 1080p. Drafts are kept about 7 days. */
|
|
1205
|
+
draft?: boolean;
|
|
1199
1206
|
[k: string]: unknown;
|
|
1200
1207
|
}
|
|
1201
1208
|
/**
|
|
@@ -1229,6 +1236,34 @@ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionP
|
|
|
1229
1236
|
direction?: DirectionFields;
|
|
1230
1237
|
/** SUBJECT ids (who is in the shot), folded ahead of the direction clauses. */
|
|
1231
1238
|
subject?: SubjectFields;
|
|
1239
|
+
/** Seedance Draft (`seedance-2-5` only; ignored elsewhere): render a 480p
|
|
1240
|
+
* DRAFT — it costs the same as a 480p run and any `resolution` is replaced
|
|
1241
|
+
* by 480p. Finalize the take you like with `nodes.run("video-upscale",
|
|
1242
|
+
* { provider: "seedance-2-5-hd", sourceJobId })`: the same take, frame for
|
|
1243
|
+
* frame, at 1080p. Drafts are kept about 7 days. */
|
|
1244
|
+
draft?: boolean;
|
|
1245
|
+
[k: string]: unknown;
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* Typed request body for `nodes.run("video-upscale", …)` / `runAndWait`.
|
|
1249
|
+
*
|
|
1250
|
+
* - `topaz` (default): upscale any `videoUrl` by `upscaleFactor`.
|
|
1251
|
+
* - `veo-1080p` / `veo-4k`: re-render a VEO generation by its `taskId`.
|
|
1252
|
+
* - `seedance-2-5-hd`: finalize a Seedance 2.5 DRAFT (a `draft: true` run) —
|
|
1253
|
+
* the same take re-rendered at 1080p at the draft's own length. Name the
|
|
1254
|
+
* draft by `sourceJobId` (its job id) or `taskId` (its providerTaskId). The
|
|
1255
|
+
* price comes from the draft (its length, and whether it used a reference
|
|
1256
|
+
* video), never from this body. A foreign, unfinished or non-draft source is
|
|
1257
|
+
* refused with a 4xx before anything is charged.
|
|
1258
|
+
*
|
|
1259
|
+
* Any other route field passes through.
|
|
1260
|
+
*/
|
|
1261
|
+
interface VideoUpscaleParams {
|
|
1262
|
+
provider?: "topaz" | "veo-1080p" | "veo-4k" | "seedance-2-5-hd";
|
|
1263
|
+
videoUrl?: string;
|
|
1264
|
+
upscaleFactor?: "1" | "2" | "4";
|
|
1265
|
+
taskId?: string;
|
|
1266
|
+
sourceJobId?: string;
|
|
1232
1267
|
[k: string]: unknown;
|
|
1233
1268
|
}
|
|
1234
1269
|
/**
|
|
@@ -1247,12 +1282,47 @@ interface AssembleNarratedVideoParams {
|
|
|
1247
1282
|
trimEndFrames?: number;
|
|
1248
1283
|
[k: string]: unknown;
|
|
1249
1284
|
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Typed request body for `nodes.run("video-depth", …)` / `runAndWait` — turns a
|
|
1287
|
+
* video into a depth video (`POST /v1/video-depth`, near is bright, far is
|
|
1288
|
+
* dark). The completed job writes `videoUrl` (MP4) and `thumbnailUrl`.
|
|
1289
|
+
*
|
|
1290
|
+
* Two providers: `video-depth-anything` (the default, temporally consistent)
|
|
1291
|
+
* honours every lever below; `depth-anything-frames` (Depth Anything per
|
|
1292
|
+
* frame) takes `modelSize` and `colormap` only, and renders only `grayscale` /
|
|
1293
|
+
* `inferno`. A lever the chosen provider does not take is dropped and a
|
|
1294
|
+
* colormap it cannot render becomes `grayscale` — coerced, never rejected (a
|
|
1295
|
+
* value outside the vocabularies below is still a `400 validation_error`).
|
|
1296
|
+
*
|
|
1297
|
+
* The clip is measured before any credits are reserved. Too long answers
|
|
1298
|
+
* `400 video_too_long` (`video-depth-anything`: more than 2,400 frames or
|
|
1299
|
+
* 300 s; `depth-anything-frames`: more than 80 s); a clip that cannot be read
|
|
1300
|
+
* answers `400 video_unreadable`; a provider the deployment has turned off
|
|
1301
|
+
* answers `403 model_not_available`.
|
|
1302
|
+
*
|
|
1303
|
+
* Common fields are typed; any other route field passes through.
|
|
1304
|
+
*/
|
|
1305
|
+
interface VideoDepthParams {
|
|
1306
|
+
/** The source video — a public http(s) URL. */
|
|
1307
|
+
videoUrl: string;
|
|
1308
|
+
/** Default `video-depth-anything`. */
|
|
1309
|
+
provider?: VideoDepthProvider;
|
|
1310
|
+
/** `small` / `base` / `large` (the default) — larger is more detailed and slower. */
|
|
1311
|
+
modelSize?: VideoDepthModelSize;
|
|
1312
|
+
/** Default `grayscale`. `depth-anything-frames` renders only `grayscale` / `inferno`. */
|
|
1313
|
+
colormap?: VideoDepthColormap;
|
|
1314
|
+
/** `video-depth-anything` only. Default `auto`. */
|
|
1315
|
+
resolution?: VideoDepthResolution;
|
|
1316
|
+
/** `video-depth-anything` only: render the original and the depth next to each other. */
|
|
1317
|
+
sideBySide?: boolean;
|
|
1318
|
+
[k: string]: unknown;
|
|
1319
|
+
}
|
|
1250
1320
|
/**
|
|
1251
1321
|
* The `output_data` shape a finalized generation job writes. Every async
|
|
1252
1322
|
* generation node persists one (or more) of these media URLs to
|
|
1253
1323
|
* `jobs.output_data` on completion — `generate-image` → `imageUrl`,
|
|
1254
|
-
* `generate-video` / `combine-videos` / `merge-video-audio` / `video-upscale`
|
|
1255
|
-
* → `videoUrl` (+ `thumbnailUrl`), `text-to-speech` / `generate-music` →
|
|
1324
|
+
* `generate-video` / `combine-videos` / `merge-video-audio` / `video-upscale` /
|
|
1325
|
+
* `video-depth` → `videoUrl` (+ `thumbnailUrl`), `text-to-speech` / `generate-music` →
|
|
1256
1326
|
* `audioUrl` (a `text-to-speech` run with `withTimestamps: true` on a model
|
|
1257
1327
|
* that returns timings, and every `text-to-dialogue` run on one, also carries
|
|
1258
1328
|
* `transcript`). Resolved by {@link NodesResource.runAndWait}. Extra fields may be
|
|
@@ -1284,7 +1354,7 @@ interface NodeJobOutput {
|
|
|
1284
1354
|
readonly otherUrl?: string;
|
|
1285
1355
|
readonly guitarUrl?: string;
|
|
1286
1356
|
readonly pianoUrl?: string;
|
|
1287
|
-
/** `generate-video` / `combine-videos` / `merge-video-audio` / `video-upscale` write here. */
|
|
1357
|
+
/** `generate-video` / `combine-videos` / `merge-video-audio` / `video-upscale` / `video-depth` write here. */
|
|
1288
1358
|
readonly videoUrl?: string;
|
|
1289
1359
|
/** `generate-image` / `edit-image` / `extract-frame` write here. */
|
|
1290
1360
|
readonly imageUrl?: string;
|
|
@@ -1346,16 +1416,28 @@ declare class NodesResource {
|
|
|
1346
1416
|
/**
|
|
1347
1417
|
* Run a single node directly without wrapping it in a workflow. Posts
|
|
1348
1418
|
* `params` as the request body to the node's API route. Most use
|
|
1349
|
-
* `POST /v1/<type>`;
|
|
1350
|
-
*
|
|
1419
|
+
* `POST /v1/<type>`; the rest are listed in `NODE_RUN_ROUTES` (exported by
|
|
1420
|
+
* `@nodaro/shared`): scene authoring uses `/v1/3d-scene/generate|edit`,
|
|
1421
|
+
* `llm-chat` uses `/v1/llm-chat/generate`, the Suno nodes `/v1/suno/…`, the
|
|
1422
|
+
* social post nodes `/v1/social/publish` (a per-platform node fills in its
|
|
1423
|
+
* `platform` when you leave it out), and render-video with a planType uses
|
|
1424
|
+
* `/v1/render-video/plan`.
|
|
1425
|
+
*
|
|
1426
|
+
* A node type with no route of its own (`NODE_TYPES_WITHOUT_RUN_ROUTE`, e.g.
|
|
1427
|
+
* `modify-image`, which runs through `image-to-image`) rejects with a
|
|
1428
|
+
* {@link NodaroError} of code `node_not_runnable` naming what to run
|
|
1429
|
+
* instead, without calling the API. A type that runs only inside a workflow
|
|
1430
|
+
* (an input, trigger, utility or parameter node such as `upload-image`)
|
|
1431
|
+
* rejects the same way once the API answers that it has no such route; a
|
|
1432
|
+
* 404 about a missing resource stays a `NotFoundError`.
|
|
1351
1433
|
*
|
|
1352
1434
|
* This is the SDK equivalent of the MCP server's verb tools — and the
|
|
1353
1435
|
* path the Nodaro CLI uses for `nodaro nodes run <type>`.
|
|
1354
1436
|
*
|
|
1355
1437
|
* Most node types are async: the response includes `{ jobId }` and the
|
|
1356
1438
|
* actual generation runs on a worker. Poll `client.jobs.get(jobId)` until
|
|
1357
|
-
* completed.
|
|
1358
|
-
* result
|
|
1439
|
+
* completed. Synchronous node types (`meta-ads-scrape`, etc.) return their
|
|
1440
|
+
* full result without a `jobId` field.
|
|
1359
1441
|
*
|
|
1360
1442
|
* @param type Node type slug — must match an entry in the registry
|
|
1361
1443
|
* returned by `list()` (e.g. "generate-image").
|
|
@@ -1370,8 +1452,10 @@ declare class NodesResource {
|
|
|
1370
1452
|
run(type: "text-to-speech", params: TextToSpeechParams): Promise<RunNodeResult>;
|
|
1371
1453
|
run(type: "generate-video", params?: GenerateVideoParams): Promise<RunNodeResult>;
|
|
1372
1454
|
run(type: "text-to-video", params: TextToVideoParams): Promise<RunNodeResult>;
|
|
1455
|
+
run(type: "video-upscale", params: VideoUpscaleParams): Promise<RunNodeResult>;
|
|
1373
1456
|
run(type: "assemble-narrated-video", params?: AssembleNarratedVideoParams): Promise<RunNodeResult>;
|
|
1374
1457
|
run(type: "social-search", params: SocialSearchParams, options?: RunNodeOptions): Promise<RunNodeResult>;
|
|
1458
|
+
run(type: "video-depth", params: VideoDepthParams, options?: RunNodeOptions): Promise<RunNodeResult>;
|
|
1375
1459
|
run(type: string, params?: Record<string, unknown>, options?: RunNodeOptions): Promise<RunNodeResult>;
|
|
1376
1460
|
/**
|
|
1377
1461
|
* Run a single async node to completion: {@link run} it, extract the
|
|
@@ -1408,8 +1492,10 @@ declare class NodesResource {
|
|
|
1408
1492
|
runAndWait(type: "text-to-speech", params: TextToSpeechParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
|
|
1409
1493
|
runAndWait(type: "generate-video", params?: GenerateVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
|
|
1410
1494
|
runAndWait(type: "text-to-video", params: TextToVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
|
|
1495
|
+
runAndWait(type: "video-upscale", params: VideoUpscaleParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
|
|
1411
1496
|
runAndWait(type: "assemble-narrated-video", params?: AssembleNarratedVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
|
|
1412
1497
|
runAndWait(type: "social-search", params: SocialSearchParams, opts?: RunAndWaitOptions): Promise<SocialSearchJobOutput>;
|
|
1498
|
+
runAndWait(type: "video-depth", params: VideoDepthParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
|
|
1413
1499
|
runAndWait<T extends string>(type: T, params?: Record<string, unknown>, opts?: RunAndWaitOptions): Promise<T extends "pro-3d-render" ? Pro3DRenderJobOutput : T extends "generate-3d-scene" | "edit-3d-scene" ? Scene3DJobOutput : NodeJobOutput>;
|
|
1414
1500
|
/**
|
|
1415
1501
|
* Fan out N async runs of the same node `type` to completion concurrently —
|
|
@@ -5373,6 +5459,20 @@ declare class MediaResource {
|
|
|
5373
5459
|
}): Promise<{
|
|
5374
5460
|
jobId: string;
|
|
5375
5461
|
}>;
|
|
5462
|
+
/**
|
|
5463
|
+
* Cut a video and/or an audio file into consecutive parts
|
|
5464
|
+
* (`POST /v1/split-media`). Every part is at most `chunkDuration` seconds and
|
|
5465
|
+
* at least `minPartDuration` (default 4, never above `chunkDuration`) — a
|
|
5466
|
+
* short leftover is evened out with the parts before it. Video is cut on
|
|
5467
|
+
* whole frames with each part's sound matching its picture; audio parts are
|
|
5468
|
+
* sample-exact, in `audioFormat` (`mp3` default / `wav` / `aac`). With both
|
|
5469
|
+
* sources each is split on its own. At most 200 parts per input. Poll
|
|
5470
|
+
* `jobs.get(jobId)`; the parts are on the completed job's `output_data` —
|
|
5471
|
+
* see {@link SplitMediaOutput}.
|
|
5472
|
+
*/
|
|
5473
|
+
splitMedia(input: SplitMediaInput): Promise<{
|
|
5474
|
+
jobId: string;
|
|
5475
|
+
}>;
|
|
5376
5476
|
/**
|
|
5377
5477
|
* Turn one still image + one audio track into an MP4
|
|
5378
5478
|
* (`POST /v1/still-to-video`) — locally rendered (FFmpeg), no AI model,
|
|
@@ -5510,6 +5610,32 @@ interface VideoMetadata {
|
|
|
5510
5610
|
isLive?: boolean;
|
|
5511
5611
|
[key: string]: unknown;
|
|
5512
5612
|
}
|
|
5613
|
+
/** Body of {@link MediaResource.splitMedia} (`POST /v1/split-media`). At least one of `videoUrl` / `audioUrl`. */
|
|
5614
|
+
interface SplitMediaInput {
|
|
5615
|
+
/** Video to split. */
|
|
5616
|
+
videoUrl?: string;
|
|
5617
|
+
/** Audio file to split (split on its own when a video is given too). */
|
|
5618
|
+
audioUrl?: string;
|
|
5619
|
+
/** The longest a part may be, in seconds (at least 1). Every part is at most this long. */
|
|
5620
|
+
chunkDuration: number;
|
|
5621
|
+
/** The shortest a part may be, in seconds (0 or more, default 4). Must not exceed `chunkDuration` (400 otherwise). */
|
|
5622
|
+
minPartDuration?: number;
|
|
5623
|
+
/** Format of the audio parts. Default `mp3`. */
|
|
5624
|
+
audioFormat?: "mp3" | "wav" | "aac";
|
|
5625
|
+
}
|
|
5626
|
+
/** A completed split-media job's `output_data`. */
|
|
5627
|
+
interface SplitMediaOutput {
|
|
5628
|
+
/** The video parts, in order (when a video was split). */
|
|
5629
|
+
videoUrls?: string[];
|
|
5630
|
+
/** The audio parts, in order (when an audio file was split). */
|
|
5631
|
+
audioUrls?: string[];
|
|
5632
|
+
/** The number of parts — the larger of the two lists. */
|
|
5633
|
+
chunkCount: number;
|
|
5634
|
+
/** Each part's exact length in seconds: the video parts' when a video was split, else the audio parts'. */
|
|
5635
|
+
partDurationsSec?: number[];
|
|
5636
|
+
/** The audio parts' lengths, only when BOTH a video and an audio file were split. */
|
|
5637
|
+
audioPartDurationsSec?: number[];
|
|
5638
|
+
}
|
|
5513
5639
|
interface MediaProcessInput {
|
|
5514
5640
|
sourceUrl: string;
|
|
5515
5641
|
type: "video" | "audio";
|
|
@@ -5766,6 +5892,23 @@ interface ModelCostsResult {
|
|
|
5766
5892
|
missing: string[];
|
|
5767
5893
|
errors: string[];
|
|
5768
5894
|
}
|
|
5895
|
+
/**
|
|
5896
|
+
* The two browser signals a claim reports — SHA-256 hex digests computed by
|
|
5897
|
+
* `@nodaro/sdk/signup-signals` (`collectSignupKeys`). Either may be absent:
|
|
5898
|
+
* a browser that cannot be measured still claims, and the server treats the
|
|
5899
|
+
* absence as what it is. Any other value is stored as absent server-side.
|
|
5900
|
+
*/
|
|
5901
|
+
interface SignupKeys {
|
|
5902
|
+
browserKey?: string;
|
|
5903
|
+
deviceKey?: string;
|
|
5904
|
+
}
|
|
5905
|
+
/** The answer of `POST /v1/credits/claim-signup-grant`. */
|
|
5906
|
+
interface SignupGrantClaimResult {
|
|
5907
|
+
/** Where the account's free grant stands after this call. */
|
|
5908
|
+
state: "unclaimed" | "granted" | "withheld" | "revoked";
|
|
5909
|
+
/** True only when THIS call moved the credits — a repeat is `false` with the same state. */
|
|
5910
|
+
granted: boolean;
|
|
5911
|
+
}
|
|
5769
5912
|
declare class CreditsResource {
|
|
5770
5913
|
private client;
|
|
5771
5914
|
constructor(client: NodaroClient);
|
|
@@ -5782,6 +5925,19 @@ declare class CreditsResource {
|
|
|
5782
5925
|
* fault-isolation shape verbatim (see {@link ModelCostsResult}).
|
|
5783
5926
|
*/
|
|
5784
5927
|
modelCosts(ids: string[]): Promise<ModelCostsResult>;
|
|
5928
|
+
/**
|
|
5929
|
+
* `POST /v1/credits/claim-signup-grant` → claims the account's free signup
|
|
5930
|
+
* grant, once, with the browser signals of the page making the claim.
|
|
5931
|
+
*
|
|
5932
|
+
* Call it once per page load as soon as the session is known, and never
|
|
5933
|
+
* wait on it for rendering: it is idempotent (a decided account answers
|
|
5934
|
+
* with its state and `granted: false`), it costs the user nothing when it
|
|
5935
|
+
* fails (the next load asks again), and the signals are what make the
|
|
5936
|
+
* claim worth sending — collect them with `collectSignupKeys()` from
|
|
5937
|
+
* `@nodaro/sdk/signup-signals` and pass whatever came back, `{}` included.
|
|
5938
|
+
* Cloud-only route: a self-hosted instance answers 404.
|
|
5939
|
+
*/
|
|
5940
|
+
claimSignupGrant(keys?: SignupKeys): Promise<SignupGrantClaimResult>;
|
|
5785
5941
|
}
|
|
5786
5942
|
|
|
5787
5943
|
/**
|
|
@@ -9105,7 +9261,9 @@ interface ApiErrorBody {
|
|
|
9105
9261
|
opIndex?: number;
|
|
9106
9262
|
[key: string]: unknown;
|
|
9107
9263
|
};
|
|
9264
|
+
/** The server framework's own top-level message, e.g. for a route it does not have. */
|
|
9265
|
+
message?: unknown;
|
|
9108
9266
|
}
|
|
9109
9267
|
declare function throwFromResponse(status: number, body: ApiErrorBody): never;
|
|
9110
9268
|
|
|
9111
|
-
export { type AccessTokenResponse, type AddCaptionsInput, type AddCollaboratorInput, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApplyEdlInput, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, type AssembleNarratedVideoParams, AudioResource, type AudioSyncInput, type AudioSyncOffset, type AudioSyncResult, type AudioSyncSource, type Auth, type BranchPipelineInput, type BranchPipelineResult, type BrowseTemplatesParams, type BrowseTemplatesResult, CREATURE_ASSET_TYPES, CallbackAuth, type CameraSwitchInput, type CancelExecutionParams, type CancelJobResult, type CaptionEntry, type CaptionLookInput, type CaptionSegmentInput, type CatalogsListResponse, CatalogsResource, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, type CloneTemplateParams, type CloneTemplateResult, type Collaborator, CollectionsResource, CommunityResource, CompetitorsResource, type ContinueVideoProResult, type CopilotMemorySavedFrameData, type CopilotMessage, type CopilotMessagePart, type CopilotMetadataFrameData, type CopilotModelTier, CopilotResource, type CopilotRunMode, type CopilotRunProposalFrameData, type CopilotRunProposalNode, type CopilotStreamFrame, type CopilotStreamOptions, type CopilotSurface, type CopilotThread, type CopilotThreadWorkflow, type CopilotToolCallFrameData, type CopilotWiredAsset, type CopilotWorkflowCreatedFrameData, type CopilotWorkflowUpdateFrameData, type CreateCopilotThreadInput, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateOrgInput, type CreateProjectInput, type CreateRecastInput, type CreateShotInput, type CreateWorkflowInput, type CreateWorkspaceInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, type CreatureVoice, CreaturesResource, type CreditStatus, CreditsResource, type DeleteAppRunResult, type DeleteJobResult, type DeveloperApp, type DeveloperAppKind, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DroppedCollaborator, type DubbingInput, type DuplicateCharacterInput, type EditJobResult, type EditPlanInput, type EditPlanSource, EditResource, type EditScene3DParams, type EnhanceInput, type EstimateRecastInput, type EstimateRecastRescoreInput, 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 GenerateLocationMotionInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateScene3DParams, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetCharacterOptions, type GetPickerCatalogOptions, type GetProductionOptions, InsufficientCreditsError, type InviteInput, type Job, JobAbortedError, JobBlockedError, type JobErrorHint, JobFailedError, JobHeldError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCharactersResult, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListInvitationsOptions, type ListJobsPage, type ListJobsParams, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListModelsOptions, type ListObjectsParams, type ListStudioProductionsOptions, type ListWorkflowsParams, LlmResource, type LlmStructuredInput, type LlmStructuredJobInput, type LlmStructuredJobOutput, type LlmStructuredResult, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, type MediaProcessInput, type MediaProcessResult, MediaResource, type ModelCostsResult, type ModelFamilyGroup, type ModelSummary, type ModelsListResult, ModelsResource, 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, OrganizationsResource, type OutputType, type OverlayPlacement, type PendingApproval, type PickerCatalog, type PickerCatalogSection, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, type PipelineRecord, type PipelineTimeline, PipelinesResource, type PolicyBlockHint, PresetsResource, type Pro3DRenderJobOutput, type Pro3DRenderParams, type Pro3DRenderQuote, type Pro3DRenderRunOptions, type Pro3DRenderRunParams, type Project, type ProjectedCatalog, type ProjectedCatalogDimension, type ProjectedCatalogOption, type ProjectedCatalogSection, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type RecastAudioLayerName, type RecastAudioManifestV1, type RecastAudioMix, type RecastAudioMixControl, type RecastAudioSectionReplacement, type RecastEstimate, type RecastRescoreOperation, type RecastRescoreQuote, type RecastRescoreReplacement, type RecastRescoreRequestV2, type RecastRescoreResponse, RecastResource, type RecastRunSnapshot, type RecastScriptImportResult, type RecastScriptValidation, type RecastScriptValidationError, type ReduceInput, ReduceResource, type ReduceResult, type ReferenceCaptionParams, type ReferencePhoto, type ReferencePhotoKind, type RenderFinalParams, type RenderFinalQuote, type RenderScene3DParams, type ResolveRecastGateInput, type RetainedScene3DEditParams, type RetainedScene3DEditResult, type RotateSecretResult, type RunAndWaitOptions, type RunAppOptions, type RunManyResult, type RunNodeAdjustment, type RunNodeOptions, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, SCENE3D_DELIVERY_ASSET_USAGE, type SafetyBlockHint, SavedPostsResource, type Scene3DAuthoringEngine, type Scene3DCapabilities, type Scene3DDelivery, type Scene3DDeliveryAsset, type Scene3DDeliveryAssetKind, type Scene3DJobOutput, Scene3DResource, type SharedWorkflow, type Shot, type ShotEntityRef, type ShotMode, ShotsResource, type SilenceDetectInput, type SilenceRanges, type SocialSearchJobOutput, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, type StudioClientRequestId, type StudioCloneRequest, type StudioCreateProductionRequest, type StudioDescribeRequest, type StudioDocumentJson, type StudioEditInput, type StudioExportPlanOptions, type StudioExportPlanResponse, type StudioExportStep, type StudioFrameRequest, type StudioGenerateEstimate, type StudioGenerateOptions, type StudioGenerateRequest, type StudioGenerateResponse, type StudioGenerateResult, type StudioGenerationReply, type StudioImportSummary, type StudioJobStartedResponse, type StudioKeyframeAcceptanceInput, type StudioKeyframeGenerationInput, type StudioKeyframeRecord, type StudioListProductionsResponse, type StudioMediaResponse, type StudioMusicRequest, type StudioOpClass, StudioOpError, type StudioOpsDryRunReceipt, type StudioOpsDryRunResponse, type StudioOpsImpact, type StudioOpsReceipt, type StudioOpsRequest, type StudioOpsResponse, type StudioPlanIssue, StudioPreviewAppliedError, StudioPreviewUnavailable, type StudioProduction, type StudioProductionCapabilities, type StudioProductionDetail, type StudioProductionRecord, type StudioProductionReply, type StudioProductionResponse, StudioProductionsResource, type StudioReconcileResponse, StudioResource, type StudioRevoiceRequest, type StudioShotGenerationInput, type StudioSkillResponse, type StudioValidatePlanResponse, type StudioVideoLane, type StudioVoiceRequest, type Template, type TemplateBrowseCard, type TemplateSort, TemplatesResource, type TextToPickerParams, type TextToPickerResult, type TextToSpeechParams, type TextToVideoParams, type TranscribeJobOutput, type TranscribeWord, type TutorialCategory, type TutorialFlowItem, type TutorialVideoItem, TutorialsResource, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateShotInput, 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, VideoProResource, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, type WorkflowConflictCode, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, isStudioGenerateEstimate, supabaseAuth, throwFromResponse };
|
|
9269
|
+
export { type AccessTokenResponse, type AddCaptionsInput, type AddCollaboratorInput, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApplyEdlInput, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, type AssembleNarratedVideoParams, AudioResource, type AudioSyncInput, type AudioSyncOffset, type AudioSyncResult, type AudioSyncSource, type Auth, type BranchPipelineInput, type BranchPipelineResult, type BrowseTemplatesParams, type BrowseTemplatesResult, CREATURE_ASSET_TYPES, CallbackAuth, type CameraSwitchInput, type CancelExecutionParams, type CancelJobResult, type CaptionEntry, type CaptionLookInput, type CaptionSegmentInput, type CatalogsListResponse, CatalogsResource, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, type CloneTemplateParams, type CloneTemplateResult, type Collaborator, CollectionsResource, CommunityResource, CompetitorsResource, type ContinueVideoProResult, type CopilotMemorySavedFrameData, type CopilotMessage, type CopilotMessagePart, type CopilotMetadataFrameData, type CopilotModelTier, CopilotResource, type CopilotRunMode, type CopilotRunProposalFrameData, type CopilotRunProposalNode, type CopilotStreamFrame, type CopilotStreamOptions, type CopilotSurface, type CopilotThread, type CopilotThreadWorkflow, type CopilotToolCallFrameData, type CopilotWiredAsset, type CopilotWorkflowCreatedFrameData, type CopilotWorkflowUpdateFrameData, type CreateCopilotThreadInput, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateOrgInput, type CreateProjectInput, type CreateRecastInput, type CreateShotInput, type CreateWorkflowInput, type CreateWorkspaceInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, type CreatureVoice, CreaturesResource, type CreditStatus, CreditsResource, type DeleteAppRunResult, type DeleteJobResult, type DeveloperApp, type DeveloperAppKind, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DroppedCollaborator, type DubbingInput, type DuplicateCharacterInput, type EditJobResult, type EditPlanInput, type EditPlanSource, EditResource, type EditScene3DParams, type EnhanceInput, type EstimateRecastInput, type EstimateRecastRescoreInput, 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 GenerateLocationMotionInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateScene3DParams, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetCharacterOptions, type GetPickerCatalogOptions, type GetProductionOptions, InsufficientCreditsError, type InviteInput, type Job, JobAbortedError, JobBlockedError, type JobErrorHint, JobFailedError, JobHeldError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCharactersResult, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListInvitationsOptions, type ListJobsPage, type ListJobsParams, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListModelsOptions, type ListObjectsParams, type ListStudioProductionsOptions, type ListWorkflowsParams, LlmResource, type LlmStructuredInput, type LlmStructuredJobInput, type LlmStructuredJobOutput, type LlmStructuredResult, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, type MediaProcessInput, type MediaProcessResult, MediaResource, type ModelCostsResult, type ModelFamilyGroup, type ModelSummary, type ModelsListResult, ModelsResource, 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, OrganizationsResource, type OutputType, type OverlayPlacement, type PendingApproval, type PickerCatalog, type PickerCatalogSection, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, type PipelineRecord, type PipelineTimeline, PipelinesResource, type PolicyBlockHint, PresetsResource, type Pro3DRenderJobOutput, type Pro3DRenderParams, type Pro3DRenderQuote, type Pro3DRenderRunOptions, type Pro3DRenderRunParams, type Project, type ProjectedCatalog, type ProjectedCatalogDimension, type ProjectedCatalogOption, type ProjectedCatalogSection, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type RecastAudioLayerName, type RecastAudioManifestV1, type RecastAudioMix, type RecastAudioMixControl, type RecastAudioSectionReplacement, type RecastEstimate, type RecastRescoreOperation, type RecastRescoreQuote, type RecastRescoreReplacement, type RecastRescoreRequestV2, type RecastRescoreResponse, RecastResource, type RecastRunSnapshot, type RecastScriptImportResult, type RecastScriptValidation, type RecastScriptValidationError, type ReduceInput, ReduceResource, type ReduceResult, type ReferenceCaptionParams, type ReferencePhoto, type ReferencePhotoKind, type RenderFinalParams, type RenderFinalQuote, type RenderScene3DParams, type ResolveRecastGateInput, type RetainedScene3DEditParams, type RetainedScene3DEditResult, type RotateSecretResult, type RunAndWaitOptions, type RunAppOptions, type RunManyResult, type RunNodeAdjustment, type RunNodeOptions, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, SCENE3D_DELIVERY_ASSET_USAGE, type SafetyBlockHint, SavedPostsResource, type Scene3DAuthoringEngine, type Scene3DCapabilities, type Scene3DDelivery, type Scene3DDeliveryAsset, type Scene3DDeliveryAssetKind, type Scene3DJobOutput, Scene3DResource, type SharedWorkflow, type Shot, type ShotEntityRef, type ShotMode, ShotsResource, type SignupGrantClaimResult, type SignupKeys, type SilenceDetectInput, type SilenceRanges, type SocialSearchJobOutput, type SplitMediaInput, type SplitMediaOutput, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, type StudioClientRequestId, type StudioCloneRequest, type StudioCreateProductionRequest, type StudioDescribeRequest, type StudioDocumentJson, type StudioEditInput, type StudioExportPlanOptions, type StudioExportPlanResponse, type StudioExportStep, type StudioFrameRequest, type StudioGenerateEstimate, type StudioGenerateOptions, type StudioGenerateRequest, type StudioGenerateResponse, type StudioGenerateResult, type StudioGenerationReply, type StudioImportSummary, type StudioJobStartedResponse, type StudioKeyframeAcceptanceInput, type StudioKeyframeGenerationInput, type StudioKeyframeRecord, type StudioListProductionsResponse, type StudioMediaResponse, type StudioMusicRequest, type StudioOpClass, StudioOpError, type StudioOpsDryRunReceipt, type StudioOpsDryRunResponse, type StudioOpsImpact, type StudioOpsReceipt, type StudioOpsRequest, type StudioOpsResponse, type StudioPlanIssue, StudioPreviewAppliedError, StudioPreviewUnavailable, type StudioProduction, type StudioProductionCapabilities, type StudioProductionDetail, type StudioProductionRecord, type StudioProductionReply, type StudioProductionResponse, StudioProductionsResource, type StudioReconcileResponse, StudioResource, type StudioRevoiceRequest, type StudioShotGenerationInput, type StudioSkillResponse, type StudioValidatePlanResponse, type StudioVideoLane, type StudioVoiceRequest, type Template, type TemplateBrowseCard, type TemplateSort, TemplatesResource, type TextToPickerParams, type TextToPickerResult, type TextToSpeechParams, type TextToVideoParams, type TranscribeJobOutput, type TranscribeWord, type TutorialCategory, type TutorialFlowItem, type TutorialVideoItem, TutorialsResource, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateShotInput, 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 VideoDepthParams, type VideoMetadata, VideoProResource, type VideoUpscaleParams, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, type WorkflowConflictCode, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, isStudioGenerateEstimate, supabaseAuth, throwFromResponse };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SCENE3D_V2_LIMITS, resolveEditPlanSources, describeAudioSyncOffsetIssue, transcriptSpeakerLabels, remapTranscriptThroughEdl, WORKSPACE_HEADER } from '@nodaro/shared';
|
|
1
|
+
import { nodeRunRoute, NODE_TYPES_WITHOUT_RUN_ROUTE, SOCIAL_POST_NODE_PLATFORM, NODE_RUN_ROUTES, SCENE3D_V2_LIMITS, resolveEditPlanSources, describeAudioSyncOffsetIssue, transcriptSpeakerLabels, remapTranscriptThroughEdl, WORKSPACE_HEADER } from '@nodaro/shared';
|
|
2
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, RECAST_SEGMENT_PACKS, SURROUND_DIRECTIONS, USAGE_GROUP_BYS, WORKSPACE_HEADER, nodeStateMayCarryOutput, unwrapEditPlanOutput } from '@nodaro/shared';
|
|
3
3
|
import { buildPersonHints } from '@nodaro/prompts';
|
|
4
4
|
export { PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, buildPersonHints } from '@nodaro/prompts';
|
|
@@ -189,7 +189,7 @@ function throwFromResponse(status, body) {
|
|
|
189
189
|
throw new ForbiddenError(message, body.error?.missingScope);
|
|
190
190
|
}
|
|
191
191
|
if (status === 403) throw new ForbiddenError(message);
|
|
192
|
-
if (status === 404) throw new NotFoundError(message);
|
|
192
|
+
if (status === 404) throw new NotFoundError(body.error?.message ?? (typeof body.message === "string" ? body.message : void 0));
|
|
193
193
|
if (status === 429) throw new RateLimitedError(message);
|
|
194
194
|
if (status === 402) {
|
|
195
195
|
throw new InsufficientCreditsError(message, body.error?.required, body.error?.available);
|
|
@@ -539,8 +539,6 @@ var ExecutionsResource = class {
|
|
|
539
539
|
);
|
|
540
540
|
}
|
|
541
541
|
};
|
|
542
|
-
|
|
543
|
-
// src/resources/nodes.ts
|
|
544
542
|
var DEFAULT_POLL_MS = 2e3;
|
|
545
543
|
var DEFAULT_MAX_MS = 15 * 60 * 1e3;
|
|
546
544
|
var sleep = (ms, signal) => new Promise((resolve, reject) => {
|
|
@@ -558,6 +556,10 @@ var sleep = (ms, signal) => new Promise((resolve, reject) => {
|
|
|
558
556
|
}
|
|
559
557
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
560
558
|
});
|
|
559
|
+
function notRunnable(type, why) {
|
|
560
|
+
return new NodaroError(`Node type "${type}" has no route of its own to run it directly: ${why}.`, "node_not_runnable", 0);
|
|
561
|
+
}
|
|
562
|
+
var isRouteNotFound = (err) => err instanceof NotFoundError && /^Route\b.*\bnot found\b/i.test(err.message);
|
|
561
563
|
function extractJobId(result, label) {
|
|
562
564
|
if (result && typeof result === "object" && "jobId" in result) {
|
|
563
565
|
const jobId = result.jobId;
|
|
@@ -579,13 +581,20 @@ var NodesResource = class {
|
|
|
579
581
|
return this.client.request("GET", `/v1/nodes/${encodeURIComponent(type)}`);
|
|
580
582
|
}
|
|
581
583
|
run(type, params = {}, options = {}) {
|
|
582
|
-
const route = type === "
|
|
584
|
+
const route = type === "render-video" && typeof params.planType === "string" ? "/v1/render-video/plan" : nodeRunRoute(type);
|
|
585
|
+
if (!route) return Promise.reject(notRunnable(type, NODE_TYPES_WITHOUT_RUN_ROUTE[type]));
|
|
586
|
+
const platform = SOCIAL_POST_NODE_PLATFORM[type];
|
|
587
|
+
const body = platform && params.platform === void 0 ? { ...params, platform } : params;
|
|
588
|
+
const conventional = !Object.prototype.hasOwnProperty.call(NODE_RUN_ROUTES, type);
|
|
583
589
|
return this.client.request("POST", route, {
|
|
584
|
-
body
|
|
590
|
+
body,
|
|
585
591
|
// Transport-level retry safety, opt-in per call. The platform reads the
|
|
586
592
|
// standard header, so a caller that reuses a key on a retry gets the
|
|
587
593
|
// same run back instead of a second charge.
|
|
588
594
|
...options.idempotencyKey ? { headers: { "Idempotency-Key": options.idempotencyKey } } : {}
|
|
595
|
+
}).catch((err) => {
|
|
596
|
+
if (conventional && isRouteNotFound(err)) throw notRunnable(type, "it runs only inside a workflow (client.workflows.run)");
|
|
597
|
+
throw err;
|
|
589
598
|
});
|
|
590
599
|
}
|
|
591
600
|
async runAndWait(type, params = {}, opts = {}) {
|
|
@@ -2386,6 +2395,20 @@ var MediaResource = class {
|
|
|
2386
2395
|
trimAudio(input) {
|
|
2387
2396
|
return this.client.request("POST", "/v1/trim-audio", { body: input });
|
|
2388
2397
|
}
|
|
2398
|
+
/**
|
|
2399
|
+
* Cut a video and/or an audio file into consecutive parts
|
|
2400
|
+
* (`POST /v1/split-media`). Every part is at most `chunkDuration` seconds and
|
|
2401
|
+
* at least `minPartDuration` (default 4, never above `chunkDuration`) — a
|
|
2402
|
+
* short leftover is evened out with the parts before it. Video is cut on
|
|
2403
|
+
* whole frames with each part's sound matching its picture; audio parts are
|
|
2404
|
+
* sample-exact, in `audioFormat` (`mp3` default / `wav` / `aac`). With both
|
|
2405
|
+
* sources each is split on its own. At most 200 parts per input. Poll
|
|
2406
|
+
* `jobs.get(jobId)`; the parts are on the completed job's `output_data` —
|
|
2407
|
+
* see {@link SplitMediaOutput}.
|
|
2408
|
+
*/
|
|
2409
|
+
splitMedia(input) {
|
|
2410
|
+
return this.client.request("POST", "/v1/split-media", { body: input });
|
|
2411
|
+
}
|
|
2389
2412
|
/**
|
|
2390
2413
|
* Turn one still image + one audio track into an MP4
|
|
2391
2414
|
* (`POST /v1/still-to-video`) — locally rendered (FFmpeg), no AI model,
|
|
@@ -2601,6 +2624,23 @@ var CreditsResource = class {
|
|
|
2601
2624
|
body: { models: ids.slice(0, MODEL_COSTS_LIMIT) }
|
|
2602
2625
|
});
|
|
2603
2626
|
}
|
|
2627
|
+
/**
|
|
2628
|
+
* `POST /v1/credits/claim-signup-grant` → claims the account's free signup
|
|
2629
|
+
* grant, once, with the browser signals of the page making the claim.
|
|
2630
|
+
*
|
|
2631
|
+
* Call it once per page load as soon as the session is known, and never
|
|
2632
|
+
* wait on it for rendering: it is idempotent (a decided account answers
|
|
2633
|
+
* with its state and `granted: false`), it costs the user nothing when it
|
|
2634
|
+
* fails (the next load asks again), and the signals are what make the
|
|
2635
|
+
* claim worth sending — collect them with `collectSignupKeys()` from
|
|
2636
|
+
* `@nodaro/sdk/signup-signals` and pass whatever came back, `{}` included.
|
|
2637
|
+
* Cloud-only route: a self-hosted instance answers 404.
|
|
2638
|
+
*/
|
|
2639
|
+
claimSignupGrant(keys = {}) {
|
|
2640
|
+
return this.client.request("POST", "/v1/credits/claim-signup-grant", {
|
|
2641
|
+
body: keys
|
|
2642
|
+
});
|
|
2643
|
+
}
|
|
2604
2644
|
// NOTE: no `estimate(...)` helper. The backend exposes
|
|
2605
2645
|
// `POST /v1/credits/estimate-workflow` (body `{ nodes }` → `{ data: {
|
|
2606
2646
|
// totalCredits, nodeCount } }`), but no consumer has a settled shape for it
|
|
@@ -4054,7 +4094,7 @@ var EditResource = class {
|
|
|
4054
4094
|
return remapTranscriptThroughEdl(edl, transcript);
|
|
4055
4095
|
}
|
|
4056
4096
|
};
|
|
4057
|
-
var SDK_VERSION = "2.
|
|
4097
|
+
var SDK_VERSION = "2.26.0" ;
|
|
4058
4098
|
var CLIENT_HEADER = "X-Nodaro-Client";
|
|
4059
4099
|
var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
4060
4100
|
var NodaroClient = class _NodaroClient {
|