@nodaro/sdk 1.27.0 → 1.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
@@ -1,6 +1,6 @@
1
1
  import { CollaboratorRole, GenericNode, GenericEdge, WorkflowExport, WorkflowImportReport, WorkflowVisibility, ConnectedReference, ModelInputAdjustment, TtsProvider, EntityStyle, CharacterAspectRatio, CharacterAttachColumn, LocationAssetType, LocationAttachColumn, SurroundDirection, ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio, CreatureAttachColumn, PipelineInput, PipelineStatus, PipelineMode, PipelineStageName, SubGateName, ChatEnabledStage, ProposedChange, ReduceStrategyId, ReduceMeta, Voice, VoiceLibraryParams, VoiceLibraryResponse, VoiceClone, AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CommunityCard, CommunityFullDetail, CommunityEntityType, CloneListingResult, FavoriteListingResult, CommunityReportReason, ReportListingResult, PublishListingParams, PublishListingResult, SharedListing, OrganizationView, OrgKind, OrgSettings, OrgPage, OrgMemberView, MemberStatus, WorkspaceRole, InvitationDelivery, InvitationState, InvitationView, InvitationPreview, OrgAuditEntry, UsageQuery, UsageReport, UsageLogEntry, WorkspaceSummary, WorkspaceView, WorkspaceSettings, WorkspaceMemberView, JoinCodeView, MeOrganizations } from '@nodaro/shared';
2
2
  export { AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, CharacterAspectRatio, CloneListingResult, CommunityCard, CommunityEntityType, CommunityReportReason, CommunitySort, ConnectedReference, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, FavoriteListingResult, GenericEdge, GenericNode, InvitationDelivery, InvitationPreview, InvitationState, InvitationView, JoinCodeView, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, MeOrganizations, MemberStatus, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, OrgAuditEntry, OrgErrorCode, OrgKind, OrgMemberView, OrgPage, OrgRole, OrgSettings, OrgStatus, OrganizationSummary, OrganizationView, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, PipelineStageName, PromptAffixFields, PublishListingParams, PublishListingResult, ReduceMeta, ReduceStrategyId, ReportListingResult, SURROUND_DIRECTIONS, SharedListing, SharedVoice, SurroundDirection, USAGE_GROUP_BYS, UsageGroupBy, UsageLogEntry, UsageQuery, UsageReport, UsageReportRow, UsageReportTotals, UsageVarianceRow, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse, WORKSPACE_HEADER, WorkflowExport, WorkflowExportCharacter, WorkflowExportLocation, WorkflowExportObject, WorkspaceMemberView, WorkspaceRole, WorkspaceSettings, WorkspaceSummary, WorkspaceView } from '@nodaro/shared';
3
- import { PersonValue, WizardNodeContext, WizardQuestion, WizardSelection, RecommendedModel, FactoryPreset } from '@nodaro/prompts';
3
+ import { DirectionFields, SubjectFields, PersonValue, WizardNodeContext, WizardQuestion, WizardSelection, RecommendedModel, FactoryPreset } from '@nodaro/prompts';
4
4
  export { PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, PersonValue, RecommendedModel, WizardNodeContext, WizardOption, WizardQuestion, WizardSelection, buildPersonHints } from '@nodaro/prompts';
5
5
 
6
6
  /**
@@ -316,11 +316,23 @@ declare class ProjectsResource {
316
316
  }>;
317
317
  }
318
318
 
319
- type JobStatus = "pending" | "queued" | "processing" | "completed" | "failed" | "cancelled";
320
319
  /**
321
- * A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable
322
- * failure verdict the worker writes on a FINAL provider content-policy
323
- * block, so a caller can act on it without parsing `error_message` prose.
320
+ * A job's lifecycle status. Hand-copied mirror of `JOB_STATUSES` in the
321
+ * platform's `backend/src/lib/job-status.ts` — nothing links the two at build
322
+ * time, so a new member has to be added here in the same change.
323
+ *
324
+ * `pending_review` is IN-FLIGHT, NOT TERMINAL: a job policy registered by the
325
+ * deployment held the output for a human reviewer. Treat it like `processing`
326
+ * in a `switch` — keep waiting, do not re-run — and it resolves to `completed`
327
+ * (approved), `failed` (rejected, carrying an `error_hint` with
328
+ * `kind: "policy-block"`) or `cancelled` (a held job is cancellable like any
329
+ * in-flight job). `credit_status` reads `"reserved"` for the whole hold. Only
330
+ * appears on deployments that register a job policy; `runAndWait` throws
331
+ * {@link JobHeldError} on the first held tick rather than waiting it out.
332
+ */
333
+ type JobStatus = "pending" | "queued" | "processing" | "pending_review" | "completed" | "failed" | "cancelled";
334
+ /**
335
+ * A PROVIDER's verdict: the model's own safety filter refused the output.
324
336
  * `class` distinguishes a deterministic block (copyright/likeness — retrying
325
337
  * the same request never helps) from `safety`, whose filter is known to be
326
338
  * non-deterministic for some models: `retried` says whether the worker
@@ -328,12 +340,42 @@ type JobStatus = "pending" | "queued" | "processing" | "completed" | "failed" |
328
340
  * only when the catalog declares a fallback for the model that failed — is a
329
341
  * real model id the SAME prompt/references can be retried on.
330
342
  */
331
- interface JobErrorHint {
343
+ type SafetyBlockHint = {
332
344
  kind: "safety-block";
333
345
  class: "copyright" | "likeness" | "safety";
334
346
  retried: boolean;
335
347
  suggestedProvider?: string;
336
- }
348
+ };
349
+ /**
350
+ * A NODARO-side verdict, not a provider's: a job policy registered by the
351
+ * deployment rejected the request (`hookPoint: "request"` — nothing ran, and
352
+ * the call itself failed with {@link JobBlockedError}) or the finished output
353
+ * (`hookPoint: "result"` — the result was blocked and never published).
354
+ *
355
+ * `reason` is USER-SAFE BY CONTRACT — the platform guarantees the policy's
356
+ * machine text (scores, labels) never reaches it — so show it to the person
357
+ * who made the request as-is. `policyId` identifies the deployment's policy,
358
+ * not a Nodaro product feature. Only occurs on deployments that register a
359
+ * job policy.
360
+ */
361
+ type PolicyBlockHint = {
362
+ kind: "policy-block";
363
+ policyId: string;
364
+ reason: string;
365
+ hookPoint: "request" | "result";
366
+ };
367
+ /**
368
+ * A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable
369
+ * failure verdict, so a caller can act on it without parsing `error_message`
370
+ * prose. One column, two verdict sources; `kind` is the discriminant.
371
+ *
372
+ * HAND-COPIED MIRROR of `ErrorHint` in the platform's
373
+ * `backend/src/lib/safety-block.ts` (which names this file in its own
374
+ * comment). Nothing links the two at build time: a new arm there has to be
375
+ * pasted here verbatim in the same change, with a changeset.
376
+ * `packages/client/dist/index.d.ts` is REBUILT, never hand-edited.
377
+ */
378
+ type JobErrorHint = SafetyBlockHint | PolicyBlockHint;
337
379
  /**
338
380
  * The billing lifecycle of a job's credit reservation — `usage_logs.status`
339
381
  * for the job's `usage_log_id`. `null` when the job has no usage log (e.g. a
@@ -358,8 +400,10 @@ interface Job {
358
400
  input_data: unknown;
359
401
  output_data: unknown;
360
402
  error_message: string | null;
361
- /** PR9: present on a failed job the worker classified as a content-policy
362
- * block; absent/null otherwise. User-safe by construction. */
403
+ /** Present on a failed job the worker classified as a provider
404
+ * content-policy block (`kind: "safety-block"`) or that a deployment's job
405
+ * policy rejected (`kind: "policy-block"`); absent/null otherwise.
406
+ * User-safe by construction — narrow on `kind` before reading the rest. */
363
407
  error_hint?: JobErrorHint | null;
364
408
  /** PR9: the job's credit reservation lifecycle, derived server-side from
365
409
  * `usage_logs.status`. `null` when there is no usage log to report. Never
@@ -384,6 +428,9 @@ interface CancelJobResult {
384
428
  success: true;
385
429
  cancelled: number;
386
430
  }
431
+ interface DeleteJobResult {
432
+ success: true;
433
+ }
387
434
  interface ListJobsParams {
388
435
  /** Exact match on `input_data.type` — the route that created the job
389
436
  * (`"llm-structured"`, `"video-analysis"`, …). */
@@ -396,6 +443,10 @@ interface ListJobsParams {
396
443
  cursor?: string;
397
444
  }
398
445
  interface ListJobsPage {
446
+ /**
447
+ * A page may hold fewer than `limit` rows — even none — and still carry a
448
+ * `next`. Page on `next`, never on `data.length`.
449
+ */
399
450
  data: Job[];
400
451
  /** Pass back as `cursor` for the next page; `null` on the last one. */
401
452
  next: string | null;
@@ -444,6 +495,13 @@ declare class JobsResource {
444
495
  * Refunds any reserved credit holds.
445
496
  */
446
497
  cancel(id: string): Promise<CancelJobResult>;
498
+ /**
499
+ * Delete a job and the private media it produced. Server route is
500
+ * `DELETE /v1/jobs/:jobId`. Only the job's owner (or an admin) may delete it;
501
+ * a job that is still running is deleted as-is — cancel it first when its
502
+ * worker should stop ({@link cancel}).
503
+ */
504
+ delete(id: string): Promise<DeleteJobResult>;
447
505
  }
448
506
 
449
507
  /**
@@ -706,6 +764,37 @@ interface GenerateVideoParams extends StructuredReferenceParams {
706
764
  referenceAudioUrls?: string[];
707
765
  [k: string]: unknown;
708
766
  }
767
+ /**
768
+ * Typed request body for `nodes.run("text-to-video", …)` / `runAndWait` — the
769
+ * PROMPT-ONLY video lane (`POST /v1/text-to-video`).
770
+ *
771
+ * Which lane takes what: `text-to-video` renders from text (plus optional
772
+ * references) and `prompt` is REQUIRED; frames belong to `generate-video`
773
+ * alone, which is the image-to-video lane (`imageUrl` start frame, `endFrameUrl`
774
+ * closing frame) and where a prompt is optional. A model with no text-to-video
775
+ * mode answers this lane with a `400 image_required` naming itself.
776
+ *
777
+ * Common fields are typed; any other route field passes through.
778
+ */
779
+ interface TextToVideoParams extends StructuredReferenceParams {
780
+ prompt: string;
781
+ provider?: string;
782
+ duration?: number;
783
+ /** Native audio toggle, on the models that render sound. */
784
+ sound?: boolean;
785
+ negativePrompt?: string;
786
+ aspectRatio?: string;
787
+ resolution?: string;
788
+ seed?: number;
789
+ referenceImageUrls?: string[];
790
+ referenceVideoUrls?: string[];
791
+ referenceAudioUrls?: string[];
792
+ /** Cinematic direction as catalog IDS — the route renders the wording. */
793
+ direction?: DirectionFields;
794
+ /** SUBJECT ids (who is in the shot), folded ahead of the direction clauses. */
795
+ subject?: SubjectFields;
796
+ [k: string]: unknown;
797
+ }
709
798
  /**
710
799
  * Typed request body for `nodes.run("assemble-narrated-video", …)` / `runAndWait`.
711
800
  * Assembles blocks of video with audio narration into a single composed video.
@@ -803,6 +892,7 @@ declare class NodesResource {
803
892
  */
804
893
  run(type: "generate-image", params?: GenerateImageParams): Promise<RunNodeResult>;
805
894
  run(type: "generate-video", params?: GenerateVideoParams): Promise<RunNodeResult>;
895
+ run(type: "text-to-video", params: TextToVideoParams): Promise<RunNodeResult>;
806
896
  run(type: "assemble-narrated-video", params?: AssembleNarratedVideoParams): Promise<RunNodeResult>;
807
897
  run(type: string, params?: Record<string, unknown>): Promise<RunNodeResult>;
808
898
  /**
@@ -819,6 +909,11 @@ declare class NodesResource {
819
909
  * - {@link JobTimeoutError} — `maxMs` deadline exceeded before terminal.
820
910
  * - {@link JobAbortedError} — `signal` fired (or was already aborted);
821
911
  * polling stops immediately.
912
+ * - {@link JobHeldError} — the job entered `pending_review` on a deployment
913
+ * that registers a job policy. Ends the poll on the FIRST held tick (that
914
+ * status waits on a human, not on the job) and does NOT cancel it.
915
+ * - {@link JobBlockedError} — a 422 from {@link run} before any poll: the
916
+ * deployment's job policy refused the request outright.
822
917
  *
823
918
  * Polling is fully client-side (no server function blocks) — the same model
824
919
  * thin clients use, lifted out of their hand-rolled run→poll loops.
@@ -829,6 +924,7 @@ declare class NodesResource {
829
924
  */
830
925
  runAndWait(type: "generate-image", params?: GenerateImageParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
831
926
  runAndWait(type: "generate-video", params?: GenerateVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
927
+ runAndWait(type: "text-to-video", params: TextToVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
832
928
  runAndWait(type: "assemble-narrated-video", params?: AssembleNarratedVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
833
929
  runAndWait(type: string, params?: Record<string, unknown>, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
834
930
  /**
@@ -836,15 +932,19 @@ declare class NodesResource {
836
932
  * the candidate-grid path (generate N stills/clips in parallel). Each runs
837
933
  * via {@link runAndWait}; resolves once ALL settle, to an array of
838
934
  * `{ jobId, output }` in input order. Rejects (and the rejection wins) if any
839
- * single run rejects — same typed errors as {@link runAndWait}. A shared
840
- * `signal` aborts the whole batch.
935
+ * single run rejects — same typed errors as {@link runAndWait}, including
936
+ * {@link JobHeldError} when one candidate is held for review while the
937
+ * others complete. A shared `signal` aborts the whole batch.
841
938
  *
842
939
  * @param type Node type slug, applied to every entry.
843
940
  * @param paramsList One request body per candidate.
844
941
  * @param opts Shared `signal` / `onProgress` / `pollMs` / `maxMs`.
845
942
  */
846
943
  runMany(type: string, paramsList: Record<string, unknown>[], opts?: RunAndWaitOptions): Promise<RunManyResult[]>;
847
- /** Poll an already-kicked job id until terminal; resolve output_data or throw. */
944
+ /** Poll an already-kicked job id until it stops moving; resolve output_data
945
+ * or throw. Two non-terminal statuses end the loop: an abort, and
946
+ * `pending_review` (a job policy held the output for a human — see
947
+ * {@link JobHeldError}). */
848
948
  private pollJob;
849
949
  }
850
950
 
@@ -6024,6 +6124,20 @@ declare class WorkflowConflictError extends NodaroError {
6024
6124
  readonly currentRecord?: Record<string, unknown> | undefined;
6025
6125
  constructor(message?: string, currentUpdatedAt?: string | undefined, currentVersion?: number | undefined, currentRecord?: Record<string, unknown> | undefined);
6026
6126
  }
6127
+ /**
6128
+ * HTTP 422 `job_blocked`. A job policy registered by this deployment refused
6129
+ * the generation **before it ran** — no job was created, nothing was reserved
6130
+ * and nothing was charged. `message` is the policy's user-safe text: show it
6131
+ * as-is. Do not retry the identical request; whether the same input would be
6132
+ * judged differently is the deployment's policy's business.
6133
+ *
6134
+ * Only occurs on deployments that register a job policy. Selected by `code`,
6135
+ * not by status, the same way `workflow_conflict` narrows a 409 above — any
6136
+ * other 422 stays a plain `NodaroError`.
6137
+ */
6138
+ declare class JobBlockedError extends NodaroError {
6139
+ constructor(message?: string);
6140
+ }
6027
6141
  /**
6028
6142
  * A job reached a terminal `failed`/`cancelled` status while being awaited by
6029
6143
  * `nodes.runAndWait` / `nodes.runMany`. Not an HTTP-level error (the polls
@@ -6059,6 +6173,26 @@ declare class JobAbortedError extends NodaroError {
6059
6173
  readonly jobId?: string | undefined;
6060
6174
  constructor(message?: string, jobId?: string | undefined);
6061
6175
  }
6176
+ /**
6177
+ * The awaited job entered `pending_review`: a job policy registered by this
6178
+ * deployment held its output for a human reviewer. `pending_review` is
6179
+ * IN-FLIGHT, not terminal, so `nodes.runAndWait` / `nodes.runMany` end the
6180
+ * poll on the first tick they observe it rather than burning `maxMs` on a
6181
+ * status that no longer moves on its own.
6182
+ *
6183
+ * This does NOT cancel the job — the output exists, a human is reviewing it,
6184
+ * and the credit reservation stays `reserved` for the whole hold. Do not
6185
+ * re-run the request (a duplicate would be held too): re-fetch with
6186
+ * `jobs.get(jobId)` later, or surface "awaiting review" to your user and poll
6187
+ * `jobs.getStatus()` yourself. It resolves to `completed` (approved), `failed`
6188
+ * (rejected, with `error_hint.kind === "policy-block"`) or `cancelled`.
6189
+ *
6190
+ * Not an HTTP error — `status` is 0; catch by type/`code`.
6191
+ */
6192
+ declare class JobHeldError extends NodaroError {
6193
+ readonly jobId: string;
6194
+ constructor(message: string, jobId: string);
6195
+ }
6062
6196
  interface ApiErrorBody {
6063
6197
  error?: {
6064
6198
  code?: string;
@@ -6072,4 +6206,4 @@ interface ApiErrorBody {
6072
6206
  }
6073
6207
  declare function throwFromResponse(status: number, body: ApiErrorBody): never;
6074
6208
 
6075
- export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, type BrowseTemplatesParams, type BrowseTemplatesResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, CatalogsResource, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, type CloneTemplateParams, type CloneTemplateResult, CommunityResource, type ContinueVideoProResult, 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, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, 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 GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type InviteInput, type Job, JobAbortedError, JobFailedError, 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 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 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 PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, type ProjectedCatalog, type ProjectedCatalogDimension, type ProjectedCatalogOption, 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 ReferencePhoto, type ReferencePhotoKind, type ResolveRecastGateInput, type RotateSecretResult, type RunAndWaitOptions, type RunAppOptions, type RunManyResult, type RunNodeAdjustment, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, type Shot, type ShotEntityRef, type ShotMode, ShotsResource, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, type Template, type TemplateBrowseCard, type TemplateSort, TemplatesResource, 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, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
6209
+ export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, type BrowseTemplatesParams, type BrowseTemplatesResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, CatalogsResource, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, type CloneTemplateParams, type CloneTemplateResult, CommunityResource, type ContinueVideoProResult, 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, CreaturesResource, type CreditStatus, CreditsResource, type DeleteAppRunResult, type DeleteJobResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, 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 GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, 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 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 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 PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, type PolicyBlockHint, PresetsResource, type Project, type ProjectedCatalog, type ProjectedCatalogDimension, type ProjectedCatalogOption, 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 ReferencePhoto, type ReferencePhotoKind, type ResolveRecastGateInput, type RotateSecretResult, type RunAndWaitOptions, type RunAppOptions, type RunManyResult, type RunNodeAdjustment, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, type SafetyBlockHint, type Shot, type ShotEntityRef, type ShotMode, ShotsResource, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, type Template, type TemplateBrowseCard, type TemplateSort, TemplatesResource, type TextToVideoParams, 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, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CollaboratorRole, GenericNode, GenericEdge, WorkflowExport, WorkflowImportReport, WorkflowVisibility, ConnectedReference, ModelInputAdjustment, TtsProvider, EntityStyle, CharacterAspectRatio, CharacterAttachColumn, LocationAssetType, LocationAttachColumn, SurroundDirection, ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio, CreatureAttachColumn, PipelineInput, PipelineStatus, PipelineMode, PipelineStageName, SubGateName, ChatEnabledStage, ProposedChange, ReduceStrategyId, ReduceMeta, Voice, VoiceLibraryParams, VoiceLibraryResponse, VoiceClone, AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CommunityCard, CommunityFullDetail, CommunityEntityType, CloneListingResult, FavoriteListingResult, CommunityReportReason, ReportListingResult, PublishListingParams, PublishListingResult, SharedListing, OrganizationView, OrgKind, OrgSettings, OrgPage, OrgMemberView, MemberStatus, WorkspaceRole, InvitationDelivery, InvitationState, InvitationView, InvitationPreview, OrgAuditEntry, UsageQuery, UsageReport, UsageLogEntry, WorkspaceSummary, WorkspaceView, WorkspaceSettings, WorkspaceMemberView, JoinCodeView, MeOrganizations } from '@nodaro/shared';
2
2
  export { AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, CharacterAspectRatio, CloneListingResult, CommunityCard, CommunityEntityType, CommunityReportReason, CommunitySort, ConnectedReference, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, FavoriteListingResult, GenericEdge, GenericNode, InvitationDelivery, InvitationPreview, InvitationState, InvitationView, JoinCodeView, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, MeOrganizations, MemberStatus, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, OrgAuditEntry, OrgErrorCode, OrgKind, OrgMemberView, OrgPage, OrgRole, OrgSettings, OrgStatus, OrganizationSummary, OrganizationView, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, PipelineStageName, PromptAffixFields, PublishListingParams, PublishListingResult, ReduceMeta, ReduceStrategyId, ReportListingResult, SURROUND_DIRECTIONS, SharedListing, SharedVoice, SurroundDirection, USAGE_GROUP_BYS, UsageGroupBy, UsageLogEntry, UsageQuery, UsageReport, UsageReportRow, UsageReportTotals, UsageVarianceRow, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse, WORKSPACE_HEADER, WorkflowExport, WorkflowExportCharacter, WorkflowExportLocation, WorkflowExportObject, WorkspaceMemberView, WorkspaceRole, WorkspaceSettings, WorkspaceSummary, WorkspaceView } from '@nodaro/shared';
3
- import { PersonValue, WizardNodeContext, WizardQuestion, WizardSelection, RecommendedModel, FactoryPreset } from '@nodaro/prompts';
3
+ import { DirectionFields, SubjectFields, PersonValue, WizardNodeContext, WizardQuestion, WizardSelection, RecommendedModel, FactoryPreset } from '@nodaro/prompts';
4
4
  export { PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, PersonValue, RecommendedModel, WizardNodeContext, WizardOption, WizardQuestion, WizardSelection, buildPersonHints } from '@nodaro/prompts';
5
5
 
6
6
  /**
@@ -316,11 +316,23 @@ declare class ProjectsResource {
316
316
  }>;
317
317
  }
318
318
 
319
- type JobStatus = "pending" | "queued" | "processing" | "completed" | "failed" | "cancelled";
320
319
  /**
321
- * A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable
322
- * failure verdict the worker writes on a FINAL provider content-policy
323
- * block, so a caller can act on it without parsing `error_message` prose.
320
+ * A job's lifecycle status. Hand-copied mirror of `JOB_STATUSES` in the
321
+ * platform's `backend/src/lib/job-status.ts` — nothing links the two at build
322
+ * time, so a new member has to be added here in the same change.
323
+ *
324
+ * `pending_review` is IN-FLIGHT, NOT TERMINAL: a job policy registered by the
325
+ * deployment held the output for a human reviewer. Treat it like `processing`
326
+ * in a `switch` — keep waiting, do not re-run — and it resolves to `completed`
327
+ * (approved), `failed` (rejected, carrying an `error_hint` with
328
+ * `kind: "policy-block"`) or `cancelled` (a held job is cancellable like any
329
+ * in-flight job). `credit_status` reads `"reserved"` for the whole hold. Only
330
+ * appears on deployments that register a job policy; `runAndWait` throws
331
+ * {@link JobHeldError} on the first held tick rather than waiting it out.
332
+ */
333
+ type JobStatus = "pending" | "queued" | "processing" | "pending_review" | "completed" | "failed" | "cancelled";
334
+ /**
335
+ * A PROVIDER's verdict: the model's own safety filter refused the output.
324
336
  * `class` distinguishes a deterministic block (copyright/likeness — retrying
325
337
  * the same request never helps) from `safety`, whose filter is known to be
326
338
  * non-deterministic for some models: `retried` says whether the worker
@@ -328,12 +340,42 @@ type JobStatus = "pending" | "queued" | "processing" | "completed" | "failed" |
328
340
  * only when the catalog declares a fallback for the model that failed — is a
329
341
  * real model id the SAME prompt/references can be retried on.
330
342
  */
331
- interface JobErrorHint {
343
+ type SafetyBlockHint = {
332
344
  kind: "safety-block";
333
345
  class: "copyright" | "likeness" | "safety";
334
346
  retried: boolean;
335
347
  suggestedProvider?: string;
336
- }
348
+ };
349
+ /**
350
+ * A NODARO-side verdict, not a provider's: a job policy registered by the
351
+ * deployment rejected the request (`hookPoint: "request"` — nothing ran, and
352
+ * the call itself failed with {@link JobBlockedError}) or the finished output
353
+ * (`hookPoint: "result"` — the result was blocked and never published).
354
+ *
355
+ * `reason` is USER-SAFE BY CONTRACT — the platform guarantees the policy's
356
+ * machine text (scores, labels) never reaches it — so show it to the person
357
+ * who made the request as-is. `policyId` identifies the deployment's policy,
358
+ * not a Nodaro product feature. Only occurs on deployments that register a
359
+ * job policy.
360
+ */
361
+ type PolicyBlockHint = {
362
+ kind: "policy-block";
363
+ policyId: string;
364
+ reason: string;
365
+ hookPoint: "request" | "result";
366
+ };
367
+ /**
368
+ * A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable
369
+ * failure verdict, so a caller can act on it without parsing `error_message`
370
+ * prose. One column, two verdict sources; `kind` is the discriminant.
371
+ *
372
+ * HAND-COPIED MIRROR of `ErrorHint` in the platform's
373
+ * `backend/src/lib/safety-block.ts` (which names this file in its own
374
+ * comment). Nothing links the two at build time: a new arm there has to be
375
+ * pasted here verbatim in the same change, with a changeset.
376
+ * `packages/client/dist/index.d.ts` is REBUILT, never hand-edited.
377
+ */
378
+ type JobErrorHint = SafetyBlockHint | PolicyBlockHint;
337
379
  /**
338
380
  * The billing lifecycle of a job's credit reservation — `usage_logs.status`
339
381
  * for the job's `usage_log_id`. `null` when the job has no usage log (e.g. a
@@ -358,8 +400,10 @@ interface Job {
358
400
  input_data: unknown;
359
401
  output_data: unknown;
360
402
  error_message: string | null;
361
- /** PR9: present on a failed job the worker classified as a content-policy
362
- * block; absent/null otherwise. User-safe by construction. */
403
+ /** Present on a failed job the worker classified as a provider
404
+ * content-policy block (`kind: "safety-block"`) or that a deployment's job
405
+ * policy rejected (`kind: "policy-block"`); absent/null otherwise.
406
+ * User-safe by construction — narrow on `kind` before reading the rest. */
363
407
  error_hint?: JobErrorHint | null;
364
408
  /** PR9: the job's credit reservation lifecycle, derived server-side from
365
409
  * `usage_logs.status`. `null` when there is no usage log to report. Never
@@ -384,6 +428,9 @@ interface CancelJobResult {
384
428
  success: true;
385
429
  cancelled: number;
386
430
  }
431
+ interface DeleteJobResult {
432
+ success: true;
433
+ }
387
434
  interface ListJobsParams {
388
435
  /** Exact match on `input_data.type` — the route that created the job
389
436
  * (`"llm-structured"`, `"video-analysis"`, …). */
@@ -396,6 +443,10 @@ interface ListJobsParams {
396
443
  cursor?: string;
397
444
  }
398
445
  interface ListJobsPage {
446
+ /**
447
+ * A page may hold fewer than `limit` rows — even none — and still carry a
448
+ * `next`. Page on `next`, never on `data.length`.
449
+ */
399
450
  data: Job[];
400
451
  /** Pass back as `cursor` for the next page; `null` on the last one. */
401
452
  next: string | null;
@@ -444,6 +495,13 @@ declare class JobsResource {
444
495
  * Refunds any reserved credit holds.
445
496
  */
446
497
  cancel(id: string): Promise<CancelJobResult>;
498
+ /**
499
+ * Delete a job and the private media it produced. Server route is
500
+ * `DELETE /v1/jobs/:jobId`. Only the job's owner (or an admin) may delete it;
501
+ * a job that is still running is deleted as-is — cancel it first when its
502
+ * worker should stop ({@link cancel}).
503
+ */
504
+ delete(id: string): Promise<DeleteJobResult>;
447
505
  }
448
506
 
449
507
  /**
@@ -706,6 +764,37 @@ interface GenerateVideoParams extends StructuredReferenceParams {
706
764
  referenceAudioUrls?: string[];
707
765
  [k: string]: unknown;
708
766
  }
767
+ /**
768
+ * Typed request body for `nodes.run("text-to-video", …)` / `runAndWait` — the
769
+ * PROMPT-ONLY video lane (`POST /v1/text-to-video`).
770
+ *
771
+ * Which lane takes what: `text-to-video` renders from text (plus optional
772
+ * references) and `prompt` is REQUIRED; frames belong to `generate-video`
773
+ * alone, which is the image-to-video lane (`imageUrl` start frame, `endFrameUrl`
774
+ * closing frame) and where a prompt is optional. A model with no text-to-video
775
+ * mode answers this lane with a `400 image_required` naming itself.
776
+ *
777
+ * Common fields are typed; any other route field passes through.
778
+ */
779
+ interface TextToVideoParams extends StructuredReferenceParams {
780
+ prompt: string;
781
+ provider?: string;
782
+ duration?: number;
783
+ /** Native audio toggle, on the models that render sound. */
784
+ sound?: boolean;
785
+ negativePrompt?: string;
786
+ aspectRatio?: string;
787
+ resolution?: string;
788
+ seed?: number;
789
+ referenceImageUrls?: string[];
790
+ referenceVideoUrls?: string[];
791
+ referenceAudioUrls?: string[];
792
+ /** Cinematic direction as catalog IDS — the route renders the wording. */
793
+ direction?: DirectionFields;
794
+ /** SUBJECT ids (who is in the shot), folded ahead of the direction clauses. */
795
+ subject?: SubjectFields;
796
+ [k: string]: unknown;
797
+ }
709
798
  /**
710
799
  * Typed request body for `nodes.run("assemble-narrated-video", …)` / `runAndWait`.
711
800
  * Assembles blocks of video with audio narration into a single composed video.
@@ -803,6 +892,7 @@ declare class NodesResource {
803
892
  */
804
893
  run(type: "generate-image", params?: GenerateImageParams): Promise<RunNodeResult>;
805
894
  run(type: "generate-video", params?: GenerateVideoParams): Promise<RunNodeResult>;
895
+ run(type: "text-to-video", params: TextToVideoParams): Promise<RunNodeResult>;
806
896
  run(type: "assemble-narrated-video", params?: AssembleNarratedVideoParams): Promise<RunNodeResult>;
807
897
  run(type: string, params?: Record<string, unknown>): Promise<RunNodeResult>;
808
898
  /**
@@ -819,6 +909,11 @@ declare class NodesResource {
819
909
  * - {@link JobTimeoutError} — `maxMs` deadline exceeded before terminal.
820
910
  * - {@link JobAbortedError} — `signal` fired (or was already aborted);
821
911
  * polling stops immediately.
912
+ * - {@link JobHeldError} — the job entered `pending_review` on a deployment
913
+ * that registers a job policy. Ends the poll on the FIRST held tick (that
914
+ * status waits on a human, not on the job) and does NOT cancel it.
915
+ * - {@link JobBlockedError} — a 422 from {@link run} before any poll: the
916
+ * deployment's job policy refused the request outright.
822
917
  *
823
918
  * Polling is fully client-side (no server function blocks) — the same model
824
919
  * thin clients use, lifted out of their hand-rolled run→poll loops.
@@ -829,6 +924,7 @@ declare class NodesResource {
829
924
  */
830
925
  runAndWait(type: "generate-image", params?: GenerateImageParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
831
926
  runAndWait(type: "generate-video", params?: GenerateVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
927
+ runAndWait(type: "text-to-video", params: TextToVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
832
928
  runAndWait(type: "assemble-narrated-video", params?: AssembleNarratedVideoParams, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
833
929
  runAndWait(type: string, params?: Record<string, unknown>, opts?: RunAndWaitOptions): Promise<NodeJobOutput>;
834
930
  /**
@@ -836,15 +932,19 @@ declare class NodesResource {
836
932
  * the candidate-grid path (generate N stills/clips in parallel). Each runs
837
933
  * via {@link runAndWait}; resolves once ALL settle, to an array of
838
934
  * `{ jobId, output }` in input order. Rejects (and the rejection wins) if any
839
- * single run rejects — same typed errors as {@link runAndWait}. A shared
840
- * `signal` aborts the whole batch.
935
+ * single run rejects — same typed errors as {@link runAndWait}, including
936
+ * {@link JobHeldError} when one candidate is held for review while the
937
+ * others complete. A shared `signal` aborts the whole batch.
841
938
  *
842
939
  * @param type Node type slug, applied to every entry.
843
940
  * @param paramsList One request body per candidate.
844
941
  * @param opts Shared `signal` / `onProgress` / `pollMs` / `maxMs`.
845
942
  */
846
943
  runMany(type: string, paramsList: Record<string, unknown>[], opts?: RunAndWaitOptions): Promise<RunManyResult[]>;
847
- /** Poll an already-kicked job id until terminal; resolve output_data or throw. */
944
+ /** Poll an already-kicked job id until it stops moving; resolve output_data
945
+ * or throw. Two non-terminal statuses end the loop: an abort, and
946
+ * `pending_review` (a job policy held the output for a human — see
947
+ * {@link JobHeldError}). */
848
948
  private pollJob;
849
949
  }
850
950
 
@@ -6024,6 +6124,20 @@ declare class WorkflowConflictError extends NodaroError {
6024
6124
  readonly currentRecord?: Record<string, unknown> | undefined;
6025
6125
  constructor(message?: string, currentUpdatedAt?: string | undefined, currentVersion?: number | undefined, currentRecord?: Record<string, unknown> | undefined);
6026
6126
  }
6127
+ /**
6128
+ * HTTP 422 `job_blocked`. A job policy registered by this deployment refused
6129
+ * the generation **before it ran** — no job was created, nothing was reserved
6130
+ * and nothing was charged. `message` is the policy's user-safe text: show it
6131
+ * as-is. Do not retry the identical request; whether the same input would be
6132
+ * judged differently is the deployment's policy's business.
6133
+ *
6134
+ * Only occurs on deployments that register a job policy. Selected by `code`,
6135
+ * not by status, the same way `workflow_conflict` narrows a 409 above — any
6136
+ * other 422 stays a plain `NodaroError`.
6137
+ */
6138
+ declare class JobBlockedError extends NodaroError {
6139
+ constructor(message?: string);
6140
+ }
6027
6141
  /**
6028
6142
  * A job reached a terminal `failed`/`cancelled` status while being awaited by
6029
6143
  * `nodes.runAndWait` / `nodes.runMany`. Not an HTTP-level error (the polls
@@ -6059,6 +6173,26 @@ declare class JobAbortedError extends NodaroError {
6059
6173
  readonly jobId?: string | undefined;
6060
6174
  constructor(message?: string, jobId?: string | undefined);
6061
6175
  }
6176
+ /**
6177
+ * The awaited job entered `pending_review`: a job policy registered by this
6178
+ * deployment held its output for a human reviewer. `pending_review` is
6179
+ * IN-FLIGHT, not terminal, so `nodes.runAndWait` / `nodes.runMany` end the
6180
+ * poll on the first tick they observe it rather than burning `maxMs` on a
6181
+ * status that no longer moves on its own.
6182
+ *
6183
+ * This does NOT cancel the job — the output exists, a human is reviewing it,
6184
+ * and the credit reservation stays `reserved` for the whole hold. Do not
6185
+ * re-run the request (a duplicate would be held too): re-fetch with
6186
+ * `jobs.get(jobId)` later, or surface "awaiting review" to your user and poll
6187
+ * `jobs.getStatus()` yourself. It resolves to `completed` (approved), `failed`
6188
+ * (rejected, with `error_hint.kind === "policy-block"`) or `cancelled`.
6189
+ *
6190
+ * Not an HTTP error — `status` is 0; catch by type/`code`.
6191
+ */
6192
+ declare class JobHeldError extends NodaroError {
6193
+ readonly jobId: string;
6194
+ constructor(message: string, jobId: string);
6195
+ }
6062
6196
  interface ApiErrorBody {
6063
6197
  error?: {
6064
6198
  code?: string;
@@ -6072,4 +6206,4 @@ interface ApiErrorBody {
6072
6206
  }
6073
6207
  declare function throwFromResponse(status: number, body: ApiErrorBody): never;
6074
6208
 
6075
- export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, type BrowseTemplatesParams, type BrowseTemplatesResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, CatalogsResource, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, type CloneTemplateParams, type CloneTemplateResult, CommunityResource, type ContinueVideoProResult, 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, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, 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 GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type InviteInput, type Job, JobAbortedError, JobFailedError, 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 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 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 PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, type ProjectedCatalog, type ProjectedCatalogDimension, type ProjectedCatalogOption, 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 ReferencePhoto, type ReferencePhotoKind, type ResolveRecastGateInput, type RotateSecretResult, type RunAndWaitOptions, type RunAppOptions, type RunManyResult, type RunNodeAdjustment, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, type Shot, type ShotEntityRef, type ShotMode, ShotsResource, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, type Template, type TemplateBrowseCard, type TemplateSort, TemplatesResource, 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, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
6209
+ export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, type BrowseTemplatesParams, type BrowseTemplatesResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, CatalogsResource, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, type CloneTemplateParams, type CloneTemplateResult, CommunityResource, type ContinueVideoProResult, 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, CreaturesResource, type CreditStatus, CreditsResource, type DeleteAppRunResult, type DeleteJobResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, 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 GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, 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 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 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 PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, type PolicyBlockHint, PresetsResource, type Project, type ProjectedCatalog, type ProjectedCatalogDimension, type ProjectedCatalogOption, 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 ReferencePhoto, type ReferencePhotoKind, type ResolveRecastGateInput, type RotateSecretResult, type RunAndWaitOptions, type RunAppOptions, type RunManyResult, type RunNodeAdjustment, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, type SafetyBlockHint, type Shot, type ShotEntityRef, type ShotMode, ShotsResource, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, type Template, type TemplateBrowseCard, type TemplateSort, TemplatesResource, type TextToVideoParams, 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, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };