@scenario-labs/sdk 0.3.0 → 1.1.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/CHANGELOG.md +30 -0
- package/README.md +40 -8
- package/client.d.mts +36 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +36 -16
- package/client.d.ts.map +1 -1
- package/client.js +10 -0
- package/client.js.map +1 -1
- package/client.mjs +10 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +153 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +153 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +276 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +263 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +5 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +5 -1
- package/index.d.ts.map +1 -1
- package/index.js +14 -1
- package/index.js.map +1 -1
- package/index.mjs +5 -1
- package/index.mjs.map +1 -1
- package/lib/asset.d.mts +55 -0
- package/lib/asset.d.mts.map +1 -0
- package/lib/asset.d.ts +55 -0
- package/lib/asset.d.ts.map +1 -0
- package/lib/asset.js +60 -0
- package/lib/asset.js.map +1 -0
- package/lib/asset.mjs +54 -0
- package/lib/asset.mjs.map +1 -0
- package/lib/job.d.mts +13 -1
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +13 -1
- package/lib/job.d.ts.map +1 -1
- package/lib/job.js +18 -1
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +16 -0
- package/lib/job.mjs.map +1 -1
- package/lib/models.d.mts +34 -2
- package/lib/models.d.mts.map +1 -1
- package/lib/models.d.ts +34 -2
- package/lib/models.d.ts.map +1 -1
- package/lib/models.js +39 -2
- package/lib/models.js.map +1 -1
- package/lib/models.mjs +37 -1
- package/lib/models.mjs.map +1 -1
- package/lib/scenario.d.mts +14 -0
- package/lib/scenario.d.mts.map +1 -1
- package/lib/scenario.d.ts +14 -0
- package/lib/scenario.d.ts.map +1 -1
- package/lib/scenario.js +14 -0
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +14 -0
- package/lib/scenario.mjs.map +1 -1
- package/lib/upload.d.mts +143 -0
- package/lib/upload.d.mts.map +1 -0
- package/lib/upload.d.ts +143 -0
- package/lib/upload.d.ts.map +1 -0
- package/lib/upload.js +242 -0
- package/lib/upload.js.map +1 -0
- package/lib/upload.mjs +203 -0
- package/lib/upload.mjs.map +1 -0
- package/lib/workflow.d.mts +13 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +13 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +17 -4
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +17 -4
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_import_validator.d.mts +40 -0
- package/lib/workflow_import_validator.d.mts.map +1 -0
- package/lib/workflow_import_validator.d.ts +40 -0
- package/lib/workflow_import_validator.d.ts.map +1 -0
- package/lib/workflow_import_validator.js +69 -0
- package/lib/workflow_import_validator.js.map +1 -0
- package/lib/workflow_import_validator.mjs +64 -0
- package/lib/workflow_import_validator.mjs.map +1 -0
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/assets/assets.d.mts +646 -669
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +646 -669
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +3 -2
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +3 -2
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/index.d.mts +1 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +1 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/assets/public.d.mts +12 -12
- package/resources/assets/public.d.mts.map +1 -1
- package/resources/assets/public.d.ts +12 -12
- package/resources/assets/public.d.ts.map +1 -1
- package/resources/collections/collections.d.mts +38 -49
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +38 -49
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js +5 -1
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +5 -1
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/collections/index.d.mts +1 -1
- package/resources/collections/index.d.mts.map +1 -1
- package/resources/collections/index.d.ts +1 -1
- package/resources/collections/index.d.ts.map +1 -1
- package/resources/collections/index.js.map +1 -1
- package/resources/collections/index.mjs.map +1 -1
- package/resources/generate.d.mts +1027 -242
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +1027 -242
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +7 -0
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +7 -0
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +8 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +369 -380
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +369 -380
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +2 -1
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +2 -1
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +2 -2
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +2 -2
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +4 -4
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +4 -4
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/index.d.mts +1 -1
- package/resources/models/index.d.mts.map +1 -1
- package/resources/models/index.d.ts +1 -1
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.mts +845 -856
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +845 -856
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +2 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +2 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +2 -2
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +2 -2
- package/resources/models/train.d.ts.map +1 -1
- package/resources/search.d.mts +215 -295
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +215 -295
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +9 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +9 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +23 -35
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +23 -35
- package/resources/tags.d.ts.map +1 -1
- package/resources/tags.js +2 -1
- package/resources/tags.js.map +1 -1
- package/resources/tags.mjs +2 -1
- package/resources/tags.mjs.map +1 -1
- package/resources/usages.d.mts +3 -3
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +3 -3
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +688 -704
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +688 -704
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +5 -1
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +5 -1
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +107 -2
- package/src/core/pagination.ts +497 -0
- package/src/index.ts +11 -1
- package/src/lib/asset.ts +85 -0
- package/src/lib/job.ts +28 -1
- package/src/lib/models.ts +62 -2
- package/src/lib/scenario.ts +14 -0
- package/src/lib/upload.ts +344 -0
- package/src/lib/workflow.ts +29 -4
- package/src/lib/workflow_import_validator.ts +104 -0
- package/src/pagination.ts +2 -0
- package/src/resources/assets/assets.ts +930 -909
- package/src/resources/assets/index.ts +2 -0
- package/src/resources/assets/public.ts +17 -7
- package/src/resources/collections/collections.ts +45 -54
- package/src/resources/collections/index.ts +1 -0
- package/src/resources/generate.ts +1227 -136
- package/src/resources/index.ts +11 -1
- package/src/resources/jobs.ts +613 -622
- package/src/resources/models/description.ts +4 -0
- package/src/resources/models/examples.ts +8 -0
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +1066 -1064
- package/src/resources/models/train.ts +4 -0
- package/src/resources/search.ts +239 -327
- package/src/resources/tags.ts +32 -39
- package/src/resources/usages.ts +5 -0
- package/src/resources/workflows.ts +850 -864
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { PagePromise, WorkflowsCursor, type WorkflowsCursorParams } from "../core/pagination.mjs";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
5
|
export declare class Workflows extends APIResource {
|
|
5
6
|
/**
|
|
@@ -17,7 +18,7 @@ export declare class Workflows extends APIResource {
|
|
|
17
18
|
/**
|
|
18
19
|
* List workflows
|
|
19
20
|
*/
|
|
20
|
-
list(query?: WorkflowListParams | null | undefined, options?: RequestOptions):
|
|
21
|
+
list(query?: WorkflowListParams | null | undefined, options?: RequestOptions): PagePromise<WorkflowListResponsesWorkflowsCursor, WorkflowListResponse>;
|
|
21
22
|
/**
|
|
22
23
|
* Delete workflow
|
|
23
24
|
*/
|
|
@@ -36,6 +37,7 @@ export declare class Workflows extends APIResource {
|
|
|
36
37
|
*/
|
|
37
38
|
run(workflowID: string, params: WorkflowRunParams, options?: RequestOptions): APIPromise<WorkflowRunResponse>;
|
|
38
39
|
}
|
|
40
|
+
export type WorkflowListResponsesWorkflowsCursor = WorkflowsCursor<WorkflowListResponse>;
|
|
39
41
|
export interface WorkflowCreateResponse {
|
|
40
42
|
workflow: WorkflowCreateResponse.Workflow;
|
|
41
43
|
}
|
|
@@ -2991,204 +2993,349 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
2991
2993
|
}
|
|
2992
2994
|
}
|
|
2993
2995
|
}
|
|
2994
|
-
/**
|
|
2995
|
-
* Returns a paginated list of workflows. Supports both public access (via the
|
|
2996
|
-
* `Authorization` header set to `public-auth-token`) and authenticated user access
|
|
2997
|
-
* (including API keys). Public responses exclude some attributes.
|
|
2998
|
-
*/
|
|
2999
2996
|
export interface WorkflowListResponse {
|
|
3000
|
-
workflows: Array<WorkflowListResponse.Workflow>;
|
|
3001
2997
|
/**
|
|
3002
|
-
*
|
|
2998
|
+
* Unique identifier of the workflow.
|
|
3003
2999
|
*/
|
|
3004
|
-
|
|
3000
|
+
id: string;
|
|
3001
|
+
/**
|
|
3002
|
+
* User that created the workflow.
|
|
3003
|
+
*/
|
|
3004
|
+
authorId: string;
|
|
3005
|
+
/**
|
|
3006
|
+
* ISO string
|
|
3007
|
+
*/
|
|
3008
|
+
createdAt: string;
|
|
3009
|
+
/**
|
|
3010
|
+
* Full description of what the workflow does.
|
|
3011
|
+
*/
|
|
3012
|
+
description: string;
|
|
3013
|
+
/**
|
|
3014
|
+
* The UI data about the workflow. This is managed by scenario webapp.
|
|
3015
|
+
*/
|
|
3016
|
+
editorInfo: {
|
|
3017
|
+
[key: string]: unknown;
|
|
3018
|
+
};
|
|
3019
|
+
/**
|
|
3020
|
+
* The flow of the workflow.
|
|
3021
|
+
*/
|
|
3022
|
+
flow: Array<WorkflowListResponse.Flow>;
|
|
3023
|
+
/**
|
|
3024
|
+
* The inputs of the workflow.
|
|
3025
|
+
*/
|
|
3026
|
+
inputs: Array<WorkflowListResponse.Input>;
|
|
3027
|
+
/**
|
|
3028
|
+
* Human-readable name of the workflow.
|
|
3029
|
+
*/
|
|
3030
|
+
name: string;
|
|
3031
|
+
/**
|
|
3032
|
+
* Project that owns the workflow.
|
|
3033
|
+
*/
|
|
3034
|
+
ownerId: string;
|
|
3035
|
+
/**
|
|
3036
|
+
* Visibility setting for the workflow.
|
|
3037
|
+
*/
|
|
3038
|
+
privacy: 'private' | 'public' | 'unlisted';
|
|
3039
|
+
/**
|
|
3040
|
+
* Short summary of the workflow.
|
|
3041
|
+
*/
|
|
3042
|
+
shortDescription: string;
|
|
3043
|
+
/**
|
|
3044
|
+
* Current lifecycle status (draft, ready, deleted).
|
|
3045
|
+
*/
|
|
3046
|
+
status: 'deleted' | 'draft' | 'ready';
|
|
3047
|
+
/**
|
|
3048
|
+
* The tag set of the workflow.
|
|
3049
|
+
*/
|
|
3050
|
+
tagSet: Array<string>;
|
|
3051
|
+
/**
|
|
3052
|
+
* ISO string
|
|
3053
|
+
*/
|
|
3054
|
+
updatedAt: string;
|
|
3055
|
+
/**
|
|
3056
|
+
* A representation of an asset after being processed by the workflow
|
|
3057
|
+
*/
|
|
3058
|
+
after?: WorkflowListResponse.After;
|
|
3059
|
+
/**
|
|
3060
|
+
* A representation of an asset before being processed by the workflow
|
|
3061
|
+
*/
|
|
3062
|
+
before?: WorkflowListResponse.Before;
|
|
3063
|
+
/**
|
|
3064
|
+
* Embedding is a map of embedding version into embedding date
|
|
3065
|
+
*/
|
|
3066
|
+
embedding?: unknown;
|
|
3067
|
+
/**
|
|
3068
|
+
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
3069
|
+
* except by the author or a project admin.
|
|
3070
|
+
*/
|
|
3071
|
+
isLocked?: boolean;
|
|
3072
|
+
lastIndexedAt?: string;
|
|
3073
|
+
/**
|
|
3074
|
+
* The type of indexing operation to perform in MeiliSearch
|
|
3075
|
+
*/
|
|
3076
|
+
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
3077
|
+
/**
|
|
3078
|
+
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
3079
|
+
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
3080
|
+
* in the Ready state.
|
|
3081
|
+
*/
|
|
3082
|
+
lastReadyFlowUpdatedAt?: string;
|
|
3083
|
+
/**
|
|
3084
|
+
* ISO string timestamp when lock state was last changed.
|
|
3085
|
+
*/
|
|
3086
|
+
lockedStateChangedAt?: string;
|
|
3087
|
+
/**
|
|
3088
|
+
* UserId of the user who last changed the lock state.
|
|
3089
|
+
*/
|
|
3090
|
+
lockedStateChangedBy?: string;
|
|
3091
|
+
/**
|
|
3092
|
+
* Asset kinds produced by this workflow (if specified).
|
|
3093
|
+
*/
|
|
3094
|
+
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
3095
|
+
/**
|
|
3096
|
+
* Currently the thumbnail is identical to the after asset.
|
|
3097
|
+
*/
|
|
3098
|
+
thumbnail?: WorkflowListResponse.Thumbnail;
|
|
3099
|
+
/**
|
|
3100
|
+
* The UI configuration for the workflow. This is managed by scenario webapp.
|
|
3101
|
+
*/
|
|
3102
|
+
uiConfig?: WorkflowListResponse.UiConfig;
|
|
3005
3103
|
}
|
|
3006
3104
|
export declare namespace WorkflowListResponse {
|
|
3007
|
-
interface
|
|
3105
|
+
interface Flow {
|
|
3008
3106
|
/**
|
|
3009
|
-
*
|
|
3107
|
+
* The id of the node.
|
|
3010
3108
|
*/
|
|
3011
3109
|
id: string;
|
|
3012
3110
|
/**
|
|
3013
|
-
*
|
|
3014
|
-
*/
|
|
3015
|
-
authorId: string;
|
|
3016
|
-
/**
|
|
3017
|
-
* ISO string
|
|
3018
|
-
*/
|
|
3019
|
-
createdAt: string;
|
|
3020
|
-
/**
|
|
3021
|
-
* Full description of what the workflow does.
|
|
3022
|
-
*/
|
|
3023
|
-
description: string;
|
|
3024
|
-
/**
|
|
3025
|
-
* The UI data about the workflow. This is managed by scenario webapp.
|
|
3026
|
-
*/
|
|
3027
|
-
editorInfo: {
|
|
3028
|
-
[key: string]: unknown;
|
|
3029
|
-
};
|
|
3030
|
-
/**
|
|
3031
|
-
* The flow of the workflow.
|
|
3032
|
-
*/
|
|
3033
|
-
flow: Array<Workflow.Flow>;
|
|
3034
|
-
/**
|
|
3035
|
-
* The inputs of the workflow.
|
|
3036
|
-
*/
|
|
3037
|
-
inputs: Array<Workflow.Input>;
|
|
3038
|
-
/**
|
|
3039
|
-
* Human-readable name of the workflow.
|
|
3040
|
-
*/
|
|
3041
|
-
name: string;
|
|
3042
|
-
/**
|
|
3043
|
-
* Project that owns the workflow.
|
|
3044
|
-
*/
|
|
3045
|
-
ownerId: string;
|
|
3046
|
-
/**
|
|
3047
|
-
* Visibility setting for the workflow.
|
|
3048
|
-
*/
|
|
3049
|
-
privacy: 'private' | 'public' | 'unlisted';
|
|
3050
|
-
/**
|
|
3051
|
-
* Short summary of the workflow.
|
|
3052
|
-
*/
|
|
3053
|
-
shortDescription: string;
|
|
3054
|
-
/**
|
|
3055
|
-
* Current lifecycle status (draft, ready, deleted).
|
|
3111
|
+
* The type of the job for the node.
|
|
3056
3112
|
*/
|
|
3057
|
-
|
|
3113
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
3058
3114
|
/**
|
|
3059
|
-
*
|
|
3115
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
3116
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
3117
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
3060
3118
|
*/
|
|
3061
|
-
|
|
3119
|
+
count?: number;
|
|
3062
3120
|
/**
|
|
3063
|
-
*
|
|
3121
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
3122
|
+
* dependencies. Mainly used for user approval nodes.
|
|
3064
3123
|
*/
|
|
3065
|
-
|
|
3124
|
+
dependsOn?: Array<string>;
|
|
3066
3125
|
/**
|
|
3067
|
-
*
|
|
3126
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
3127
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
3128
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
3129
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
3130
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
3068
3131
|
*/
|
|
3069
|
-
|
|
3132
|
+
includeOutputsInWorkflowJob?: true;
|
|
3070
3133
|
/**
|
|
3071
|
-
*
|
|
3134
|
+
* The inputs of the node.
|
|
3072
3135
|
*/
|
|
3073
|
-
|
|
3136
|
+
inputs?: Array<Flow.Input>;
|
|
3074
3137
|
/**
|
|
3075
|
-
*
|
|
3138
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
3139
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
3140
|
+
* numbers, or asset IDs.
|
|
3076
3141
|
*/
|
|
3077
|
-
|
|
3142
|
+
items?: Array<string>;
|
|
3078
3143
|
/**
|
|
3079
|
-
*
|
|
3080
|
-
*
|
|
3144
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
3145
|
+
* dynamically-created copies of loop body nodes.
|
|
3081
3146
|
*/
|
|
3082
|
-
|
|
3083
|
-
lastIndexedAt?: string;
|
|
3147
|
+
iterationIndex?: number;
|
|
3084
3148
|
/**
|
|
3085
|
-
* The
|
|
3149
|
+
* The logic of the node. Only available for logic nodes.
|
|
3086
3150
|
*/
|
|
3087
|
-
|
|
3151
|
+
logic?: Flow.Logic;
|
|
3088
3152
|
/**
|
|
3089
|
-
*
|
|
3090
|
-
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
3091
|
-
* in the Ready state.
|
|
3153
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
3092
3154
|
*/
|
|
3093
|
-
|
|
3155
|
+
logicType?: 'if-else';
|
|
3094
3156
|
/**
|
|
3095
|
-
*
|
|
3157
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
3158
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
3159
|
+
* for ForEach nodes.
|
|
3096
3160
|
*/
|
|
3097
|
-
|
|
3161
|
+
loopBodyNodeIds?: Array<string>;
|
|
3098
3162
|
/**
|
|
3099
|
-
*
|
|
3163
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
3164
|
+
* dynamically-created copies of loop body nodes.
|
|
3100
3165
|
*/
|
|
3101
|
-
|
|
3166
|
+
loopNodeId?: string;
|
|
3102
3167
|
/**
|
|
3103
|
-
*
|
|
3168
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
3104
3169
|
*/
|
|
3105
|
-
|
|
3170
|
+
modelId?: string;
|
|
3106
3171
|
/**
|
|
3107
|
-
*
|
|
3172
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
3108
3173
|
*/
|
|
3109
|
-
|
|
3174
|
+
workflowId?: string;
|
|
3175
|
+
}
|
|
3176
|
+
namespace Flow {
|
|
3110
3177
|
/**
|
|
3111
|
-
*
|
|
3178
|
+
* This is used to run the flow.
|
|
3112
3179
|
*/
|
|
3113
|
-
|
|
3114
|
-
}
|
|
3115
|
-
namespace Workflow {
|
|
3116
|
-
interface Flow {
|
|
3180
|
+
interface Input {
|
|
3117
3181
|
/**
|
|
3118
|
-
* The
|
|
3182
|
+
* The name that must be user to call the model through the API
|
|
3119
3183
|
*/
|
|
3120
|
-
|
|
3184
|
+
name: string;
|
|
3121
3185
|
/**
|
|
3122
|
-
* The type of the
|
|
3186
|
+
* The data type of the input
|
|
3123
3187
|
*/
|
|
3124
|
-
type: '
|
|
3188
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
3125
3189
|
/**
|
|
3126
|
-
*
|
|
3127
|
-
*
|
|
3128
|
-
*
|
|
3190
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
3191
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
3192
|
+
* dropdown.
|
|
3129
3193
|
*/
|
|
3130
|
-
|
|
3194
|
+
allowedValues?: Array<unknown>;
|
|
3131
3195
|
/**
|
|
3132
|
-
*
|
|
3133
|
-
*
|
|
3196
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
3197
|
+
* \`file_array\` input types with kind \`image\`.
|
|
3134
3198
|
*/
|
|
3135
|
-
|
|
3199
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
3136
3200
|
/**
|
|
3137
|
-
*
|
|
3138
|
-
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
3139
|
-
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
3140
|
-
* outputs. Set this to true to also include intermediate nodes in the final
|
|
3141
|
-
* output. Note: This should only be set to `true` or left undefined.
|
|
3201
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
3142
3202
|
*/
|
|
3143
|
-
|
|
3203
|
+
color?: boolean;
|
|
3144
3204
|
/**
|
|
3145
|
-
*
|
|
3205
|
+
* Whether this input affects the model's cost calculation
|
|
3146
3206
|
*/
|
|
3147
|
-
|
|
3207
|
+
costImpact?: boolean;
|
|
3148
3208
|
/**
|
|
3149
|
-
*
|
|
3150
|
-
* when executed. Only available for List nodes. The values can be strings,
|
|
3151
|
-
* numbers, or asset IDs.
|
|
3209
|
+
* The default value for the input
|
|
3152
3210
|
*/
|
|
3153
|
-
|
|
3211
|
+
default?: unknown;
|
|
3154
3212
|
/**
|
|
3155
|
-
*
|
|
3156
|
-
* dynamically-created copies of loop body nodes.
|
|
3213
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
3157
3214
|
*/
|
|
3158
|
-
|
|
3215
|
+
description?: string;
|
|
3159
3216
|
/**
|
|
3160
|
-
*
|
|
3217
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
3218
|
+
* value appear consecutively in the UI.
|
|
3161
3219
|
*/
|
|
3162
|
-
|
|
3220
|
+
group?: string;
|
|
3163
3221
|
/**
|
|
3164
|
-
*
|
|
3222
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
3165
3223
|
*/
|
|
3166
|
-
|
|
3224
|
+
hint?: string;
|
|
3167
3225
|
/**
|
|
3168
|
-
*
|
|
3169
|
-
*
|
|
3170
|
-
*
|
|
3226
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
3227
|
+
* the same as the current object. This is only available for type inputs_array
|
|
3228
|
+
* inputs.
|
|
3171
3229
|
*/
|
|
3172
|
-
|
|
3230
|
+
inputs?: Array<{
|
|
3231
|
+
[key: string]: unknown;
|
|
3232
|
+
}>;
|
|
3173
3233
|
/**
|
|
3174
|
-
*
|
|
3175
|
-
*
|
|
3234
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
3235
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
3236
|
+
* type.
|
|
3176
3237
|
*/
|
|
3177
|
-
|
|
3238
|
+
items?: Array<Array<Input.Item>>;
|
|
3178
3239
|
/**
|
|
3179
|
-
* The
|
|
3180
|
-
|
|
3181
|
-
|
|
3240
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3241
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3242
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
3243
|
+
* data:kind, prefix
|
|
3244
|
+
*/
|
|
3245
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3182
3246
|
/**
|
|
3183
|
-
* The
|
|
3247
|
+
* The label displayed in the UI for this input
|
|
3184
3248
|
*/
|
|
3185
|
-
|
|
3249
|
+
label?: string;
|
|
3250
|
+
/**
|
|
3251
|
+
* The name of the file input field to use as the mask source
|
|
3252
|
+
*/
|
|
3253
|
+
maskFrom?: string;
|
|
3254
|
+
/**
|
|
3255
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
3256
|
+
* types.
|
|
3257
|
+
*/
|
|
3258
|
+
max?: number;
|
|
3259
|
+
/**
|
|
3260
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3261
|
+
* \`string_array\`.
|
|
3262
|
+
*/
|
|
3263
|
+
maxLength?: number;
|
|
3264
|
+
/**
|
|
3265
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
3266
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3267
|
+
* creation time.
|
|
3268
|
+
*/
|
|
3269
|
+
maxSize?: number;
|
|
3270
|
+
/**
|
|
3271
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3272
|
+
*/
|
|
3273
|
+
min?: number;
|
|
3274
|
+
/**
|
|
3275
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
3276
|
+
* \`string_array\`.
|
|
3277
|
+
*/
|
|
3278
|
+
minLength?: number;
|
|
3279
|
+
/**
|
|
3280
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3281
|
+
* available for \`model_array\` input type.
|
|
3282
|
+
*/
|
|
3283
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
3284
|
+
/**
|
|
3285
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3286
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
3287
|
+
*
|
|
3288
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
3289
|
+
*/
|
|
3290
|
+
parent?: boolean;
|
|
3291
|
+
/**
|
|
3292
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
3293
|
+
*/
|
|
3294
|
+
placeholder?: string;
|
|
3295
|
+
/**
|
|
3296
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
3297
|
+
* spark feature. Only available for \`string\` input type.
|
|
3298
|
+
*/
|
|
3299
|
+
prompt?: boolean;
|
|
3300
|
+
/**
|
|
3301
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
3302
|
+
* type.
|
|
3303
|
+
*/
|
|
3304
|
+
promptSpark?: boolean;
|
|
3305
|
+
/**
|
|
3306
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
3307
|
+
* least one of node or conditional.
|
|
3308
|
+
*/
|
|
3309
|
+
ref?: Input.Ref;
|
|
3310
|
+
/**
|
|
3311
|
+
* Set of rules that describes when this input is required:
|
|
3312
|
+
*
|
|
3313
|
+
* - \`always\`: Input is always required
|
|
3314
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3315
|
+
* defined
|
|
3316
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3317
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3318
|
+
* value
|
|
3319
|
+
*
|
|
3320
|
+
* By default, the input is not required.
|
|
3321
|
+
*/
|
|
3322
|
+
required?: Input.Required;
|
|
3323
|
+
/**
|
|
3324
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3325
|
+
*/
|
|
3326
|
+
step?: number;
|
|
3327
|
+
/**
|
|
3328
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
3329
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
3330
|
+
*/
|
|
3331
|
+
value?: unknown;
|
|
3186
3332
|
}
|
|
3187
|
-
namespace
|
|
3333
|
+
namespace Input {
|
|
3188
3334
|
/**
|
|
3189
|
-
*
|
|
3335
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
3336
|
+
* recursive items field.
|
|
3190
3337
|
*/
|
|
3191
|
-
interface
|
|
3338
|
+
interface Item {
|
|
3192
3339
|
/**
|
|
3193
3340
|
* The name that must be user to call the model through the API
|
|
3194
3341
|
*/
|
|
@@ -3241,12 +3388,6 @@ export declare namespace WorkflowListResponse {
|
|
|
3241
3388
|
inputs?: Array<{
|
|
3242
3389
|
[key: string]: unknown;
|
|
3243
3390
|
}>;
|
|
3244
|
-
/**
|
|
3245
|
-
* The configured items for inputs_array type inputs. Each item is an array of
|
|
3246
|
-
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
3247
|
-
* type.
|
|
3248
|
-
*/
|
|
3249
|
-
items?: Array<Array<Input.Item>>;
|
|
3250
3391
|
/**
|
|
3251
3392
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3252
3393
|
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
@@ -3317,7 +3458,7 @@ export declare namespace WorkflowListResponse {
|
|
|
3317
3458
|
* The reference to another input or output of the same workflow. Must have at
|
|
3318
3459
|
* least one of node or conditional.
|
|
3319
3460
|
*/
|
|
3320
|
-
ref?:
|
|
3461
|
+
ref?: Item.Ref;
|
|
3321
3462
|
/**
|
|
3322
3463
|
* Set of rules that describes when this input is required:
|
|
3323
3464
|
*
|
|
@@ -3330,7 +3471,7 @@ export declare namespace WorkflowListResponse {
|
|
|
3330
3471
|
*
|
|
3331
3472
|
* By default, the input is not required.
|
|
3332
3473
|
*/
|
|
3333
|
-
required?:
|
|
3474
|
+
required?: Item.Required;
|
|
3334
3475
|
/**
|
|
3335
3476
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3336
3477
|
*/
|
|
@@ -3341,647 +3482,494 @@ export declare namespace WorkflowListResponse {
|
|
|
3341
3482
|
*/
|
|
3342
3483
|
value?: unknown;
|
|
3343
3484
|
}
|
|
3344
|
-
namespace
|
|
3485
|
+
namespace Item {
|
|
3345
3486
|
/**
|
|
3346
|
-
*
|
|
3347
|
-
*
|
|
3487
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
3488
|
+
* least one of node or conditional.
|
|
3348
3489
|
*/
|
|
3349
|
-
interface
|
|
3350
|
-
/**
|
|
3351
|
-
* The name that must be user to call the model through the API
|
|
3352
|
-
*/
|
|
3353
|
-
name: string;
|
|
3354
|
-
/**
|
|
3355
|
-
* The data type of the input
|
|
3356
|
-
*/
|
|
3357
|
-
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
3358
|
-
/**
|
|
3359
|
-
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
3360
|
-
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
3361
|
-
* dropdown.
|
|
3362
|
-
*/
|
|
3363
|
-
allowedValues?: Array<unknown>;
|
|
3364
|
-
/**
|
|
3365
|
-
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
3366
|
-
* \`file_array\` input types with kind \`image\`.
|
|
3367
|
-
*/
|
|
3368
|
-
backgroundBehavior?: 'opaque' | 'transparent';
|
|
3369
|
-
/**
|
|
3370
|
-
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
3371
|
-
*/
|
|
3372
|
-
color?: boolean;
|
|
3373
|
-
/**
|
|
3374
|
-
* Whether this input affects the model's cost calculation
|
|
3375
|
-
*/
|
|
3376
|
-
costImpact?: boolean;
|
|
3377
|
-
/**
|
|
3378
|
-
* The default value for the input
|
|
3379
|
-
*/
|
|
3380
|
-
default?: unknown;
|
|
3381
|
-
/**
|
|
3382
|
-
* Help text displayed in the UI to provide additional information about the input
|
|
3383
|
-
*/
|
|
3384
|
-
description?: string;
|
|
3385
|
-
/**
|
|
3386
|
-
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
3387
|
-
* value appear consecutively in the UI.
|
|
3388
|
-
*/
|
|
3389
|
-
group?: string;
|
|
3390
|
-
/**
|
|
3391
|
-
* Hint text displayed in the UI as a tooltip to guide the user
|
|
3392
|
-
*/
|
|
3393
|
-
hint?: string;
|
|
3394
|
-
/**
|
|
3395
|
-
* The list of inputs which form an object within a container array. All inputs are
|
|
3396
|
-
* the same as the current object. This is only available for type inputs_array
|
|
3397
|
-
* inputs.
|
|
3398
|
-
*/
|
|
3399
|
-
inputs?: Array<{
|
|
3400
|
-
[key: string]: unknown;
|
|
3401
|
-
}>;
|
|
3402
|
-
/**
|
|
3403
|
-
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3404
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3405
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
3406
|
-
* data:kind, prefix
|
|
3407
|
-
*/
|
|
3408
|
-
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3409
|
-
/**
|
|
3410
|
-
* The label displayed in the UI for this input
|
|
3411
|
-
*/
|
|
3412
|
-
label?: string;
|
|
3413
|
-
/**
|
|
3414
|
-
* The name of the file input field to use as the mask source
|
|
3415
|
-
*/
|
|
3416
|
-
maskFrom?: string;
|
|
3417
|
-
/**
|
|
3418
|
-
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
3419
|
-
* types.
|
|
3420
|
-
*/
|
|
3421
|
-
max?: number;
|
|
3490
|
+
interface Ref {
|
|
3422
3491
|
/**
|
|
3423
|
-
* The
|
|
3424
|
-
*
|
|
3492
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
3493
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
3494
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
3425
3495
|
*/
|
|
3426
|
-
|
|
3496
|
+
conditional?: Array<string>;
|
|
3427
3497
|
/**
|
|
3428
|
-
*
|
|
3429
|
-
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3430
|
-
* creation time.
|
|
3498
|
+
* This is the desired node output value if ref is an if/else node.
|
|
3431
3499
|
*/
|
|
3432
|
-
|
|
3500
|
+
equal?: string;
|
|
3433
3501
|
/**
|
|
3434
|
-
* The
|
|
3502
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
3503
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
3504
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
3505
|
+
* all outputs of a node, you can use the name 'all'.
|
|
3435
3506
|
*/
|
|
3436
|
-
|
|
3507
|
+
name?: string;
|
|
3437
3508
|
/**
|
|
3438
|
-
* The
|
|
3439
|
-
* \`string_array\`.
|
|
3509
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
3440
3510
|
*/
|
|
3441
|
-
|
|
3511
|
+
node?: string;
|
|
3512
|
+
}
|
|
3513
|
+
/**
|
|
3514
|
+
* Set of rules that describes when this input is required:
|
|
3515
|
+
*
|
|
3516
|
+
* - \`always\`: Input is always required
|
|
3517
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3518
|
+
* defined
|
|
3519
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3520
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3521
|
+
* value
|
|
3522
|
+
*
|
|
3523
|
+
* By default, the input is not required.
|
|
3524
|
+
*/
|
|
3525
|
+
interface Required {
|
|
3442
3526
|
/**
|
|
3443
|
-
*
|
|
3444
|
-
* available for \`model_array\` input type.
|
|
3527
|
+
* Whether the input is always required
|
|
3445
3528
|
*/
|
|
3446
|
-
|
|
3529
|
+
always?: boolean;
|
|
3447
3530
|
/**
|
|
3448
|
-
*
|
|
3449
|
-
* Only available for \`file\` and \`file_array\` input types.
|
|
3531
|
+
* Makes this input required when another input has a specific value:
|
|
3450
3532
|
*
|
|
3451
|
-
*
|
|
3533
|
+
* - Key: name of the input to check
|
|
3534
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
3452
3535
|
*/
|
|
3453
|
-
|
|
3536
|
+
conditionalValues?: unknown;
|
|
3454
3537
|
/**
|
|
3455
|
-
*
|
|
3538
|
+
* Makes this input required when another input is defined:
|
|
3539
|
+
*
|
|
3540
|
+
* - Key: name of the input that must be defined
|
|
3541
|
+
* - Value: message to display when this input is required
|
|
3456
3542
|
*/
|
|
3457
|
-
|
|
3543
|
+
ifDefined?: unknown;
|
|
3458
3544
|
/**
|
|
3459
|
-
*
|
|
3460
|
-
*
|
|
3545
|
+
* Makes this input required when another input is not defined:
|
|
3546
|
+
*
|
|
3547
|
+
* - Key: name of the input that must be undefined
|
|
3548
|
+
* - Value: message to display when this input is required
|
|
3461
3549
|
*/
|
|
3462
|
-
|
|
3463
|
-
/**
|
|
3464
|
-
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
3465
|
-
* type.
|
|
3466
|
-
*/
|
|
3467
|
-
promptSpark?: boolean;
|
|
3468
|
-
/**
|
|
3469
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
3470
|
-
* least one of node or conditional.
|
|
3471
|
-
*/
|
|
3472
|
-
ref?: Item.Ref;
|
|
3473
|
-
/**
|
|
3474
|
-
* Set of rules that describes when this input is required:
|
|
3475
|
-
*
|
|
3476
|
-
* - \`always\`: Input is always required
|
|
3477
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3478
|
-
* defined
|
|
3479
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3480
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3481
|
-
* value
|
|
3482
|
-
*
|
|
3483
|
-
* By default, the input is not required.
|
|
3484
|
-
*/
|
|
3485
|
-
required?: Item.Required;
|
|
3486
|
-
/**
|
|
3487
|
-
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3488
|
-
*/
|
|
3489
|
-
step?: number;
|
|
3490
|
-
/**
|
|
3491
|
-
* The value of the input. This is the value of the input that will be used to run
|
|
3492
|
-
* the node. Only available for flows managed by a WorkflowJob.
|
|
3493
|
-
*/
|
|
3494
|
-
value?: unknown;
|
|
3495
|
-
}
|
|
3496
|
-
namespace Item {
|
|
3497
|
-
/**
|
|
3498
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
3499
|
-
* least one of node or conditional.
|
|
3500
|
-
*/
|
|
3501
|
-
interface Ref {
|
|
3502
|
-
/**
|
|
3503
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
3504
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
3505
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
3506
|
-
*/
|
|
3507
|
-
conditional?: Array<string>;
|
|
3508
|
-
/**
|
|
3509
|
-
* This is the desired node output value if ref is an if/else node.
|
|
3510
|
-
*/
|
|
3511
|
-
equal?: string;
|
|
3512
|
-
/**
|
|
3513
|
-
* The name of the input or output to reference. If the type is 'workflow', the
|
|
3514
|
-
* name is the name of the input of the workflow is required If the type is 'node',
|
|
3515
|
-
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
3516
|
-
* all outputs of a node, you can use the name 'all'.
|
|
3517
|
-
*/
|
|
3518
|
-
name?: string;
|
|
3519
|
-
/**
|
|
3520
|
-
* The node id or 'workflow' if the source is a workflow input.
|
|
3521
|
-
*/
|
|
3522
|
-
node?: string;
|
|
3523
|
-
}
|
|
3524
|
-
/**
|
|
3525
|
-
* Set of rules that describes when this input is required:
|
|
3526
|
-
*
|
|
3527
|
-
* - \`always\`: Input is always required
|
|
3528
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3529
|
-
* defined
|
|
3530
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3531
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3532
|
-
* value
|
|
3533
|
-
*
|
|
3534
|
-
* By default, the input is not required.
|
|
3535
|
-
*/
|
|
3536
|
-
interface Required {
|
|
3537
|
-
/**
|
|
3538
|
-
* Whether the input is always required
|
|
3539
|
-
*/
|
|
3540
|
-
always?: boolean;
|
|
3541
|
-
/**
|
|
3542
|
-
* Makes this input required when another input has a specific value:
|
|
3543
|
-
*
|
|
3544
|
-
* - Key: name of the input to check
|
|
3545
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
3546
|
-
*/
|
|
3547
|
-
conditionalValues?: unknown;
|
|
3548
|
-
/**
|
|
3549
|
-
* Makes this input required when another input is defined:
|
|
3550
|
-
*
|
|
3551
|
-
* - Key: name of the input that must be defined
|
|
3552
|
-
* - Value: message to display when this input is required
|
|
3553
|
-
*/
|
|
3554
|
-
ifDefined?: unknown;
|
|
3555
|
-
/**
|
|
3556
|
-
* Makes this input required when another input is not defined:
|
|
3557
|
-
*
|
|
3558
|
-
* - Key: name of the input that must be undefined
|
|
3559
|
-
* - Value: message to display when this input is required
|
|
3560
|
-
*/
|
|
3561
|
-
ifNotDefined?: unknown;
|
|
3562
|
-
}
|
|
3550
|
+
ifNotDefined?: unknown;
|
|
3563
3551
|
}
|
|
3552
|
+
}
|
|
3553
|
+
/**
|
|
3554
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
3555
|
+
* least one of node or conditional.
|
|
3556
|
+
*/
|
|
3557
|
+
interface Ref {
|
|
3564
3558
|
/**
|
|
3565
|
-
* The
|
|
3566
|
-
*
|
|
3559
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
3560
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
3561
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
3567
3562
|
*/
|
|
3568
|
-
|
|
3569
|
-
/**
|
|
3570
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
3571
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
3572
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
3573
|
-
*/
|
|
3574
|
-
conditional?: Array<string>;
|
|
3575
|
-
/**
|
|
3576
|
-
* This is the desired node output value if ref is an if/else node.
|
|
3577
|
-
*/
|
|
3578
|
-
equal?: string;
|
|
3579
|
-
/**
|
|
3580
|
-
* The name of the input or output to reference. If the type is 'workflow', the
|
|
3581
|
-
* name is the name of the input of the workflow is required If the type is 'node',
|
|
3582
|
-
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
3583
|
-
* all outputs of a node, you can use the name 'all'.
|
|
3584
|
-
*/
|
|
3585
|
-
name?: string;
|
|
3586
|
-
/**
|
|
3587
|
-
* The node id or 'workflow' if the source is a workflow input.
|
|
3588
|
-
*/
|
|
3589
|
-
node?: string;
|
|
3590
|
-
}
|
|
3563
|
+
conditional?: Array<string>;
|
|
3591
3564
|
/**
|
|
3592
|
-
*
|
|
3593
|
-
*
|
|
3594
|
-
* - \`always\`: Input is always required
|
|
3595
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3596
|
-
* defined
|
|
3597
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3598
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3599
|
-
* value
|
|
3600
|
-
*
|
|
3601
|
-
* By default, the input is not required.
|
|
3565
|
+
* This is the desired node output value if ref is an if/else node.
|
|
3602
3566
|
*/
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
/**
|
|
3616
|
-
* Makes this input required when another input is defined:
|
|
3617
|
-
*
|
|
3618
|
-
* - Key: name of the input that must be defined
|
|
3619
|
-
* - Value: message to display when this input is required
|
|
3620
|
-
*/
|
|
3621
|
-
ifDefined?: unknown;
|
|
3622
|
-
/**
|
|
3623
|
-
* Makes this input required when another input is not defined:
|
|
3624
|
-
*
|
|
3625
|
-
* - Key: name of the input that must be undefined
|
|
3626
|
-
* - Value: message to display when this input is required
|
|
3627
|
-
*/
|
|
3628
|
-
ifNotDefined?: unknown;
|
|
3629
|
-
}
|
|
3567
|
+
equal?: string;
|
|
3568
|
+
/**
|
|
3569
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
3570
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
3571
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
3572
|
+
* all outputs of a node, you can use the name 'all'.
|
|
3573
|
+
*/
|
|
3574
|
+
name?: string;
|
|
3575
|
+
/**
|
|
3576
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
3577
|
+
*/
|
|
3578
|
+
node?: string;
|
|
3630
3579
|
}
|
|
3631
3580
|
/**
|
|
3632
|
-
*
|
|
3581
|
+
* Set of rules that describes when this input is required:
|
|
3582
|
+
*
|
|
3583
|
+
* - \`always\`: Input is always required
|
|
3584
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3585
|
+
* defined
|
|
3586
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3587
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3588
|
+
* value
|
|
3589
|
+
*
|
|
3590
|
+
* By default, the input is not required.
|
|
3633
3591
|
*/
|
|
3634
|
-
interface
|
|
3592
|
+
interface Required {
|
|
3635
3593
|
/**
|
|
3636
|
-
*
|
|
3594
|
+
* Whether the input is always required
|
|
3637
3595
|
*/
|
|
3638
|
-
|
|
3596
|
+
always?: boolean;
|
|
3639
3597
|
/**
|
|
3640
|
-
*
|
|
3641
|
-
*
|
|
3598
|
+
* Makes this input required when another input has a specific value:
|
|
3599
|
+
*
|
|
3600
|
+
* - Key: name of the input to check
|
|
3601
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
3642
3602
|
*/
|
|
3643
|
-
|
|
3603
|
+
conditionalValues?: unknown;
|
|
3644
3604
|
/**
|
|
3645
|
-
*
|
|
3605
|
+
* Makes this input required when another input is defined:
|
|
3606
|
+
*
|
|
3607
|
+
* - Key: name of the input that must be defined
|
|
3608
|
+
* - Value: message to display when this input is required
|
|
3646
3609
|
*/
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3610
|
+
ifDefined?: unknown;
|
|
3611
|
+
/**
|
|
3612
|
+
* Makes this input required when another input is not defined:
|
|
3613
|
+
*
|
|
3614
|
+
* - Key: name of the input that must be undefined
|
|
3615
|
+
* - Value: message to display when this input is required
|
|
3616
|
+
*/
|
|
3617
|
+
ifNotDefined?: unknown;
|
|
3654
3618
|
}
|
|
3655
3619
|
}
|
|
3656
3620
|
/**
|
|
3657
|
-
*
|
|
3658
|
-
* input parameters for a given `modelId` when calling
|
|
3659
|
-
* `POST /generate/custom/{modelId}`. See {@link
|
|
3660
|
-
* https://docs.scenario.com/docs/video-generation} for examples.
|
|
3621
|
+
* The logic of the node. Only available for logic nodes.
|
|
3661
3622
|
*/
|
|
3662
|
-
interface
|
|
3663
|
-
/**
|
|
3664
|
-
* The name that must be user to call the model through the API
|
|
3665
|
-
*/
|
|
3666
|
-
name: string;
|
|
3667
|
-
/**
|
|
3668
|
-
* The data type of the input
|
|
3669
|
-
*/
|
|
3670
|
-
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
3671
|
-
/**
|
|
3672
|
-
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
3673
|
-
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
3674
|
-
* dropdown.
|
|
3675
|
-
*/
|
|
3676
|
-
allowedValues?: Array<unknown>;
|
|
3677
|
-
/**
|
|
3678
|
-
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
3679
|
-
* \`file_array\` input types with kind \`image\`.
|
|
3680
|
-
*/
|
|
3681
|
-
backgroundBehavior?: 'opaque' | 'transparent';
|
|
3682
|
-
/**
|
|
3683
|
-
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
3684
|
-
*/
|
|
3685
|
-
color?: boolean;
|
|
3686
|
-
/**
|
|
3687
|
-
* Whether this input affects the model's cost calculation
|
|
3688
|
-
*/
|
|
3689
|
-
costImpact?: boolean;
|
|
3690
|
-
/**
|
|
3691
|
-
* The default value for the input
|
|
3692
|
-
*/
|
|
3693
|
-
default?: unknown;
|
|
3694
|
-
/**
|
|
3695
|
-
* Help text displayed in the UI to provide additional information about the input
|
|
3696
|
-
*/
|
|
3697
|
-
description?: string;
|
|
3698
|
-
/**
|
|
3699
|
-
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
3700
|
-
* value appear consecutively in the UI.
|
|
3701
|
-
*/
|
|
3702
|
-
group?: string;
|
|
3703
|
-
/**
|
|
3704
|
-
* Hint text displayed in the UI as a tooltip to guide the user
|
|
3705
|
-
*/
|
|
3706
|
-
hint?: string;
|
|
3707
|
-
/**
|
|
3708
|
-
* The list of inputs which form an object within a container array. All inputs are
|
|
3709
|
-
* the same as the current object. This is only available for type inputs_array
|
|
3710
|
-
* inputs.
|
|
3711
|
-
*/
|
|
3712
|
-
inputs?: Array<{
|
|
3713
|
-
[key: string]: unknown;
|
|
3714
|
-
}>;
|
|
3715
|
-
/**
|
|
3716
|
-
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3717
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3718
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
3719
|
-
* data:kind, prefix
|
|
3720
|
-
*/
|
|
3721
|
-
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3722
|
-
/**
|
|
3723
|
-
* The label displayed in the UI for this input
|
|
3724
|
-
*/
|
|
3725
|
-
label?: string;
|
|
3726
|
-
/**
|
|
3727
|
-
* The name of the file input field to use as the mask source
|
|
3728
|
-
*/
|
|
3729
|
-
maskFrom?: string;
|
|
3730
|
-
/**
|
|
3731
|
-
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
3732
|
-
* types.
|
|
3733
|
-
*/
|
|
3734
|
-
max?: number;
|
|
3735
|
-
/**
|
|
3736
|
-
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3737
|
-
* \`string_array\`.
|
|
3738
|
-
*/
|
|
3739
|
-
maxLength?: number;
|
|
3623
|
+
interface Logic {
|
|
3740
3624
|
/**
|
|
3741
|
-
* The
|
|
3742
|
-
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3743
|
-
* creation time.
|
|
3625
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
3744
3626
|
*/
|
|
3745
|
-
|
|
3627
|
+
cases?: Array<Logic.Case>;
|
|
3746
3628
|
/**
|
|
3747
|
-
* The
|
|
3629
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
3630
|
+
* no case is matched. Only available for if/else nodes.
|
|
3748
3631
|
*/
|
|
3749
|
-
|
|
3632
|
+
default?: string;
|
|
3750
3633
|
/**
|
|
3751
|
-
* The
|
|
3752
|
-
* \`string_array\`.
|
|
3634
|
+
* The transform of the logic. Only available for transform nodes.
|
|
3753
3635
|
*/
|
|
3754
|
-
|
|
3636
|
+
transform?: string;
|
|
3637
|
+
}
|
|
3638
|
+
namespace Logic {
|
|
3639
|
+
interface Case {
|
|
3640
|
+
condition: string;
|
|
3641
|
+
value: string;
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
/**
|
|
3646
|
+
* Defines the input parameters for a model. Use this to understand the available
|
|
3647
|
+
* input parameters for a given `modelId` when calling
|
|
3648
|
+
* `POST /generate/custom/{modelId}`. See {@link
|
|
3649
|
+
* https://docs.scenario.com/docs/video-generation} for examples.
|
|
3650
|
+
*/
|
|
3651
|
+
interface Input {
|
|
3652
|
+
/**
|
|
3653
|
+
* The name that must be user to call the model through the API
|
|
3654
|
+
*/
|
|
3655
|
+
name: string;
|
|
3656
|
+
/**
|
|
3657
|
+
* The data type of the input
|
|
3658
|
+
*/
|
|
3659
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
3660
|
+
/**
|
|
3661
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
3662
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
3663
|
+
* dropdown.
|
|
3664
|
+
*/
|
|
3665
|
+
allowedValues?: Array<unknown>;
|
|
3666
|
+
/**
|
|
3667
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
3668
|
+
* \`file_array\` input types with kind \`image\`.
|
|
3669
|
+
*/
|
|
3670
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
3671
|
+
/**
|
|
3672
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
3673
|
+
*/
|
|
3674
|
+
color?: boolean;
|
|
3675
|
+
/**
|
|
3676
|
+
* Whether this input affects the model's cost calculation
|
|
3677
|
+
*/
|
|
3678
|
+
costImpact?: boolean;
|
|
3679
|
+
/**
|
|
3680
|
+
* The default value for the input
|
|
3681
|
+
*/
|
|
3682
|
+
default?: unknown;
|
|
3683
|
+
/**
|
|
3684
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
3685
|
+
*/
|
|
3686
|
+
description?: string;
|
|
3687
|
+
/**
|
|
3688
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
3689
|
+
* value appear consecutively in the UI.
|
|
3690
|
+
*/
|
|
3691
|
+
group?: string;
|
|
3692
|
+
/**
|
|
3693
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
3694
|
+
*/
|
|
3695
|
+
hint?: string;
|
|
3696
|
+
/**
|
|
3697
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
3698
|
+
* the same as the current object. This is only available for type inputs_array
|
|
3699
|
+
* inputs.
|
|
3700
|
+
*/
|
|
3701
|
+
inputs?: Array<{
|
|
3702
|
+
[key: string]: unknown;
|
|
3703
|
+
}>;
|
|
3704
|
+
/**
|
|
3705
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3706
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3707
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
3708
|
+
* data:kind, prefix
|
|
3709
|
+
*/
|
|
3710
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3711
|
+
/**
|
|
3712
|
+
* The label displayed in the UI for this input
|
|
3713
|
+
*/
|
|
3714
|
+
label?: string;
|
|
3715
|
+
/**
|
|
3716
|
+
* The name of the file input field to use as the mask source
|
|
3717
|
+
*/
|
|
3718
|
+
maskFrom?: string;
|
|
3719
|
+
/**
|
|
3720
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
3721
|
+
* types.
|
|
3722
|
+
*/
|
|
3723
|
+
max?: number;
|
|
3724
|
+
/**
|
|
3725
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3726
|
+
* \`string_array\`.
|
|
3727
|
+
*/
|
|
3728
|
+
maxLength?: number;
|
|
3729
|
+
/**
|
|
3730
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
3731
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3732
|
+
* creation time.
|
|
3733
|
+
*/
|
|
3734
|
+
maxSize?: number;
|
|
3735
|
+
/**
|
|
3736
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3737
|
+
*/
|
|
3738
|
+
min?: number;
|
|
3739
|
+
/**
|
|
3740
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
3741
|
+
* \`string_array\`.
|
|
3742
|
+
*/
|
|
3743
|
+
minLength?: number;
|
|
3744
|
+
/**
|
|
3745
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3746
|
+
* available for \`model_array\` input type.
|
|
3747
|
+
*/
|
|
3748
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
3749
|
+
/**
|
|
3750
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3751
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
3752
|
+
*
|
|
3753
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
3754
|
+
*/
|
|
3755
|
+
parent?: boolean;
|
|
3756
|
+
/**
|
|
3757
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
3758
|
+
*/
|
|
3759
|
+
placeholder?: string;
|
|
3760
|
+
/**
|
|
3761
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
3762
|
+
* spark feature. Only available for \`string\` input type.
|
|
3763
|
+
*/
|
|
3764
|
+
prompt?: boolean;
|
|
3765
|
+
/**
|
|
3766
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
3767
|
+
* type.
|
|
3768
|
+
*/
|
|
3769
|
+
promptSpark?: boolean;
|
|
3770
|
+
/**
|
|
3771
|
+
* Set of rules that describes when this input is required:
|
|
3772
|
+
*
|
|
3773
|
+
* - \`always\`: Input is always required
|
|
3774
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3775
|
+
* defined
|
|
3776
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3777
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3778
|
+
* value
|
|
3779
|
+
*
|
|
3780
|
+
* By default, the input is not required.
|
|
3781
|
+
*/
|
|
3782
|
+
required?: Input.Required;
|
|
3783
|
+
/**
|
|
3784
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3785
|
+
*/
|
|
3786
|
+
step?: number;
|
|
3787
|
+
}
|
|
3788
|
+
namespace Input {
|
|
3789
|
+
/**
|
|
3790
|
+
* Set of rules that describes when this input is required:
|
|
3791
|
+
*
|
|
3792
|
+
* - \`always\`: Input is always required
|
|
3793
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3794
|
+
* defined
|
|
3795
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3796
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3797
|
+
* value
|
|
3798
|
+
*
|
|
3799
|
+
* By default, the input is not required.
|
|
3800
|
+
*/
|
|
3801
|
+
interface Required {
|
|
3755
3802
|
/**
|
|
3756
|
-
*
|
|
3757
|
-
* available for \`model_array\` input type.
|
|
3803
|
+
* Whether the input is always required
|
|
3758
3804
|
*/
|
|
3759
|
-
|
|
3805
|
+
always?: boolean;
|
|
3760
3806
|
/**
|
|
3761
|
-
*
|
|
3762
|
-
* Only available for \`file\` and \`file_array\` input types.
|
|
3807
|
+
* Makes this input required when another input has a specific value:
|
|
3763
3808
|
*
|
|
3764
|
-
*
|
|
3765
|
-
|
|
3766
|
-
parent?: boolean;
|
|
3767
|
-
/**
|
|
3768
|
-
* Placeholder text for the input. Only available for 'string' input type.
|
|
3769
|
-
*/
|
|
3770
|
-
placeholder?: string;
|
|
3771
|
-
/**
|
|
3772
|
-
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
3773
|
-
* spark feature. Only available for \`string\` input type.
|
|
3774
|
-
*/
|
|
3775
|
-
prompt?: boolean;
|
|
3776
|
-
/**
|
|
3777
|
-
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
3778
|
-
* type.
|
|
3809
|
+
* - Key: name of the input to check
|
|
3810
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
3779
3811
|
*/
|
|
3780
|
-
|
|
3812
|
+
conditionalValues?: unknown;
|
|
3781
3813
|
/**
|
|
3782
|
-
*
|
|
3783
|
-
*
|
|
3784
|
-
* - \`always\`: Input is always required
|
|
3785
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3786
|
-
* defined
|
|
3787
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3788
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3789
|
-
* value
|
|
3814
|
+
* Makes this input required when another input is defined:
|
|
3790
3815
|
*
|
|
3791
|
-
*
|
|
3792
|
-
|
|
3793
|
-
required?: Input.Required;
|
|
3794
|
-
/**
|
|
3795
|
-
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3816
|
+
* - Key: name of the input that must be defined
|
|
3817
|
+
* - Value: message to display when this input is required
|
|
3796
3818
|
*/
|
|
3797
|
-
|
|
3798
|
-
}
|
|
3799
|
-
namespace Input {
|
|
3819
|
+
ifDefined?: unknown;
|
|
3800
3820
|
/**
|
|
3801
|
-
*
|
|
3802
|
-
*
|
|
3803
|
-
* - \`always\`: Input is always required
|
|
3804
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3805
|
-
* defined
|
|
3806
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3807
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3808
|
-
* value
|
|
3821
|
+
* Makes this input required when another input is not defined:
|
|
3809
3822
|
*
|
|
3810
|
-
*
|
|
3823
|
+
* - Key: name of the input that must be undefined
|
|
3824
|
+
* - Value: message to display when this input is required
|
|
3811
3825
|
*/
|
|
3812
|
-
|
|
3813
|
-
/**
|
|
3814
|
-
* Whether the input is always required
|
|
3815
|
-
*/
|
|
3816
|
-
always?: boolean;
|
|
3817
|
-
/**
|
|
3818
|
-
* Makes this input required when another input has a specific value:
|
|
3819
|
-
*
|
|
3820
|
-
* - Key: name of the input to check
|
|
3821
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
3822
|
-
*/
|
|
3823
|
-
conditionalValues?: unknown;
|
|
3824
|
-
/**
|
|
3825
|
-
* Makes this input required when another input is defined:
|
|
3826
|
-
*
|
|
3827
|
-
* - Key: name of the input that must be defined
|
|
3828
|
-
* - Value: message to display when this input is required
|
|
3829
|
-
*/
|
|
3830
|
-
ifDefined?: unknown;
|
|
3831
|
-
/**
|
|
3832
|
-
* Makes this input required when another input is not defined:
|
|
3833
|
-
*
|
|
3834
|
-
* - Key: name of the input that must be undefined
|
|
3835
|
-
* - Value: message to display when this input is required
|
|
3836
|
-
*/
|
|
3837
|
-
ifNotDefined?: unknown;
|
|
3838
|
-
}
|
|
3826
|
+
ifNotDefined?: unknown;
|
|
3839
3827
|
}
|
|
3828
|
+
}
|
|
3829
|
+
/**
|
|
3830
|
+
* A representation of an asset after being processed by the workflow
|
|
3831
|
+
*/
|
|
3832
|
+
interface After {
|
|
3840
3833
|
/**
|
|
3841
|
-
*
|
|
3834
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
3835
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
3842
3836
|
*/
|
|
3843
|
-
|
|
3844
|
-
/**
|
|
3845
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
3846
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
3847
|
-
*/
|
|
3848
|
-
assetId: string;
|
|
3849
|
-
/**
|
|
3850
|
-
* The url of the image used as a thumbnail for your model
|
|
3851
|
-
*/
|
|
3852
|
-
url: string;
|
|
3853
|
-
}
|
|
3837
|
+
assetId: string;
|
|
3854
3838
|
/**
|
|
3855
|
-
*
|
|
3839
|
+
* The url of the image used as a thumbnail for your model
|
|
3856
3840
|
*/
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
/**
|
|
3864
|
-
* The url of the image used as a thumbnail for your model
|
|
3865
|
-
*/
|
|
3866
|
-
url: string;
|
|
3867
|
-
}
|
|
3841
|
+
url: string;
|
|
3842
|
+
}
|
|
3843
|
+
/**
|
|
3844
|
+
* A representation of an asset before being processed by the workflow
|
|
3845
|
+
*/
|
|
3846
|
+
interface Before {
|
|
3868
3847
|
/**
|
|
3869
|
-
*
|
|
3848
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
3849
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
3870
3850
|
*/
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3851
|
+
assetId: string;
|
|
3852
|
+
/**
|
|
3853
|
+
* The url of the image used as a thumbnail for your model
|
|
3854
|
+
*/
|
|
3855
|
+
url: string;
|
|
3856
|
+
}
|
|
3857
|
+
/**
|
|
3858
|
+
* Currently the thumbnail is identical to the after asset.
|
|
3859
|
+
*/
|
|
3860
|
+
interface Thumbnail {
|
|
3861
|
+
assetId: string;
|
|
3862
|
+
url: string;
|
|
3863
|
+
}
|
|
3864
|
+
/**
|
|
3865
|
+
* The UI configuration for the workflow. This is managed by scenario webapp.
|
|
3866
|
+
*/
|
|
3867
|
+
interface UiConfig {
|
|
3868
|
+
/**
|
|
3869
|
+
* Configuration for the input properties
|
|
3870
|
+
*/
|
|
3871
|
+
inputProperties?: {
|
|
3872
|
+
[key: string]: UiConfig.InputProperties;
|
|
3873
|
+
};
|
|
3874
|
+
/**
|
|
3875
|
+
* Configuration for the loras component
|
|
3876
|
+
*/
|
|
3877
|
+
lorasComponent?: UiConfig.LorasComponent;
|
|
3878
|
+
/**
|
|
3879
|
+
* Configuration for the presets
|
|
3880
|
+
*/
|
|
3881
|
+
presets?: Array<UiConfig.Preset>;
|
|
3882
|
+
/**
|
|
3883
|
+
* Configuration for the resolution component
|
|
3884
|
+
*/
|
|
3885
|
+
resolutionComponent?: UiConfig.ResolutionComponent;
|
|
3886
|
+
/**
|
|
3887
|
+
* Configuration for the selects
|
|
3888
|
+
*/
|
|
3889
|
+
selects?: {
|
|
3890
|
+
[key: string]: unknown;
|
|
3891
|
+
};
|
|
3892
|
+
/**
|
|
3893
|
+
* Configuration for the trigger generate button
|
|
3894
|
+
*/
|
|
3895
|
+
triggerGenerate?: UiConfig.TriggerGenerate;
|
|
3896
|
+
}
|
|
3897
|
+
namespace UiConfig {
|
|
3898
|
+
interface InputProperties {
|
|
3899
|
+
collapsed?: boolean;
|
|
3874
3900
|
}
|
|
3875
3901
|
/**
|
|
3876
|
-
*
|
|
3902
|
+
* Configuration for the loras component
|
|
3877
3903
|
*/
|
|
3878
|
-
interface
|
|
3904
|
+
interface LorasComponent {
|
|
3879
3905
|
/**
|
|
3880
|
-
*
|
|
3906
|
+
* The label of the component
|
|
3881
3907
|
*/
|
|
3882
|
-
|
|
3883
|
-
[key: string]: UiConfig.InputProperties;
|
|
3884
|
-
};
|
|
3908
|
+
label: string;
|
|
3885
3909
|
/**
|
|
3886
|
-
*
|
|
3910
|
+
* The input name of the model (model_array)
|
|
3887
3911
|
*/
|
|
3888
|
-
|
|
3912
|
+
modelInput: string;
|
|
3889
3913
|
/**
|
|
3890
|
-
*
|
|
3914
|
+
* The input name of the scale (number_array)
|
|
3891
3915
|
*/
|
|
3892
|
-
|
|
3916
|
+
scaleInput: string;
|
|
3893
3917
|
/**
|
|
3894
|
-
*
|
|
3918
|
+
* The input model id (example: a composition or a single LoRA modelId) If
|
|
3919
|
+
* specified, the model id will be attached to the output asset as a metadata If
|
|
3920
|
+
* the model-decomposer parser is specified on it, modelInput and scaleInput will
|
|
3921
|
+
* be automatically populated
|
|
3895
3922
|
*/
|
|
3896
|
-
|
|
3923
|
+
modelIdInput?: string;
|
|
3924
|
+
}
|
|
3925
|
+
interface Preset {
|
|
3926
|
+
fields: Array<string>;
|
|
3927
|
+
presets: unknown;
|
|
3928
|
+
}
|
|
3929
|
+
/**
|
|
3930
|
+
* Configuration for the resolution component
|
|
3931
|
+
*/
|
|
3932
|
+
interface ResolutionComponent {
|
|
3897
3933
|
/**
|
|
3898
|
-
*
|
|
3934
|
+
* The input name of the height
|
|
3899
3935
|
*/
|
|
3900
|
-
|
|
3901
|
-
[key: string]: unknown;
|
|
3902
|
-
};
|
|
3936
|
+
heightInput: string;
|
|
3903
3937
|
/**
|
|
3904
|
-
*
|
|
3938
|
+
* The label of the component
|
|
3905
3939
|
*/
|
|
3906
|
-
|
|
3907
|
-
}
|
|
3908
|
-
namespace UiConfig {
|
|
3909
|
-
interface InputProperties {
|
|
3910
|
-
collapsed?: boolean;
|
|
3911
|
-
}
|
|
3940
|
+
label: string;
|
|
3912
3941
|
/**
|
|
3913
|
-
*
|
|
3942
|
+
* The resolution presets
|
|
3914
3943
|
*/
|
|
3915
|
-
|
|
3916
|
-
/**
|
|
3917
|
-
* The label of the component
|
|
3918
|
-
*/
|
|
3919
|
-
label: string;
|
|
3920
|
-
/**
|
|
3921
|
-
* The input name of the model (model_array)
|
|
3922
|
-
*/
|
|
3923
|
-
modelInput: string;
|
|
3924
|
-
/**
|
|
3925
|
-
* The input name of the scale (number_array)
|
|
3926
|
-
*/
|
|
3927
|
-
scaleInput: string;
|
|
3928
|
-
/**
|
|
3929
|
-
* The input model id (example: a composition or a single LoRA modelId) If
|
|
3930
|
-
* specified, the model id will be attached to the output asset as a metadata If
|
|
3931
|
-
* the model-decomposer parser is specified on it, modelInput and scaleInput will
|
|
3932
|
-
* be automatically populated
|
|
3933
|
-
*/
|
|
3934
|
-
modelIdInput?: string;
|
|
3935
|
-
}
|
|
3936
|
-
interface Preset {
|
|
3937
|
-
fields: Array<string>;
|
|
3938
|
-
presets: unknown;
|
|
3939
|
-
}
|
|
3944
|
+
presets: Array<ResolutionComponent.Preset>;
|
|
3940
3945
|
/**
|
|
3941
|
-
*
|
|
3946
|
+
* The input name of the width
|
|
3942
3947
|
*/
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
/**
|
|
3949
|
-
* The label of the component
|
|
3950
|
-
*/
|
|
3948
|
+
widthInput: string;
|
|
3949
|
+
}
|
|
3950
|
+
namespace ResolutionComponent {
|
|
3951
|
+
interface Preset {
|
|
3952
|
+
height: number;
|
|
3951
3953
|
label: string;
|
|
3952
|
-
|
|
3953
|
-
* The resolution presets
|
|
3954
|
-
*/
|
|
3955
|
-
presets: Array<ResolutionComponent.Preset>;
|
|
3956
|
-
/**
|
|
3957
|
-
* The input name of the width
|
|
3958
|
-
*/
|
|
3959
|
-
widthInput: string;
|
|
3960
|
-
}
|
|
3961
|
-
namespace ResolutionComponent {
|
|
3962
|
-
interface Preset {
|
|
3963
|
-
height: number;
|
|
3964
|
-
label: string;
|
|
3965
|
-
width: number;
|
|
3966
|
-
}
|
|
3954
|
+
width: number;
|
|
3967
3955
|
}
|
|
3956
|
+
}
|
|
3957
|
+
/**
|
|
3958
|
+
* Configuration for the trigger generate button
|
|
3959
|
+
*/
|
|
3960
|
+
interface TriggerGenerate {
|
|
3961
|
+
label: string;
|
|
3968
3962
|
/**
|
|
3969
|
-
*
|
|
3963
|
+
* The 'name' of the input where the trigger generate button will be displayed
|
|
3964
|
+
* (after the input). Do not specify both position and after.
|
|
3970
3965
|
*/
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
/**
|
|
3979
|
-
* The position of the trigger generate button. If position specified, the button
|
|
3980
|
-
* will be displayed at the specified position. Do not specify both position and
|
|
3981
|
-
* after.
|
|
3982
|
-
*/
|
|
3983
|
-
position?: 'bottom' | 'top';
|
|
3984
|
-
}
|
|
3966
|
+
after?: string;
|
|
3967
|
+
/**
|
|
3968
|
+
* The position of the trigger generate button. If position specified, the button
|
|
3969
|
+
* will be displayed at the specified position. Do not specify both position and
|
|
3970
|
+
* after.
|
|
3971
|
+
*/
|
|
3972
|
+
position?: 'bottom' | 'top';
|
|
3985
3973
|
}
|
|
3986
3974
|
}
|
|
3987
3975
|
}
|
|
@@ -7123,16 +7111,12 @@ export declare namespace WorkflowUpdateParams {
|
|
|
7123
7111
|
}
|
|
7124
7112
|
}
|
|
7125
7113
|
}
|
|
7126
|
-
export interface WorkflowListParams {
|
|
7114
|
+
export interface WorkflowListParams extends WorkflowsCursorParams {
|
|
7127
7115
|
/**
|
|
7128
7116
|
* The number of items to return in the response. The default value is 10, maximum
|
|
7129
7117
|
* value is 200, minimum value is 1
|
|
7130
7118
|
*/
|
|
7131
7119
|
pageSize?: number;
|
|
7132
|
-
/**
|
|
7133
|
-
* A token you received in a previous request to query the next page of items
|
|
7134
|
-
*/
|
|
7135
|
-
paginationToken?: string;
|
|
7136
7120
|
/**
|
|
7137
7121
|
* The privacy of the workflows to return. The default value is `private`, possible
|
|
7138
7122
|
* values are `private`, `public` and `unlisted`. Default value is `private`.
|
|
@@ -7171,6 +7155,6 @@ export interface WorkflowRunParams {
|
|
|
7171
7155
|
dryRun?: unknown;
|
|
7172
7156
|
}
|
|
7173
7157
|
export declare namespace Workflows {
|
|
7174
|
-
export { type WorkflowCreateResponse as WorkflowCreateResponse, type WorkflowRetrieveResponse as WorkflowRetrieveResponse, type WorkflowUpdateResponse as WorkflowUpdateResponse, type WorkflowListResponse as WorkflowListResponse, type WorkflowDeleteResponse as WorkflowDeleteResponse, type WorkflowApproveUserResponse as WorkflowApproveUserResponse, type WorkflowGetTagsResponse as WorkflowGetTagsResponse, type WorkflowRunResponse as WorkflowRunResponse, type WorkflowCreateParams as WorkflowCreateParams, type WorkflowUpdateParams as WorkflowUpdateParams, type WorkflowListParams as WorkflowListParams, type WorkflowApproveUserParams as WorkflowApproveUserParams, type WorkflowGetTagsParams as WorkflowGetTagsParams, type WorkflowRunParams as WorkflowRunParams, };
|
|
7158
|
+
export { type WorkflowCreateResponse as WorkflowCreateResponse, type WorkflowRetrieveResponse as WorkflowRetrieveResponse, type WorkflowUpdateResponse as WorkflowUpdateResponse, type WorkflowListResponse as WorkflowListResponse, type WorkflowDeleteResponse as WorkflowDeleteResponse, type WorkflowApproveUserResponse as WorkflowApproveUserResponse, type WorkflowGetTagsResponse as WorkflowGetTagsResponse, type WorkflowRunResponse as WorkflowRunResponse, type WorkflowListResponsesWorkflowsCursor as WorkflowListResponsesWorkflowsCursor, type WorkflowCreateParams as WorkflowCreateParams, type WorkflowUpdateParams as WorkflowUpdateParams, type WorkflowListParams as WorkflowListParams, type WorkflowApproveUserParams as WorkflowApproveUserParams, type WorkflowGetTagsParams as WorkflowGetTagsParams, type WorkflowRunParams as WorkflowRunParams, };
|
|
7175
7159
|
}
|
|
7176
7160
|
//# sourceMappingURL=workflows.d.mts.map
|