Types
Every TypeScript type, helper function and constant that @nodaro/sdk exports, grouped by resource, with the page that documents each one.
@nodaro/sdk exports a TypeScript type for most methods' inputs and outputs, plus a few helper functions and constants. Import types with import type, so they add nothing to your bundle:
import type { Workflow, Job, NodeJobOutput, WorkflowExecution } from "@nodaro/sdk"
const { data }: { data: Workflow } = await client.workflows.get(id)Types follow the wire format of the API. A Job uses snake_case fields, such as output_data and created_at, because the API sends them that way. A Workflow and a WorkflowExecution use camelCase. Object, the object type, shares its name with the JavaScript global, so import it under another name when you need both: import type { Object as NodaroObject } from "@nodaro/sdk".
Some types that the methods use are not exported. A type defined in @nodaro/shared, such as PipelineInput or CommunityFullDetail, is imported from there. Add @nodaro/shared to your own dependencies at the version range the SDK uses, so that only one copy is installed. Derive any other type, such as PipelineRecord, from the method that returns it:
import type { NodaroClient } from "@nodaro/sdk"
import type { PipelineInput, CommunityFullDetail } from "@nodaro/shared"
type PipelineRecord = Awaited<ReturnType<NodaroClient["pipelines"]["get"]>>Client, auth and errors
| Export | Kind | Documented in |
|---|---|---|
createClient, NodaroClient | Function, class | Client |
ClientOptions, UserIdentity, MeOrganizations, ConnectedApp | Types | Client |
Auth, StaticTokenAuth, CallbackAuth, supabaseAuth | Type, classes, function | Authentication |
createSharedSupabaseClient | Function, from @nodaro/sdk/supabase | Authentication |
NodaroError, UnauthorizedError, ForbiddenError, ModelUnavailableError, NotFoundError, RateLimitedError, InsufficientCreditsError, StorageExceededError, WorkflowConflictError, JobBlockedError, JobFailedError, JobTimeoutError, JobAbortedError, JobHeldError, StudioOpError, StudioPreviewUnavailable, StudioPreviewAppliedError | Classes | Errors |
WorkflowConflictCode, throwFromResponse | Type, function | Errors |
Workflows, runs and nodes
| Export | Documented in |
|---|---|
Workflow, ListWorkflowsParams, CreateWorkflowInput, UpdateWorkflowInput, RunWorkflowParams, RunWorkflowResult, RenderFinalParams, RenderFinalQuote | Workflows and projects |
Project, CreateProjectInput, UpdateProjectInput | Workflows and projects |
GenerationSession, SessionItem, SessionPage, CreateSessionInput, UpdateSessionInput, ListSessionsParams, ListSessionItemsParams, GenerationSessionParams | Workflows and projects |
GenericNode, GenericEdge, WorkflowExport, WorkflowExportCharacter, WorkflowExportObject, WorkflowExportLocation | Workflows and projects |
Job, JobStatus, JobStatusResult, JobErrorHint, SafetyBlockHint, PolicyBlockHint, CreditStatus, CancelJobResult, DeleteJobResult, ListJobsParams, ListJobsPage, JobRating, JobRatingFilter, RateJobResult | Jobs and executions |
WebhookEndpoint, CreateWebhookEndpointInput, UpdateWebhookEndpointInput, CreatedWebhookEndpoint, RotateWebhookSecretInput, RotatedWebhookSecret, WebhookDelivery, WebhookDeliveryPage, ListWebhookDeliveriesParams, WebhookJobEvent, WebhookEventType, WebhookDeliveryStatus, WebhookEvent, JobWebhookEvent, PingWebhookEvent, WebhookSignatureError, VerifyWebhookSignatureOptions, WebhookSignatureErrorCode | Jobs and executions |
WorkflowExecution, WorkflowExecutionSummary, NodeExecutionState, NodeExecutionStatus, ExecutionStatus, ExecutionOutcome, ExecutionTriggerType, ListExecutionsForWorkflowParams, ListExecutionsPage, CancelExecutionParams | Jobs and executions |
StopVideoProResult, ContinueVideoProResult | Jobs and executions |
NodeDescriptor, NodeCategory, OutputType, NodeInputField, NodeInputSchema | Run nodes |
RunNodeResult, RunNodeAdjustment, RunNodeWarning, NodeJobOutput, JobOutputImage, RunAndWaitOptions, RunManyResult, GenerateImageBatchResult, GenerateImageBatchOutput, BatchJobOutcome | Run nodes |
GenerateImageParams, GenerateVideoParams, TextToVideoParams, StructuredReferenceParams, ConnectedReference, DescribedReference, ImageOutputFormat, ImageSvgLevel | Run nodes |
PromptAffixFields | The node-data fields for pre and post text: promptPrefix and promptSuffix |
PublishedApp, PublishedAppDetail, ListAppsParams, ListAppsResult, AppRunResult, RunAppOptions, AppRun, ListAppRunsParams, DeleteAppRunResult | Apps and templates |
Template, TemplateBrowseCard, TemplateSort, BrowseTemplatesParams, BrowseTemplatesResult, CloneTemplateParams, CloneTemplateResult | Apps and templates |
TutorialCategory, TutorialVideoItem, TutorialFlowItem | Apps and templates |
LlmStructuredInput, LlmStructuredResult, LlmStructuredJobInput, LlmStructuredJobOutput | LLM and Reduce |
ReduceStrategyId, ReduceMeta, ReduceInput, ReduceResult | LLM and Reduce |
Media, voices and editing
| Export | Documented in |
|---|---|
UploadResult, ImportUrlResult, LibraryAsset, ListLibraryParams, ListLibraryResult | Media and uploads |
GalleryItem, GalleryMediaType, BrowseGalleryParams, GalleryPage, ToggleFavoriteResult | Media and uploads |
VideoMetadata, DownloadVideoProgress, MediaProcessInput, MediaProcessResult, OverlayPlacement | Media and uploads |
AddCaptionsInput, CaptionLookInput, CaptionSegmentInput, CaptionEntry | Media and uploads |
Voice, SharedVoice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse | Voices and audio |
VoiceChangerProInput, VoiceChangerProVoice, VcpAnalyzeInput, VcpAnalysis, VcpAnalysisSpeaker, VcpExportInput, VcpExportTrack | Voices and audio |
VoiceDesignInput, VoiceRemixInput, DubbingInput, AudioFxPreset | Voices and audio |
TranscribeWord, TranscribeJobOutput, TranscribeProvider, TranscribeLane | Voices and audio |
EditJobResult, SilenceDetectInput, SilenceRanges, AudioSyncInput, AudioSyncSource, AudioSyncOffset, AudioSyncResult, ApplyEdlInput, EditPlanInput, EditPlanSource, EditPlanMode, EditPlanTier, Edl, EdlClipSet, ChapterSet, Transcript, TightenEpisodeInput, TightenEpisodeJobResult, TightenEpisodeEstimate, UseCaseRecordingsInput, UseCaseJobResult, UseCaseEstimate, EpisodeChaptersInput, EpisodeTrailerInput, TrailerFormat, ClipPackInput, SpeakerLayoutInput, SpeakerMapInput, SpeakerMapSource, SpeakerMapResult, CameraSwitchInput, EditPlanCapabilities, UseCaseContinueInput | Editing |
GenerateScene3DParams, EditScene3DParams, RenderScene3DParams, Scene3DJobOutput, Scene3DCapabilities, Scene3DAuthoringEngine, RetainedScene3DEditParams, RetainedScene3DEditResult, Scene3DDelivery, Scene3DDeliveryAsset, Scene3DDeliveryAssetKind | 3D scenes |
Assets
| Export | Documented in |
|---|---|
Character, CharacterDetail, CharacterUsage, ReferencePhoto, ReferencePhotoKind, UpsertCharacterInput, UpsertCharacterResult, ListCharactersParams, ListCharactersResult, DuplicateCharacterInput, GenerateCharacterInput, GenerateCharacterResult, GenerateAssetInput, GenerateMotionInput, ApprovePortraitResult, RecaptionResult, CharacterAspectRatio, EntityStyle, TrainCharacterInput, TrainCharacterResult, CharacterTrainingStatus, CharacterTrainingState, TrainCharacterRefusalCode | Characters |
Location, LocationDetail, LocationReferencePhoto, LocationReferencePhotoKind, CreateLocationInput, UpdateLocationInput, UpdateLocationResult, ListLocationsParams, GenerateLocationInput, GenerateLocationResult, GenerateLocationAssetInput, GenerateSurroundContinuationInput, ApproveMainImageResult, RecaptionLocationResult, LocationAssetType, LocationAttachColumn, SurroundDirection | Locations |
Object, ObjectDetail, ObjectCategory, ObjectReferencePhoto, ObjectReferencePhotoKind, CreateObjectInput, UpdateObjectInput, UpdateObjectResult, UpsertObjectInput, UpsertObjectResult, ListObjectsParams, GenerateObjectInput, GenerateObjectResult, GenerateObjectAssetInput, GenerateObjectAssetResult, GenerateObjectMotionInput, GenerateObjectMotionResult, ApproveObjectMainImageResult, RecaptionObjectResult, ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio | Objects and creatures |
Creature, CreatureDetail, CreatureReferencePhoto, CreatureReferencePhotoKind, CreateCreatureInput, UpdateCreatureInput, UpdateCreatureResult, UpsertCreatureInput, UpsertCreatureResult, ListCreaturesParams, GenerateCreatureInput, GenerateCreatureResult, GenerateCreatureAssetInput, GenerateCreatureAssetResult, GenerateCreatureMotionInput, GenerateCreatureMotionResult, ApproveCreatureMainImageResult, RecaptionCreatureResult, CreatureAssetType, CreatureAttachColumn, CreatureAspectRatio | Objects and creatures |
CommunityCard, CommunityEntityType, CommunitySort, CommunityReportReason, BrowseCommunityParams, BrowseCommunityResult, CloneListingResult, FavoriteListingResult, ReportListingResult | Community library |
Productions
| Export | Documented in |
|---|---|
StudioProduction, StudioProductionDetail, StudioSkillResponse, StudioValidatePlanResponse, StudioPlanIssue, StudioListProductionsResponse, ListStudioProductionsOptions, GetProductionOptions, StudioExportPlanOptions, StudioExportPlanResponse, StudioExportStep | Studio productions |
StudioCreateProductionRequest, StudioProductionResponse, StudioImportSummary, StudioClientRequestId, StudioOpsRequest, StudioOpsResponse, StudioOpsReceipt, StudioOpsImpact, StudioOpClass, StudioOpsDryRunReceipt, StudioOpsDryRunResponse, StudioReconcileResponse | Studio productions |
StudioGenerateRequest, StudioGenerateOptions, StudioGenerateResult, StudioGenerateEstimate, StudioGenerateResponse, StudioVideoLane, StudioDescribeRequest, StudioFrameRequest, StudioVoiceRequest, StudioRevoiceRequest, StudioMusicRequest, StudioMediaResponse, StudioJobStartedResponse, StudioCloneRequest | Studio productions |
StudioProductionCapabilities, StudioKeyframeRecord, StudioProductionRecord, StudioProductionReply, StudioEditInput, StudioKeyframeGenerationInput, StudioKeyframeAcceptanceInput, StudioShotGenerationInput, StudioGenerationReply, StudioDocumentJson | Studio productions |
Shot, ShotMode, ShotEntityRef, CreateShotInput, UpdateShotInput | Studio productions |
CreateRecastInput, EstimateRecastInput, RecastEstimate, RecastRunSnapshot, ResolveRecastGateInput, RecastScriptValidation, RecastScriptValidationError, RecastScriptImportResult | Recast |
RecastAudioManifestV1, RecastAudioLayerName, RecastAudioMix, RecastAudioMixControl, RecastAudioSectionReplacement, RecastRescoreReplacement, RecastRescoreOperation, EstimateRecastRescoreInput, RecastRescoreRequestV2, RecastRescoreQuote, RecastRescoreResponse | Recast |
PipelineStageName, BranchPipelineInput, BranchPipelineResult, ChatTurn, ChatStageResult, ApplyChatProposalResult | Pipelines |
CopilotThread, CopilotThreadWorkflow, CopilotSurface, CopilotRunMode, CopilotModelTier, CopilotMessage, CopilotMessagePart, CreateCopilotThreadInput, CopilotStreamOptions, CopilotStreamFrame and the frame data types | Copilot |
Account and catalogs
| Export | Documented in |
|---|---|
ModelSummary, ModelMaker, ModelsListResult, ListModelsOptions, UserBalance, ModelCostsResult, FreeGrantState, WelcomeOfferState, WelcomeOfferClaimInput, WelcomeOfferClaimResult, UsageSummary, UsageSummaryOptions, UsageSummaryBucket, UsageSummaryTotals, UsageByModel, UsageByCategory, UsageOverTime, UsageByGroup, CreditHistoryEntry, CreditHistoryJob, CreditHistoryKind, CreditHistoryPage, CreditHistoryFilters, CreditHistoryOptions | Models and credits |
BillingPlansResult, BillingPlan, BillingPlanPrices, BillingMoney, BillingMonthlyPrice, BillingYearlyPrice, BillingPriceCredits, BillingTopUp, BillingSubscriptionResult, BillingSubscription, BillingSurface, BillingAccountSummary, BillingUsageCategory, BillingPurchase, BillingDocument, BillingCard, BillingDetails, BillingPaymentMethod, BillingAutoRecharge, BillingAutoRechargeInput, BillingAutoRechargeSaved, BillingCheckoutInput, BillingCheckoutSession, BillingLoadInput, BillingLoadSession, BillingPortalInput, BillingPortalSession, BillingChangePlanInput, BillingChangePlanResult | Models and credits |
PickerCatalog, PickerCatalogSummary, PickerOption, PickerDimension, PickerCatalogSection, GetPickerCatalogOptions | Pickers, presets and prompts |
CatalogsListResponse, ProjectedCatalog, ProjectedCatalogOption, ProjectedCatalogDimension, ProjectedCatalogSection | Pickers, presets and prompts |
NodePreset, NodePresetGroup, FactoryPresetsResult, FactoryPresetEntry, CreateNodePresetInput, UpdateNodePresetInput, ImportNodePresetInput, ReorderNodePresetsInput | Pickers, presets and prompts |
ColorPalette, PalettePage, ListPalettesParams, CreatePaletteInput, UpdatePaletteInput, Moodboard, MoodboardPage, ListMoodboardsParams, CreateMoodboardInput, UpdateMoodboardInput, DirectionFields | Pickers, presets and prompts |
AnalyzeInput, AnalyzeResult, GenerateInput, EnhanceInput, PromptResult, WizardQuestion, WizardOption, WizardSelection, RecommendedModel, WizardNodeContext | Pickers, presets and prompts |
OrganizationView, OrganizationSummary, OrgMemberView, OrgKind, OrgRole, OrgStatus, OrgSettings, OrgAuditEntry, OrgPage, OrgErrorCode, MemberStatus, CreateOrgInput, InviteInput, ListInvitationsOptions | Organizations and workspaces |
InvitationView, InvitationDelivery, InvitationPreview, InvitationState, JoinCodeView | Organizations and workspaces |
WorkspaceView, WorkspaceSummary, WorkspaceMemberView, WorkspaceRole, WorkspaceSettings, CreateWorkspaceInput | Organizations and workspaces |
UsageQuery, UsageGroupBy, UsageReport, UsageReportRow, UsageReportTotals, UsageVarianceRow, UsageLogEntry | Organizations and workspaces |
DeveloperApp, DeveloperAppScope, DeveloperAppStatus, DeveloperAppKind, CreateDeveloperAppInput, UpdateDeveloperAppInput, CreateDeveloperAppResult, RotateSecretResult | OAuth and developer apps |
ExchangeCodeInput, AccessTokenResponse, OAuthAppInfo | OAuth and developer apps |
Helper functions and constants
These are values, not types, so import them without type.
| Export | What it is |
|---|---|
nodeStateMayCarryOutput(status), OUTPUT_BEARING_NODE_STATUSES | Whether a node state can carry output: completed and failed. See Jobs and executions. |
executionOutcome(status, nodeStates), countEmptyInputSkips(nodeStates) | Whether a completed run found nothing new, and how many nodes it skipped for lack of input. See Jobs and executions. |
isStudioGenerateEstimate(result) | Tells a generation quote from a started run. See Studio productions. |
unwrapEditPlanOutput(outputData) | Reads an edit plan job's output as an EDL, a list of EDLs or chapters. See Editing. |
verifyWebhookSignature(options) | Checks the signature of a webhook call and returns the event. See Jobs and executions. |
paletteDirectionId(id), moodboardDirectionId(id), PALETTE_DIRECTION_PREFIX, MOODBOARD_DIRECTION_PREFIX | Build the direction values of a palette or a moodboard. See Pickers, presets and prompts. |
throwFromResponse(status, body) | Throws the error class that matches an API answer. See Errors. |
PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY | The node-data keys of pre and post text. |
WORKSPACE_HEADER | The name of the workspace header, X-Nodaro-Workspace. |
USAGE_GROUP_BYS | The groupings a usage report accepts. |
LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, SURROUND_DIRECTIONS | The allowed location variant types, collections and surround directions. |
OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, OBJECT_ASPECT_OPTIONS, OBJECT_ASPECT_DEFAULTS | The allowed object variant types, collections and aspect ratios. |
CREATURE_ASSET_TYPES, CREATURE_ATTACH_COLUMNS, CREATURE_ASPECT_OPTIONS, CREATURE_ASPECT_DEFAULTS | The same lists for creatures. |
CHARACTER_STYLES, CHARACTER_ASPECT_OPTIONS, CHARACTER_ASPECT_DEFAULTS | The character styles and aspect ratios. |
SCENE3D_DELIVERY_ASSET_USAGE | The allowed pairs of delivery file kind and usage. |
Every resource class, such as WorkflowsResource or NodesResource, is exported too, for advanced typing. You rarely need them: createClient builds every resource for you.
Frequently asked questions
How do I import a type from the Nodaro SDK?
Use import type with the type's name, for example import type { Workflow, Job } from @nodaro/sdk. Some types that methods use are not exported: import them from @nodaro/shared, or derive them from the method.
Why do some fields use snake_case and others camelCase?
Types follow the API's wire format. A Job uses snake_case, such as output_data and created_at, because the API sends it that way. A Workflow and a WorkflowExecution use camelCase.
Do I need @nodaro/shared as well?
Usually not. The SDK re-exports most of the shared types its methods use, such as the organization and editing types. A few helpers, such as the 3D review helpers and toConnectedReference, and a few types, such as PipelineInput and CommunityFullDetail, are imported from @nodaro/shared directly.
Related
TypeScript SDK
Client
Errors
Run nodes
Last updated on
OAuth and developer apps
Register and manage your Nodaro OAuth apps with client.developerApps, and exchange codes, revoke tokens and read consent-screen data with client.oauth.
CLI
Install the Nodaro CLI with npm or as a standalone binary, sign in once per instance, and run workflows, apps and single nodes from a terminal or a CI job.