@nodaro/sdk 1.8.0 → 1.10.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
@@ -86,6 +86,20 @@ interface UpdateWorkflowInput {
86
86
  settings?: Record<string, unknown>;
87
87
  sourcePrompt?: string;
88
88
  thumbnailUrl?: string | null;
89
+ /**
90
+ * Optimistic concurrency: the `updatedAt` your copy of the workflow was
91
+ * loaded with. When the row has since been written by another tab/device,
92
+ * the update is rejected with HTTP 409 `workflow_conflict`
93
+ * (`WorkflowConflictError`) carrying the current record — re-read/merge and
94
+ * retry instead of last-writer-wins clobbering the other writer's changes.
95
+ * Omit for the legacy unconditional replace.
96
+ */
97
+ expectedUpdatedAt?: string;
98
+ /**
99
+ * Optimistic concurrency by monotonic version — preferred over
100
+ * `expectedUpdatedAt` (integer bumped by the DB on every content change).
101
+ */
102
+ expectedVersion?: number;
89
103
  }
90
104
  interface RunWorkflowParams {
91
105
  /** Optional subset of node IDs to execute. Omit to run the full workflow. */
@@ -3855,6 +3869,27 @@ declare class MediaResource {
3855
3869
  }): Promise<{
3856
3870
  jobId: string;
3857
3871
  }>;
3872
+ /**
3873
+ * Composite 2–30 images into ONE large 2K/4K collage (`POST /v1/image-collage`).
3874
+ * `layout` `"smart"` (default — justified rows at each image's exact aspect
3875
+ * ratio, no cropping; the output height floats) or `"grid"` (uniform,
3876
+ * letterboxed cells). `imageSizes` is index-aligned with `imageUrls` and
3877
+ * gives per-image RELATIVE size hints for the smart layout: `0` auto
3878
+ * ("don't care", default), `1` big (~2× linear vs medium), `2` medium,
3879
+ * `3` small (~½ linear). All-equal hints change nothing; grid ignores them.
3880
+ * Poll `jobs.get(jobId)` for the finished image.
3881
+ */
3882
+ imageCollage(input: {
3883
+ imageUrls: string[];
3884
+ imageSizes?: Array<0 | 1 | 2 | 3>;
3885
+ layout?: "smart" | "grid";
3886
+ resolution?: "2K" | "4K";
3887
+ aspectRatio?: string;
3888
+ gap?: number;
3889
+ backgroundColor?: string;
3890
+ }): Promise<{
3891
+ jobId: string;
3892
+ }>;
3858
3893
  /**
3859
3894
  * Trim a video to a range (`POST /v1/trim-video`). Give the range in whichever
3860
3895
  * unit fits: `startTime`/`endTime` seconds, `trim*Frames`, `trim*Seconds`, or
@@ -4492,6 +4527,19 @@ declare class StorageExceededError extends NodaroError {
4492
4527
  readonly limitBytes?: number | undefined;
4493
4528
  constructor(message?: string, limitBytes?: number | undefined);
4494
4529
  }
4530
+ /**
4531
+ * Optimistic-concurrency rejection (HTTP 409 `workflow_conflict`): the workflow
4532
+ * was written by another tab/device after the state carried in
4533
+ * `expectedUpdatedAt`/`expectedVersion` was read. `currentRecord` — when the
4534
+ * server includes it — is the full current workflow: merge your changes onto it
4535
+ * and retry with its fresh `updatedAt`, no follow-up GET needed.
4536
+ */
4537
+ declare class WorkflowConflictError extends NodaroError {
4538
+ readonly currentUpdatedAt?: string | undefined;
4539
+ readonly currentVersion?: number | undefined;
4540
+ readonly currentRecord?: Record<string, unknown> | undefined;
4541
+ constructor(message?: string, currentUpdatedAt?: string | undefined, currentVersion?: number | undefined, currentRecord?: Record<string, unknown> | undefined);
4542
+ }
4495
4543
  /**
4496
4544
  * A job reached a terminal `failed`/`cancelled` status while being awaited by
4497
4545
  * `nodes.runAndWait` / `nodes.runMany`. Not an HTTP-level error (the polls
@@ -4540,4 +4588,4 @@ interface ApiErrorBody {
4540
4588
  }
4541
4589
  declare function throwFromResponse(status: number, body: ApiErrorBody): never;
4542
4590
 
4543
- export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, CommunityResource, type ContinueVideoProResult, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, type CreateWorkflowInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, type EnhanceInput, type ExchangeCodeInput, type ExecutionStatus, type ExecutionTriggerType, ExecutionsResource, type FactoryPresetsResult, ForbiddenError, type GenerateAssetInput, type GenerateCharacterInput, type GenerateCharacterResult, type GenerateCreatureAssetInput, type GenerateCreatureAssetResult, type GenerateCreatureInput, type GenerateCreatureMotionInput, type GenerateCreatureMotionResult, type GenerateCreatureResult, type GenerateImageParams, type GenerateInput, type GenerateLocationAssetInput, type GenerateLocationInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type Job, JobAbortedError, JobFailedError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, NodaroClient, NodaroError, type NodeCategory, type NodeDescriptor, type NodeExecutionState, type NodeInputField, type NodeInputSchema, type NodeJobOutput, type NodePreset, type NodePresetGroup, NodesResource, NotFoundError, type OAuthAppInfo, OAuthResource, type Object$1 as Object, type ObjectCategory, type ObjectDetail, type ObjectReferencePhoto, type ObjectReferencePhotoKind, ObjectsResource, type OutputType, type PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UserBalance, type UserIdentity, type VcpAnalysis, type VcpAnalysisSpeaker, type VcpAnalyzeInput, type VcpExportInput, type VcpExportTrack, type VideoMetadata, VideoProResource, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
4591
+ export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, CommunityResource, type ContinueVideoProResult, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, type CreateWorkflowInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, type EnhanceInput, type ExchangeCodeInput, type ExecutionStatus, type ExecutionTriggerType, ExecutionsResource, type FactoryPresetsResult, ForbiddenError, type GenerateAssetInput, type GenerateCharacterInput, type GenerateCharacterResult, type GenerateCreatureAssetInput, type GenerateCreatureAssetResult, type GenerateCreatureInput, type GenerateCreatureMotionInput, type GenerateCreatureMotionResult, type GenerateCreatureResult, type GenerateImageParams, type GenerateInput, type GenerateLocationAssetInput, type GenerateLocationInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type Job, JobAbortedError, JobFailedError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, NodaroClient, NodaroError, type NodeCategory, type NodeDescriptor, type NodeExecutionState, type NodeInputField, type NodeInputSchema, type NodeJobOutput, type NodePreset, type NodePresetGroup, NodesResource, NotFoundError, type OAuthAppInfo, OAuthResource, type Object$1 as Object, type ObjectCategory, type ObjectDetail, type ObjectReferencePhoto, type ObjectReferencePhotoKind, ObjectsResource, type OutputType, type PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UserBalance, type UserIdentity, type VcpAnalysis, type VcpAnalysisSpeaker, type VcpAnalyzeInput, type VcpExportInput, type VcpExportTrack, type VideoMetadata, VideoProResource, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
package/dist/index.d.ts CHANGED
@@ -86,6 +86,20 @@ interface UpdateWorkflowInput {
86
86
  settings?: Record<string, unknown>;
87
87
  sourcePrompt?: string;
88
88
  thumbnailUrl?: string | null;
89
+ /**
90
+ * Optimistic concurrency: the `updatedAt` your copy of the workflow was
91
+ * loaded with. When the row has since been written by another tab/device,
92
+ * the update is rejected with HTTP 409 `workflow_conflict`
93
+ * (`WorkflowConflictError`) carrying the current record — re-read/merge and
94
+ * retry instead of last-writer-wins clobbering the other writer's changes.
95
+ * Omit for the legacy unconditional replace.
96
+ */
97
+ expectedUpdatedAt?: string;
98
+ /**
99
+ * Optimistic concurrency by monotonic version — preferred over
100
+ * `expectedUpdatedAt` (integer bumped by the DB on every content change).
101
+ */
102
+ expectedVersion?: number;
89
103
  }
90
104
  interface RunWorkflowParams {
91
105
  /** Optional subset of node IDs to execute. Omit to run the full workflow. */
@@ -3855,6 +3869,27 @@ declare class MediaResource {
3855
3869
  }): Promise<{
3856
3870
  jobId: string;
3857
3871
  }>;
3872
+ /**
3873
+ * Composite 2–30 images into ONE large 2K/4K collage (`POST /v1/image-collage`).
3874
+ * `layout` `"smart"` (default — justified rows at each image's exact aspect
3875
+ * ratio, no cropping; the output height floats) or `"grid"` (uniform,
3876
+ * letterboxed cells). `imageSizes` is index-aligned with `imageUrls` and
3877
+ * gives per-image RELATIVE size hints for the smart layout: `0` auto
3878
+ * ("don't care", default), `1` big (~2× linear vs medium), `2` medium,
3879
+ * `3` small (~½ linear). All-equal hints change nothing; grid ignores them.
3880
+ * Poll `jobs.get(jobId)` for the finished image.
3881
+ */
3882
+ imageCollage(input: {
3883
+ imageUrls: string[];
3884
+ imageSizes?: Array<0 | 1 | 2 | 3>;
3885
+ layout?: "smart" | "grid";
3886
+ resolution?: "2K" | "4K";
3887
+ aspectRatio?: string;
3888
+ gap?: number;
3889
+ backgroundColor?: string;
3890
+ }): Promise<{
3891
+ jobId: string;
3892
+ }>;
3858
3893
  /**
3859
3894
  * Trim a video to a range (`POST /v1/trim-video`). Give the range in whichever
3860
3895
  * unit fits: `startTime`/`endTime` seconds, `trim*Frames`, `trim*Seconds`, or
@@ -4492,6 +4527,19 @@ declare class StorageExceededError extends NodaroError {
4492
4527
  readonly limitBytes?: number | undefined;
4493
4528
  constructor(message?: string, limitBytes?: number | undefined);
4494
4529
  }
4530
+ /**
4531
+ * Optimistic-concurrency rejection (HTTP 409 `workflow_conflict`): the workflow
4532
+ * was written by another tab/device after the state carried in
4533
+ * `expectedUpdatedAt`/`expectedVersion` was read. `currentRecord` — when the
4534
+ * server includes it — is the full current workflow: merge your changes onto it
4535
+ * and retry with its fresh `updatedAt`, no follow-up GET needed.
4536
+ */
4537
+ declare class WorkflowConflictError extends NodaroError {
4538
+ readonly currentUpdatedAt?: string | undefined;
4539
+ readonly currentVersion?: number | undefined;
4540
+ readonly currentRecord?: Record<string, unknown> | undefined;
4541
+ constructor(message?: string, currentUpdatedAt?: string | undefined, currentVersion?: number | undefined, currentRecord?: Record<string, unknown> | undefined);
4542
+ }
4495
4543
  /**
4496
4544
  * A job reached a terminal `failed`/`cancelled` status while being awaited by
4497
4545
  * `nodes.runAndWait` / `nodes.runMany`. Not an HTTP-level error (the polls
@@ -4540,4 +4588,4 @@ interface ApiErrorBody {
4540
4588
  }
4541
4589
  declare function throwFromResponse(status: number, body: ApiErrorBody): never;
4542
4590
 
4543
- export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, CommunityResource, type ContinueVideoProResult, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, type CreateWorkflowInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, type EnhanceInput, type ExchangeCodeInput, type ExecutionStatus, type ExecutionTriggerType, ExecutionsResource, type FactoryPresetsResult, ForbiddenError, type GenerateAssetInput, type GenerateCharacterInput, type GenerateCharacterResult, type GenerateCreatureAssetInput, type GenerateCreatureAssetResult, type GenerateCreatureInput, type GenerateCreatureMotionInput, type GenerateCreatureMotionResult, type GenerateCreatureResult, type GenerateImageParams, type GenerateInput, type GenerateLocationAssetInput, type GenerateLocationInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type Job, JobAbortedError, JobFailedError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, NodaroClient, NodaroError, type NodeCategory, type NodeDescriptor, type NodeExecutionState, type NodeInputField, type NodeInputSchema, type NodeJobOutput, type NodePreset, type NodePresetGroup, NodesResource, NotFoundError, type OAuthAppInfo, OAuthResource, type Object$1 as Object, type ObjectCategory, type ObjectDetail, type ObjectReferencePhoto, type ObjectReferencePhotoKind, ObjectsResource, type OutputType, type PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UserBalance, type UserIdentity, type VcpAnalysis, type VcpAnalysisSpeaker, type VcpAnalyzeInput, type VcpExportInput, type VcpExportTrack, type VideoMetadata, VideoProResource, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
4591
+ export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, CommunityResource, type ContinueVideoProResult, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, type CreateWorkflowInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, type EnhanceInput, type ExchangeCodeInput, type ExecutionStatus, type ExecutionTriggerType, ExecutionsResource, type FactoryPresetsResult, ForbiddenError, type GenerateAssetInput, type GenerateCharacterInput, type GenerateCharacterResult, type GenerateCreatureAssetInput, type GenerateCreatureAssetResult, type GenerateCreatureInput, type GenerateCreatureMotionInput, type GenerateCreatureMotionResult, type GenerateCreatureResult, type GenerateImageParams, type GenerateInput, type GenerateLocationAssetInput, type GenerateLocationInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type Job, JobAbortedError, JobFailedError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, NodaroClient, NodaroError, type NodeCategory, type NodeDescriptor, type NodeExecutionState, type NodeInputField, type NodeInputSchema, type NodeJobOutput, type NodePreset, type NodePresetGroup, NodesResource, NotFoundError, type OAuthAppInfo, OAuthResource, type Object$1 as Object, type ObjectCategory, type ObjectDetail, type ObjectReferencePhoto, type ObjectReferencePhotoKind, ObjectsResource, type OutputType, type PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UserBalance, type UserIdentity, type VcpAnalysis, type VcpAnalysisSpeaker, type VcpAnalyzeInput, type VcpExportInput, type VcpExportTrack, type VideoMetadata, VideoProResource, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
package/dist/index.js CHANGED
@@ -57,6 +57,18 @@ var StorageExceededError = class extends NodaroError {
57
57
  }
58
58
  limitBytes;
59
59
  };
60
+ var WorkflowConflictError = class extends NodaroError {
61
+ constructor(message = "Workflow was updated by another writer", currentUpdatedAt, currentVersion, currentRecord) {
62
+ super(message, "workflow_conflict", 409);
63
+ this.currentUpdatedAt = currentUpdatedAt;
64
+ this.currentVersion = currentVersion;
65
+ this.currentRecord = currentRecord;
66
+ this.name = "WorkflowConflictError";
67
+ }
68
+ currentUpdatedAt;
69
+ currentVersion;
70
+ currentRecord;
71
+ };
60
72
  var JobFailedError = class extends NodaroError {
61
73
  constructor(message, jobId, jobStatus = "failed") {
62
74
  super(message, "job_failed", 0);
@@ -89,6 +101,14 @@ function throwFromResponse(status, body) {
89
101
  const code = body.error?.code ?? "internal_error";
90
102
  const message = body.error?.message ?? "Request failed";
91
103
  if (status === 401) throw new UnauthorizedError(message);
104
+ if (status === 409 && code === "workflow_conflict") {
105
+ throw new WorkflowConflictError(
106
+ message,
107
+ body.error?.currentUpdatedAt,
108
+ body.error?.currentVersion,
109
+ body.error?.currentRecord
110
+ );
111
+ }
92
112
  if (status === 403 && code === "insufficient_scope") {
93
113
  throw new ForbiddenError(message, body.error?.missingScope);
94
114
  }
@@ -1735,6 +1755,19 @@ var MediaResource = class {
1735
1755
  saveToStorage(input) {
1736
1756
  return this.client.request("POST", "/v1/save-to-storage", { body: input });
1737
1757
  }
1758
+ /**
1759
+ * Composite 2–30 images into ONE large 2K/4K collage (`POST /v1/image-collage`).
1760
+ * `layout` `"smart"` (default — justified rows at each image's exact aspect
1761
+ * ratio, no cropping; the output height floats) or `"grid"` (uniform,
1762
+ * letterboxed cells). `imageSizes` is index-aligned with `imageUrls` and
1763
+ * gives per-image RELATIVE size hints for the smart layout: `0` auto
1764
+ * ("don't care", default), `1` big (~2× linear vs medium), `2` medium,
1765
+ * `3` small (~½ linear). All-equal hints change nothing; grid ignores them.
1766
+ * Poll `jobs.get(jobId)` for the finished image.
1767
+ */
1768
+ imageCollage(input) {
1769
+ return this.client.request("POST", "/v1/image-collage", { body: input });
1770
+ }
1738
1771
  /**
1739
1772
  * Trim a video to a range (`POST /v1/trim-video`). Give the range in whichever
1740
1773
  * unit fits: `startTime`/`endTime` seconds, `trim*Frames`, `trim*Seconds`, or
@@ -2244,6 +2277,6 @@ function supabaseAuth(supabase) {
2244
2277
  };
2245
2278
  }
2246
2279
 
2247
- export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, MediaResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, ReduceResource, StaticTokenAuth, StorageExceededError, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
2280
+ export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, MediaResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, ReduceResource, StaticTokenAuth, StorageExceededError, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowConflictError, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
2248
2281
  //# sourceMappingURL=index.js.map
2249
2282
  //# sourceMappingURL=index.js.map