@nodaro/sdk 1.9.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.cjs +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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. */
|
|
@@ -4513,6 +4527,19 @@ declare class StorageExceededError extends NodaroError {
|
|
|
4513
4527
|
readonly limitBytes?: number | undefined;
|
|
4514
4528
|
constructor(message?: string, limitBytes?: number | undefined);
|
|
4515
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
|
+
}
|
|
4516
4543
|
/**
|
|
4517
4544
|
* A job reached a terminal `failed`/`cancelled` status while being awaited by
|
|
4518
4545
|
* `nodes.runAndWait` / `nodes.runMany`. Not an HTTP-level error (the polls
|
|
@@ -4561,4 +4588,4 @@ interface ApiErrorBody {
|
|
|
4561
4588
|
}
|
|
4562
4589
|
declare function throwFromResponse(status: number, body: ApiErrorBody): never;
|
|
4563
4590
|
|
|
4564
|
-
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. */
|
|
@@ -4513,6 +4527,19 @@ declare class StorageExceededError extends NodaroError {
|
|
|
4513
4527
|
readonly limitBytes?: number | undefined;
|
|
4514
4528
|
constructor(message?: string, limitBytes?: number | undefined);
|
|
4515
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
|
+
}
|
|
4516
4543
|
/**
|
|
4517
4544
|
* A job reached a terminal `failed`/`cancelled` status while being awaited by
|
|
4518
4545
|
* `nodes.runAndWait` / `nodes.runMany`. Not an HTTP-level error (the polls
|
|
@@ -4561,4 +4588,4 @@ interface ApiErrorBody {
|
|
|
4561
4588
|
}
|
|
4562
4589
|
declare function throwFromResponse(status: number, body: ApiErrorBody): never;
|
|
4563
4590
|
|
|
4564
|
-
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
|
}
|
|
@@ -2257,6 +2277,6 @@ function supabaseAuth(supabase) {
|
|
|
2257
2277
|
};
|
|
2258
2278
|
}
|
|
2259
2279
|
|
|
2260
|
-
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 };
|
|
2261
2281
|
//# sourceMappingURL=index.js.map
|
|
2262
2282
|
//# sourceMappingURL=index.js.map
|