@scenario-labs/sdk 0.1.2
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 +33 -0
- package/LICENSE +201 -0
- package/README.md +358 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +208 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +208 -0
- package/client.d.ts.map +1 -0
- package/client.js +492 -0
- package/client.js.map +1 -0
- package/client.mjs +488 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +143 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/assets/assets.d.mts +6397 -0
- package/resources/assets/assets.d.mts.map +1 -0
- package/resources/assets/assets.d.ts +6397 -0
- package/resources/assets/assets.d.ts.map +1 -0
- package/resources/assets/assets.js +98 -0
- package/resources/assets/assets.js.map +1 -0
- package/resources/assets/assets.mjs +93 -0
- package/resources/assets/assets.mjs.map +1 -0
- package/resources/assets/download.d.mts +87 -0
- package/resources/assets/download.d.mts.map +1 -0
- package/resources/assets/download.d.ts +87 -0
- package/resources/assets/download.d.ts.map +1 -0
- package/resources/assets/download.js +28 -0
- package/resources/assets/download.js.map +1 -0
- package/resources/assets/download.mjs +24 -0
- package/resources/assets/download.mjs.map +1 -0
- package/resources/assets/index.d.mts +4 -0
- package/resources/assets/index.d.mts.map +1 -0
- package/resources/assets/index.d.ts +4 -0
- package/resources/assets/index.d.ts.map +1 -0
- package/resources/assets/index.js +11 -0
- package/resources/assets/index.js.map +1 -0
- package/resources/assets/index.mjs +5 -0
- package/resources/assets/index.mjs.map +1 -0
- package/resources/assets/public.d.mts +1535 -0
- package/resources/assets/public.d.mts.map +1 -0
- package/resources/assets/public.d.ts +1535 -0
- package/resources/assets/public.d.ts.map +1 -0
- package/resources/assets/public.js +28 -0
- package/resources/assets/public.js.map +1 -0
- package/resources/assets/public.mjs +24 -0
- package/resources/assets/public.mjs.map +1 -0
- package/resources/assets.d.mts +2 -0
- package/resources/assets.d.mts.map +1 -0
- package/resources/assets.d.ts +2 -0
- package/resources/assets.d.ts.map +1 -0
- package/resources/assets.js +6 -0
- package/resources/assets.js.map +1 -0
- package/resources/assets.mjs +3 -0
- package/resources/assets.mjs.map +1 -0
- package/resources/collections/assets.d.mts +119 -0
- package/resources/collections/assets.d.mts.map +1 -0
- package/resources/collections/assets.d.ts +119 -0
- package/resources/collections/assets.d.ts.map +1 -0
- package/resources/collections/assets.js +22 -0
- package/resources/collections/assets.js.map +1 -0
- package/resources/collections/assets.mjs +18 -0
- package/resources/collections/assets.mjs.map +1 -0
- package/resources/collections/collections.d.mts +250 -0
- package/resources/collections/collections.d.mts.map +1 -0
- package/resources/collections/collections.d.ts +250 -0
- package/resources/collections/collections.d.ts.map +1 -0
- package/resources/collections/collections.js +52 -0
- package/resources/collections/collections.js.map +1 -0
- package/resources/collections/collections.mjs +47 -0
- package/resources/collections/collections.mjs.map +1 -0
- package/resources/collections/index.d.mts +4 -0
- package/resources/collections/index.d.mts.map +1 -0
- package/resources/collections/index.d.ts +4 -0
- package/resources/collections/index.d.ts.map +1 -0
- package/resources/collections/index.js +11 -0
- package/resources/collections/index.js.map +1 -0
- package/resources/collections/index.mjs +5 -0
- package/resources/collections/index.mjs.map +1 -0
- package/resources/collections/models.d.mts +119 -0
- package/resources/collections/models.d.mts.map +1 -0
- package/resources/collections/models.d.ts +119 -0
- package/resources/collections/models.d.ts.map +1 -0
- package/resources/collections/models.js +22 -0
- package/resources/collections/models.js.map +1 -0
- package/resources/collections/models.mjs +18 -0
- package/resources/collections/models.mjs.map +1 -0
- package/resources/collections.d.mts +2 -0
- package/resources/collections.d.mts.map +1 -0
- package/resources/collections.d.ts +2 -0
- package/resources/collections.d.ts.map +1 -0
- package/resources/collections.js +6 -0
- package/resources/collections.js.map +1 -0
- package/resources/collections.mjs +3 -0
- package/resources/collections.mjs.map +1 -0
- package/resources/generate.d.mts +3804 -0
- package/resources/generate.d.mts.map +1 -0
- package/resources/generate.d.ts +3804 -0
- package/resources/generate.d.ts.map +1 -0
- package/resources/generate.js +70 -0
- package/resources/generate.js.map +1 -0
- package/resources/generate.mjs +66 -0
- package/resources/generate.mjs.map +1 -0
- package/resources/index.d.mts +12 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +12 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +27 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +13 -0
- package/resources/index.mjs.map +1 -0
- package/resources/jobs.d.mts +1191 -0
- package/resources/jobs.d.mts.map +1 -0
- package/resources/jobs.d.ts +1191 -0
- package/resources/jobs.d.ts.map +1 -0
- package/resources/jobs.js +31 -0
- package/resources/jobs.js.map +1 -0
- package/resources/jobs.mjs +27 -0
- package/resources/jobs.mjs.map +1 -0
- package/resources/models/description.d.mts +490 -0
- package/resources/models/description.d.mts.map +1 -0
- package/resources/models/description.d.ts +490 -0
- package/resources/models/description.d.ts.map +1 -0
- package/resources/models/description.js +27 -0
- package/resources/models/description.js.map +1 -0
- package/resources/models/description.mjs +23 -0
- package/resources/models/description.mjs.map +1 -0
- package/resources/models/examples.d.mts +2819 -0
- package/resources/models/examples.d.mts.map +1 -0
- package/resources/models/examples.d.ts +2819 -0
- package/resources/models/examples.d.ts.map +1 -0
- package/resources/models/examples.js +27 -0
- package/resources/models/examples.js.map +1 -0
- package/resources/models/examples.mjs +23 -0
- package/resources/models/examples.mjs.map +1 -0
- package/resources/models/index.d.mts +6 -0
- package/resources/models/index.d.mts.map +1 -0
- package/resources/models/index.d.ts +6 -0
- package/resources/models/index.d.ts.map +1 -0
- package/resources/models/index.js +15 -0
- package/resources/models/index.js.map +1 -0
- package/resources/models/index.mjs +7 -0
- package/resources/models/index.mjs.map +1 -0
- package/resources/models/models.d.mts +6676 -0
- package/resources/models/models.d.mts.map +1 -0
- package/resources/models/models.d.ts +6676 -0
- package/resources/models/models.d.ts.map +1 -0
- package/resources/models/models.js +107 -0
- package/resources/models/models.js.map +1 -0
- package/resources/models/models.mjs +102 -0
- package/resources/models/models.mjs.map +1 -0
- package/resources/models/train.d.mts +2334 -0
- package/resources/models/train.d.mts.map +1 -0
- package/resources/models/train.d.ts +2334 -0
- package/resources/models/train.d.ts.map +1 -0
- package/resources/models/train.js +27 -0
- package/resources/models/train.js.map +1 -0
- package/resources/models/train.mjs +23 -0
- package/resources/models/train.mjs.map +1 -0
- package/resources/models/training-images.d.mts +214 -0
- package/resources/models/training-images.d.mts.map +1 -0
- package/resources/models/training-images.d.ts +214 -0
- package/resources/models/training-images.d.ts.map +1 -0
- package/resources/models/training-images.js +46 -0
- package/resources/models/training-images.js.map +1 -0
- package/resources/models/training-images.mjs +42 -0
- package/resources/models/training-images.mjs.map +1 -0
- package/resources/models.d.mts +2 -0
- package/resources/models.d.mts.map +1 -0
- package/resources/models.d.ts +2 -0
- package/resources/models.d.ts.map +1 -0
- package/resources/models.js +6 -0
- package/resources/models.js.map +1 -0
- package/resources/models.mjs +3 -0
- package/resources/models.mjs.map +1 -0
- package/resources/oscu.d.mts +25 -0
- package/resources/oscu.d.mts.map +1 -0
- package/resources/oscu.d.ts +25 -0
- package/resources/oscu.d.ts.map +1 -0
- package/resources/oscu.js +16 -0
- package/resources/oscu.js.map +1 -0
- package/resources/oscu.mjs +12 -0
- package/resources/oscu.mjs.map +1 -0
- package/resources/search.d.mts +595 -0
- package/resources/search.d.mts.map +1 -0
- package/resources/search.d.ts +595 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +29 -0
- package/resources/search.js.map +1 -0
- package/resources/search.mjs +25 -0
- package/resources/search.mjs.map +1 -0
- package/resources/tags.d.mts +55 -0
- package/resources/tags.d.mts.map +1 -0
- package/resources/tags.d.ts +55 -0
- package/resources/tags.d.ts.map +1 -0
- package/resources/tags.js +15 -0
- package/resources/tags.js.map +1 -0
- package/resources/tags.mjs +11 -0
- package/resources/tags.mjs.map +1 -0
- package/resources/uploads.d.mts +250 -0
- package/resources/uploads.d.mts.map +1 -0
- package/resources/uploads.d.ts +250 -0
- package/resources/uploads.d.ts.map +1 -0
- package/resources/uploads.js +29 -0
- package/resources/uploads.js.map +1 -0
- package/resources/uploads.mjs +25 -0
- package/resources/uploads.mjs.map +1 -0
- package/resources/usages.d.mts +760 -0
- package/resources/usages.d.mts.map +1 -0
- package/resources/usages.d.ts +760 -0
- package/resources/usages.d.ts.map +1 -0
- package/resources/usages.js +17 -0
- package/resources/usages.js.map +1 -0
- package/resources/usages.mjs +13 -0
- package/resources/usages.mjs.map +1 -0
- package/resources/workflows.d.mts +4539 -0
- package/resources/workflows.d.mts.map +1 -0
- package/resources/workflows.d.ts +4539 -0
- package/resources/workflows.d.ts.map +1 -0
- package/resources/workflows.js +64 -0
- package/resources/workflows.js.map +1 -0
- package/resources/workflows.mjs +60 -0
- package/resources/workflows.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +999 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/assets/assets.ts +9939 -0
- package/src/resources/assets/download.ts +138 -0
- package/src/resources/assets/index.ts +41 -0
- package/src/resources/assets/public.ts +2329 -0
- package/src/resources/assets.ts +3 -0
- package/src/resources/collections/assets.ts +163 -0
- package/src/resources/collections/collections.ts +357 -0
- package/src/resources/collections/index.ts +27 -0
- package/src/resources/collections/models.ts +163 -0
- package/src/resources/collections.ts +3 -0
- package/src/resources/generate.ts +5478 -0
- package/src/resources/index.ts +122 -0
- package/src/resources/jobs.ts +1712 -0
- package/src/resources/models/description.ts +800 -0
- package/src/resources/models/examples.ts +4125 -0
- package/src/resources/models/index.ts +58 -0
- package/src/resources/models/models.ts +8619 -0
- package/src/resources/models/train.ts +3034 -0
- package/src/resources/models/training-images.ts +304 -0
- package/src/resources/models.ts +3 -0
- package/src/resources/oscu.ts +35 -0
- package/src/resources/search.ts +731 -0
- package/src/resources/tags.ts +69 -0
- package/src/resources/uploads.ts +369 -0
- package/src/resources/usages.ts +1242 -0
- package/src/resources/workflows.ts +6019 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,1191 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class Jobs extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get job data by job ID
|
|
7
|
+
*/
|
|
8
|
+
retrieve(jobID: string, options?: RequestOptions): APIPromise<JobRetrieveResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* List all jobs matching the given filters. A job is a synchronous operation or an
|
|
11
|
+
* asynchronous task such as a training, a generation, etc. It offers a unified
|
|
12
|
+
* view of all operations running on the platform along with their status and
|
|
13
|
+
* results.
|
|
14
|
+
*/
|
|
15
|
+
list(query?: JobListParams | null | undefined, options?: RequestOptions): APIPromise<JobListResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Trigger an action on a job: cancel
|
|
18
|
+
*/
|
|
19
|
+
triggerAction(jobID: string, body: JobTriggerActionParams, options?: RequestOptions): APIPromise<JobTriggerActionResponse>;
|
|
20
|
+
}
|
|
21
|
+
export interface JobRetrieveResponse {
|
|
22
|
+
job: JobRetrieveResponse.Job;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace JobRetrieveResponse {
|
|
25
|
+
interface Job {
|
|
26
|
+
/**
|
|
27
|
+
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
28
|
+
*/
|
|
29
|
+
createdAt: string;
|
|
30
|
+
/**
|
|
31
|
+
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
32
|
+
*/
|
|
33
|
+
jobId: string;
|
|
34
|
+
/**
|
|
35
|
+
* The type of job
|
|
36
|
+
*/
|
|
37
|
+
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' | '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';
|
|
38
|
+
/**
|
|
39
|
+
* Metadata of the job with some additional information
|
|
40
|
+
*/
|
|
41
|
+
metadata: Job.Metadata;
|
|
42
|
+
/**
|
|
43
|
+
* Progress of the job (between 0 and 1)
|
|
44
|
+
*/
|
|
45
|
+
progress: number;
|
|
46
|
+
/**
|
|
47
|
+
* The current status of the job
|
|
48
|
+
*/
|
|
49
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
50
|
+
/**
|
|
51
|
+
* The history of the different statuses the job went through with the ISO string
|
|
52
|
+
* date of when the job reached each statuses.
|
|
53
|
+
*/
|
|
54
|
+
statusHistory: Array<Job.StatusHistory>;
|
|
55
|
+
/**
|
|
56
|
+
* The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
57
|
+
*/
|
|
58
|
+
updatedAt: string;
|
|
59
|
+
/**
|
|
60
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
61
|
+
*/
|
|
62
|
+
authorId?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The billing of the job
|
|
65
|
+
*/
|
|
66
|
+
billing?: Job.Billing;
|
|
67
|
+
/**
|
|
68
|
+
* The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
|
|
69
|
+
*/
|
|
70
|
+
ownerId?: string;
|
|
71
|
+
}
|
|
72
|
+
namespace Job {
|
|
73
|
+
/**
|
|
74
|
+
* Metadata of the job with some additional information
|
|
75
|
+
*/
|
|
76
|
+
interface Metadata {
|
|
77
|
+
/**
|
|
78
|
+
* List of produced assets for this job
|
|
79
|
+
*/
|
|
80
|
+
assetIds?: Array<string>;
|
|
81
|
+
/**
|
|
82
|
+
* The flow of the job. Only available for workflow jobs.
|
|
83
|
+
*/
|
|
84
|
+
flow?: Array<Metadata.Flow>;
|
|
85
|
+
/**
|
|
86
|
+
* The inputs for the job
|
|
87
|
+
*/
|
|
88
|
+
input?: unknown;
|
|
89
|
+
/**
|
|
90
|
+
* The output of the job
|
|
91
|
+
*/
|
|
92
|
+
output?: unknown;
|
|
93
|
+
/**
|
|
94
|
+
* The workflow ID of the job if job is part of a workflow.
|
|
95
|
+
*/
|
|
96
|
+
workflowId?: string;
|
|
97
|
+
/**
|
|
98
|
+
* The workflow job ID of the job if job is part of a workflow job.
|
|
99
|
+
*/
|
|
100
|
+
workflowJobId?: string;
|
|
101
|
+
}
|
|
102
|
+
namespace Metadata {
|
|
103
|
+
interface Flow {
|
|
104
|
+
/**
|
|
105
|
+
* The id of the node.
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
/**
|
|
109
|
+
* The status of the node. Only available for WorkflowJob nodes.
|
|
110
|
+
*/
|
|
111
|
+
status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
|
|
112
|
+
/**
|
|
113
|
+
* The type of the job for the node.
|
|
114
|
+
*/
|
|
115
|
+
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
116
|
+
/**
|
|
117
|
+
* List of produced assets for this node.
|
|
118
|
+
*/
|
|
119
|
+
assets?: Array<Flow.Asset>;
|
|
120
|
+
/**
|
|
121
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
122
|
+
* dependencies. Mainly used for user approval nodes.
|
|
123
|
+
*/
|
|
124
|
+
dependsOn?: Array<string>;
|
|
125
|
+
/**
|
|
126
|
+
* The inputs of the node.
|
|
127
|
+
*/
|
|
128
|
+
inputs?: Array<Flow.Input>;
|
|
129
|
+
/**
|
|
130
|
+
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
131
|
+
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
132
|
+
* not started.
|
|
133
|
+
*/
|
|
134
|
+
jobId?: string;
|
|
135
|
+
/**
|
|
136
|
+
* The logic of the node. Only available for logic nodes.
|
|
137
|
+
*/
|
|
138
|
+
logic?: Flow.Logic;
|
|
139
|
+
/**
|
|
140
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
141
|
+
*/
|
|
142
|
+
logicType?: 'if-else';
|
|
143
|
+
/**
|
|
144
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
145
|
+
*/
|
|
146
|
+
modelId?: string;
|
|
147
|
+
/**
|
|
148
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
149
|
+
*/
|
|
150
|
+
workflowId?: string;
|
|
151
|
+
}
|
|
152
|
+
namespace Flow {
|
|
153
|
+
interface Asset {
|
|
154
|
+
assetId: string;
|
|
155
|
+
url: string;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* This is used to run the flow.
|
|
159
|
+
*/
|
|
160
|
+
interface Input {
|
|
161
|
+
/**
|
|
162
|
+
* The name that must be user to call the model through the API
|
|
163
|
+
*/
|
|
164
|
+
name: string;
|
|
165
|
+
/**
|
|
166
|
+
* The data type of the input
|
|
167
|
+
*/
|
|
168
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
169
|
+
/**
|
|
170
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
171
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
172
|
+
* dropdown.
|
|
173
|
+
*/
|
|
174
|
+
allowedValues?: Array<unknown>;
|
|
175
|
+
/**
|
|
176
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
177
|
+
* \`file_array\` input types with kind \`image\`.
|
|
178
|
+
*/
|
|
179
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
180
|
+
/**
|
|
181
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
182
|
+
*/
|
|
183
|
+
color?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Whether this input affects the model's cost calculation
|
|
186
|
+
*/
|
|
187
|
+
costImpact?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
190
|
+
*/
|
|
191
|
+
description?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
194
|
+
* value appear consecutively in the UI.
|
|
195
|
+
*/
|
|
196
|
+
group?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
199
|
+
*/
|
|
200
|
+
hint?: string;
|
|
201
|
+
/**
|
|
202
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
203
|
+
* the same as the current object. This is only available for type inputs_array
|
|
204
|
+
* inputs.
|
|
205
|
+
*/
|
|
206
|
+
inputs?: Array<unknown>;
|
|
207
|
+
/**
|
|
208
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
209
|
+
* \`file_array\` input types.
|
|
210
|
+
*/
|
|
211
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
212
|
+
/**
|
|
213
|
+
* The label displayed in the UI for this input
|
|
214
|
+
*/
|
|
215
|
+
label?: string;
|
|
216
|
+
/**
|
|
217
|
+
* The name of the file input field to use as the mask source
|
|
218
|
+
*/
|
|
219
|
+
maskFrom?: string;
|
|
220
|
+
/**
|
|
221
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
222
|
+
* types.
|
|
223
|
+
*/
|
|
224
|
+
max?: number;
|
|
225
|
+
/**
|
|
226
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
227
|
+
* \`string_array\`.
|
|
228
|
+
*/
|
|
229
|
+
maxLength?: number;
|
|
230
|
+
/**
|
|
231
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
232
|
+
*/
|
|
233
|
+
min?: number;
|
|
234
|
+
/**
|
|
235
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
236
|
+
* \`string_array\`.
|
|
237
|
+
*/
|
|
238
|
+
minLength?: number;
|
|
239
|
+
/**
|
|
240
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
241
|
+
* available for \`model_array\` input type.
|
|
242
|
+
*/
|
|
243
|
+
modelTypes?: Array<'custom' | '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' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
244
|
+
/**
|
|
245
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
246
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
247
|
+
*
|
|
248
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
249
|
+
*/
|
|
250
|
+
parent?: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
253
|
+
*/
|
|
254
|
+
placeholder?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
257
|
+
* spark feature. Only available for \`string\` input type.
|
|
258
|
+
*/
|
|
259
|
+
prompt?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
262
|
+
* type.
|
|
263
|
+
*/
|
|
264
|
+
promptSpark?: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
267
|
+
* least one of node or conditional.
|
|
268
|
+
*/
|
|
269
|
+
ref?: Input.Ref;
|
|
270
|
+
/**
|
|
271
|
+
* Set of rules that describes when this input is required:
|
|
272
|
+
*
|
|
273
|
+
* - \`always\`: Input is always required
|
|
274
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
275
|
+
* defined
|
|
276
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
277
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
278
|
+
* value
|
|
279
|
+
*
|
|
280
|
+
* By default, the input is not required.
|
|
281
|
+
*/
|
|
282
|
+
required?: Input.Required;
|
|
283
|
+
/**
|
|
284
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
285
|
+
*/
|
|
286
|
+
step?: number;
|
|
287
|
+
}
|
|
288
|
+
namespace Input {
|
|
289
|
+
/**
|
|
290
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
291
|
+
* least one of node or conditional.
|
|
292
|
+
*/
|
|
293
|
+
interface Ref {
|
|
294
|
+
/**
|
|
295
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
296
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
297
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
298
|
+
*/
|
|
299
|
+
conditional?: Array<string>;
|
|
300
|
+
/**
|
|
301
|
+
* This is the desired node output value if ref is an if/else node.
|
|
302
|
+
*/
|
|
303
|
+
equal?: string;
|
|
304
|
+
/**
|
|
305
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
306
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
307
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
308
|
+
* all outputs of a node, you can use the name 'all'.
|
|
309
|
+
*/
|
|
310
|
+
name?: string;
|
|
311
|
+
/**
|
|
312
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
313
|
+
*/
|
|
314
|
+
node?: string;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Set of rules that describes when this input is required:
|
|
318
|
+
*
|
|
319
|
+
* - \`always\`: Input is always required
|
|
320
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
321
|
+
* defined
|
|
322
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
323
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
324
|
+
* value
|
|
325
|
+
*
|
|
326
|
+
* By default, the input is not required.
|
|
327
|
+
*/
|
|
328
|
+
interface Required {
|
|
329
|
+
/**
|
|
330
|
+
* Whether the input is always required
|
|
331
|
+
*/
|
|
332
|
+
always?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Makes this input required when another input has a specific value:
|
|
335
|
+
*
|
|
336
|
+
* - Key: name of the input to check
|
|
337
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
338
|
+
*/
|
|
339
|
+
conditionalValues?: unknown;
|
|
340
|
+
/**
|
|
341
|
+
* Makes this input required when another input is defined:
|
|
342
|
+
*
|
|
343
|
+
* - Key: name of the input that must be defined
|
|
344
|
+
* - Value: message to display when this input is required
|
|
345
|
+
*/
|
|
346
|
+
ifDefined?: unknown;
|
|
347
|
+
/**
|
|
348
|
+
* Makes this input required when another input is not defined:
|
|
349
|
+
*
|
|
350
|
+
* - Key: name of the input that must be undefined
|
|
351
|
+
* - Value: message to display when this input is required
|
|
352
|
+
*/
|
|
353
|
+
ifNotDefined?: unknown;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* The logic of the node. Only available for logic nodes.
|
|
358
|
+
*/
|
|
359
|
+
interface Logic {
|
|
360
|
+
/**
|
|
361
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
362
|
+
*/
|
|
363
|
+
cases?: Array<Logic.Case>;
|
|
364
|
+
/**
|
|
365
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
366
|
+
* no case is matched. Only available for if/else nodes.
|
|
367
|
+
*/
|
|
368
|
+
default?: string;
|
|
369
|
+
/**
|
|
370
|
+
* The transform of the logic. Only available for transform nodes.
|
|
371
|
+
*/
|
|
372
|
+
transform?: string;
|
|
373
|
+
}
|
|
374
|
+
namespace Logic {
|
|
375
|
+
interface Case {
|
|
376
|
+
condition: string;
|
|
377
|
+
value: string;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
interface StatusHistory {
|
|
383
|
+
date: string;
|
|
384
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* The billing of the job
|
|
388
|
+
*/
|
|
389
|
+
interface Billing {
|
|
390
|
+
cuCost: number;
|
|
391
|
+
cuDiscount: number;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
export interface JobListResponse {
|
|
396
|
+
jobs: Array<JobListResponse.Job>;
|
|
397
|
+
/**
|
|
398
|
+
* A token to query the next page of jobs
|
|
399
|
+
*/
|
|
400
|
+
nextPaginationToken?: string;
|
|
401
|
+
}
|
|
402
|
+
export declare namespace JobListResponse {
|
|
403
|
+
interface Job {
|
|
404
|
+
/**
|
|
405
|
+
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
406
|
+
*/
|
|
407
|
+
createdAt: string;
|
|
408
|
+
/**
|
|
409
|
+
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
410
|
+
*/
|
|
411
|
+
jobId: string;
|
|
412
|
+
/**
|
|
413
|
+
* The type of job
|
|
414
|
+
*/
|
|
415
|
+
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' | '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';
|
|
416
|
+
/**
|
|
417
|
+
* Metadata of the job with some additional information
|
|
418
|
+
*/
|
|
419
|
+
metadata: Job.Metadata;
|
|
420
|
+
/**
|
|
421
|
+
* Progress of the job (between 0 and 1)
|
|
422
|
+
*/
|
|
423
|
+
progress: number;
|
|
424
|
+
/**
|
|
425
|
+
* The current status of the job
|
|
426
|
+
*/
|
|
427
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
428
|
+
/**
|
|
429
|
+
* The history of the different statuses the job went through with the ISO string
|
|
430
|
+
* date of when the job reached each statuses.
|
|
431
|
+
*/
|
|
432
|
+
statusHistory: Array<Job.StatusHistory>;
|
|
433
|
+
/**
|
|
434
|
+
* The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
435
|
+
*/
|
|
436
|
+
updatedAt: string;
|
|
437
|
+
/**
|
|
438
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
439
|
+
*/
|
|
440
|
+
authorId?: string;
|
|
441
|
+
/**
|
|
442
|
+
* The billing of the job
|
|
443
|
+
*/
|
|
444
|
+
billing?: Job.Billing;
|
|
445
|
+
/**
|
|
446
|
+
* The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
|
|
447
|
+
*/
|
|
448
|
+
ownerId?: string;
|
|
449
|
+
}
|
|
450
|
+
namespace Job {
|
|
451
|
+
/**
|
|
452
|
+
* Metadata of the job with some additional information
|
|
453
|
+
*/
|
|
454
|
+
interface Metadata {
|
|
455
|
+
/**
|
|
456
|
+
* List of produced assets for this job
|
|
457
|
+
*/
|
|
458
|
+
assetIds?: Array<string>;
|
|
459
|
+
/**
|
|
460
|
+
* The flow of the job. Only available for workflow jobs.
|
|
461
|
+
*/
|
|
462
|
+
flow?: Array<Metadata.Flow>;
|
|
463
|
+
/**
|
|
464
|
+
* The inputs for the job
|
|
465
|
+
*/
|
|
466
|
+
input?: unknown;
|
|
467
|
+
/**
|
|
468
|
+
* The output of the job
|
|
469
|
+
*/
|
|
470
|
+
output?: unknown;
|
|
471
|
+
/**
|
|
472
|
+
* The workflow ID of the job if job is part of a workflow.
|
|
473
|
+
*/
|
|
474
|
+
workflowId?: string;
|
|
475
|
+
/**
|
|
476
|
+
* The workflow job ID of the job if job is part of a workflow job.
|
|
477
|
+
*/
|
|
478
|
+
workflowJobId?: string;
|
|
479
|
+
}
|
|
480
|
+
namespace Metadata {
|
|
481
|
+
interface Flow {
|
|
482
|
+
/**
|
|
483
|
+
* The id of the node.
|
|
484
|
+
*/
|
|
485
|
+
id: string;
|
|
486
|
+
/**
|
|
487
|
+
* The status of the node. Only available for WorkflowJob nodes.
|
|
488
|
+
*/
|
|
489
|
+
status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
|
|
490
|
+
/**
|
|
491
|
+
* The type of the job for the node.
|
|
492
|
+
*/
|
|
493
|
+
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
494
|
+
/**
|
|
495
|
+
* List of produced assets for this node.
|
|
496
|
+
*/
|
|
497
|
+
assets?: Array<Flow.Asset>;
|
|
498
|
+
/**
|
|
499
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
500
|
+
* dependencies. Mainly used for user approval nodes.
|
|
501
|
+
*/
|
|
502
|
+
dependsOn?: Array<string>;
|
|
503
|
+
/**
|
|
504
|
+
* The inputs of the node.
|
|
505
|
+
*/
|
|
506
|
+
inputs?: Array<Flow.Input>;
|
|
507
|
+
/**
|
|
508
|
+
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
509
|
+
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
510
|
+
* not started.
|
|
511
|
+
*/
|
|
512
|
+
jobId?: string;
|
|
513
|
+
/**
|
|
514
|
+
* The logic of the node. Only available for logic nodes.
|
|
515
|
+
*/
|
|
516
|
+
logic?: Flow.Logic;
|
|
517
|
+
/**
|
|
518
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
519
|
+
*/
|
|
520
|
+
logicType?: 'if-else';
|
|
521
|
+
/**
|
|
522
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
523
|
+
*/
|
|
524
|
+
modelId?: string;
|
|
525
|
+
/**
|
|
526
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
527
|
+
*/
|
|
528
|
+
workflowId?: string;
|
|
529
|
+
}
|
|
530
|
+
namespace Flow {
|
|
531
|
+
interface Asset {
|
|
532
|
+
assetId: string;
|
|
533
|
+
url: string;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* This is used to run the flow.
|
|
537
|
+
*/
|
|
538
|
+
interface Input {
|
|
539
|
+
/**
|
|
540
|
+
* The name that must be user to call the model through the API
|
|
541
|
+
*/
|
|
542
|
+
name: string;
|
|
543
|
+
/**
|
|
544
|
+
* The data type of the input
|
|
545
|
+
*/
|
|
546
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
547
|
+
/**
|
|
548
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
549
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
550
|
+
* dropdown.
|
|
551
|
+
*/
|
|
552
|
+
allowedValues?: Array<unknown>;
|
|
553
|
+
/**
|
|
554
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
555
|
+
* \`file_array\` input types with kind \`image\`.
|
|
556
|
+
*/
|
|
557
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
558
|
+
/**
|
|
559
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
560
|
+
*/
|
|
561
|
+
color?: boolean;
|
|
562
|
+
/**
|
|
563
|
+
* Whether this input affects the model's cost calculation
|
|
564
|
+
*/
|
|
565
|
+
costImpact?: boolean;
|
|
566
|
+
/**
|
|
567
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
568
|
+
*/
|
|
569
|
+
description?: string;
|
|
570
|
+
/**
|
|
571
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
572
|
+
* value appear consecutively in the UI.
|
|
573
|
+
*/
|
|
574
|
+
group?: string;
|
|
575
|
+
/**
|
|
576
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
577
|
+
*/
|
|
578
|
+
hint?: string;
|
|
579
|
+
/**
|
|
580
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
581
|
+
* the same as the current object. This is only available for type inputs_array
|
|
582
|
+
* inputs.
|
|
583
|
+
*/
|
|
584
|
+
inputs?: Array<unknown>;
|
|
585
|
+
/**
|
|
586
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
587
|
+
* \`file_array\` input types.
|
|
588
|
+
*/
|
|
589
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
590
|
+
/**
|
|
591
|
+
* The label displayed in the UI for this input
|
|
592
|
+
*/
|
|
593
|
+
label?: string;
|
|
594
|
+
/**
|
|
595
|
+
* The name of the file input field to use as the mask source
|
|
596
|
+
*/
|
|
597
|
+
maskFrom?: string;
|
|
598
|
+
/**
|
|
599
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
600
|
+
* types.
|
|
601
|
+
*/
|
|
602
|
+
max?: number;
|
|
603
|
+
/**
|
|
604
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
605
|
+
* \`string_array\`.
|
|
606
|
+
*/
|
|
607
|
+
maxLength?: number;
|
|
608
|
+
/**
|
|
609
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
610
|
+
*/
|
|
611
|
+
min?: number;
|
|
612
|
+
/**
|
|
613
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
614
|
+
* \`string_array\`.
|
|
615
|
+
*/
|
|
616
|
+
minLength?: number;
|
|
617
|
+
/**
|
|
618
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
619
|
+
* available for \`model_array\` input type.
|
|
620
|
+
*/
|
|
621
|
+
modelTypes?: Array<'custom' | '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' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
622
|
+
/**
|
|
623
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
624
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
625
|
+
*
|
|
626
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
627
|
+
*/
|
|
628
|
+
parent?: boolean;
|
|
629
|
+
/**
|
|
630
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
631
|
+
*/
|
|
632
|
+
placeholder?: string;
|
|
633
|
+
/**
|
|
634
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
635
|
+
* spark feature. Only available for \`string\` input type.
|
|
636
|
+
*/
|
|
637
|
+
prompt?: boolean;
|
|
638
|
+
/**
|
|
639
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
640
|
+
* type.
|
|
641
|
+
*/
|
|
642
|
+
promptSpark?: boolean;
|
|
643
|
+
/**
|
|
644
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
645
|
+
* least one of node or conditional.
|
|
646
|
+
*/
|
|
647
|
+
ref?: Input.Ref;
|
|
648
|
+
/**
|
|
649
|
+
* Set of rules that describes when this input is required:
|
|
650
|
+
*
|
|
651
|
+
* - \`always\`: Input is always required
|
|
652
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
653
|
+
* defined
|
|
654
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
655
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
656
|
+
* value
|
|
657
|
+
*
|
|
658
|
+
* By default, the input is not required.
|
|
659
|
+
*/
|
|
660
|
+
required?: Input.Required;
|
|
661
|
+
/**
|
|
662
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
663
|
+
*/
|
|
664
|
+
step?: number;
|
|
665
|
+
}
|
|
666
|
+
namespace Input {
|
|
667
|
+
/**
|
|
668
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
669
|
+
* least one of node or conditional.
|
|
670
|
+
*/
|
|
671
|
+
interface Ref {
|
|
672
|
+
/**
|
|
673
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
674
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
675
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
676
|
+
*/
|
|
677
|
+
conditional?: Array<string>;
|
|
678
|
+
/**
|
|
679
|
+
* This is the desired node output value if ref is an if/else node.
|
|
680
|
+
*/
|
|
681
|
+
equal?: string;
|
|
682
|
+
/**
|
|
683
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
684
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
685
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
686
|
+
* all outputs of a node, you can use the name 'all'.
|
|
687
|
+
*/
|
|
688
|
+
name?: string;
|
|
689
|
+
/**
|
|
690
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
691
|
+
*/
|
|
692
|
+
node?: string;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* Set of rules that describes when this input is required:
|
|
696
|
+
*
|
|
697
|
+
* - \`always\`: Input is always required
|
|
698
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
699
|
+
* defined
|
|
700
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
701
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
702
|
+
* value
|
|
703
|
+
*
|
|
704
|
+
* By default, the input is not required.
|
|
705
|
+
*/
|
|
706
|
+
interface Required {
|
|
707
|
+
/**
|
|
708
|
+
* Whether the input is always required
|
|
709
|
+
*/
|
|
710
|
+
always?: boolean;
|
|
711
|
+
/**
|
|
712
|
+
* Makes this input required when another input has a specific value:
|
|
713
|
+
*
|
|
714
|
+
* - Key: name of the input to check
|
|
715
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
716
|
+
*/
|
|
717
|
+
conditionalValues?: unknown;
|
|
718
|
+
/**
|
|
719
|
+
* Makes this input required when another input is defined:
|
|
720
|
+
*
|
|
721
|
+
* - Key: name of the input that must be defined
|
|
722
|
+
* - Value: message to display when this input is required
|
|
723
|
+
*/
|
|
724
|
+
ifDefined?: unknown;
|
|
725
|
+
/**
|
|
726
|
+
* Makes this input required when another input is not defined:
|
|
727
|
+
*
|
|
728
|
+
* - Key: name of the input that must be undefined
|
|
729
|
+
* - Value: message to display when this input is required
|
|
730
|
+
*/
|
|
731
|
+
ifNotDefined?: unknown;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* The logic of the node. Only available for logic nodes.
|
|
736
|
+
*/
|
|
737
|
+
interface Logic {
|
|
738
|
+
/**
|
|
739
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
740
|
+
*/
|
|
741
|
+
cases?: Array<Logic.Case>;
|
|
742
|
+
/**
|
|
743
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
744
|
+
* no case is matched. Only available for if/else nodes.
|
|
745
|
+
*/
|
|
746
|
+
default?: string;
|
|
747
|
+
/**
|
|
748
|
+
* The transform of the logic. Only available for transform nodes.
|
|
749
|
+
*/
|
|
750
|
+
transform?: string;
|
|
751
|
+
}
|
|
752
|
+
namespace Logic {
|
|
753
|
+
interface Case {
|
|
754
|
+
condition: string;
|
|
755
|
+
value: string;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
interface StatusHistory {
|
|
761
|
+
date: string;
|
|
762
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* The billing of the job
|
|
766
|
+
*/
|
|
767
|
+
interface Billing {
|
|
768
|
+
cuCost: number;
|
|
769
|
+
cuDiscount: number;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
export interface JobTriggerActionResponse {
|
|
774
|
+
job: JobTriggerActionResponse.Job;
|
|
775
|
+
}
|
|
776
|
+
export declare namespace JobTriggerActionResponse {
|
|
777
|
+
interface Job {
|
|
778
|
+
/**
|
|
779
|
+
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
780
|
+
*/
|
|
781
|
+
createdAt: string;
|
|
782
|
+
/**
|
|
783
|
+
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
784
|
+
*/
|
|
785
|
+
jobId: string;
|
|
786
|
+
/**
|
|
787
|
+
* The type of job
|
|
788
|
+
*/
|
|
789
|
+
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' | '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';
|
|
790
|
+
/**
|
|
791
|
+
* Metadata of the job with some additional information
|
|
792
|
+
*/
|
|
793
|
+
metadata: Job.Metadata;
|
|
794
|
+
/**
|
|
795
|
+
* Progress of the job (between 0 and 1)
|
|
796
|
+
*/
|
|
797
|
+
progress: number;
|
|
798
|
+
/**
|
|
799
|
+
* The current status of the job
|
|
800
|
+
*/
|
|
801
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
802
|
+
/**
|
|
803
|
+
* The history of the different statuses the job went through with the ISO string
|
|
804
|
+
* date of when the job reached each statuses.
|
|
805
|
+
*/
|
|
806
|
+
statusHistory: Array<Job.StatusHistory>;
|
|
807
|
+
/**
|
|
808
|
+
* The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
809
|
+
*/
|
|
810
|
+
updatedAt: string;
|
|
811
|
+
/**
|
|
812
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
813
|
+
*/
|
|
814
|
+
authorId?: string;
|
|
815
|
+
/**
|
|
816
|
+
* The billing of the job
|
|
817
|
+
*/
|
|
818
|
+
billing?: Job.Billing;
|
|
819
|
+
/**
|
|
820
|
+
* The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
|
|
821
|
+
*/
|
|
822
|
+
ownerId?: string;
|
|
823
|
+
}
|
|
824
|
+
namespace Job {
|
|
825
|
+
/**
|
|
826
|
+
* Metadata of the job with some additional information
|
|
827
|
+
*/
|
|
828
|
+
interface Metadata {
|
|
829
|
+
/**
|
|
830
|
+
* List of produced assets for this job
|
|
831
|
+
*/
|
|
832
|
+
assetIds?: Array<string>;
|
|
833
|
+
/**
|
|
834
|
+
* The flow of the job. Only available for workflow jobs.
|
|
835
|
+
*/
|
|
836
|
+
flow?: Array<Metadata.Flow>;
|
|
837
|
+
/**
|
|
838
|
+
* The inputs for the job
|
|
839
|
+
*/
|
|
840
|
+
input?: unknown;
|
|
841
|
+
/**
|
|
842
|
+
* The output of the job
|
|
843
|
+
*/
|
|
844
|
+
output?: unknown;
|
|
845
|
+
/**
|
|
846
|
+
* The workflow ID of the job if job is part of a workflow.
|
|
847
|
+
*/
|
|
848
|
+
workflowId?: string;
|
|
849
|
+
/**
|
|
850
|
+
* The workflow job ID of the job if job is part of a workflow job.
|
|
851
|
+
*/
|
|
852
|
+
workflowJobId?: string;
|
|
853
|
+
}
|
|
854
|
+
namespace Metadata {
|
|
855
|
+
interface Flow {
|
|
856
|
+
/**
|
|
857
|
+
* The id of the node.
|
|
858
|
+
*/
|
|
859
|
+
id: string;
|
|
860
|
+
/**
|
|
861
|
+
* The status of the node. Only available for WorkflowJob nodes.
|
|
862
|
+
*/
|
|
863
|
+
status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
|
|
864
|
+
/**
|
|
865
|
+
* The type of the job for the node.
|
|
866
|
+
*/
|
|
867
|
+
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
868
|
+
/**
|
|
869
|
+
* List of produced assets for this node.
|
|
870
|
+
*/
|
|
871
|
+
assets?: Array<Flow.Asset>;
|
|
872
|
+
/**
|
|
873
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
874
|
+
* dependencies. Mainly used for user approval nodes.
|
|
875
|
+
*/
|
|
876
|
+
dependsOn?: Array<string>;
|
|
877
|
+
/**
|
|
878
|
+
* The inputs of the node.
|
|
879
|
+
*/
|
|
880
|
+
inputs?: Array<Flow.Input>;
|
|
881
|
+
/**
|
|
882
|
+
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
883
|
+
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
884
|
+
* not started.
|
|
885
|
+
*/
|
|
886
|
+
jobId?: string;
|
|
887
|
+
/**
|
|
888
|
+
* The logic of the node. Only available for logic nodes.
|
|
889
|
+
*/
|
|
890
|
+
logic?: Flow.Logic;
|
|
891
|
+
/**
|
|
892
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
893
|
+
*/
|
|
894
|
+
logicType?: 'if-else';
|
|
895
|
+
/**
|
|
896
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
897
|
+
*/
|
|
898
|
+
modelId?: string;
|
|
899
|
+
/**
|
|
900
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
901
|
+
*/
|
|
902
|
+
workflowId?: string;
|
|
903
|
+
}
|
|
904
|
+
namespace Flow {
|
|
905
|
+
interface Asset {
|
|
906
|
+
assetId: string;
|
|
907
|
+
url: string;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* This is used to run the flow.
|
|
911
|
+
*/
|
|
912
|
+
interface Input {
|
|
913
|
+
/**
|
|
914
|
+
* The name that must be user to call the model through the API
|
|
915
|
+
*/
|
|
916
|
+
name: string;
|
|
917
|
+
/**
|
|
918
|
+
* The data type of the input
|
|
919
|
+
*/
|
|
920
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
921
|
+
/**
|
|
922
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
923
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
924
|
+
* dropdown.
|
|
925
|
+
*/
|
|
926
|
+
allowedValues?: Array<unknown>;
|
|
927
|
+
/**
|
|
928
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
929
|
+
* \`file_array\` input types with kind \`image\`.
|
|
930
|
+
*/
|
|
931
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
932
|
+
/**
|
|
933
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
934
|
+
*/
|
|
935
|
+
color?: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* Whether this input affects the model's cost calculation
|
|
938
|
+
*/
|
|
939
|
+
costImpact?: boolean;
|
|
940
|
+
/**
|
|
941
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
942
|
+
*/
|
|
943
|
+
description?: string;
|
|
944
|
+
/**
|
|
945
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
946
|
+
* value appear consecutively in the UI.
|
|
947
|
+
*/
|
|
948
|
+
group?: string;
|
|
949
|
+
/**
|
|
950
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
951
|
+
*/
|
|
952
|
+
hint?: string;
|
|
953
|
+
/**
|
|
954
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
955
|
+
* the same as the current object. This is only available for type inputs_array
|
|
956
|
+
* inputs.
|
|
957
|
+
*/
|
|
958
|
+
inputs?: Array<unknown>;
|
|
959
|
+
/**
|
|
960
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
961
|
+
* \`file_array\` input types.
|
|
962
|
+
*/
|
|
963
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
964
|
+
/**
|
|
965
|
+
* The label displayed in the UI for this input
|
|
966
|
+
*/
|
|
967
|
+
label?: string;
|
|
968
|
+
/**
|
|
969
|
+
* The name of the file input field to use as the mask source
|
|
970
|
+
*/
|
|
971
|
+
maskFrom?: string;
|
|
972
|
+
/**
|
|
973
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
974
|
+
* types.
|
|
975
|
+
*/
|
|
976
|
+
max?: number;
|
|
977
|
+
/**
|
|
978
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
979
|
+
* \`string_array\`.
|
|
980
|
+
*/
|
|
981
|
+
maxLength?: 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' | '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' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-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
|
+
namespace Input {
|
|
1041
|
+
/**
|
|
1042
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1043
|
+
* least one of node or conditional.
|
|
1044
|
+
*/
|
|
1045
|
+
interface Ref {
|
|
1046
|
+
/**
|
|
1047
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
1048
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
1049
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
1050
|
+
*/
|
|
1051
|
+
conditional?: Array<string>;
|
|
1052
|
+
/**
|
|
1053
|
+
* This is the desired node output value if ref is an if/else node.
|
|
1054
|
+
*/
|
|
1055
|
+
equal?: string;
|
|
1056
|
+
/**
|
|
1057
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
1058
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
1059
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
1060
|
+
* all outputs of a node, you can use the name 'all'.
|
|
1061
|
+
*/
|
|
1062
|
+
name?: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
1065
|
+
*/
|
|
1066
|
+
node?: string;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Set of rules that describes when this input is required:
|
|
1070
|
+
*
|
|
1071
|
+
* - \`always\`: Input is always required
|
|
1072
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1073
|
+
* defined
|
|
1074
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1075
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1076
|
+
* value
|
|
1077
|
+
*
|
|
1078
|
+
* By default, the input is not required.
|
|
1079
|
+
*/
|
|
1080
|
+
interface Required {
|
|
1081
|
+
/**
|
|
1082
|
+
* Whether the input is always required
|
|
1083
|
+
*/
|
|
1084
|
+
always?: boolean;
|
|
1085
|
+
/**
|
|
1086
|
+
* Makes this input required when another input has a specific value:
|
|
1087
|
+
*
|
|
1088
|
+
* - Key: name of the input to check
|
|
1089
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
1090
|
+
*/
|
|
1091
|
+
conditionalValues?: unknown;
|
|
1092
|
+
/**
|
|
1093
|
+
* Makes this input required when another input is defined:
|
|
1094
|
+
*
|
|
1095
|
+
* - Key: name of the input that must be defined
|
|
1096
|
+
* - Value: message to display when this input is required
|
|
1097
|
+
*/
|
|
1098
|
+
ifDefined?: unknown;
|
|
1099
|
+
/**
|
|
1100
|
+
* Makes this input required when another input is not defined:
|
|
1101
|
+
*
|
|
1102
|
+
* - Key: name of the input that must be undefined
|
|
1103
|
+
* - Value: message to display when this input is required
|
|
1104
|
+
*/
|
|
1105
|
+
ifNotDefined?: unknown;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* The logic of the node. Only available for logic nodes.
|
|
1110
|
+
*/
|
|
1111
|
+
interface Logic {
|
|
1112
|
+
/**
|
|
1113
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
1114
|
+
*/
|
|
1115
|
+
cases?: Array<Logic.Case>;
|
|
1116
|
+
/**
|
|
1117
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
1118
|
+
* no case is matched. Only available for if/else nodes.
|
|
1119
|
+
*/
|
|
1120
|
+
default?: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* The transform of the logic. Only available for transform nodes.
|
|
1123
|
+
*/
|
|
1124
|
+
transform?: string;
|
|
1125
|
+
}
|
|
1126
|
+
namespace Logic {
|
|
1127
|
+
interface Case {
|
|
1128
|
+
condition: string;
|
|
1129
|
+
value: string;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
interface StatusHistory {
|
|
1135
|
+
date: string;
|
|
1136
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* The billing of the job
|
|
1140
|
+
*/
|
|
1141
|
+
interface Billing {
|
|
1142
|
+
cuCost: number;
|
|
1143
|
+
cuDiscount: number;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
export interface JobListParams {
|
|
1148
|
+
/**
|
|
1149
|
+
* The authorId of the jobs to return. Optional.
|
|
1150
|
+
*/
|
|
1151
|
+
authorId?: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* If false, jobs containing the hideResults param will be not returned. Optional.
|
|
1154
|
+
*/
|
|
1155
|
+
hideResults?: string;
|
|
1156
|
+
/**
|
|
1157
|
+
* The number of items to return in the response. The default value is 10, maximum
|
|
1158
|
+
* value is 200, minimum value is 1
|
|
1159
|
+
*/
|
|
1160
|
+
pageSize?: string;
|
|
1161
|
+
/**
|
|
1162
|
+
* A token you received in a previous request to query the next page of items
|
|
1163
|
+
*/
|
|
1164
|
+
paginationToken?: string;
|
|
1165
|
+
/**
|
|
1166
|
+
* The status of the jobs to return. Optional.
|
|
1167
|
+
*/
|
|
1168
|
+
status?: string;
|
|
1169
|
+
/**
|
|
1170
|
+
* The type of the jobs to return. If "types" is defined, "type" will be ignored.
|
|
1171
|
+
* Optional.
|
|
1172
|
+
*/
|
|
1173
|
+
type?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* The types of the jobs to return. If "types" is defined, "type" will be ignored.
|
|
1176
|
+
* Optional.
|
|
1177
|
+
*/
|
|
1178
|
+
types?: string;
|
|
1179
|
+
workflowId?: string;
|
|
1180
|
+
}
|
|
1181
|
+
export interface JobTriggerActionParams {
|
|
1182
|
+
/**
|
|
1183
|
+
* The action to execute on the job, such as canceling it. Today only cancel on
|
|
1184
|
+
* inference jobs is supported.
|
|
1185
|
+
*/
|
|
1186
|
+
action?: 'cancel';
|
|
1187
|
+
}
|
|
1188
|
+
export declare namespace Jobs {
|
|
1189
|
+
export { type JobRetrieveResponse as JobRetrieveResponse, type JobListResponse as JobListResponse, type JobTriggerActionResponse as JobTriggerActionResponse, type JobListParams as JobListParams, type JobTriggerActionParams as JobTriggerActionParams, };
|
|
1190
|
+
}
|
|
1191
|
+
//# sourceMappingURL=jobs.d.ts.map
|