@scenario-labs/sdk 0.3.0 → 1.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 +22 -0
- package/README.md +40 -6
- package/client.d.mts +34 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +34 -14
- 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 +2 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/index.mjs +2 -0
- package/index.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 +2 -0
- package/lib/scenario.d.mts.map +1 -1
- package/lib/scenario.d.ts +2 -0
- package/lib/scenario.d.ts.map +1 -1
- package/lib/scenario.js +2 -0
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +2 -0
- package/lib/scenario.mjs.map +1 -1
- package/lib/upload.d.mts +89 -0
- package/lib/upload.d.mts.map +1 -0
- package/lib/upload.d.ts +89 -0
- package/lib/upload.d.ts.map +1 -0
- package/lib/upload.js +193 -0
- package/lib/upload.js.map +1 -0
- package/lib/upload.mjs +156 -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 +623 -646
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +623 -646
- 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/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/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- 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/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 +839 -850
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +839 -850
- 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/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/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 +103 -2
- package/src/core/pagination.ts +497 -0
- package/src/index.ts +8 -0
- package/src/lib/models.ts +62 -2
- package/src/lib/scenario.ts +2 -0
- package/src/lib/upload.ts +250 -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 +887 -902
- package/src/resources/assets/index.ts +2 -0
- package/src/resources/collections/collections.ts +45 -54
- package/src/resources/collections/index.ts +1 -0
- package/src/resources/index.ts +9 -1
- package/src/resources/jobs.ts +613 -622
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +1052 -1064
- package/src/resources/search.ts +239 -327
- package/src/resources/tags.ts +32 -39
- 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
package/resources/jobs.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { JobsCursor, type JobsCursorParams, PagePromise } from "../core/pagination.mjs";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
5
|
export declare class Jobs extends APIResource {
|
|
5
6
|
/**
|
|
@@ -12,12 +13,13 @@ export declare class Jobs extends APIResource {
|
|
|
12
13
|
* view of all operations running on the platform along with their status and
|
|
13
14
|
* results.
|
|
14
15
|
*/
|
|
15
|
-
list(query?: JobListParams | null | undefined, options?: RequestOptions):
|
|
16
|
+
list(query?: JobListParams | null | undefined, options?: RequestOptions): PagePromise<JobListResponsesJobsCursor, JobListResponse>;
|
|
16
17
|
/**
|
|
17
18
|
* Trigger an action on a job: cancel
|
|
18
19
|
*/
|
|
19
20
|
triggerAction(jobID: string, params: JobTriggerActionParams, options?: RequestOptions): APIPromise<JobTriggerActionResponse>;
|
|
20
21
|
}
|
|
22
|
+
export type JobListResponsesJobsCursor = JobsCursor<JobListResponse>;
|
|
21
23
|
export interface JobRetrieveResponse {
|
|
22
24
|
job: JobRetrieveResponse.Job;
|
|
23
25
|
}
|
|
@@ -695,207 +697,357 @@ export declare namespace JobRetrieveResponse {
|
|
|
695
697
|
}
|
|
696
698
|
}
|
|
697
699
|
export interface JobListResponse {
|
|
698
|
-
jobs: Array<JobListResponse.Job>;
|
|
699
700
|
/**
|
|
700
|
-
*
|
|
701
|
+
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
701
702
|
*/
|
|
702
|
-
|
|
703
|
+
createdAt: string;
|
|
704
|
+
/**
|
|
705
|
+
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
706
|
+
*/
|
|
707
|
+
jobId: string;
|
|
708
|
+
/**
|
|
709
|
+
* The type of job
|
|
710
|
+
*/
|
|
711
|
+
jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'musubi-model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
|
|
712
|
+
/**
|
|
713
|
+
* Metadata of the job with some additional information
|
|
714
|
+
*/
|
|
715
|
+
metadata: JobListResponse.Metadata;
|
|
716
|
+
/**
|
|
717
|
+
* Progress of the job (between 0 and 1)
|
|
718
|
+
*/
|
|
719
|
+
progress: number;
|
|
720
|
+
/**
|
|
721
|
+
* The current status of the job
|
|
722
|
+
*/
|
|
723
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
724
|
+
/**
|
|
725
|
+
* The history of the different statuses the job went through with the ISO string
|
|
726
|
+
* date of when the job reached each statuses.
|
|
727
|
+
*/
|
|
728
|
+
statusHistory: Array<JobListResponse.StatusHistory>;
|
|
729
|
+
/**
|
|
730
|
+
* The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
731
|
+
*/
|
|
732
|
+
updatedAt: string;
|
|
733
|
+
/**
|
|
734
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
735
|
+
*/
|
|
736
|
+
authorId?: string;
|
|
737
|
+
/**
|
|
738
|
+
* The billing of the job
|
|
739
|
+
*/
|
|
740
|
+
billing?: JobListResponse.Billing;
|
|
741
|
+
/**
|
|
742
|
+
* The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
|
|
743
|
+
*/
|
|
744
|
+
ownerId?: string;
|
|
703
745
|
}
|
|
704
746
|
export declare namespace JobListResponse {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
createdAt: string;
|
|
710
|
-
/**
|
|
711
|
-
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
712
|
-
*/
|
|
713
|
-
jobId: string;
|
|
747
|
+
/**
|
|
748
|
+
* Metadata of the job with some additional information
|
|
749
|
+
*/
|
|
750
|
+
interface Metadata {
|
|
714
751
|
/**
|
|
715
|
-
*
|
|
752
|
+
* List of produced assets for this job
|
|
716
753
|
*/
|
|
717
|
-
|
|
754
|
+
assetIds?: Array<string>;
|
|
718
755
|
/**
|
|
719
|
-
*
|
|
756
|
+
* Eventual error for the job
|
|
720
757
|
*/
|
|
721
|
-
|
|
758
|
+
error?: string | null;
|
|
722
759
|
/**
|
|
723
|
-
*
|
|
760
|
+
* The flow of the job. Only available for workflow jobs.
|
|
724
761
|
*/
|
|
725
|
-
|
|
762
|
+
flow?: Array<Metadata.Flow>;
|
|
726
763
|
/**
|
|
727
|
-
*
|
|
764
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
728
765
|
*/
|
|
729
|
-
|
|
766
|
+
hint?: string;
|
|
730
767
|
/**
|
|
731
|
-
* The
|
|
732
|
-
* date of when the job reached each statuses.
|
|
768
|
+
* The inputs for the job
|
|
733
769
|
*/
|
|
734
|
-
|
|
770
|
+
input?: {
|
|
771
|
+
[key: string]: unknown;
|
|
772
|
+
};
|
|
735
773
|
/**
|
|
736
|
-
*
|
|
774
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
775
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
776
|
+
* results.
|
|
737
777
|
*/
|
|
738
|
-
|
|
778
|
+
output?: {
|
|
779
|
+
[key: string]: unknown;
|
|
780
|
+
};
|
|
739
781
|
/**
|
|
740
|
-
*
|
|
782
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
741
783
|
*/
|
|
742
|
-
|
|
784
|
+
outputModelId?: string;
|
|
743
785
|
/**
|
|
744
|
-
* The
|
|
786
|
+
* The workflow ID of the job if job is part of a workflow.
|
|
745
787
|
*/
|
|
746
|
-
|
|
788
|
+
workflowId?: string;
|
|
747
789
|
/**
|
|
748
|
-
* The
|
|
790
|
+
* The workflow job ID of the job if job is part of a workflow job.
|
|
749
791
|
*/
|
|
750
|
-
|
|
792
|
+
workflowJobId?: string;
|
|
751
793
|
}
|
|
752
|
-
namespace
|
|
753
|
-
|
|
754
|
-
* Metadata of the job with some additional information
|
|
755
|
-
*/
|
|
756
|
-
interface Metadata {
|
|
794
|
+
namespace Metadata {
|
|
795
|
+
interface Flow {
|
|
757
796
|
/**
|
|
758
|
-
*
|
|
797
|
+
* The id of the node.
|
|
759
798
|
*/
|
|
760
|
-
|
|
799
|
+
id: string;
|
|
761
800
|
/**
|
|
762
|
-
*
|
|
801
|
+
* The status of the node. Only available for WorkflowJob nodes.
|
|
763
802
|
*/
|
|
764
|
-
|
|
803
|
+
status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
|
|
765
804
|
/**
|
|
766
|
-
* The
|
|
805
|
+
* The type of the job for the node.
|
|
767
806
|
*/
|
|
768
|
-
|
|
807
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
769
808
|
/**
|
|
770
|
-
*
|
|
809
|
+
* List of produced assets for this node.
|
|
771
810
|
*/
|
|
772
|
-
|
|
811
|
+
assets?: Array<Flow.Asset>;
|
|
773
812
|
/**
|
|
774
|
-
*
|
|
813
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
814
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
815
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
775
816
|
*/
|
|
776
|
-
|
|
777
|
-
[key: string]: unknown;
|
|
778
|
-
};
|
|
817
|
+
count?: number;
|
|
779
818
|
/**
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
* results.
|
|
819
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
820
|
+
* dependencies. Mainly used for user approval nodes.
|
|
783
821
|
*/
|
|
784
|
-
|
|
785
|
-
[key: string]: unknown;
|
|
786
|
-
};
|
|
822
|
+
dependsOn?: Array<string>;
|
|
787
823
|
/**
|
|
788
|
-
*
|
|
824
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
825
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
826
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
827
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
828
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
789
829
|
*/
|
|
790
|
-
|
|
830
|
+
includeOutputsInWorkflowJob?: true;
|
|
791
831
|
/**
|
|
792
|
-
* The
|
|
832
|
+
* The inputs of the node.
|
|
793
833
|
*/
|
|
794
|
-
|
|
834
|
+
inputs?: Array<Flow.Input>;
|
|
795
835
|
/**
|
|
796
|
-
*
|
|
836
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
837
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
838
|
+
* numbers, or asset IDs.
|
|
797
839
|
*/
|
|
798
|
-
|
|
840
|
+
items?: Array<string>;
|
|
841
|
+
/**
|
|
842
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
843
|
+
* dynamically-created copies of loop body nodes.
|
|
844
|
+
*/
|
|
845
|
+
iterationIndex?: number;
|
|
846
|
+
/**
|
|
847
|
+
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
848
|
+
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
849
|
+
* not started.
|
|
850
|
+
*/
|
|
851
|
+
jobId?: string;
|
|
852
|
+
/**
|
|
853
|
+
* The logic of the node. Only available for logic nodes.
|
|
854
|
+
*/
|
|
855
|
+
logic?: Flow.Logic;
|
|
856
|
+
/**
|
|
857
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
858
|
+
*/
|
|
859
|
+
logicType?: 'if-else';
|
|
860
|
+
/**
|
|
861
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
862
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
863
|
+
* for ForEach nodes.
|
|
864
|
+
*/
|
|
865
|
+
loopBodyNodeIds?: Array<string>;
|
|
866
|
+
/**
|
|
867
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
868
|
+
* dynamically-created copies of loop body nodes.
|
|
869
|
+
*/
|
|
870
|
+
loopNodeId?: string;
|
|
871
|
+
/**
|
|
872
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
873
|
+
*/
|
|
874
|
+
modelId?: string;
|
|
875
|
+
/**
|
|
876
|
+
* The output of the node. Only available for logic nodes.
|
|
877
|
+
*/
|
|
878
|
+
output?: unknown;
|
|
879
|
+
/**
|
|
880
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
881
|
+
*/
|
|
882
|
+
workflowId?: string;
|
|
799
883
|
}
|
|
800
|
-
namespace
|
|
801
|
-
interface
|
|
884
|
+
namespace Flow {
|
|
885
|
+
interface Asset {
|
|
886
|
+
assetId: string;
|
|
887
|
+
url: string;
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* This is used to run the flow.
|
|
891
|
+
*/
|
|
892
|
+
interface Input {
|
|
802
893
|
/**
|
|
803
|
-
* The
|
|
894
|
+
* The name that must be user to call the model through the API
|
|
804
895
|
*/
|
|
805
|
-
|
|
896
|
+
name: string;
|
|
806
897
|
/**
|
|
807
|
-
* The
|
|
898
|
+
* The data type of the input
|
|
808
899
|
*/
|
|
809
|
-
|
|
900
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
810
901
|
/**
|
|
811
|
-
* The
|
|
902
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
903
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
904
|
+
* dropdown.
|
|
812
905
|
*/
|
|
813
|
-
|
|
906
|
+
allowedValues?: Array<unknown>;
|
|
814
907
|
/**
|
|
815
|
-
*
|
|
908
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
909
|
+
* \`file_array\` input types with kind \`image\`.
|
|
816
910
|
*/
|
|
817
|
-
|
|
911
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
818
912
|
/**
|
|
819
|
-
*
|
|
820
|
-
* `count` times regardless of array input. When not set, the loop iterates over
|
|
821
|
-
* the resolved array input. Only available for ForEach nodes.
|
|
913
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
822
914
|
*/
|
|
823
|
-
|
|
915
|
+
color?: boolean;
|
|
824
916
|
/**
|
|
825
|
-
*
|
|
826
|
-
* dependencies. Mainly used for user approval nodes.
|
|
917
|
+
* Whether this input affects the model's cost calculation
|
|
827
918
|
*/
|
|
828
|
-
|
|
919
|
+
costImpact?: boolean;
|
|
829
920
|
/**
|
|
830
|
-
*
|
|
831
|
-
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
832
|
-
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
833
|
-
* outputs. Set this to true to also include intermediate nodes in the final
|
|
834
|
-
* output. Note: This should only be set to `true` or left undefined.
|
|
921
|
+
* The default value for the input
|
|
835
922
|
*/
|
|
836
|
-
|
|
923
|
+
default?: unknown;
|
|
837
924
|
/**
|
|
838
|
-
*
|
|
925
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
839
926
|
*/
|
|
840
|
-
|
|
927
|
+
description?: string;
|
|
841
928
|
/**
|
|
842
|
-
*
|
|
843
|
-
*
|
|
844
|
-
* numbers, or asset IDs.
|
|
929
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
930
|
+
* value appear consecutively in the UI.
|
|
845
931
|
*/
|
|
846
|
-
|
|
932
|
+
group?: string;
|
|
847
933
|
/**
|
|
848
|
-
*
|
|
849
|
-
* dynamically-created copies of loop body nodes.
|
|
934
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
850
935
|
*/
|
|
851
|
-
|
|
936
|
+
hint?: string;
|
|
852
937
|
/**
|
|
853
|
-
*
|
|
854
|
-
*
|
|
855
|
-
*
|
|
938
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
939
|
+
* the same as the current object. This is only available for type inputs_array
|
|
940
|
+
* inputs.
|
|
856
941
|
*/
|
|
857
|
-
|
|
942
|
+
inputs?: Array<{
|
|
943
|
+
[key: string]: unknown;
|
|
944
|
+
}>;
|
|
858
945
|
/**
|
|
859
|
-
* The
|
|
946
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
947
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
948
|
+
* type.
|
|
860
949
|
*/
|
|
861
|
-
|
|
950
|
+
items?: Array<Array<Input.Item>>;
|
|
862
951
|
/**
|
|
863
|
-
* The
|
|
952
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
953
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
954
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
955
|
+
* data:kind, prefix
|
|
864
956
|
*/
|
|
865
|
-
|
|
957
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
866
958
|
/**
|
|
867
|
-
*
|
|
868
|
-
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
869
|
-
* for ForEach nodes.
|
|
959
|
+
* The label displayed in the UI for this input
|
|
870
960
|
*/
|
|
871
|
-
|
|
961
|
+
label?: string;
|
|
872
962
|
/**
|
|
873
|
-
*
|
|
874
|
-
* dynamically-created copies of loop body nodes.
|
|
963
|
+
* The name of the file input field to use as the mask source
|
|
875
964
|
*/
|
|
876
|
-
|
|
965
|
+
maskFrom?: string;
|
|
877
966
|
/**
|
|
878
|
-
* The
|
|
967
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
968
|
+
* types.
|
|
879
969
|
*/
|
|
880
|
-
|
|
970
|
+
max?: number;
|
|
881
971
|
/**
|
|
882
|
-
* The
|
|
972
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
973
|
+
* \`string_array\`.
|
|
883
974
|
*/
|
|
884
|
-
|
|
975
|
+
maxLength?: number;
|
|
885
976
|
/**
|
|
886
|
-
* The
|
|
977
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
978
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
979
|
+
* creation time.
|
|
887
980
|
*/
|
|
888
|
-
|
|
981
|
+
maxSize?: number;
|
|
982
|
+
/**
|
|
983
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
984
|
+
*/
|
|
985
|
+
min?: number;
|
|
986
|
+
/**
|
|
987
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
988
|
+
* \`string_array\`.
|
|
989
|
+
*/
|
|
990
|
+
minLength?: number;
|
|
991
|
+
/**
|
|
992
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
993
|
+
* available for \`model_array\` input type.
|
|
994
|
+
*/
|
|
995
|
+
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'>;
|
|
996
|
+
/**
|
|
997
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
998
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
999
|
+
*
|
|
1000
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
1001
|
+
*/
|
|
1002
|
+
parent?: boolean;
|
|
1003
|
+
/**
|
|
1004
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
1005
|
+
*/
|
|
1006
|
+
placeholder?: string;
|
|
1007
|
+
/**
|
|
1008
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
1009
|
+
* spark feature. Only available for \`string\` input type.
|
|
1010
|
+
*/
|
|
1011
|
+
prompt?: boolean;
|
|
1012
|
+
/**
|
|
1013
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
1014
|
+
* type.
|
|
1015
|
+
*/
|
|
1016
|
+
promptSpark?: boolean;
|
|
1017
|
+
/**
|
|
1018
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1019
|
+
* least one of node or conditional.
|
|
1020
|
+
*/
|
|
1021
|
+
ref?: Input.Ref;
|
|
1022
|
+
/**
|
|
1023
|
+
* Set of rules that describes when this input is required:
|
|
1024
|
+
*
|
|
1025
|
+
* - \`always\`: Input is always required
|
|
1026
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1027
|
+
* defined
|
|
1028
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1029
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1030
|
+
* value
|
|
1031
|
+
*
|
|
1032
|
+
* By default, the input is not required.
|
|
1033
|
+
*/
|
|
1034
|
+
required?: Input.Required;
|
|
1035
|
+
/**
|
|
1036
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1037
|
+
*/
|
|
1038
|
+
step?: number;
|
|
1039
|
+
/**
|
|
1040
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1041
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1042
|
+
*/
|
|
1043
|
+
value?: unknown;
|
|
889
1044
|
}
|
|
890
|
-
namespace
|
|
891
|
-
interface Asset {
|
|
892
|
-
assetId: string;
|
|
893
|
-
url: string;
|
|
894
|
-
}
|
|
1045
|
+
namespace Input {
|
|
895
1046
|
/**
|
|
896
|
-
*
|
|
1047
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
1048
|
+
* recursive items field.
|
|
897
1049
|
*/
|
|
898
|
-
interface
|
|
1050
|
+
interface Item {
|
|
899
1051
|
/**
|
|
900
1052
|
* The name that must be user to call the model through the API
|
|
901
1053
|
*/
|
|
@@ -948,12 +1100,6 @@ export declare namespace JobListResponse {
|
|
|
948
1100
|
inputs?: Array<{
|
|
949
1101
|
[key: string]: unknown;
|
|
950
1102
|
}>;
|
|
951
|
-
/**
|
|
952
|
-
* The configured items for inputs_array type inputs. Each item is an array of
|
|
953
|
-
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
954
|
-
* type.
|
|
955
|
-
*/
|
|
956
|
-
items?: Array<Array<Input.Item>>;
|
|
957
1103
|
/**
|
|
958
1104
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
959
1105
|
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
@@ -1024,7 +1170,7 @@ export declare namespace JobListResponse {
|
|
|
1024
1170
|
* The reference to another input or output of the same workflow. Must have at
|
|
1025
1171
|
* least one of node or conditional.
|
|
1026
1172
|
*/
|
|
1027
|
-
ref?:
|
|
1173
|
+
ref?: Item.Ref;
|
|
1028
1174
|
/**
|
|
1029
1175
|
* Set of rules that describes when this input is required:
|
|
1030
1176
|
*
|
|
@@ -1037,7 +1183,7 @@ export declare namespace JobListResponse {
|
|
|
1037
1183
|
*
|
|
1038
1184
|
* By default, the input is not required.
|
|
1039
1185
|
*/
|
|
1040
|
-
required?:
|
|
1186
|
+
required?: Item.Required;
|
|
1041
1187
|
/**
|
|
1042
1188
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1043
1189
|
*/
|
|
@@ -1048,226 +1194,7 @@ export declare namespace JobListResponse {
|
|
|
1048
1194
|
*/
|
|
1049
1195
|
value?: unknown;
|
|
1050
1196
|
}
|
|
1051
|
-
namespace
|
|
1052
|
-
/**
|
|
1053
|
-
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
1054
|
-
* recursive items field.
|
|
1055
|
-
*/
|
|
1056
|
-
interface Item {
|
|
1057
|
-
/**
|
|
1058
|
-
* The name that must be user to call the model through the API
|
|
1059
|
-
*/
|
|
1060
|
-
name: string;
|
|
1061
|
-
/**
|
|
1062
|
-
* The data type of the input
|
|
1063
|
-
*/
|
|
1064
|
-
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
1065
|
-
/**
|
|
1066
|
-
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
1067
|
-
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
1068
|
-
* dropdown.
|
|
1069
|
-
*/
|
|
1070
|
-
allowedValues?: Array<unknown>;
|
|
1071
|
-
/**
|
|
1072
|
-
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
1073
|
-
* \`file_array\` input types with kind \`image\`.
|
|
1074
|
-
*/
|
|
1075
|
-
backgroundBehavior?: 'opaque' | 'transparent';
|
|
1076
|
-
/**
|
|
1077
|
-
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
1078
|
-
*/
|
|
1079
|
-
color?: boolean;
|
|
1080
|
-
/**
|
|
1081
|
-
* Whether this input affects the model's cost calculation
|
|
1082
|
-
*/
|
|
1083
|
-
costImpact?: boolean;
|
|
1084
|
-
/**
|
|
1085
|
-
* The default value for the input
|
|
1086
|
-
*/
|
|
1087
|
-
default?: unknown;
|
|
1088
|
-
/**
|
|
1089
|
-
* Help text displayed in the UI to provide additional information about the input
|
|
1090
|
-
*/
|
|
1091
|
-
description?: string;
|
|
1092
|
-
/**
|
|
1093
|
-
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
1094
|
-
* value appear consecutively in the UI.
|
|
1095
|
-
*/
|
|
1096
|
-
group?: string;
|
|
1097
|
-
/**
|
|
1098
|
-
* Hint text displayed in the UI as a tooltip to guide the user
|
|
1099
|
-
*/
|
|
1100
|
-
hint?: string;
|
|
1101
|
-
/**
|
|
1102
|
-
* The list of inputs which form an object within a container array. All inputs are
|
|
1103
|
-
* the same as the current object. This is only available for type inputs_array
|
|
1104
|
-
* inputs.
|
|
1105
|
-
*/
|
|
1106
|
-
inputs?: Array<{
|
|
1107
|
-
[key: string]: unknown;
|
|
1108
|
-
}>;
|
|
1109
|
-
/**
|
|
1110
|
-
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1111
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1112
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
1113
|
-
* data:kind, prefix
|
|
1114
|
-
*/
|
|
1115
|
-
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1116
|
-
/**
|
|
1117
|
-
* The label displayed in the UI for this input
|
|
1118
|
-
*/
|
|
1119
|
-
label?: string;
|
|
1120
|
-
/**
|
|
1121
|
-
* The name of the file input field to use as the mask source
|
|
1122
|
-
*/
|
|
1123
|
-
maskFrom?: string;
|
|
1124
|
-
/**
|
|
1125
|
-
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
1126
|
-
* types.
|
|
1127
|
-
*/
|
|
1128
|
-
max?: number;
|
|
1129
|
-
/**
|
|
1130
|
-
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1131
|
-
* \`string_array\`.
|
|
1132
|
-
*/
|
|
1133
|
-
maxLength?: number;
|
|
1134
|
-
/**
|
|
1135
|
-
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1136
|
-
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1137
|
-
* creation time.
|
|
1138
|
-
*/
|
|
1139
|
-
maxSize?: number;
|
|
1140
|
-
/**
|
|
1141
|
-
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1142
|
-
*/
|
|
1143
|
-
min?: number;
|
|
1144
|
-
/**
|
|
1145
|
-
* The minimum allowed length for string inputs. Also applies to each item in
|
|
1146
|
-
* \`string_array\`.
|
|
1147
|
-
*/
|
|
1148
|
-
minLength?: number;
|
|
1149
|
-
/**
|
|
1150
|
-
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1151
|
-
* available for \`model_array\` input type.
|
|
1152
|
-
*/
|
|
1153
|
-
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'>;
|
|
1154
|
-
/**
|
|
1155
|
-
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1156
|
-
* Only available for \`file\` and \`file_array\` input types.
|
|
1157
|
-
*
|
|
1158
|
-
* For \`file_array\`, the parent asset is the first item in the array.
|
|
1159
|
-
*/
|
|
1160
|
-
parent?: boolean;
|
|
1161
|
-
/**
|
|
1162
|
-
* Placeholder text for the input. Only available for 'string' input type.
|
|
1163
|
-
*/
|
|
1164
|
-
placeholder?: string;
|
|
1165
|
-
/**
|
|
1166
|
-
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
1167
|
-
* spark feature. Only available for \`string\` input type.
|
|
1168
|
-
*/
|
|
1169
|
-
prompt?: boolean;
|
|
1170
|
-
/**
|
|
1171
|
-
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
1172
|
-
* type.
|
|
1173
|
-
*/
|
|
1174
|
-
promptSpark?: boolean;
|
|
1175
|
-
/**
|
|
1176
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
1177
|
-
* least one of node or conditional.
|
|
1178
|
-
*/
|
|
1179
|
-
ref?: Item.Ref;
|
|
1180
|
-
/**
|
|
1181
|
-
* Set of rules that describes when this input is required:
|
|
1182
|
-
*
|
|
1183
|
-
* - \`always\`: Input is always required
|
|
1184
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1185
|
-
* defined
|
|
1186
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1187
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1188
|
-
* value
|
|
1189
|
-
*
|
|
1190
|
-
* By default, the input is not required.
|
|
1191
|
-
*/
|
|
1192
|
-
required?: Item.Required;
|
|
1193
|
-
/**
|
|
1194
|
-
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1195
|
-
*/
|
|
1196
|
-
step?: number;
|
|
1197
|
-
/**
|
|
1198
|
-
* The value of the input. This is the value of the input that will be used to run
|
|
1199
|
-
* the node. Only available for flows managed by a WorkflowJob.
|
|
1200
|
-
*/
|
|
1201
|
-
value?: unknown;
|
|
1202
|
-
}
|
|
1203
|
-
namespace Item {
|
|
1204
|
-
/**
|
|
1205
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
1206
|
-
* least one of node or conditional.
|
|
1207
|
-
*/
|
|
1208
|
-
interface Ref {
|
|
1209
|
-
/**
|
|
1210
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
1211
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
1212
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
1213
|
-
*/
|
|
1214
|
-
conditional?: Array<string>;
|
|
1215
|
-
/**
|
|
1216
|
-
* This is the desired node output value if ref is an if/else node.
|
|
1217
|
-
*/
|
|
1218
|
-
equal?: string;
|
|
1219
|
-
/**
|
|
1220
|
-
* The name of the input or output to reference. If the type is 'workflow', the
|
|
1221
|
-
* name is the name of the input of the workflow is required If the type is 'node',
|
|
1222
|
-
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
1223
|
-
* all outputs of a node, you can use the name 'all'.
|
|
1224
|
-
*/
|
|
1225
|
-
name?: string;
|
|
1226
|
-
/**
|
|
1227
|
-
* The node id or 'workflow' if the source is a workflow input.
|
|
1228
|
-
*/
|
|
1229
|
-
node?: string;
|
|
1230
|
-
}
|
|
1231
|
-
/**
|
|
1232
|
-
* Set of rules that describes when this input is required:
|
|
1233
|
-
*
|
|
1234
|
-
* - \`always\`: Input is always required
|
|
1235
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1236
|
-
* defined
|
|
1237
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1238
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1239
|
-
* value
|
|
1240
|
-
*
|
|
1241
|
-
* By default, the input is not required.
|
|
1242
|
-
*/
|
|
1243
|
-
interface Required {
|
|
1244
|
-
/**
|
|
1245
|
-
* Whether the input is always required
|
|
1246
|
-
*/
|
|
1247
|
-
always?: boolean;
|
|
1248
|
-
/**
|
|
1249
|
-
* Makes this input required when another input has a specific value:
|
|
1250
|
-
*
|
|
1251
|
-
* - Key: name of the input to check
|
|
1252
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
1253
|
-
*/
|
|
1254
|
-
conditionalValues?: unknown;
|
|
1255
|
-
/**
|
|
1256
|
-
* Makes this input required when another input is defined:
|
|
1257
|
-
*
|
|
1258
|
-
* - Key: name of the input that must be defined
|
|
1259
|
-
* - Value: message to display when this input is required
|
|
1260
|
-
*/
|
|
1261
|
-
ifDefined?: unknown;
|
|
1262
|
-
/**
|
|
1263
|
-
* Makes this input required when another input is not defined:
|
|
1264
|
-
*
|
|
1265
|
-
* - Key: name of the input that must be undefined
|
|
1266
|
-
* - Value: message to display when this input is required
|
|
1267
|
-
*/
|
|
1268
|
-
ifNotDefined?: unknown;
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1197
|
+
namespace Item {
|
|
1271
1198
|
/**
|
|
1272
1199
|
* The reference to another input or output of the same workflow. Must have at
|
|
1273
1200
|
* least one of node or conditional.
|
|
@@ -1336,43 +1263,109 @@ export declare namespace JobListResponse {
|
|
|
1336
1263
|
}
|
|
1337
1264
|
}
|
|
1338
1265
|
/**
|
|
1339
|
-
* The
|
|
1266
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1267
|
+
* least one of node or conditional.
|
|
1340
1268
|
*/
|
|
1341
|
-
interface
|
|
1269
|
+
interface Ref {
|
|
1342
1270
|
/**
|
|
1343
|
-
* The
|
|
1271
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
1272
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
1273
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
1344
1274
|
*/
|
|
1345
|
-
|
|
1275
|
+
conditional?: Array<string>;
|
|
1346
1276
|
/**
|
|
1347
|
-
*
|
|
1348
|
-
* no case is matched. Only available for if/else nodes.
|
|
1277
|
+
* This is the desired node output value if ref is an if/else node.
|
|
1349
1278
|
*/
|
|
1350
|
-
|
|
1279
|
+
equal?: string;
|
|
1351
1280
|
/**
|
|
1352
|
-
* The
|
|
1281
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
1282
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
1283
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
1284
|
+
* all outputs of a node, you can use the name 'all'.
|
|
1353
1285
|
*/
|
|
1354
|
-
|
|
1286
|
+
name?: string;
|
|
1287
|
+
/**
|
|
1288
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
1289
|
+
*/
|
|
1290
|
+
node?: string;
|
|
1355
1291
|
}
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1292
|
+
/**
|
|
1293
|
+
* Set of rules that describes when this input is required:
|
|
1294
|
+
*
|
|
1295
|
+
* - \`always\`: Input is always required
|
|
1296
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1297
|
+
* defined
|
|
1298
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1299
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1300
|
+
* value
|
|
1301
|
+
*
|
|
1302
|
+
* By default, the input is not required.
|
|
1303
|
+
*/
|
|
1304
|
+
interface Required {
|
|
1305
|
+
/**
|
|
1306
|
+
* Whether the input is always required
|
|
1307
|
+
*/
|
|
1308
|
+
always?: boolean;
|
|
1309
|
+
/**
|
|
1310
|
+
* Makes this input required when another input has a specific value:
|
|
1311
|
+
*
|
|
1312
|
+
* - Key: name of the input to check
|
|
1313
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
1314
|
+
*/
|
|
1315
|
+
conditionalValues?: unknown;
|
|
1316
|
+
/**
|
|
1317
|
+
* Makes this input required when another input is defined:
|
|
1318
|
+
*
|
|
1319
|
+
* - Key: name of the input that must be defined
|
|
1320
|
+
* - Value: message to display when this input is required
|
|
1321
|
+
*/
|
|
1322
|
+
ifDefined?: unknown;
|
|
1323
|
+
/**
|
|
1324
|
+
* Makes this input required when another input is not defined:
|
|
1325
|
+
*
|
|
1326
|
+
* - Key: name of the input that must be undefined
|
|
1327
|
+
* - Value: message to display when this input is required
|
|
1328
|
+
*/
|
|
1329
|
+
ifNotDefined?: unknown;
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* The logic of the node. Only available for logic nodes.
|
|
1334
|
+
*/
|
|
1335
|
+
interface Logic {
|
|
1336
|
+
/**
|
|
1337
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
1338
|
+
*/
|
|
1339
|
+
cases?: Array<Logic.Case>;
|
|
1340
|
+
/**
|
|
1341
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
1342
|
+
* no case is matched. Only available for if/else nodes.
|
|
1343
|
+
*/
|
|
1344
|
+
default?: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* The transform of the logic. Only available for transform nodes.
|
|
1347
|
+
*/
|
|
1348
|
+
transform?: string;
|
|
1349
|
+
}
|
|
1350
|
+
namespace Logic {
|
|
1351
|
+
interface Case {
|
|
1352
|
+
condition: string;
|
|
1353
|
+
value: string;
|
|
1361
1354
|
}
|
|
1362
1355
|
}
|
|
1363
|
-
}
|
|
1364
|
-
interface StatusHistory {
|
|
1365
|
-
date: string;
|
|
1366
|
-
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
1367
|
-
}
|
|
1368
|
-
/**
|
|
1369
|
-
* The billing of the job
|
|
1370
|
-
*/
|
|
1371
|
-
interface Billing {
|
|
1372
|
-
cuCost: number;
|
|
1373
|
-
cuDiscount: number;
|
|
1374
1356
|
}
|
|
1375
1357
|
}
|
|
1358
|
+
interface StatusHistory {
|
|
1359
|
+
date: string;
|
|
1360
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
1361
|
+
}
|
|
1362
|
+
/**
|
|
1363
|
+
* The billing of the job
|
|
1364
|
+
*/
|
|
1365
|
+
interface Billing {
|
|
1366
|
+
cuCost: number;
|
|
1367
|
+
cuDiscount: number;
|
|
1368
|
+
}
|
|
1376
1369
|
}
|
|
1377
1370
|
export interface JobTriggerActionResponse {
|
|
1378
1371
|
job: JobTriggerActionResponse.Job;
|
|
@@ -2050,7 +2043,7 @@ export declare namespace JobTriggerActionResponse {
|
|
|
2050
2043
|
}
|
|
2051
2044
|
}
|
|
2052
2045
|
}
|
|
2053
|
-
export interface JobListParams {
|
|
2046
|
+
export interface JobListParams extends JobsCursorParams {
|
|
2054
2047
|
/**
|
|
2055
2048
|
* The authorId of the jobs to return. Optional.
|
|
2056
2049
|
*/
|
|
@@ -2064,10 +2057,6 @@ export interface JobListParams {
|
|
|
2064
2057
|
* value is 200, minimum value is 1
|
|
2065
2058
|
*/
|
|
2066
2059
|
pageSize?: number;
|
|
2067
|
-
/**
|
|
2068
|
-
* A token you received in a previous request to query the next page of items
|
|
2069
|
-
*/
|
|
2070
|
-
paginationToken?: string;
|
|
2071
2060
|
/**
|
|
2072
2061
|
* The status of the jobs to return. Optional.
|
|
2073
2062
|
*/
|
|
@@ -2096,6 +2085,6 @@ export interface JobTriggerActionParams {
|
|
|
2096
2085
|
action?: 'cancel';
|
|
2097
2086
|
}
|
|
2098
2087
|
export declare namespace Jobs {
|
|
2099
|
-
export { type JobRetrieveResponse as JobRetrieveResponse, type JobListResponse as JobListResponse, type JobTriggerActionResponse as JobTriggerActionResponse, type JobListParams as JobListParams, type JobTriggerActionParams as JobTriggerActionParams, };
|
|
2088
|
+
export { type JobRetrieveResponse as JobRetrieveResponse, type JobListResponse as JobListResponse, type JobTriggerActionResponse as JobTriggerActionResponse, type JobListResponsesJobsCursor as JobListResponsesJobsCursor, type JobListParams as JobListParams, type JobTriggerActionParams as JobTriggerActionParams, };
|
|
2100
2089
|
}
|
|
2101
2090
|
//# sourceMappingURL=jobs.d.mts.map
|