@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,55 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Tags extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List all tags in use for the given `projectId`
|
|
7
|
+
*/
|
|
8
|
+
list(query?: TagListParams | null | undefined, options?: RequestOptions): APIPromise<TagListResponse>;
|
|
9
|
+
}
|
|
10
|
+
export interface TagListResponse {
|
|
11
|
+
tags: Array<TagListResponse.Tag>;
|
|
12
|
+
/**
|
|
13
|
+
* A token to query the next page of tags
|
|
14
|
+
*/
|
|
15
|
+
nextPaginationToken?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace TagListResponse {
|
|
18
|
+
interface Tag {
|
|
19
|
+
/**
|
|
20
|
+
* The tag creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
21
|
+
*/
|
|
22
|
+
createdAt: string;
|
|
23
|
+
/**
|
|
24
|
+
* The number of items that have this tag
|
|
25
|
+
*/
|
|
26
|
+
itemCount: number;
|
|
27
|
+
/**
|
|
28
|
+
* The owner ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
29
|
+
*/
|
|
30
|
+
ownerId: string;
|
|
31
|
+
/**
|
|
32
|
+
* The tag name
|
|
33
|
+
*/
|
|
34
|
+
tagName: string;
|
|
35
|
+
/**
|
|
36
|
+
* The tag last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
37
|
+
*/
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export interface TagListParams {
|
|
42
|
+
/**
|
|
43
|
+
* The number of items to return in the response. The default value is 50, maximum
|
|
44
|
+
* value is 100, minimum value is 1
|
|
45
|
+
*/
|
|
46
|
+
pageSize?: string;
|
|
47
|
+
/**
|
|
48
|
+
* A token you received in a previous request to query the next page of items
|
|
49
|
+
*/
|
|
50
|
+
paginationToken?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace Tags {
|
|
53
|
+
export { type TagListResponse as TagListResponse, type TagListParams as TagListParams };
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=tags.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.d.mts","sourceRoot":"","sources":["../src/resources/tags.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,IAAI,CAAC,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAG1G;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAEjC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,GAAG;QAClB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,CAAC;CACzF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 Tags extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List all tags in use for the given `projectId`
|
|
7
|
+
*/
|
|
8
|
+
list(query?: TagListParams | null | undefined, options?: RequestOptions): APIPromise<TagListResponse>;
|
|
9
|
+
}
|
|
10
|
+
export interface TagListResponse {
|
|
11
|
+
tags: Array<TagListResponse.Tag>;
|
|
12
|
+
/**
|
|
13
|
+
* A token to query the next page of tags
|
|
14
|
+
*/
|
|
15
|
+
nextPaginationToken?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace TagListResponse {
|
|
18
|
+
interface Tag {
|
|
19
|
+
/**
|
|
20
|
+
* The tag creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
21
|
+
*/
|
|
22
|
+
createdAt: string;
|
|
23
|
+
/**
|
|
24
|
+
* The number of items that have this tag
|
|
25
|
+
*/
|
|
26
|
+
itemCount: number;
|
|
27
|
+
/**
|
|
28
|
+
* The owner ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
29
|
+
*/
|
|
30
|
+
ownerId: string;
|
|
31
|
+
/**
|
|
32
|
+
* The tag name
|
|
33
|
+
*/
|
|
34
|
+
tagName: string;
|
|
35
|
+
/**
|
|
36
|
+
* The tag last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
37
|
+
*/
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export interface TagListParams {
|
|
42
|
+
/**
|
|
43
|
+
* The number of items to return in the response. The default value is 50, maximum
|
|
44
|
+
* value is 100, minimum value is 1
|
|
45
|
+
*/
|
|
46
|
+
pageSize?: string;
|
|
47
|
+
/**
|
|
48
|
+
* A token you received in a previous request to query the next page of items
|
|
49
|
+
*/
|
|
50
|
+
paginationToken?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace Tags {
|
|
53
|
+
export { type TagListResponse as TagListResponse, type TagListParams as TagListParams };
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../src/resources/tags.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,IAAI,CAAC,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAG1G;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAEjC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,GAAG;QAClB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,CAAC;CACzF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Tags = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class Tags extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* List all tags in use for the given `projectId`
|
|
9
|
+
*/
|
|
10
|
+
list(query = {}, options) {
|
|
11
|
+
return this._client.get('/tags', { query, ...options });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Tags = Tags;
|
|
15
|
+
//# sourceMappingURL=tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../src/resources/tags.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,IAAI,CAAC,QAA0C,EAAE,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAPD,oBAOC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class Tags extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* List all tags in use for the given `projectId`
|
|
6
|
+
*/
|
|
7
|
+
list(query = {}, options) {
|
|
8
|
+
return this._client.get('/tags', { query, ...options });
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=tags.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.mjs","sourceRoot":"","sources":["../src/resources/tags.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,IAAI,CAAC,QAA0C,EAAE,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Uploads extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a temporary upload URL for a file. Support multipart uploads. Return a
|
|
7
|
+
* list of URLs for each part of the file.
|
|
8
|
+
*/
|
|
9
|
+
create(body: UploadCreateParams, options?: RequestOptions): APIPromise<UploadCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the details of an existing upload
|
|
12
|
+
*/
|
|
13
|
+
retrieve(uploadID: string, options?: RequestOptions): APIPromise<UploadRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Trigger an action on upload
|
|
16
|
+
*/
|
|
17
|
+
triggerAction(uploadID: string, body: UploadTriggerActionParams, options?: RequestOptions): APIPromise<UploadTriggerActionResponse>;
|
|
18
|
+
}
|
|
19
|
+
export interface UploadCreateResponse {
|
|
20
|
+
upload: UploadCreateResponse.Upload;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace UploadCreateResponse {
|
|
23
|
+
interface Upload {
|
|
24
|
+
id: string;
|
|
25
|
+
authorId: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
fileName: string;
|
|
28
|
+
/**
|
|
29
|
+
* The kind of the file once validated (example: "model")
|
|
30
|
+
*/
|
|
31
|
+
kind: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'video';
|
|
32
|
+
ownerId: string;
|
|
33
|
+
source: 'civitai' | 'huggingface' | 'multipart' | 'other' | 'url';
|
|
34
|
+
status: 'complete' | 'failed' | 'imported' | 'pending' | 'validated' | 'validating';
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
assetOptions?: Upload.AssetOptions;
|
|
37
|
+
config?: unknown;
|
|
38
|
+
contentType?: string;
|
|
39
|
+
entityId?: string;
|
|
40
|
+
errorMessage?: string;
|
|
41
|
+
fileSize?: number;
|
|
42
|
+
jobId?: string;
|
|
43
|
+
originalFileName?: string;
|
|
44
|
+
parts?: Array<Upload.Part>;
|
|
45
|
+
partsCount?: number;
|
|
46
|
+
provider?: 'civitai' | 'huggingface' | 'other';
|
|
47
|
+
url?: string;
|
|
48
|
+
}
|
|
49
|
+
namespace Upload {
|
|
50
|
+
interface AssetOptions {
|
|
51
|
+
/**
|
|
52
|
+
* The collection ids to add the asset to.
|
|
53
|
+
*/
|
|
54
|
+
collectionIds?: Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Specify if the asset should be hidden from the user.
|
|
57
|
+
*/
|
|
58
|
+
hide?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The parentId of the asset.
|
|
61
|
+
*/
|
|
62
|
+
parentId?: string;
|
|
63
|
+
}
|
|
64
|
+
interface Part {
|
|
65
|
+
expires: string;
|
|
66
|
+
number: number;
|
|
67
|
+
url: string;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export interface UploadRetrieveResponse {
|
|
72
|
+
upload: UploadRetrieveResponse.Upload;
|
|
73
|
+
}
|
|
74
|
+
export declare namespace UploadRetrieveResponse {
|
|
75
|
+
interface Upload {
|
|
76
|
+
id: string;
|
|
77
|
+
authorId: string;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
fileName: string;
|
|
80
|
+
/**
|
|
81
|
+
* The kind of the file once validated (example: "model")
|
|
82
|
+
*/
|
|
83
|
+
kind: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'video';
|
|
84
|
+
ownerId: string;
|
|
85
|
+
source: 'civitai' | 'huggingface' | 'multipart' | 'other' | 'url';
|
|
86
|
+
status: 'complete' | 'failed' | 'imported' | 'pending' | 'validated' | 'validating';
|
|
87
|
+
updatedAt: string;
|
|
88
|
+
assetOptions?: Upload.AssetOptions;
|
|
89
|
+
config?: unknown;
|
|
90
|
+
contentType?: string;
|
|
91
|
+
entityId?: string;
|
|
92
|
+
errorMessage?: string;
|
|
93
|
+
fileSize?: number;
|
|
94
|
+
jobId?: string;
|
|
95
|
+
originalFileName?: string;
|
|
96
|
+
parts?: Array<Upload.Part>;
|
|
97
|
+
partsCount?: number;
|
|
98
|
+
provider?: 'civitai' | 'huggingface' | 'other';
|
|
99
|
+
url?: string;
|
|
100
|
+
}
|
|
101
|
+
namespace Upload {
|
|
102
|
+
interface AssetOptions {
|
|
103
|
+
/**
|
|
104
|
+
* The collection ids to add the asset to.
|
|
105
|
+
*/
|
|
106
|
+
collectionIds?: Array<string>;
|
|
107
|
+
/**
|
|
108
|
+
* Specify if the asset should be hidden from the user.
|
|
109
|
+
*/
|
|
110
|
+
hide?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* The parentId of the asset.
|
|
113
|
+
*/
|
|
114
|
+
parentId?: string;
|
|
115
|
+
}
|
|
116
|
+
interface Part {
|
|
117
|
+
expires: string;
|
|
118
|
+
number: number;
|
|
119
|
+
url: string;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export interface UploadTriggerActionResponse {
|
|
124
|
+
upload: UploadTriggerActionResponse.Upload;
|
|
125
|
+
}
|
|
126
|
+
export declare namespace UploadTriggerActionResponse {
|
|
127
|
+
interface Upload {
|
|
128
|
+
id: string;
|
|
129
|
+
authorId: string;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
fileName: string;
|
|
132
|
+
/**
|
|
133
|
+
* The kind of the file once validated (example: "model")
|
|
134
|
+
*/
|
|
135
|
+
kind: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'video';
|
|
136
|
+
ownerId: string;
|
|
137
|
+
source: 'civitai' | 'huggingface' | 'multipart' | 'other' | 'url';
|
|
138
|
+
status: 'complete' | 'failed' | 'imported' | 'pending' | 'validated' | 'validating';
|
|
139
|
+
updatedAt: string;
|
|
140
|
+
assetOptions?: Upload.AssetOptions;
|
|
141
|
+
config?: unknown;
|
|
142
|
+
contentType?: string;
|
|
143
|
+
entityId?: string;
|
|
144
|
+
errorMessage?: string;
|
|
145
|
+
fileSize?: number;
|
|
146
|
+
jobId?: string;
|
|
147
|
+
originalFileName?: string;
|
|
148
|
+
parts?: Array<Upload.Part>;
|
|
149
|
+
partsCount?: number;
|
|
150
|
+
provider?: 'civitai' | 'huggingface' | 'other';
|
|
151
|
+
url?: string;
|
|
152
|
+
}
|
|
153
|
+
namespace Upload {
|
|
154
|
+
interface AssetOptions {
|
|
155
|
+
/**
|
|
156
|
+
* The collection ids to add the asset to.
|
|
157
|
+
*/
|
|
158
|
+
collectionIds?: Array<string>;
|
|
159
|
+
/**
|
|
160
|
+
* Specify if the asset should be hidden from the user.
|
|
161
|
+
*/
|
|
162
|
+
hide?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* The parentId of the asset.
|
|
165
|
+
*/
|
|
166
|
+
parentId?: string;
|
|
167
|
+
}
|
|
168
|
+
interface Part {
|
|
169
|
+
expires: string;
|
|
170
|
+
number: number;
|
|
171
|
+
url: string;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
export interface UploadCreateParams {
|
|
176
|
+
/**
|
|
177
|
+
* Asset extra options. Only available for kinds which produce an asset. (Not
|
|
178
|
+
* available for model kind)
|
|
179
|
+
*/
|
|
180
|
+
assetOptions?: UploadCreateParams.AssetOptions;
|
|
181
|
+
/**
|
|
182
|
+
* The civitai.com url of the model (example:
|
|
183
|
+
* "https://civitai.com/models/370194/translucent-subsurface-scattering-test?modelVersionId=413566").
|
|
184
|
+
*/
|
|
185
|
+
civitaiModelUrl?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Required for multipart upload. The MIME type of the file (example: "image/jpeg")
|
|
188
|
+
*/
|
|
189
|
+
contentType?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Required for multipart upload. The original file name of the image (example:
|
|
192
|
+
* "low-res-image.jpg"). It will be ignored if assetId is provided.
|
|
193
|
+
*/
|
|
194
|
+
fileName?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Required for multipart upload. The size of the file in bytes
|
|
197
|
+
*/
|
|
198
|
+
fileSize?: number;
|
|
199
|
+
/**
|
|
200
|
+
* The huggingface.co modelName (example:
|
|
201
|
+
* "stabilityai/stable-diffusion-xl-base-1.0"). No need to setup other fields if
|
|
202
|
+
* you setup huggingFaceModelName
|
|
203
|
+
*/
|
|
204
|
+
huggingFaceModelName?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Required for multipart upload and url. The purpose of the file once validated
|
|
207
|
+
* (example: "model")
|
|
208
|
+
*/
|
|
209
|
+
kind?: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'video';
|
|
210
|
+
/**
|
|
211
|
+
* Required for multipart upload. The number of parts the file will be uploaded in
|
|
212
|
+
*/
|
|
213
|
+
parts?: number;
|
|
214
|
+
/**
|
|
215
|
+
* The url where to download the file. If you setup url you MUST setup kind as
|
|
216
|
+
* well.
|
|
217
|
+
*/
|
|
218
|
+
url?: string;
|
|
219
|
+
}
|
|
220
|
+
export declare namespace UploadCreateParams {
|
|
221
|
+
/**
|
|
222
|
+
* Asset extra options. Only available for kinds which produce an asset. (Not
|
|
223
|
+
* available for model kind)
|
|
224
|
+
*/
|
|
225
|
+
interface AssetOptions {
|
|
226
|
+
/**
|
|
227
|
+
* The collection ids to add the asset to.
|
|
228
|
+
*/
|
|
229
|
+
collectionIds?: Array<string>;
|
|
230
|
+
/**
|
|
231
|
+
* Specify if the asset should be hidden from the user.
|
|
232
|
+
*/
|
|
233
|
+
hide?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* The parentId of the asset.
|
|
236
|
+
*/
|
|
237
|
+
parentId?: string;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
export interface UploadTriggerActionParams {
|
|
241
|
+
/**
|
|
242
|
+
* The action to perform on an upload, currently only "upload-complete" is
|
|
243
|
+
* supported
|
|
244
|
+
*/
|
|
245
|
+
action: 'complete';
|
|
246
|
+
}
|
|
247
|
+
export declare namespace Uploads {
|
|
248
|
+
export { type UploadCreateResponse as UploadCreateResponse, type UploadRetrieveResponse as UploadRetrieveResponse, type UploadTriggerActionResponse as UploadTriggerActionResponse, type UploadCreateParams as UploadCreateParams, type UploadTriggerActionParams as UploadTriggerActionParams, };
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=uploads.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,O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AEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IAEzE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,kBAAkB,CAAC;IAClC;;;OAGG;IACH,UAAiB,YAAY;QAC3B;;WAEG;QACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAE9B;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QAEf;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,250 @@
|
|
|
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 Uploads extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a temporary upload URL for a file. Support multipart uploads. Return a
|
|
7
|
+
* list of URLs for each part of the file.
|
|
8
|
+
*/
|
|
9
|
+
create(body: UploadCreateParams, options?: RequestOptions): APIPromise<UploadCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the details of an existing upload
|
|
12
|
+
*/
|
|
13
|
+
retrieve(uploadID: string, options?: RequestOptions): APIPromise<UploadRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Trigger an action on upload
|
|
16
|
+
*/
|
|
17
|
+
triggerAction(uploadID: string, body: UploadTriggerActionParams, options?: RequestOptions): APIPromise<UploadTriggerActionResponse>;
|
|
18
|
+
}
|
|
19
|
+
export interface UploadCreateResponse {
|
|
20
|
+
upload: UploadCreateResponse.Upload;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace UploadCreateResponse {
|
|
23
|
+
interface Upload {
|
|
24
|
+
id: string;
|
|
25
|
+
authorId: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
fileName: string;
|
|
28
|
+
/**
|
|
29
|
+
* The kind of the file once validated (example: "model")
|
|
30
|
+
*/
|
|
31
|
+
kind: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'video';
|
|
32
|
+
ownerId: string;
|
|
33
|
+
source: 'civitai' | 'huggingface' | 'multipart' | 'other' | 'url';
|
|
34
|
+
status: 'complete' | 'failed' | 'imported' | 'pending' | 'validated' | 'validating';
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
assetOptions?: Upload.AssetOptions;
|
|
37
|
+
config?: unknown;
|
|
38
|
+
contentType?: string;
|
|
39
|
+
entityId?: string;
|
|
40
|
+
errorMessage?: string;
|
|
41
|
+
fileSize?: number;
|
|
42
|
+
jobId?: string;
|
|
43
|
+
originalFileName?: string;
|
|
44
|
+
parts?: Array<Upload.Part>;
|
|
45
|
+
partsCount?: number;
|
|
46
|
+
provider?: 'civitai' | 'huggingface' | 'other';
|
|
47
|
+
url?: string;
|
|
48
|
+
}
|
|
49
|
+
namespace Upload {
|
|
50
|
+
interface AssetOptions {
|
|
51
|
+
/**
|
|
52
|
+
* The collection ids to add the asset to.
|
|
53
|
+
*/
|
|
54
|
+
collectionIds?: Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Specify if the asset should be hidden from the user.
|
|
57
|
+
*/
|
|
58
|
+
hide?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The parentId of the asset.
|
|
61
|
+
*/
|
|
62
|
+
parentId?: string;
|
|
63
|
+
}
|
|
64
|
+
interface Part {
|
|
65
|
+
expires: string;
|
|
66
|
+
number: number;
|
|
67
|
+
url: string;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export interface UploadRetrieveResponse {
|
|
72
|
+
upload: UploadRetrieveResponse.Upload;
|
|
73
|
+
}
|
|
74
|
+
export declare namespace UploadRetrieveResponse {
|
|
75
|
+
interface Upload {
|
|
76
|
+
id: string;
|
|
77
|
+
authorId: string;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
fileName: string;
|
|
80
|
+
/**
|
|
81
|
+
* The kind of the file once validated (example: "model")
|
|
82
|
+
*/
|
|
83
|
+
kind: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'video';
|
|
84
|
+
ownerId: string;
|
|
85
|
+
source: 'civitai' | 'huggingface' | 'multipart' | 'other' | 'url';
|
|
86
|
+
status: 'complete' | 'failed' | 'imported' | 'pending' | 'validated' | 'validating';
|
|
87
|
+
updatedAt: string;
|
|
88
|
+
assetOptions?: Upload.AssetOptions;
|
|
89
|
+
config?: unknown;
|
|
90
|
+
contentType?: string;
|
|
91
|
+
entityId?: string;
|
|
92
|
+
errorMessage?: string;
|
|
93
|
+
fileSize?: number;
|
|
94
|
+
jobId?: string;
|
|
95
|
+
originalFileName?: string;
|
|
96
|
+
parts?: Array<Upload.Part>;
|
|
97
|
+
partsCount?: number;
|
|
98
|
+
provider?: 'civitai' | 'huggingface' | 'other';
|
|
99
|
+
url?: string;
|
|
100
|
+
}
|
|
101
|
+
namespace Upload {
|
|
102
|
+
interface AssetOptions {
|
|
103
|
+
/**
|
|
104
|
+
* The collection ids to add the asset to.
|
|
105
|
+
*/
|
|
106
|
+
collectionIds?: Array<string>;
|
|
107
|
+
/**
|
|
108
|
+
* Specify if the asset should be hidden from the user.
|
|
109
|
+
*/
|
|
110
|
+
hide?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* The parentId of the asset.
|
|
113
|
+
*/
|
|
114
|
+
parentId?: string;
|
|
115
|
+
}
|
|
116
|
+
interface Part {
|
|
117
|
+
expires: string;
|
|
118
|
+
number: number;
|
|
119
|
+
url: string;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export interface UploadTriggerActionResponse {
|
|
124
|
+
upload: UploadTriggerActionResponse.Upload;
|
|
125
|
+
}
|
|
126
|
+
export declare namespace UploadTriggerActionResponse {
|
|
127
|
+
interface Upload {
|
|
128
|
+
id: string;
|
|
129
|
+
authorId: string;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
fileName: string;
|
|
132
|
+
/**
|
|
133
|
+
* The kind of the file once validated (example: "model")
|
|
134
|
+
*/
|
|
135
|
+
kind: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'video';
|
|
136
|
+
ownerId: string;
|
|
137
|
+
source: 'civitai' | 'huggingface' | 'multipart' | 'other' | 'url';
|
|
138
|
+
status: 'complete' | 'failed' | 'imported' | 'pending' | 'validated' | 'validating';
|
|
139
|
+
updatedAt: string;
|
|
140
|
+
assetOptions?: Upload.AssetOptions;
|
|
141
|
+
config?: unknown;
|
|
142
|
+
contentType?: string;
|
|
143
|
+
entityId?: string;
|
|
144
|
+
errorMessage?: string;
|
|
145
|
+
fileSize?: number;
|
|
146
|
+
jobId?: string;
|
|
147
|
+
originalFileName?: string;
|
|
148
|
+
parts?: Array<Upload.Part>;
|
|
149
|
+
partsCount?: number;
|
|
150
|
+
provider?: 'civitai' | 'huggingface' | 'other';
|
|
151
|
+
url?: string;
|
|
152
|
+
}
|
|
153
|
+
namespace Upload {
|
|
154
|
+
interface AssetOptions {
|
|
155
|
+
/**
|
|
156
|
+
* The collection ids to add the asset to.
|
|
157
|
+
*/
|
|
158
|
+
collectionIds?: Array<string>;
|
|
159
|
+
/**
|
|
160
|
+
* Specify if the asset should be hidden from the user.
|
|
161
|
+
*/
|
|
162
|
+
hide?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* The parentId of the asset.
|
|
165
|
+
*/
|
|
166
|
+
parentId?: string;
|
|
167
|
+
}
|
|
168
|
+
interface Part {
|
|
169
|
+
expires: string;
|
|
170
|
+
number: number;
|
|
171
|
+
url: string;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
export interface UploadCreateParams {
|
|
176
|
+
/**
|
|
177
|
+
* Asset extra options. Only available for kinds which produce an asset. (Not
|
|
178
|
+
* available for model kind)
|
|
179
|
+
*/
|
|
180
|
+
assetOptions?: UploadCreateParams.AssetOptions;
|
|
181
|
+
/**
|
|
182
|
+
* The civitai.com url of the model (example:
|
|
183
|
+
* "https://civitai.com/models/370194/translucent-subsurface-scattering-test?modelVersionId=413566").
|
|
184
|
+
*/
|
|
185
|
+
civitaiModelUrl?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Required for multipart upload. The MIME type of the file (example: "image/jpeg")
|
|
188
|
+
*/
|
|
189
|
+
contentType?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Required for multipart upload. The original file name of the image (example:
|
|
192
|
+
* "low-res-image.jpg"). It will be ignored if assetId is provided.
|
|
193
|
+
*/
|
|
194
|
+
fileName?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Required for multipart upload. The size of the file in bytes
|
|
197
|
+
*/
|
|
198
|
+
fileSize?: number;
|
|
199
|
+
/**
|
|
200
|
+
* The huggingface.co modelName (example:
|
|
201
|
+
* "stabilityai/stable-diffusion-xl-base-1.0"). No need to setup other fields if
|
|
202
|
+
* you setup huggingFaceModelName
|
|
203
|
+
*/
|
|
204
|
+
huggingFaceModelName?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Required for multipart upload and url. The purpose of the file once validated
|
|
207
|
+
* (example: "model")
|
|
208
|
+
*/
|
|
209
|
+
kind?: '3d' | 'asset' | 'audio' | 'avatar' | 'image' | 'model' | 'video';
|
|
210
|
+
/**
|
|
211
|
+
* Required for multipart upload. The number of parts the file will be uploaded in
|
|
212
|
+
*/
|
|
213
|
+
parts?: number;
|
|
214
|
+
/**
|
|
215
|
+
* The url where to download the file. If you setup url you MUST setup kind as
|
|
216
|
+
* well.
|
|
217
|
+
*/
|
|
218
|
+
url?: string;
|
|
219
|
+
}
|
|
220
|
+
export declare namespace UploadCreateParams {
|
|
221
|
+
/**
|
|
222
|
+
* Asset extra options. Only available for kinds which produce an asset. (Not
|
|
223
|
+
* available for model kind)
|
|
224
|
+
*/
|
|
225
|
+
interface AssetOptions {
|
|
226
|
+
/**
|
|
227
|
+
* The collection ids to add the asset to.
|
|
228
|
+
*/
|
|
229
|
+
collectionIds?: Array<string>;
|
|
230
|
+
/**
|
|
231
|
+
* Specify if the asset should be hidden from the user.
|
|
232
|
+
*/
|
|
233
|
+
hide?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* The parentId of the asset.
|
|
236
|
+
*/
|
|
237
|
+
parentId?: string;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
export interface UploadTriggerActionParams {
|
|
241
|
+
/**
|
|
242
|
+
* The action to perform on an upload, currently only "upload-complete" is
|
|
243
|
+
* supported
|
|
244
|
+
*/
|
|
245
|
+
action: 'complete';
|
|
246
|
+
}
|
|
247
|
+
export declare namespace Uploads {
|
|
248
|
+
export { type UploadCreateResponse as UploadCreateResponse, type UploadRetrieveResponse as UploadRetrieveResponse, type UploadTriggerActionResponse as UploadTriggerActionResponse, type UploadCreateParams as UploadCreateParams, type UploadTriggerActionParams as UploadTriggerActionParams, };
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=uploads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/resources/uploads.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EA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