@nodaro/sdk 2.27.0 → 2.28.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.cts CHANGED
@@ -545,6 +545,9 @@ interface Job {
545
545
  */
546
546
  source?: string | null;
547
547
  source_detail?: string | null;
548
+ /** The generation session this job was born in (the `sessionId` sent with
549
+ * the generation request), or null. See `client.sessions`. */
550
+ session_id?: string | null;
548
551
  }
549
552
  interface CancelJobResult {
550
553
  success: true;
@@ -628,6 +631,116 @@ declare class JobsResource {
628
631
  delete(id: string): Promise<DeleteJobResult>;
629
632
  }
630
633
 
634
+ /**
635
+ * A generation session: one run of work in a creation tool (Create Image,
636
+ * Video, Music), optionally inside a project. Its project is fixed at
637
+ * creation — to get an item into another project, import it into a session
638
+ * there.
639
+ */
640
+ interface GenerationSession {
641
+ id: string;
642
+ /** Null when the session has no project, or its project was deleted. */
643
+ projectId: string | null;
644
+ /** Null = untitled; a UI may fall back to the first prompt. */
645
+ title: string | null;
646
+ /** The creation tool that owns the session, e.g. `"create-image"`. */
647
+ tool: string;
648
+ createdAt: string;
649
+ /** The latest activity: an item added, or an edit. */
650
+ updatedAt: string;
651
+ archivedAt: string | null;
652
+ itemCount: number;
653
+ /** Up to four image links of the newest completed items. */
654
+ previewUrls: string[];
655
+ }
656
+ interface CreateSessionInput {
657
+ /** One of your projects (on the side of the workspace line you are on). */
658
+ projectId?: string;
659
+ title?: string;
660
+ /** Lowercase letters, digits and dashes, at most 40 — e.g. `"create-image"`. */
661
+ tool: string;
662
+ }
663
+ interface UpdateSessionInput {
664
+ /** `null` makes the session untitled again. */
665
+ title?: string | null;
666
+ archived?: boolean;
667
+ }
668
+ interface ListSessionsParams {
669
+ projectId?: string;
670
+ tool?: string;
671
+ /** Archived sessions are left out unless this is true. */
672
+ includeArchived?: boolean;
673
+ /** Page size, 1–100 (server default 50). */
674
+ limit?: number;
675
+ /** The previous page's `next`. */
676
+ cursor?: string;
677
+ }
678
+ /** One item of a session's feed: a link to one of your jobs. */
679
+ interface SessionItem {
680
+ jobId: string;
681
+ addedAt: string;
682
+ /** True when imported from elsewhere rather than born in this session. */
683
+ imported: boolean;
684
+ importedFrom: {
685
+ sessionId: string;
686
+ title: string | null;
687
+ } | null;
688
+ job: Job;
689
+ }
690
+ interface ListSessionItemsParams {
691
+ limit?: number;
692
+ cursor?: string;
693
+ }
694
+ interface SessionPage<T> {
695
+ data: T[];
696
+ /** Pass back as `cursor` for the next page; `null` on the last one. */
697
+ next: string | null;
698
+ }
699
+ declare class SessionsResource {
700
+ private client;
701
+ constructor(client: NodaroClient);
702
+ /**
703
+ * Create a session. Send its `id` as `sessionId` on a generation request
704
+ * (`nodes.run("generate-image", { sessionId, … })`, video, speech, music) and
705
+ * the job is born in it.
706
+ */
707
+ create(input: CreateSessionInput): Promise<{
708
+ data: GenerationSession;
709
+ }>;
710
+ /** Your sessions, newest first. */
711
+ list(params?: ListSessionsParams): Promise<SessionPage<GenerationSession>>;
712
+ get(id: string): Promise<{
713
+ data: GenerationSession;
714
+ }>;
715
+ /** Rename or archive a session. Its project cannot change. */
716
+ update(id: string, input: UpdateSessionInput): Promise<{
717
+ data: GenerationSession;
718
+ }>;
719
+ /** Delete a session and its links. Its jobs are kept, and stay in every other session holding them. */
720
+ delete(id: string): Promise<{
721
+ success: true;
722
+ }>;
723
+ /** The session's items, born-in and imported, newest first. */
724
+ items(id: string, params?: ListSessionItemsParams): Promise<SessionPage<SessionItem>>;
725
+ /**
726
+ * Import some of your own jobs into a session — a link, not a copy (up to 100
727
+ * a call). All-or-nothing: if any id is not one of your jobs, nothing is
728
+ * imported and the call fails with 404. Items already there are left as they are.
729
+ */
730
+ importItems(id: string, input: {
731
+ jobIds: string[];
732
+ }): Promise<{
733
+ data: {
734
+ imported: number;
735
+ requested: number;
736
+ };
737
+ }>;
738
+ /** Remove one item from a session. Only the link goes: the job, and every other session holding it, stay. */
739
+ removeItem(id: string, jobId: string): Promise<{
740
+ success: true;
741
+ }>;
742
+ }
743
+
631
744
  /**
632
745
  * Generate Video Pro control surface (Cloud edition) — the checkpointed
633
746
  * long-video engine's stop/continue operations. The generation itself is
@@ -1172,7 +1285,7 @@ interface ReferenceCaptionParams {
1172
1285
  * Typed request body for `nodes.run("text-to-speech", …)` / `runAndWait`.
1173
1286
  * Common fields are typed; any other route field passes through.
1174
1287
  */
1175
- interface TextToSpeechParams {
1288
+ interface TextToSpeechParams extends GenerationSessionParams {
1176
1289
  text: string;
1177
1290
  /** A premade voice NAME (Rachel, George, …) or a library / custom voice id. */
1178
1291
  voice?: string;
@@ -1194,13 +1307,28 @@ interface TextToSpeechParams {
1194
1307
  nextText?: string;
1195
1308
  [k: string]: unknown;
1196
1309
  }
1310
+ /**
1311
+ * Fields every generation request accepts beside its own params.
1312
+ */
1313
+ interface GenerationSessionParams {
1314
+ /** A session from `client.sessions.create()` — the job is born in it and
1315
+ * shows in its feed. Must be one of yours (404 otherwise). */
1316
+ sessionId?: string;
1317
+ /** Your app's slug (`create-image`, …): stored on the job, and what
1318
+ * `jobs.list({ origin })` filters on. Lowercase letters, digits, dashes. */
1319
+ origin?: string;
1320
+ }
1197
1321
  /**
1198
1322
  * Typed request body for `nodes.run("generate-image", …)` / `runAndWait`.
1199
1323
  * Common fields are typed; any other route field passes through via the index
1200
1324
  * signature (the route Zod-validates the full body).
1201
1325
  */
1202
- interface GenerateImageParams extends StructuredReferenceParams {
1326
+ interface GenerateImageParams extends StructuredReferenceParams, GenerationSessionParams {
1203
1327
  prompt?: string;
1328
+ /** Pre & post text wrapped around `prompt` (a preset's words), joined the
1329
+ * same way every AI prompt node joins them. */
1330
+ promptPrefix?: string;
1331
+ promptSuffix?: string;
1204
1332
  provider?: string;
1205
1333
  /** Flat reference image URLs — appended after `connectedReferences`. */
1206
1334
  referenceImageUrls?: string[];
@@ -1211,7 +1339,7 @@ interface GenerateImageParams extends StructuredReferenceParams {
1211
1339
  * Typed request body for `nodes.run("generate-video", …)` / `runAndWait`.
1212
1340
  * Common fields are typed; any other route field passes through.
1213
1341
  */
1214
- interface GenerateVideoParams extends StructuredReferenceParams, ReferenceCaptionParams {
1342
+ interface GenerateVideoParams extends StructuredReferenceParams, ReferenceCaptionParams, GenerationSessionParams {
1215
1343
  prompt?: string;
1216
1344
  provider?: string;
1217
1345
  /** Start-frame image (image-to-video). */
@@ -1262,7 +1390,7 @@ interface GenerateVideoParams extends StructuredReferenceParams, ReferenceCaptio
1262
1390
  *
1263
1391
  * Common fields are typed; any other route field passes through.
1264
1392
  */
1265
- interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionParams {
1393
+ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionParams, GenerationSessionParams {
1266
1394
  prompt: string;
1267
1395
  provider?: string;
1268
1396
  duration?: number;
@@ -1863,6 +1991,17 @@ interface PublishedApp {
1863
1991
  * item. 0 or absent when the app has no such input.
1864
1992
  */
1865
1993
  perItemCredits?: number;
1994
+ /**
1995
+ * The listed price is a range: `estimatedCredits` (with `perMinuteCredits` /
1996
+ * `perItemCredits`) is "from" — the app's saved settings — and these are
1997
+ * "up to": the most a run can cost over the choices the app's user has (every
1998
+ * exposed field, at the creator's restricted values where set). Present only
1999
+ * when they differ from "from"; absent on an app published before the range
2000
+ * existed until its next publish.
2001
+ */
2002
+ maxEstimatedCredits?: number;
2003
+ maxPerMinuteCredits?: number;
2004
+ maxPerItemCredits?: number;
1866
2005
  createdAt: string;
1867
2006
  updatedAt: string;
1868
2007
  }
@@ -8234,6 +8373,13 @@ interface TemplateBrowseCard {
8234
8373
  * 0 or absent when the price does not depend on a recording's length.
8235
8374
  */
8236
8375
  estimatedPerMinuteCredits?: number;
8376
+ /**
8377
+ * The listed price is a range: `estimatedCredits` / `estimatedPerMinuteCredits`
8378
+ * are "from" (the saved settings), these "up to" — the most a run can cost over
8379
+ * the template's exposed fields. Present only when they differ from "from".
8380
+ */
8381
+ maxEstimatedCredits?: number;
8382
+ maxEstimatedPerMinuteCredits?: number;
8237
8383
  category: string;
8238
8384
  outputTypes: string[];
8239
8385
  tags: string[];
@@ -9163,6 +9309,8 @@ declare class NodaroClient {
9163
9309
  get fetch(): typeof fetch;
9164
9310
  readonly workflows: WorkflowsResource;
9165
9311
  readonly projects: ProjectsResource;
9312
+ /** Generation sessions inside projects (Create Image / Video / Music). */
9313
+ readonly sessions: SessionsResource;
9166
9314
  readonly jobs: JobsResource;
9167
9315
  readonly videoPro: VideoProResource;
9168
9316
  readonly executions: ExecutionsResource;
@@ -9505,4 +9653,4 @@ interface ApiErrorBody {
9505
9653
  }
9506
9654
  declare function throwFromResponse(status: number, body: ApiErrorBody): never;
9507
9655
 
9508
- 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, ContinuationRefusedError, 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, type CreditTransaction, type CreditTransactionsOptions, type CreditTransactionsPage, 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 TightenEpisodeEstimate, type TightenEpisodeInput, type TightenEpisodeJobResult, 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 UseCaseContinueInput, type UseCaseRequestOptions, 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 };
9656
+ 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, ContinuationRefusedError, 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 CreateSessionInput, type CreateShotInput, type CreateWorkflowInput, type CreateWorkspaceInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, type CreatureVoice, CreaturesResource, type CreditStatus, type CreditTransaction, type CreditTransactionsOptions, type CreditTransactionsPage, 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 GenerationSession, type GenerationSessionParams, 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 ListSessionItemsParams, type ListSessionsParams, 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 SessionItem, type SessionPage, SessionsResource, 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 TightenEpisodeEstimate, type TightenEpisodeInput, type TightenEpisodeJobResult, 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 UpdateSessionInput, type UpdateShotInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UseCaseContinueInput, type UseCaseRequestOptions, 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.d.ts CHANGED
@@ -545,6 +545,9 @@ interface Job {
545
545
  */
546
546
  source?: string | null;
547
547
  source_detail?: string | null;
548
+ /** The generation session this job was born in (the `sessionId` sent with
549
+ * the generation request), or null. See `client.sessions`. */
550
+ session_id?: string | null;
548
551
  }
549
552
  interface CancelJobResult {
550
553
  success: true;
@@ -628,6 +631,116 @@ declare class JobsResource {
628
631
  delete(id: string): Promise<DeleteJobResult>;
629
632
  }
630
633
 
634
+ /**
635
+ * A generation session: one run of work in a creation tool (Create Image,
636
+ * Video, Music), optionally inside a project. Its project is fixed at
637
+ * creation — to get an item into another project, import it into a session
638
+ * there.
639
+ */
640
+ interface GenerationSession {
641
+ id: string;
642
+ /** Null when the session has no project, or its project was deleted. */
643
+ projectId: string | null;
644
+ /** Null = untitled; a UI may fall back to the first prompt. */
645
+ title: string | null;
646
+ /** The creation tool that owns the session, e.g. `"create-image"`. */
647
+ tool: string;
648
+ createdAt: string;
649
+ /** The latest activity: an item added, or an edit. */
650
+ updatedAt: string;
651
+ archivedAt: string | null;
652
+ itemCount: number;
653
+ /** Up to four image links of the newest completed items. */
654
+ previewUrls: string[];
655
+ }
656
+ interface CreateSessionInput {
657
+ /** One of your projects (on the side of the workspace line you are on). */
658
+ projectId?: string;
659
+ title?: string;
660
+ /** Lowercase letters, digits and dashes, at most 40 — e.g. `"create-image"`. */
661
+ tool: string;
662
+ }
663
+ interface UpdateSessionInput {
664
+ /** `null` makes the session untitled again. */
665
+ title?: string | null;
666
+ archived?: boolean;
667
+ }
668
+ interface ListSessionsParams {
669
+ projectId?: string;
670
+ tool?: string;
671
+ /** Archived sessions are left out unless this is true. */
672
+ includeArchived?: boolean;
673
+ /** Page size, 1–100 (server default 50). */
674
+ limit?: number;
675
+ /** The previous page's `next`. */
676
+ cursor?: string;
677
+ }
678
+ /** One item of a session's feed: a link to one of your jobs. */
679
+ interface SessionItem {
680
+ jobId: string;
681
+ addedAt: string;
682
+ /** True when imported from elsewhere rather than born in this session. */
683
+ imported: boolean;
684
+ importedFrom: {
685
+ sessionId: string;
686
+ title: string | null;
687
+ } | null;
688
+ job: Job;
689
+ }
690
+ interface ListSessionItemsParams {
691
+ limit?: number;
692
+ cursor?: string;
693
+ }
694
+ interface SessionPage<T> {
695
+ data: T[];
696
+ /** Pass back as `cursor` for the next page; `null` on the last one. */
697
+ next: string | null;
698
+ }
699
+ declare class SessionsResource {
700
+ private client;
701
+ constructor(client: NodaroClient);
702
+ /**
703
+ * Create a session. Send its `id` as `sessionId` on a generation request
704
+ * (`nodes.run("generate-image", { sessionId, … })`, video, speech, music) and
705
+ * the job is born in it.
706
+ */
707
+ create(input: CreateSessionInput): Promise<{
708
+ data: GenerationSession;
709
+ }>;
710
+ /** Your sessions, newest first. */
711
+ list(params?: ListSessionsParams): Promise<SessionPage<GenerationSession>>;
712
+ get(id: string): Promise<{
713
+ data: GenerationSession;
714
+ }>;
715
+ /** Rename or archive a session. Its project cannot change. */
716
+ update(id: string, input: UpdateSessionInput): Promise<{
717
+ data: GenerationSession;
718
+ }>;
719
+ /** Delete a session and its links. Its jobs are kept, and stay in every other session holding them. */
720
+ delete(id: string): Promise<{
721
+ success: true;
722
+ }>;
723
+ /** The session's items, born-in and imported, newest first. */
724
+ items(id: string, params?: ListSessionItemsParams): Promise<SessionPage<SessionItem>>;
725
+ /**
726
+ * Import some of your own jobs into a session — a link, not a copy (up to 100
727
+ * a call). All-or-nothing: if any id is not one of your jobs, nothing is
728
+ * imported and the call fails with 404. Items already there are left as they are.
729
+ */
730
+ importItems(id: string, input: {
731
+ jobIds: string[];
732
+ }): Promise<{
733
+ data: {
734
+ imported: number;
735
+ requested: number;
736
+ };
737
+ }>;
738
+ /** Remove one item from a session. Only the link goes: the job, and every other session holding it, stay. */
739
+ removeItem(id: string, jobId: string): Promise<{
740
+ success: true;
741
+ }>;
742
+ }
743
+
631
744
  /**
632
745
  * Generate Video Pro control surface (Cloud edition) — the checkpointed
633
746
  * long-video engine's stop/continue operations. The generation itself is
@@ -1172,7 +1285,7 @@ interface ReferenceCaptionParams {
1172
1285
  * Typed request body for `nodes.run("text-to-speech", …)` / `runAndWait`.
1173
1286
  * Common fields are typed; any other route field passes through.
1174
1287
  */
1175
- interface TextToSpeechParams {
1288
+ interface TextToSpeechParams extends GenerationSessionParams {
1176
1289
  text: string;
1177
1290
  /** A premade voice NAME (Rachel, George, …) or a library / custom voice id. */
1178
1291
  voice?: string;
@@ -1194,13 +1307,28 @@ interface TextToSpeechParams {
1194
1307
  nextText?: string;
1195
1308
  [k: string]: unknown;
1196
1309
  }
1310
+ /**
1311
+ * Fields every generation request accepts beside its own params.
1312
+ */
1313
+ interface GenerationSessionParams {
1314
+ /** A session from `client.sessions.create()` — the job is born in it and
1315
+ * shows in its feed. Must be one of yours (404 otherwise). */
1316
+ sessionId?: string;
1317
+ /** Your app's slug (`create-image`, …): stored on the job, and what
1318
+ * `jobs.list({ origin })` filters on. Lowercase letters, digits, dashes. */
1319
+ origin?: string;
1320
+ }
1197
1321
  /**
1198
1322
  * Typed request body for `nodes.run("generate-image", …)` / `runAndWait`.
1199
1323
  * Common fields are typed; any other route field passes through via the index
1200
1324
  * signature (the route Zod-validates the full body).
1201
1325
  */
1202
- interface GenerateImageParams extends StructuredReferenceParams {
1326
+ interface GenerateImageParams extends StructuredReferenceParams, GenerationSessionParams {
1203
1327
  prompt?: string;
1328
+ /** Pre & post text wrapped around `prompt` (a preset's words), joined the
1329
+ * same way every AI prompt node joins them. */
1330
+ promptPrefix?: string;
1331
+ promptSuffix?: string;
1204
1332
  provider?: string;
1205
1333
  /** Flat reference image URLs — appended after `connectedReferences`. */
1206
1334
  referenceImageUrls?: string[];
@@ -1211,7 +1339,7 @@ interface GenerateImageParams extends StructuredReferenceParams {
1211
1339
  * Typed request body for `nodes.run("generate-video", …)` / `runAndWait`.
1212
1340
  * Common fields are typed; any other route field passes through.
1213
1341
  */
1214
- interface GenerateVideoParams extends StructuredReferenceParams, ReferenceCaptionParams {
1342
+ interface GenerateVideoParams extends StructuredReferenceParams, ReferenceCaptionParams, GenerationSessionParams {
1215
1343
  prompt?: string;
1216
1344
  provider?: string;
1217
1345
  /** Start-frame image (image-to-video). */
@@ -1262,7 +1390,7 @@ interface GenerateVideoParams extends StructuredReferenceParams, ReferenceCaptio
1262
1390
  *
1263
1391
  * Common fields are typed; any other route field passes through.
1264
1392
  */
1265
- interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionParams {
1393
+ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionParams, GenerationSessionParams {
1266
1394
  prompt: string;
1267
1395
  provider?: string;
1268
1396
  duration?: number;
@@ -1863,6 +1991,17 @@ interface PublishedApp {
1863
1991
  * item. 0 or absent when the app has no such input.
1864
1992
  */
1865
1993
  perItemCredits?: number;
1994
+ /**
1995
+ * The listed price is a range: `estimatedCredits` (with `perMinuteCredits` /
1996
+ * `perItemCredits`) is "from" — the app's saved settings — and these are
1997
+ * "up to": the most a run can cost over the choices the app's user has (every
1998
+ * exposed field, at the creator's restricted values where set). Present only
1999
+ * when they differ from "from"; absent on an app published before the range
2000
+ * existed until its next publish.
2001
+ */
2002
+ maxEstimatedCredits?: number;
2003
+ maxPerMinuteCredits?: number;
2004
+ maxPerItemCredits?: number;
1866
2005
  createdAt: string;
1867
2006
  updatedAt: string;
1868
2007
  }
@@ -8234,6 +8373,13 @@ interface TemplateBrowseCard {
8234
8373
  * 0 or absent when the price does not depend on a recording's length.
8235
8374
  */
8236
8375
  estimatedPerMinuteCredits?: number;
8376
+ /**
8377
+ * The listed price is a range: `estimatedCredits` / `estimatedPerMinuteCredits`
8378
+ * are "from" (the saved settings), these "up to" — the most a run can cost over
8379
+ * the template's exposed fields. Present only when they differ from "from".
8380
+ */
8381
+ maxEstimatedCredits?: number;
8382
+ maxEstimatedPerMinuteCredits?: number;
8237
8383
  category: string;
8238
8384
  outputTypes: string[];
8239
8385
  tags: string[];
@@ -9163,6 +9309,8 @@ declare class NodaroClient {
9163
9309
  get fetch(): typeof fetch;
9164
9310
  readonly workflows: WorkflowsResource;
9165
9311
  readonly projects: ProjectsResource;
9312
+ /** Generation sessions inside projects (Create Image / Video / Music). */
9313
+ readonly sessions: SessionsResource;
9166
9314
  readonly jobs: JobsResource;
9167
9315
  readonly videoPro: VideoProResource;
9168
9316
  readonly executions: ExecutionsResource;
@@ -9505,4 +9653,4 @@ interface ApiErrorBody {
9505
9653
  }
9506
9654
  declare function throwFromResponse(status: number, body: ApiErrorBody): never;
9507
9655
 
9508
- 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, ContinuationRefusedError, 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, type CreditTransaction, type CreditTransactionsOptions, type CreditTransactionsPage, 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 TightenEpisodeEstimate, type TightenEpisodeInput, type TightenEpisodeJobResult, 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 UseCaseContinueInput, type UseCaseRequestOptions, 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 };
9656
+ 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, ContinuationRefusedError, 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 CreateSessionInput, type CreateShotInput, type CreateWorkflowInput, type CreateWorkspaceInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, type CreatureVoice, CreaturesResource, type CreditStatus, type CreditTransaction, type CreditTransactionsOptions, type CreditTransactionsPage, 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 GenerationSession, type GenerationSessionParams, 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 ListSessionItemsParams, type ListSessionsParams, 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 SessionItem, type SessionPage, SessionsResource, 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 TightenEpisodeEstimate, type TightenEpisodeInput, type TightenEpisodeJobResult, 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 UpdateSessionInput, type UpdateShotInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UseCaseContinueInput, type UseCaseRequestOptions, 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
@@ -449,6 +449,65 @@ var ProjectsResource = class {
449
449
  }
450
450
  };
451
451
 
452
+ // src/resources/sessions.ts
453
+ var SessionsResource = class {
454
+ constructor(client) {
455
+ this.client = client;
456
+ }
457
+ client;
458
+ /**
459
+ * Create a session. Send its `id` as `sessionId` on a generation request
460
+ * (`nodes.run("generate-image", { sessionId, … })`, video, speech, music) and
461
+ * the job is born in it.
462
+ */
463
+ create(input) {
464
+ return this.client.request("POST", "/v1/sessions", { body: input });
465
+ }
466
+ /** Your sessions, newest first. */
467
+ list(params = {}) {
468
+ const query = {};
469
+ if (params.projectId) query.projectId = params.projectId;
470
+ if (params.tool) query.tool = params.tool;
471
+ if (params.includeArchived) query.includeArchived = "true";
472
+ if (params.limit !== void 0) query.limit = String(params.limit);
473
+ if (params.cursor) query.cursor = params.cursor;
474
+ return this.client.request("GET", "/v1/sessions", { query });
475
+ }
476
+ get(id) {
477
+ return this.client.request("GET", `/v1/sessions/${encodeURIComponent(id)}`);
478
+ }
479
+ /** Rename or archive a session. Its project cannot change. */
480
+ update(id, input) {
481
+ return this.client.request("PATCH", `/v1/sessions/${encodeURIComponent(id)}`, { body: input });
482
+ }
483
+ /** Delete a session and its links. Its jobs are kept, and stay in every other session holding them. */
484
+ delete(id) {
485
+ return this.client.request("DELETE", `/v1/sessions/${encodeURIComponent(id)}`);
486
+ }
487
+ /** The session's items, born-in and imported, newest first. */
488
+ items(id, params = {}) {
489
+ const query = {};
490
+ if (params.limit !== void 0) query.limit = String(params.limit);
491
+ if (params.cursor) query.cursor = params.cursor;
492
+ return this.client.request("GET", `/v1/sessions/${encodeURIComponent(id)}/items`, { query });
493
+ }
494
+ /**
495
+ * Import some of your own jobs into a session — a link, not a copy (up to 100
496
+ * a call). All-or-nothing: if any id is not one of your jobs, nothing is
497
+ * imported and the call fails with 404. Items already there are left as they are.
498
+ */
499
+ importItems(id, input) {
500
+ return this.client.request("POST", `/v1/sessions/${encodeURIComponent(id)}/items`, { body: input });
501
+ }
502
+ /** Remove one item from a session. Only the link goes: the job, and every other session holding it, stay. */
503
+ removeItem(id, jobId) {
504
+ return this.client.request(
505
+ "DELETE",
506
+ `/v1/sessions/${encodeURIComponent(id)}/items/${encodeURIComponent(jobId)}`
507
+ );
508
+ }
509
+ };
510
+
452
511
  // src/resources/jobs.ts
453
512
  var JobsResource = class {
454
513
  constructor(client) {
@@ -4177,7 +4236,7 @@ var EditResource = class {
4177
4236
  return remapTranscriptThroughEdl(edl, transcript);
4178
4237
  }
4179
4238
  };
4180
- var SDK_VERSION = "2.27.0" ;
4239
+ var SDK_VERSION = "2.28.0" ;
4181
4240
  var CLIENT_HEADER = "X-Nodaro-Client";
4182
4241
  var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
4183
4242
  var NodaroClient = class _NodaroClient {
@@ -4200,6 +4259,8 @@ var NodaroClient = class _NodaroClient {
4200
4259
  }
4201
4260
  workflows;
4202
4261
  projects;
4262
+ /** Generation sessions inside projects (Create Image / Video / Music). */
4263
+ sessions;
4203
4264
  jobs;
4204
4265
  videoPro;
4205
4266
  executions;
@@ -4251,6 +4312,7 @@ var NodaroClient = class _NodaroClient {
4251
4312
  this.sendClientHeader = opts.clientLabel !== void 0 || !isBrowser();
4252
4313
  this.workflows = new WorkflowsResource(this);
4253
4314
  this.projects = new ProjectsResource(this);
4315
+ this.sessions = new SessionsResource(this);
4254
4316
  this.jobs = new JobsResource(this);
4255
4317
  this.videoPro = new VideoProResource(this);
4256
4318
  this.executions = new ExecutionsResource(this);
@@ -4446,6 +4508,6 @@ function supabaseAuth(supabase) {
4446
4508
  };
4447
4509
  }
4448
4510
 
4449
- export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CatalogsResource, CharactersResource, CollectionsResource, CommunityResource, CompetitorsResource, ContinuationRefusedError, CopilotResource, CreaturesResource, CreditsResource, DeveloperAppsResource, EditResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, JobsResource, LibraryResource, LlmResource, LocationsResource, MediaResource, ModelsResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, OrganizationsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, RecastResource, ReduceResource, SCENE3D_DELIVERY_ASSET_USAGE, SavedPostsResource, Scene3DResource, ShotsResource, StaticTokenAuth, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, StudioProductionsResource, StudioResource, TemplatesResource, TutorialsResource, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowConflictError, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, isStudioGenerateEstimate, supabaseAuth, throwFromResponse };
4511
+ export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CatalogsResource, CharactersResource, CollectionsResource, CommunityResource, CompetitorsResource, ContinuationRefusedError, CopilotResource, CreaturesResource, CreditsResource, DeveloperAppsResource, EditResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, JobsResource, LibraryResource, LlmResource, LocationsResource, MediaResource, ModelsResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, OrganizationsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, RecastResource, ReduceResource, SCENE3D_DELIVERY_ASSET_USAGE, SavedPostsResource, Scene3DResource, SessionsResource, ShotsResource, StaticTokenAuth, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, StudioProductionsResource, StudioResource, TemplatesResource, TutorialsResource, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowConflictError, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, isStudioGenerateEstimate, supabaseAuth, throwFromResponse };
4450
4512
  //# sourceMappingURL=index.js.map
4451
4513
  //# sourceMappingURL=index.js.map