@scenario-labs/sdk 2.6.0 → 3.0.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 +49 -0
- package/client.d.mts +10 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -10
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/lib/job.d.mts +2 -2
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +2 -2
- package/lib/job.d.ts.map +1 -1
- package/lib/job.js +3 -3
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +3 -3
- package/lib/job.mjs.map +1 -1
- package/lib/upload.d.mts +2 -2
- package/lib/upload.d.mts.map +1 -1
- package/lib/upload.d.ts +2 -2
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js +4 -4
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +4 -4
- package/lib/upload.mjs.map +1 -1
- package/lib/workflow.d.mts +2 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +2 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +2 -2
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +2 -2
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_converter.d.mts.map +1 -1
- package/lib/workflow_converter.d.ts.map +1 -1
- package/lib/workflow_converter.js +101 -22
- package/lib/workflow_converter.js.map +1 -1
- package/lib/workflow_converter.mjs +101 -22
- package/lib/workflow_converter.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets/assets.d.mts +1091 -8
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +1091 -8
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +34 -16
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +34 -16
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/download.d.mts +28 -5
- package/resources/assets/download.d.mts.map +1 -1
- package/resources/assets/download.d.ts +28 -5
- package/resources/assets/download.d.ts.map +1 -1
- package/resources/assets/download.js +8 -6
- package/resources/assets/download.js.map +1 -1
- package/resources/assets/download.mjs +8 -6
- package/resources/assets/download.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/collections/assets.d.mts +15 -4
- package/resources/collections/assets.d.mts.map +1 -1
- package/resources/collections/assets.d.ts +15 -4
- package/resources/collections/assets.d.ts.map +1 -1
- package/resources/collections/assets.js +14 -4
- package/resources/collections/assets.js.map +1 -1
- package/resources/collections/assets.mjs +14 -4
- package/resources/collections/assets.mjs.map +1 -1
- package/resources/collections/collections.d.mts +38 -9
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +38 -9
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js +11 -8
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +11 -8
- 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/collections/models.d.mts +15 -4
- package/resources/collections/models.d.mts.map +1 -1
- package/resources/collections/models.d.ts +15 -4
- package/resources/collections/models.d.ts.map +1 -1
- package/resources/collections/models.js +14 -4
- package/resources/collections/models.js.map +1 -1
- package/resources/collections/models.mjs +14 -4
- package/resources/collections/models.mjs.map +1 -1
- package/resources/generate.d.mts +941 -0
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +941 -0
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +28 -16
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +28 -16
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- 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 +146 -2
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +146 -2
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +8 -4
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +8 -4
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +10 -0
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +10 -0
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/description.js +2 -2
- package/resources/models/description.js.map +1 -1
- package/resources/models/description.mjs +2 -2
- package/resources/models/description.mjs.map +1 -1
- package/resources/models/examples.d.mts +346 -1
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +346 -1
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/examples.js +2 -2
- package/resources/models/examples.js.map +1 -1
- package/resources/models/examples.mjs +2 -2
- package/resources/models/examples.mjs.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 +71 -13
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +71 -13
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +30 -18
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +30 -18
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +93 -0
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +93 -0
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +4 -4
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +4 -4
- package/resources/models/train.mjs.map +1 -1
- package/resources/models/training-images.d.mts +22 -2
- package/resources/models/training-images.d.mts.map +1 -1
- package/resources/models/training-images.d.ts +22 -2
- package/resources/models/training-images.d.ts.map +1 -1
- package/resources/models/training-images.js +15 -8
- package/resources/models/training-images.js.map +1 -1
- package/resources/models/training-images.mjs +15 -8
- package/resources/models/training-images.mjs.map +1 -1
- package/resources/search.d.mts +10 -0
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +10 -0
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +4 -4
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +4 -4
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +5 -0
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +5 -0
- package/resources/tags.d.ts.map +1 -1
- package/resources/uploads.d.mts +35 -20
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +35 -20
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +8 -6
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +8 -6
- package/resources/uploads.mjs.map +1 -1
- package/resources/usages.d.mts +53 -10
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +53 -10
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +446 -266
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +446 -266
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +20 -12
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +20 -12
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +14 -0
- package/src/lib/job.ts +8 -3
- package/src/lib/upload.ts +5 -3
- package/src/lib/workflow.ts +3 -1
- package/src/lib/workflow_converter.ts +119 -24
- package/src/resources/assets/assets.ts +1310 -32
- package/src/resources/assets/download.ts +40 -7
- package/src/resources/assets/index.ts +1 -0
- package/src/resources/collections/assets.ts +29 -6
- package/src/resources/collections/collections.ts +59 -12
- package/src/resources/collections/index.ts +2 -0
- package/src/resources/collections/models.ts +29 -6
- package/src/resources/generate.ts +1247 -30
- package/src/resources/index.ts +7 -0
- package/src/resources/jobs.ts +169 -4
- package/src/resources/models/description.ts +14 -2
- package/src/resources/models/examples.ts +396 -3
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +112 -26
- package/src/resources/models/train.ts +126 -4
- package/src/resources/models/training-images.ts +41 -10
- package/src/resources/search.ts +16 -4
- package/src/resources/tags.ts +6 -0
- package/src/resources/uploads.ts +47 -22
- package/src/resources/usages.ts +63 -10
- package/src/resources/workflows.ts +783 -563
- 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
package/resources/workflows.d.ts
CHANGED
|
@@ -6,15 +6,15 @@ export declare class Workflows extends APIResource {
|
|
|
6
6
|
/**
|
|
7
7
|
* Create workflow
|
|
8
8
|
*/
|
|
9
|
-
create(
|
|
9
|
+
create(params: WorkflowCreateParams, options?: RequestOptions): APIPromise<WorkflowCreateResponse>;
|
|
10
10
|
/**
|
|
11
11
|
* Get workflow by ID
|
|
12
12
|
*/
|
|
13
|
-
retrieve(workflowID: string, options?: RequestOptions): APIPromise<WorkflowRetrieveResponse>;
|
|
13
|
+
retrieve(workflowID: string, query?: WorkflowRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<WorkflowRetrieveResponse>;
|
|
14
14
|
/**
|
|
15
15
|
* Update workflow
|
|
16
16
|
*/
|
|
17
|
-
update(workflowID: string,
|
|
17
|
+
update(workflowID: string, params: WorkflowUpdateParams, options?: RequestOptions): APIPromise<WorkflowUpdateResponse>;
|
|
18
18
|
/**
|
|
19
19
|
* List workflows
|
|
20
20
|
*/
|
|
@@ -22,7 +22,7 @@ export declare class Workflows extends APIResource {
|
|
|
22
22
|
/**
|
|
23
23
|
* Delete workflow
|
|
24
24
|
*/
|
|
25
|
-
delete(workflowID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
25
|
+
delete(workflowID: string, params?: WorkflowDeleteParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
26
26
|
/**
|
|
27
27
|
* Get all unique tags from workflows in a project (all privacy levels). Optionally
|
|
28
28
|
* filter by status.
|
|
@@ -38,11 +38,11 @@ export declare class Workflows extends APIResource {
|
|
|
38
38
|
* rejected stand-alone node cancels the workflow; a rejected ForEach iteration
|
|
39
39
|
* cascades to the surrounding loop.
|
|
40
40
|
*/
|
|
41
|
-
userApproval(workflowID: string,
|
|
41
|
+
userApproval(workflowID: string, params: WorkflowUserApprovalParams, options?: RequestOptions): APIPromise<WorkflowUserApprovalResponse>;
|
|
42
42
|
/**
|
|
43
43
|
* @deprecated Use `userApproval()` instead
|
|
44
44
|
*/
|
|
45
|
-
approveUser: (workflowID: string,
|
|
45
|
+
approveUser: (workflowID: string, params: WorkflowUserApprovalParams, options?: RequestOptions) => APIPromise<WorkflowUserApprovalResponse>;
|
|
46
46
|
}
|
|
47
47
|
export type WorkflowListResponsesWorkflowsCursor = WorkflowsCursor<WorkflowListResponse>;
|
|
48
48
|
export interface WorkflowCreateResponse {
|
|
@@ -76,6 +76,11 @@ export declare namespace WorkflowCreateResponse {
|
|
|
76
76
|
* The flow of the workflow.
|
|
77
77
|
*/
|
|
78
78
|
flow: Array<Workflow.Flow>;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
81
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
82
|
+
*/
|
|
83
|
+
hasFlow: boolean;
|
|
79
84
|
/**
|
|
80
85
|
* The inputs of the workflow.
|
|
81
86
|
*/
|
|
@@ -1079,6 +1084,11 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
1079
1084
|
* The flow of the workflow.
|
|
1080
1085
|
*/
|
|
1081
1086
|
flow: Array<Workflow.Flow>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
1089
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
1090
|
+
*/
|
|
1091
|
+
hasFlow: boolean;
|
|
1082
1092
|
/**
|
|
1083
1093
|
* The inputs of the workflow.
|
|
1084
1094
|
*/
|
|
@@ -2082,6 +2092,11 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
2082
2092
|
* The flow of the workflow.
|
|
2083
2093
|
*/
|
|
2084
2094
|
flow: Array<Workflow.Flow>;
|
|
2095
|
+
/**
|
|
2096
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
2097
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
2098
|
+
*/
|
|
2099
|
+
hasFlow: boolean;
|
|
2085
2100
|
/**
|
|
2086
2101
|
* The inputs of the workflow.
|
|
2087
2102
|
*/
|
|
@@ -3054,6 +3069,10 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
3054
3069
|
}
|
|
3055
3070
|
}
|
|
3056
3071
|
}
|
|
3072
|
+
/**
|
|
3073
|
+
* A workflow as returned by `GET /v1/workflows`, where the caller can trade the
|
|
3074
|
+
* two heaviest fields away to keep a large page under the response size limit.
|
|
3075
|
+
*/
|
|
3057
3076
|
export interface WorkflowListResponse {
|
|
3058
3077
|
/**
|
|
3059
3078
|
* Unique identifier of the workflow.
|
|
@@ -3072,15 +3091,10 @@ export interface WorkflowListResponse {
|
|
|
3072
3091
|
*/
|
|
3073
3092
|
description: string;
|
|
3074
3093
|
/**
|
|
3075
|
-
*
|
|
3076
|
-
|
|
3077
|
-
editorInfo: {
|
|
3078
|
-
[key: string]: unknown;
|
|
3079
|
-
};
|
|
3080
|
-
/**
|
|
3081
|
-
* The flow of the workflow.
|
|
3094
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
3095
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
3082
3096
|
*/
|
|
3083
|
-
|
|
3097
|
+
hasFlow: boolean;
|
|
3084
3098
|
/**
|
|
3085
3099
|
* The inputs of the workflow.
|
|
3086
3100
|
*/
|
|
@@ -3121,10 +3135,22 @@ export interface WorkflowListResponse {
|
|
|
3121
3135
|
* A representation of an asset before being processed by the workflow
|
|
3122
3136
|
*/
|
|
3123
3137
|
before?: WorkflowListResponse.Before;
|
|
3138
|
+
/**
|
|
3139
|
+
* The UI data about the workflow. This is managed by scenario webapp. Omitted when
|
|
3140
|
+
* the listing is requested with `full=false`.
|
|
3141
|
+
*/
|
|
3142
|
+
editorInfo?: {
|
|
3143
|
+
[key: string]: unknown;
|
|
3144
|
+
};
|
|
3124
3145
|
/**
|
|
3125
3146
|
* Embedding is a map of embedding version into embedding date
|
|
3126
3147
|
*/
|
|
3127
3148
|
embedding?: unknown;
|
|
3149
|
+
/**
|
|
3150
|
+
* The flow of the workflow. Omitted when the listing is requested with
|
|
3151
|
+
* `full=false`; read `hasFlow` to know whether there is a flow to fetch.
|
|
3152
|
+
*/
|
|
3153
|
+
flow?: Array<WorkflowListResponse.Flow>;
|
|
3128
3154
|
/**
|
|
3129
3155
|
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
3130
3156
|
* except by the author or a project admin.
|
|
@@ -3154,15 +3180,235 @@ export interface WorkflowListResponse {
|
|
|
3154
3180
|
*/
|
|
3155
3181
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'>;
|
|
3156
3182
|
/**
|
|
3157
|
-
*
|
|
3183
|
+
* Optional thumbnail asset for listing/display. Currently the thumbnail is
|
|
3184
|
+
* identical to the after asset.
|
|
3158
3185
|
*/
|
|
3159
3186
|
thumbnail?: WorkflowListResponse.Thumbnail;
|
|
3160
3187
|
/**
|
|
3161
|
-
*
|
|
3188
|
+
* UI configuration for custom workflows input display configuration. The UI
|
|
3189
|
+
* configuration for the workflow. This is managed by scenario webapp.
|
|
3162
3190
|
*/
|
|
3163
3191
|
uiConfig?: WorkflowListResponse.UiConfig;
|
|
3164
3192
|
}
|
|
3165
3193
|
export declare namespace WorkflowListResponse {
|
|
3194
|
+
/**
|
|
3195
|
+
* Defines the input parameters for a model. Use this to understand the available
|
|
3196
|
+
* input parameters for a given `modelId` when calling
|
|
3197
|
+
* `POST /generate/custom/{modelId}`. See {@link
|
|
3198
|
+
* https://docs.scenario.com/get-started/generation/video-generation} for examples.
|
|
3199
|
+
*/
|
|
3200
|
+
interface Input {
|
|
3201
|
+
/**
|
|
3202
|
+
* The name that must be user to call the model through the API
|
|
3203
|
+
*/
|
|
3204
|
+
name: string;
|
|
3205
|
+
/**
|
|
3206
|
+
* The data type of the input
|
|
3207
|
+
*/
|
|
3208
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
3209
|
+
/**
|
|
3210
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
3211
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
3212
|
+
* dropdown.
|
|
3213
|
+
*/
|
|
3214
|
+
allowedValues?: Array<unknown>;
|
|
3215
|
+
/**
|
|
3216
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
3217
|
+
* \`file_array\` input types with kind \`image\`.
|
|
3218
|
+
*/
|
|
3219
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
3220
|
+
/**
|
|
3221
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
3222
|
+
*/
|
|
3223
|
+
color?: boolean;
|
|
3224
|
+
/**
|
|
3225
|
+
* Whether this input affects the model's cost calculation
|
|
3226
|
+
*/
|
|
3227
|
+
costImpact?: boolean;
|
|
3228
|
+
/**
|
|
3229
|
+
* The default value for the input
|
|
3230
|
+
*/
|
|
3231
|
+
default?: unknown;
|
|
3232
|
+
/**
|
|
3233
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
3234
|
+
*/
|
|
3235
|
+
description?: string;
|
|
3236
|
+
/**
|
|
3237
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
3238
|
+
* value appear consecutively in the UI.
|
|
3239
|
+
*/
|
|
3240
|
+
group?: string;
|
|
3241
|
+
/**
|
|
3242
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
3243
|
+
*/
|
|
3244
|
+
hint?: string;
|
|
3245
|
+
/**
|
|
3246
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
3247
|
+
* the same as the current object. This is only available for type inputs_array
|
|
3248
|
+
* inputs.
|
|
3249
|
+
*/
|
|
3250
|
+
inputs?: Array<{
|
|
3251
|
+
[key: string]: unknown;
|
|
3252
|
+
}>;
|
|
3253
|
+
/**
|
|
3254
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3255
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3256
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
3257
|
+
* data:kind, prefix
|
|
3258
|
+
*/
|
|
3259
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
|
|
3260
|
+
/**
|
|
3261
|
+
* The label displayed in the UI for this input
|
|
3262
|
+
*/
|
|
3263
|
+
label?: string;
|
|
3264
|
+
/**
|
|
3265
|
+
* The name of the file input field to use as the mask source
|
|
3266
|
+
*/
|
|
3267
|
+
maskFrom?: string;
|
|
3268
|
+
/**
|
|
3269
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
3270
|
+
* types.
|
|
3271
|
+
*/
|
|
3272
|
+
max?: number;
|
|
3273
|
+
/**
|
|
3274
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
3275
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
3276
|
+
* \`asset.properties.duration\` at job creation time.
|
|
3277
|
+
*/
|
|
3278
|
+
maxDuration?: number;
|
|
3279
|
+
/**
|
|
3280
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3281
|
+
* \`string_array\`.
|
|
3282
|
+
*/
|
|
3283
|
+
maxLength?: number;
|
|
3284
|
+
/**
|
|
3285
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
3286
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3287
|
+
* creation time.
|
|
3288
|
+
*/
|
|
3289
|
+
maxSize?: number;
|
|
3290
|
+
/**
|
|
3291
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3292
|
+
*/
|
|
3293
|
+
min?: number;
|
|
3294
|
+
/**
|
|
3295
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
3296
|
+
* \`string_array\`.
|
|
3297
|
+
*/
|
|
3298
|
+
minLength?: number;
|
|
3299
|
+
/**
|
|
3300
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3301
|
+
* available for \`model_array\` input type.
|
|
3302
|
+
*/
|
|
3303
|
+
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' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
3304
|
+
/**
|
|
3305
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3306
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
3307
|
+
*
|
|
3308
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
3309
|
+
*/
|
|
3310
|
+
parent?: boolean;
|
|
3311
|
+
/**
|
|
3312
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
3313
|
+
*/
|
|
3314
|
+
placeholder?: string;
|
|
3315
|
+
/**
|
|
3316
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
3317
|
+
* spark feature. Only available for \`string\` input type.
|
|
3318
|
+
*/
|
|
3319
|
+
prompt?: boolean;
|
|
3320
|
+
/**
|
|
3321
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
3322
|
+
* type.
|
|
3323
|
+
*/
|
|
3324
|
+
promptSpark?: boolean;
|
|
3325
|
+
/**
|
|
3326
|
+
* Set of rules that describes when this input is required:
|
|
3327
|
+
*
|
|
3328
|
+
* - \`always\`: Input is always required
|
|
3329
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3330
|
+
* defined
|
|
3331
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3332
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3333
|
+
* value
|
|
3334
|
+
*
|
|
3335
|
+
* By default, the input is not required.
|
|
3336
|
+
*/
|
|
3337
|
+
required?: Input.Required;
|
|
3338
|
+
/**
|
|
3339
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3340
|
+
*/
|
|
3341
|
+
step?: number;
|
|
3342
|
+
}
|
|
3343
|
+
namespace Input {
|
|
3344
|
+
/**
|
|
3345
|
+
* Set of rules that describes when this input is required:
|
|
3346
|
+
*
|
|
3347
|
+
* - \`always\`: Input is always required
|
|
3348
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3349
|
+
* defined
|
|
3350
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3351
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3352
|
+
* value
|
|
3353
|
+
*
|
|
3354
|
+
* By default, the input is not required.
|
|
3355
|
+
*/
|
|
3356
|
+
interface Required {
|
|
3357
|
+
/**
|
|
3358
|
+
* Whether the input is always required
|
|
3359
|
+
*/
|
|
3360
|
+
always?: boolean;
|
|
3361
|
+
/**
|
|
3362
|
+
* Makes this input required when another input has a specific value:
|
|
3363
|
+
*
|
|
3364
|
+
* - Key: name of the input to check
|
|
3365
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
3366
|
+
*/
|
|
3367
|
+
conditionalValues?: unknown;
|
|
3368
|
+
/**
|
|
3369
|
+
* Makes this input required when another input is defined:
|
|
3370
|
+
*
|
|
3371
|
+
* - Key: name of the input that must be defined
|
|
3372
|
+
* - Value: message to display when this input is required
|
|
3373
|
+
*/
|
|
3374
|
+
ifDefined?: unknown;
|
|
3375
|
+
/**
|
|
3376
|
+
* Makes this input required when another input is not defined:
|
|
3377
|
+
*
|
|
3378
|
+
* - Key: name of the input that must be undefined
|
|
3379
|
+
* - Value: message to display when this input is required
|
|
3380
|
+
*/
|
|
3381
|
+
ifNotDefined?: unknown;
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3384
|
+
/**
|
|
3385
|
+
* A representation of an asset after being processed by the workflow
|
|
3386
|
+
*/
|
|
3387
|
+
interface After {
|
|
3388
|
+
/**
|
|
3389
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
3390
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
3391
|
+
*/
|
|
3392
|
+
assetId: string;
|
|
3393
|
+
/**
|
|
3394
|
+
* The url of the image used as a thumbnail for your model
|
|
3395
|
+
*/
|
|
3396
|
+
url: string;
|
|
3397
|
+
}
|
|
3398
|
+
/**
|
|
3399
|
+
* A representation of an asset before being processed by the workflow
|
|
3400
|
+
*/
|
|
3401
|
+
interface Before {
|
|
3402
|
+
/**
|
|
3403
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
3404
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
3405
|
+
*/
|
|
3406
|
+
assetId: string;
|
|
3407
|
+
/**
|
|
3408
|
+
* The url of the image used as a thumbnail for your model
|
|
3409
|
+
*/
|
|
3410
|
+
url: string;
|
|
3411
|
+
}
|
|
3166
3412
|
interface Flow {
|
|
3167
3413
|
/**
|
|
3168
3414
|
* The id of the node.
|
|
@@ -3716,232 +3962,17 @@ export declare namespace WorkflowListResponse {
|
|
|
3716
3962
|
}
|
|
3717
3963
|
}
|
|
3718
3964
|
/**
|
|
3719
|
-
*
|
|
3720
|
-
*
|
|
3721
|
-
* `POST /generate/custom/{modelId}`. See {@link
|
|
3722
|
-
* https://docs.scenario.com/get-started/generation/video-generation} for examples.
|
|
3723
|
-
*/
|
|
3724
|
-
interface Input {
|
|
3725
|
-
/**
|
|
3726
|
-
* The name that must be user to call the model through the API
|
|
3727
|
-
*/
|
|
3728
|
-
name: string;
|
|
3729
|
-
/**
|
|
3730
|
-
* The data type of the input
|
|
3731
|
-
*/
|
|
3732
|
-
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
3733
|
-
/**
|
|
3734
|
-
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
3735
|
-
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
3736
|
-
* dropdown.
|
|
3737
|
-
*/
|
|
3738
|
-
allowedValues?: Array<unknown>;
|
|
3739
|
-
/**
|
|
3740
|
-
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
3741
|
-
* \`file_array\` input types with kind \`image\`.
|
|
3742
|
-
*/
|
|
3743
|
-
backgroundBehavior?: 'opaque' | 'transparent';
|
|
3744
|
-
/**
|
|
3745
|
-
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
3746
|
-
*/
|
|
3747
|
-
color?: boolean;
|
|
3748
|
-
/**
|
|
3749
|
-
* Whether this input affects the model's cost calculation
|
|
3750
|
-
*/
|
|
3751
|
-
costImpact?: boolean;
|
|
3752
|
-
/**
|
|
3753
|
-
* The default value for the input
|
|
3754
|
-
*/
|
|
3755
|
-
default?: unknown;
|
|
3756
|
-
/**
|
|
3757
|
-
* Help text displayed in the UI to provide additional information about the input
|
|
3758
|
-
*/
|
|
3759
|
-
description?: string;
|
|
3760
|
-
/**
|
|
3761
|
-
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
3762
|
-
* value appear consecutively in the UI.
|
|
3763
|
-
*/
|
|
3764
|
-
group?: string;
|
|
3765
|
-
/**
|
|
3766
|
-
* Hint text displayed in the UI as a tooltip to guide the user
|
|
3767
|
-
*/
|
|
3768
|
-
hint?: string;
|
|
3769
|
-
/**
|
|
3770
|
-
* The list of inputs which form an object within a container array. All inputs are
|
|
3771
|
-
* the same as the current object. This is only available for type inputs_array
|
|
3772
|
-
* inputs.
|
|
3773
|
-
*/
|
|
3774
|
-
inputs?: Array<{
|
|
3775
|
-
[key: string]: unknown;
|
|
3776
|
-
}>;
|
|
3777
|
-
/**
|
|
3778
|
-
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3779
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3780
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
3781
|
-
* data:kind, prefix
|
|
3782
|
-
*/
|
|
3783
|
-
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
|
|
3784
|
-
/**
|
|
3785
|
-
* The label displayed in the UI for this input
|
|
3786
|
-
*/
|
|
3787
|
-
label?: string;
|
|
3788
|
-
/**
|
|
3789
|
-
* The name of the file input field to use as the mask source
|
|
3790
|
-
*/
|
|
3791
|
-
maskFrom?: string;
|
|
3792
|
-
/**
|
|
3793
|
-
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
3794
|
-
* types.
|
|
3795
|
-
*/
|
|
3796
|
-
max?: number;
|
|
3797
|
-
/**
|
|
3798
|
-
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
3799
|
-
* \`file_array\` input types for video and audio assets. Validated against
|
|
3800
|
-
* \`asset.properties.duration\` at job creation time.
|
|
3801
|
-
*/
|
|
3802
|
-
maxDuration?: number;
|
|
3803
|
-
/**
|
|
3804
|
-
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3805
|
-
* \`string_array\`.
|
|
3806
|
-
*/
|
|
3807
|
-
maxLength?: number;
|
|
3808
|
-
/**
|
|
3809
|
-
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
3810
|
-
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3811
|
-
* creation time.
|
|
3812
|
-
*/
|
|
3813
|
-
maxSize?: number;
|
|
3814
|
-
/**
|
|
3815
|
-
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3816
|
-
*/
|
|
3817
|
-
min?: number;
|
|
3818
|
-
/**
|
|
3819
|
-
* The minimum allowed length for string inputs. Also applies to each item in
|
|
3820
|
-
* \`string_array\`.
|
|
3821
|
-
*/
|
|
3822
|
-
minLength?: number;
|
|
3823
|
-
/**
|
|
3824
|
-
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3825
|
-
* available for \`model_array\` input type.
|
|
3826
|
-
*/
|
|
3827
|
-
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' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
3828
|
-
/**
|
|
3829
|
-
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3830
|
-
* Only available for \`file\` and \`file_array\` input types.
|
|
3831
|
-
*
|
|
3832
|
-
* For \`file_array\`, the parent asset is the first item in the array.
|
|
3833
|
-
*/
|
|
3834
|
-
parent?: boolean;
|
|
3835
|
-
/**
|
|
3836
|
-
* Placeholder text for the input. Only available for 'string' input type.
|
|
3837
|
-
*/
|
|
3838
|
-
placeholder?: string;
|
|
3839
|
-
/**
|
|
3840
|
-
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
3841
|
-
* spark feature. Only available for \`string\` input type.
|
|
3842
|
-
*/
|
|
3843
|
-
prompt?: boolean;
|
|
3844
|
-
/**
|
|
3845
|
-
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
3846
|
-
* type.
|
|
3847
|
-
*/
|
|
3848
|
-
promptSpark?: boolean;
|
|
3849
|
-
/**
|
|
3850
|
-
* Set of rules that describes when this input is required:
|
|
3851
|
-
*
|
|
3852
|
-
* - \`always\`: Input is always required
|
|
3853
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3854
|
-
* defined
|
|
3855
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3856
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3857
|
-
* value
|
|
3858
|
-
*
|
|
3859
|
-
* By default, the input is not required.
|
|
3860
|
-
*/
|
|
3861
|
-
required?: Input.Required;
|
|
3862
|
-
/**
|
|
3863
|
-
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3864
|
-
*/
|
|
3865
|
-
step?: number;
|
|
3866
|
-
}
|
|
3867
|
-
namespace Input {
|
|
3868
|
-
/**
|
|
3869
|
-
* Set of rules that describes when this input is required:
|
|
3870
|
-
*
|
|
3871
|
-
* - \`always\`: Input is always required
|
|
3872
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3873
|
-
* defined
|
|
3874
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3875
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3876
|
-
* value
|
|
3877
|
-
*
|
|
3878
|
-
* By default, the input is not required.
|
|
3879
|
-
*/
|
|
3880
|
-
interface Required {
|
|
3881
|
-
/**
|
|
3882
|
-
* Whether the input is always required
|
|
3883
|
-
*/
|
|
3884
|
-
always?: boolean;
|
|
3885
|
-
/**
|
|
3886
|
-
* Makes this input required when another input has a specific value:
|
|
3887
|
-
*
|
|
3888
|
-
* - Key: name of the input to check
|
|
3889
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
3890
|
-
*/
|
|
3891
|
-
conditionalValues?: unknown;
|
|
3892
|
-
/**
|
|
3893
|
-
* Makes this input required when another input is defined:
|
|
3894
|
-
*
|
|
3895
|
-
* - Key: name of the input that must be defined
|
|
3896
|
-
* - Value: message to display when this input is required
|
|
3897
|
-
*/
|
|
3898
|
-
ifDefined?: unknown;
|
|
3899
|
-
/**
|
|
3900
|
-
* Makes this input required when another input is not defined:
|
|
3901
|
-
*
|
|
3902
|
-
* - Key: name of the input that must be undefined
|
|
3903
|
-
* - Value: message to display when this input is required
|
|
3904
|
-
*/
|
|
3905
|
-
ifNotDefined?: unknown;
|
|
3906
|
-
}
|
|
3907
|
-
}
|
|
3908
|
-
/**
|
|
3909
|
-
* A representation of an asset after being processed by the workflow
|
|
3910
|
-
*/
|
|
3911
|
-
interface After {
|
|
3912
|
-
/**
|
|
3913
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
3914
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
3915
|
-
*/
|
|
3916
|
-
assetId: string;
|
|
3917
|
-
/**
|
|
3918
|
-
* The url of the image used as a thumbnail for your model
|
|
3919
|
-
*/
|
|
3920
|
-
url: string;
|
|
3921
|
-
}
|
|
3922
|
-
/**
|
|
3923
|
-
* A representation of an asset before being processed by the workflow
|
|
3924
|
-
*/
|
|
3925
|
-
interface Before {
|
|
3926
|
-
/**
|
|
3927
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
3928
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
3929
|
-
*/
|
|
3930
|
-
assetId: string;
|
|
3931
|
-
/**
|
|
3932
|
-
* The url of the image used as a thumbnail for your model
|
|
3933
|
-
*/
|
|
3934
|
-
url: string;
|
|
3935
|
-
}
|
|
3936
|
-
/**
|
|
3937
|
-
* Currently the thumbnail is identical to the after asset.
|
|
3965
|
+
* Optional thumbnail asset for listing/display. Currently the thumbnail is
|
|
3966
|
+
* identical to the after asset.
|
|
3938
3967
|
*/
|
|
3939
3968
|
interface Thumbnail {
|
|
3969
|
+
__brand: 'AssetId';
|
|
3940
3970
|
assetId: string;
|
|
3941
3971
|
url: string;
|
|
3942
3972
|
}
|
|
3943
3973
|
/**
|
|
3944
|
-
*
|
|
3974
|
+
* UI configuration for custom workflows input display configuration. The UI
|
|
3975
|
+
* configuration for the workflow. This is managed by scenario webapp.
|
|
3945
3976
|
*/
|
|
3946
3977
|
interface UiConfig {
|
|
3947
3978
|
/**
|
|
@@ -4745,6 +4776,26 @@ export declare namespace WorkflowRunResponse {
|
|
|
4745
4776
|
interface Billing {
|
|
4746
4777
|
cuCost: number;
|
|
4747
4778
|
cuDiscount: number;
|
|
4779
|
+
/**
|
|
4780
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
4781
|
+
* top of the generation itself, such as `slop-detection`.
|
|
4782
|
+
*
|
|
4783
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
4784
|
+
* values here.
|
|
4785
|
+
*
|
|
4786
|
+
* Two caveats when displaying it:
|
|
4787
|
+
*
|
|
4788
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
4789
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
4790
|
+
* still shows the main action's original charge.
|
|
4791
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
4792
|
+
* charged outside the job and reported once, as
|
|
4793
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
4794
|
+
* it.
|
|
4795
|
+
*
|
|
4796
|
+
* Absent when the job paid for no add-on.
|
|
4797
|
+
*/
|
|
4798
|
+
cuCostDetails?: Billing.CuCostDetails;
|
|
4748
4799
|
/**
|
|
4749
4800
|
* When true, the credits charged for this job are not automatically refunded if
|
|
4750
4801
|
* the generation fails, because the model used does not support refund-on-failure.
|
|
@@ -4752,6 +4803,31 @@ export declare namespace WorkflowRunResponse {
|
|
|
4752
4803
|
*/
|
|
4753
4804
|
disableRefund?: boolean;
|
|
4754
4805
|
}
|
|
4806
|
+
namespace Billing {
|
|
4807
|
+
/**
|
|
4808
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
4809
|
+
* top of the generation itself, such as `slop-detection`.
|
|
4810
|
+
*
|
|
4811
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
4812
|
+
* values here.
|
|
4813
|
+
*
|
|
4814
|
+
* Two caveats when displaying it:
|
|
4815
|
+
*
|
|
4816
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
4817
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
4818
|
+
* still shows the main action's original charge.
|
|
4819
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
4820
|
+
* charged outside the job and reported once, as
|
|
4821
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
4822
|
+
* it.
|
|
4823
|
+
*
|
|
4824
|
+
* Absent when the job paid for no add-on.
|
|
4825
|
+
*/
|
|
4826
|
+
interface CuCostDetails {
|
|
4827
|
+
'ip-detection'?: number;
|
|
4828
|
+
'slop-detection'?: number;
|
|
4829
|
+
}
|
|
4830
|
+
}
|
|
4755
4831
|
}
|
|
4756
4832
|
interface Workflow {
|
|
4757
4833
|
/**
|
|
@@ -4780,6 +4856,11 @@ export declare namespace WorkflowRunResponse {
|
|
|
4780
4856
|
* The flow of the workflow.
|
|
4781
4857
|
*/
|
|
4782
4858
|
flow: Array<Workflow.Flow>;
|
|
4859
|
+
/**
|
|
4860
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
4861
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
4862
|
+
*/
|
|
4863
|
+
hasFlow: boolean;
|
|
4783
4864
|
/**
|
|
4784
4865
|
* The inputs of the workflow.
|
|
4785
4866
|
*/
|
|
@@ -6437,6 +6518,26 @@ export declare namespace WorkflowUserApprovalResponse {
|
|
|
6437
6518
|
interface Billing {
|
|
6438
6519
|
cuCost: number;
|
|
6439
6520
|
cuDiscount: number;
|
|
6521
|
+
/**
|
|
6522
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
6523
|
+
* top of the generation itself, such as `slop-detection`.
|
|
6524
|
+
*
|
|
6525
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
6526
|
+
* values here.
|
|
6527
|
+
*
|
|
6528
|
+
* Two caveats when displaying it:
|
|
6529
|
+
*
|
|
6530
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
6531
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
6532
|
+
* still shows the main action's original charge.
|
|
6533
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
6534
|
+
* charged outside the job and reported once, as
|
|
6535
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
6536
|
+
* it.
|
|
6537
|
+
*
|
|
6538
|
+
* Absent when the job paid for no add-on.
|
|
6539
|
+
*/
|
|
6540
|
+
cuCostDetails?: Billing.CuCostDetails;
|
|
6440
6541
|
/**
|
|
6441
6542
|
* When true, the credits charged for this job are not automatically refunded if
|
|
6442
6543
|
* the generation fails, because the model used does not support refund-on-failure.
|
|
@@ -6444,77 +6545,123 @@ export declare namespace WorkflowUserApprovalResponse {
|
|
|
6444
6545
|
*/
|
|
6445
6546
|
disableRefund?: boolean;
|
|
6446
6547
|
}
|
|
6548
|
+
namespace Billing {
|
|
6549
|
+
/**
|
|
6550
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
6551
|
+
* top of the generation itself, such as `slop-detection`.
|
|
6552
|
+
*
|
|
6553
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
6554
|
+
* values here.
|
|
6555
|
+
*
|
|
6556
|
+
* Two caveats when displaying it:
|
|
6557
|
+
*
|
|
6558
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
6559
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
6560
|
+
* still shows the main action's original charge.
|
|
6561
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
6562
|
+
* charged outside the job and reported once, as
|
|
6563
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
6564
|
+
* it.
|
|
6565
|
+
*
|
|
6566
|
+
* Absent when the job paid for no add-on.
|
|
6567
|
+
*/
|
|
6568
|
+
interface CuCostDetails {
|
|
6569
|
+
'ip-detection'?: number;
|
|
6570
|
+
'slop-detection'?: number;
|
|
6571
|
+
}
|
|
6572
|
+
}
|
|
6447
6573
|
}
|
|
6448
6574
|
}
|
|
6449
6575
|
export interface WorkflowCreateParams {
|
|
6576
|
+
/**
|
|
6577
|
+
* Body param
|
|
6578
|
+
*/
|
|
6450
6579
|
description: string;
|
|
6580
|
+
/**
|
|
6581
|
+
* Body param
|
|
6582
|
+
*/
|
|
6451
6583
|
name: string;
|
|
6584
|
+
/**
|
|
6585
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
6586
|
+
* assert ownership or to set the owner of the resource(s)
|
|
6587
|
+
*/
|
|
6588
|
+
projectId?: string;
|
|
6589
|
+
}
|
|
6590
|
+
export interface WorkflowRetrieveParams {
|
|
6591
|
+
projectId?: unknown;
|
|
6452
6592
|
}
|
|
6453
6593
|
export interface WorkflowUpdateParams {
|
|
6454
6594
|
/**
|
|
6455
|
-
*
|
|
6595
|
+
* Query param
|
|
6596
|
+
*/
|
|
6597
|
+
projectId?: unknown;
|
|
6598
|
+
/**
|
|
6599
|
+
* Body param: The after asset of the workflow. Set to null to unset the after
|
|
6600
|
+
* asset.
|
|
6456
6601
|
*/
|
|
6457
6602
|
after?: string;
|
|
6458
6603
|
/**
|
|
6459
|
-
* The before asset of the workflow. Set to null to unset the before
|
|
6604
|
+
* Body param: The before asset of the workflow. Set to null to unset the before
|
|
6605
|
+
* asset.
|
|
6460
6606
|
*/
|
|
6461
6607
|
before?: string;
|
|
6462
6608
|
/**
|
|
6463
|
-
* Set to true to bypass the lock and save a locked workflow without
|
|
6464
|
-
* first. Only the author or a project admin can use this.
|
|
6609
|
+
* Body param: Set to true to bypass the lock and save a locked workflow without
|
|
6610
|
+
* unlocking it first. Only the author or a project admin can use this.
|
|
6465
6611
|
*/
|
|
6466
6612
|
bypassLock?: boolean;
|
|
6467
6613
|
/**
|
|
6468
|
-
* The description of the workflow.
|
|
6614
|
+
* Body param: The description of the workflow.
|
|
6469
6615
|
*/
|
|
6470
6616
|
description?: string;
|
|
6471
6617
|
/**
|
|
6472
|
-
* The UI data about the workflow. This is managed by scenario webapp.
|
|
6618
|
+
* Body param: The UI data about the workflow. This is managed by scenario webapp.
|
|
6473
6619
|
*/
|
|
6474
6620
|
editorInfo?: {
|
|
6475
6621
|
[key: string]: unknown;
|
|
6476
6622
|
};
|
|
6477
6623
|
/**
|
|
6478
|
-
* The flow of the workflow.
|
|
6624
|
+
* Body param: The flow of the workflow.
|
|
6479
6625
|
*/
|
|
6480
6626
|
flow?: Array<WorkflowUpdateParams.Flow>;
|
|
6481
6627
|
/**
|
|
6482
|
-
* The inputs of the workflow.
|
|
6628
|
+
* Body param: The inputs of the workflow.
|
|
6483
6629
|
*/
|
|
6484
6630
|
inputs?: Array<WorkflowUpdateParams.Input>;
|
|
6485
6631
|
/**
|
|
6486
|
-
* Set to true to lock the workflow, false to unlock. Only the author
|
|
6487
|
-
* admin can change this.
|
|
6632
|
+
* Body param: Set to true to lock the workflow, false to unlock. Only the author
|
|
6633
|
+
* or a project admin can change this.
|
|
6488
6634
|
*/
|
|
6489
6635
|
isLocked?: boolean;
|
|
6490
6636
|
/**
|
|
6491
|
-
* The name of the workflow.
|
|
6637
|
+
* Body param: The name of the workflow.
|
|
6492
6638
|
*/
|
|
6493
6639
|
name?: string;
|
|
6494
6640
|
/**
|
|
6495
|
-
* The output asset kinds of the workflow.
|
|
6641
|
+
* Body param: The output asset kinds of the workflow.
|
|
6496
6642
|
*/
|
|
6497
6643
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'>;
|
|
6498
6644
|
/**
|
|
6499
|
-
* The privacy of the workflow.
|
|
6645
|
+
* Body param: The privacy of the workflow.
|
|
6500
6646
|
*/
|
|
6501
6647
|
privacy?: 'private' | 'public' | 'unlisted';
|
|
6502
6648
|
/**
|
|
6503
|
-
* A short description of the workflow.
|
|
6649
|
+
* Body param: A short description of the workflow.
|
|
6504
6650
|
*
|
|
6505
6651
|
* Used for display in the App UI.
|
|
6506
6652
|
*/
|
|
6507
6653
|
shortDescription?: string;
|
|
6508
6654
|
/**
|
|
6509
|
-
* The status of the workflow.
|
|
6655
|
+
* Body param: The status of the workflow.
|
|
6510
6656
|
*/
|
|
6511
6657
|
status?: 'draft' | 'ready';
|
|
6512
6658
|
/**
|
|
6513
|
-
* The tag set of the workflow.
|
|
6659
|
+
* Body param: The tag set of the workflow.
|
|
6514
6660
|
*/
|
|
6515
6661
|
tagSet?: Array<string>;
|
|
6516
6662
|
/**
|
|
6517
|
-
* The thumbnail asset of the workflow. Set to null to unset the
|
|
6663
|
+
* Body param: The thumbnail asset of the workflow. Set to null to unset the
|
|
6664
|
+
* thumbnail.
|
|
6518
6665
|
*/
|
|
6519
6666
|
thumbnail?: string;
|
|
6520
6667
|
}
|
|
@@ -7263,6 +7410,14 @@ export declare namespace WorkflowUpdateParams {
|
|
|
7263
7410
|
}
|
|
7264
7411
|
}
|
|
7265
7412
|
export interface WorkflowListParams extends WorkflowsCursorParams {
|
|
7413
|
+
/**
|
|
7414
|
+
* Whether to return the complete workflow (default `true`). Set it to `false` to
|
|
7415
|
+
* omit `flow` and `editorInfo`, the two heaviest fields, and keep a large page
|
|
7416
|
+
* under the response size limit; `hasFlow` then tells you which workflows have a
|
|
7417
|
+
* flow to fetch from `GET /v1/workflows/{workflowId}`. Ignored for public
|
|
7418
|
+
* listings, which never return either field.
|
|
7419
|
+
*/
|
|
7420
|
+
full?: boolean;
|
|
7266
7421
|
/**
|
|
7267
7422
|
* The number of items to return in the response. The default value is 50, maximum
|
|
7268
7423
|
* value is 100, minimum value is 1
|
|
@@ -7273,6 +7428,11 @@ export interface WorkflowListParams extends WorkflowsCursorParams {
|
|
|
7273
7428
|
* values are `private`, `public` and `unlisted`. Default value is `private`.
|
|
7274
7429
|
*/
|
|
7275
7430
|
privacy?: 'public' | 'private' | 'unlisted';
|
|
7431
|
+
/**
|
|
7432
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
7433
|
+
* or to set the owner of the resource(s)
|
|
7434
|
+
*/
|
|
7435
|
+
projectId?: string;
|
|
7276
7436
|
/**
|
|
7277
7437
|
* Sort direction applied to `updatedAt`: `asc` or `desc` (default `desc`). Public
|
|
7278
7438
|
* listings are always ordered by `updatedAt`. Private listings honor it only when
|
|
@@ -7287,7 +7447,15 @@ export interface WorkflowListParams extends WorkflowsCursorParams {
|
|
|
7287
7447
|
status?: 'draft' | 'ready';
|
|
7288
7448
|
tags?: unknown;
|
|
7289
7449
|
}
|
|
7450
|
+
export interface WorkflowDeleteParams {
|
|
7451
|
+
projectId?: unknown;
|
|
7452
|
+
}
|
|
7290
7453
|
export interface WorkflowGetTagsParams {
|
|
7454
|
+
/**
|
|
7455
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
7456
|
+
* or to set the owner of the resource(s)
|
|
7457
|
+
*/
|
|
7458
|
+
projectId?: string;
|
|
7291
7459
|
status?: unknown;
|
|
7292
7460
|
}
|
|
7293
7461
|
export interface WorkflowRunParams {
|
|
@@ -7300,42 +7468,54 @@ export interface WorkflowRunParams {
|
|
|
7300
7468
|
* Query param
|
|
7301
7469
|
*/
|
|
7302
7470
|
dryRun?: unknown;
|
|
7471
|
+
/**
|
|
7472
|
+
* Query param
|
|
7473
|
+
*/
|
|
7474
|
+
projectId?: unknown;
|
|
7303
7475
|
}
|
|
7304
7476
|
export interface WorkflowUserApprovalParams {
|
|
7305
7477
|
/**
|
|
7306
|
-
*
|
|
7478
|
+
* Query param
|
|
7479
|
+
*/
|
|
7480
|
+
projectId: unknown;
|
|
7481
|
+
/**
|
|
7482
|
+
* Body param: The ID of the user approval node to act on in the workflow
|
|
7307
7483
|
*/
|
|
7308
7484
|
nodeId: string;
|
|
7309
7485
|
/**
|
|
7310
|
-
* The ID of the workflow job that contains the user approval node
|
|
7486
|
+
* Body param: The ID of the workflow job that contains the user approval node
|
|
7311
7487
|
*/
|
|
7312
7488
|
workflowJobId: string;
|
|
7313
7489
|
/**
|
|
7314
|
-
* Decision taken on the approval node. "approve" marks it Success and
|
|
7315
|
-
* workflow; "reject" marks it Rejected and either cancels the
|
|
7316
|
-
* node is inside a ForEach iteration — cascades to the loop.
|
|
7317
|
-
* for backward compatibility.
|
|
7490
|
+
* Body param: Decision taken on the approval node. "approve" marks it Success and
|
|
7491
|
+
* advances the workflow; "reject" marks it Rejected and either cancels the
|
|
7492
|
+
* workflow or — if the node is inside a ForEach iteration — cascades to the loop.
|
|
7493
|
+
* Defaults to "approve" for backward compatibility.
|
|
7318
7494
|
*/
|
|
7319
7495
|
action?: 'approve' | 'reject';
|
|
7320
7496
|
}
|
|
7321
7497
|
export interface WorkflowApproveUserParams {
|
|
7322
7498
|
/**
|
|
7323
|
-
*
|
|
7499
|
+
* Query param
|
|
7500
|
+
*/
|
|
7501
|
+
projectId: unknown;
|
|
7502
|
+
/**
|
|
7503
|
+
* Body param: The ID of the user approval node to act on in the workflow
|
|
7324
7504
|
*/
|
|
7325
7505
|
nodeId: string;
|
|
7326
7506
|
/**
|
|
7327
|
-
* The ID of the workflow job that contains the user approval node
|
|
7507
|
+
* Body param: The ID of the workflow job that contains the user approval node
|
|
7328
7508
|
*/
|
|
7329
7509
|
workflowJobId: string;
|
|
7330
7510
|
/**
|
|
7331
|
-
* Decision taken on the approval node. "approve" marks it Success and
|
|
7332
|
-
* workflow; "reject" marks it Rejected and either cancels the
|
|
7333
|
-
* node is inside a ForEach iteration — cascades to the loop.
|
|
7334
|
-
* for backward compatibility.
|
|
7511
|
+
* Body param: Decision taken on the approval node. "approve" marks it Success and
|
|
7512
|
+
* advances the workflow; "reject" marks it Rejected and either cancels the
|
|
7513
|
+
* workflow or — if the node is inside a ForEach iteration — cascades to the loop.
|
|
7514
|
+
* Defaults to "approve" for backward compatibility.
|
|
7335
7515
|
*/
|
|
7336
7516
|
action?: 'approve' | 'reject';
|
|
7337
7517
|
}
|
|
7338
7518
|
export declare namespace Workflows {
|
|
7339
|
-
export { type WorkflowCreateResponse as WorkflowCreateResponse, type WorkflowRetrieveResponse as WorkflowRetrieveResponse, type WorkflowUpdateResponse as WorkflowUpdateResponse, type WorkflowListResponse as WorkflowListResponse, type WorkflowDeleteResponse as WorkflowDeleteResponse, type WorkflowGetTagsResponse as WorkflowGetTagsResponse, type WorkflowRunResponse as WorkflowRunResponse, type WorkflowUserApprovalResponse as WorkflowUserApprovalResponse, type WorkflowListResponsesWorkflowsCursor as WorkflowListResponsesWorkflowsCursor, type WorkflowCreateParams as WorkflowCreateParams, type WorkflowUpdateParams as WorkflowUpdateParams, type WorkflowListParams as WorkflowListParams, type WorkflowGetTagsParams as WorkflowGetTagsParams, type WorkflowRunParams as WorkflowRunParams, type WorkflowUserApprovalParams as WorkflowUserApprovalParams, type WorkflowApproveUserParams as WorkflowApproveUserParams, };
|
|
7519
|
+
export { type WorkflowCreateResponse as WorkflowCreateResponse, type WorkflowRetrieveResponse as WorkflowRetrieveResponse, type WorkflowUpdateResponse as WorkflowUpdateResponse, type WorkflowListResponse as WorkflowListResponse, type WorkflowDeleteResponse as WorkflowDeleteResponse, type WorkflowGetTagsResponse as WorkflowGetTagsResponse, type WorkflowRunResponse as WorkflowRunResponse, type WorkflowUserApprovalResponse as WorkflowUserApprovalResponse, type WorkflowListResponsesWorkflowsCursor as WorkflowListResponsesWorkflowsCursor, type WorkflowCreateParams as WorkflowCreateParams, type WorkflowRetrieveParams as WorkflowRetrieveParams, type WorkflowUpdateParams as WorkflowUpdateParams, type WorkflowListParams as WorkflowListParams, type WorkflowDeleteParams as WorkflowDeleteParams, type WorkflowGetTagsParams as WorkflowGetTagsParams, type WorkflowRunParams as WorkflowRunParams, type WorkflowUserApprovalParams as WorkflowUserApprovalParams, type WorkflowApproveUserParams as WorkflowApproveUserParams, };
|
|
7340
7520
|
}
|
|
7341
7521
|
//# sourceMappingURL=workflows.d.ts.map
|