@leonardo-ai/sdk 4.14.2 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -7
- package/core.d.ts +10 -0
- package/core.d.ts.map +1 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/docs/sdks/dataset/README.md +169 -7
- package/docs/sdks/elements/README.md +33 -1
- package/docs/sdks/image/README.md +132 -7
- package/docs/sdks/initimages/README.md +136 -6
- package/docs/sdks/leonardo/README.md +1 -5
- package/docs/sdks/models/README.md +135 -6
- package/docs/sdks/motion/README.md +34 -4
- package/docs/sdks/pricingcalculator/README.md +34 -2
- package/docs/sdks/prompt/README.md +67 -2
- package/docs/sdks/realtimecanvas/README.md +133 -21
- package/docs/sdks/texture/README.md +67 -4
- package/docs/sdks/threedmodelassets/README.md +67 -4
- package/docs/sdks/user/README.md +33 -1
- package/docs/sdks/variation/README.md +166 -10
- package/funcs/datasetCreateDataset.d.ts +15 -0
- package/funcs/datasetCreateDataset.d.ts.map +1 -0
- package/funcs/datasetCreateDataset.js +101 -0
- package/funcs/datasetCreateDataset.js.map +1 -0
- package/funcs/datasetDeleteDatasetById.d.ts +15 -0
- package/funcs/datasetDeleteDatasetById.d.ts.map +1 -0
- package/funcs/datasetDeleteDatasetById.js +103 -0
- package/funcs/datasetDeleteDatasetById.js.map +1 -0
- package/funcs/datasetGetDatasetById.d.ts +15 -0
- package/funcs/datasetGetDatasetById.d.ts.map +1 -0
- package/funcs/datasetGetDatasetById.js +105 -0
- package/funcs/datasetGetDatasetById.js.map +1 -0
- package/funcs/datasetUploadDatasetImage.d.ts +15 -0
- package/funcs/datasetUploadDatasetImage.d.ts.map +1 -0
- package/funcs/datasetUploadDatasetImage.js +108 -0
- package/funcs/datasetUploadDatasetImage.js.map +1 -0
- package/funcs/datasetUploadDatasetImageFromGen.d.ts +15 -0
- package/funcs/datasetUploadDatasetImageFromGen.d.ts.map +1 -0
- package/funcs/datasetUploadDatasetImageFromGen.js +108 -0
- package/funcs/datasetUploadDatasetImageFromGen.js.map +1 -0
- package/funcs/elementsListElements.d.ts +15 -0
- package/funcs/elementsListElements.d.ts.map +1 -0
- package/funcs/elementsListElements.js +90 -0
- package/funcs/elementsListElements.js.map +1 -0
- package/funcs/imageCreateGeneration.d.ts +15 -0
- package/funcs/imageCreateGeneration.d.ts.map +1 -0
- package/funcs/imageCreateGeneration.js +99 -0
- package/funcs/imageCreateGeneration.js.map +1 -0
- package/funcs/imageDeleteGenerationById.d.ts +15 -0
- package/funcs/imageDeleteGenerationById.d.ts.map +1 -0
- package/funcs/imageDeleteGenerationById.js +103 -0
- package/funcs/imageDeleteGenerationById.js.map +1 -0
- package/funcs/imageGetGenerationById.d.ts +15 -0
- package/funcs/imageGetGenerationById.d.ts.map +1 -0
- package/funcs/imageGetGenerationById.js +103 -0
- package/funcs/imageGetGenerationById.js.map +1 -0
- package/funcs/imageGetGenerationsByUserId.d.ts +15 -0
- package/funcs/imageGetGenerationsByUserId.d.ts.map +1 -0
- package/funcs/imageGetGenerationsByUserId.js +113 -0
- package/funcs/imageGetGenerationsByUserId.js.map +1 -0
- package/funcs/initImagesDeleteInitImageById.d.ts +15 -0
- package/funcs/initImagesDeleteInitImageById.d.ts.map +1 -0
- package/funcs/initImagesDeleteInitImageById.js +103 -0
- package/funcs/initImagesDeleteInitImageById.js.map +1 -0
- package/funcs/initImagesGetInitImageById.d.ts +15 -0
- package/funcs/initImagesGetInitImageById.d.ts.map +1 -0
- package/funcs/initImagesGetInitImageById.js +103 -0
- package/funcs/initImagesGetInitImageById.js.map +1 -0
- package/funcs/initImagesUploadCanvasInitImage.d.ts +15 -0
- package/funcs/initImagesUploadCanvasInitImage.d.ts.map +1 -0
- package/funcs/initImagesUploadCanvasInitImage.js +99 -0
- package/funcs/initImagesUploadCanvasInitImage.js.map +1 -0
- package/funcs/initImagesUploadInitImage.d.ts +15 -0
- package/funcs/initImagesUploadInitImage.d.ts.map +1 -0
- package/funcs/initImagesUploadInitImage.js +101 -0
- package/funcs/initImagesUploadInitImage.js.map +1 -0
- package/funcs/modelsCreateModel.d.ts +15 -0
- package/funcs/modelsCreateModel.d.ts.map +1 -0
- package/funcs/modelsCreateModel.js +101 -0
- package/funcs/modelsCreateModel.js.map +1 -0
- package/funcs/modelsDeleteModelById.d.ts +15 -0
- package/funcs/modelsDeleteModelById.d.ts.map +1 -0
- package/funcs/modelsDeleteModelById.js +105 -0
- package/funcs/modelsDeleteModelById.js.map +1 -0
- package/funcs/modelsGetModelById.d.ts +15 -0
- package/funcs/modelsGetModelById.d.ts.map +1 -0
- package/funcs/modelsGetModelById.js +105 -0
- package/funcs/modelsGetModelById.js.map +1 -0
- package/funcs/modelsListPlatformModels.d.ts +15 -0
- package/funcs/modelsListPlatformModels.d.ts.map +1 -0
- package/funcs/modelsListPlatformModels.js +88 -0
- package/funcs/modelsListPlatformModels.js.map +1 -0
- package/funcs/motionCreateSVDMotionGeneration.d.ts +15 -0
- package/funcs/motionCreateSVDMotionGeneration.d.ts.map +1 -0
- package/funcs/motionCreateSVDMotionGeneration.js +99 -0
- package/funcs/motionCreateSVDMotionGeneration.js.map +1 -0
- package/funcs/pricingCalculatorPricingCalculator.d.ts +15 -0
- package/funcs/pricingCalculatorPricingCalculator.d.ts.map +1 -0
- package/funcs/pricingCalculatorPricingCalculator.js +99 -0
- package/funcs/pricingCalculatorPricingCalculator.js.map +1 -0
- package/funcs/promptPromptImprove.d.ts +15 -0
- package/funcs/promptPromptImprove.d.ts.map +1 -0
- package/funcs/promptPromptImprove.js +101 -0
- package/funcs/promptPromptImprove.js.map +1 -0
- package/funcs/promptPromptRandom.d.ts +15 -0
- package/funcs/promptPromptRandom.d.ts.map +1 -0
- package/funcs/promptPromptRandom.js +90 -0
- package/funcs/promptPromptRandom.js.map +1 -0
- package/funcs/realtimeCanvasCreateLCMGeneration.d.ts +15 -0
- package/funcs/realtimeCanvasCreateLCMGeneration.d.ts.map +1 -0
- package/funcs/realtimeCanvasCreateLCMGeneration.js +99 -0
- package/funcs/realtimeCanvasCreateLCMGeneration.js.map +1 -0
- package/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.d.ts +15 -0
- package/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.d.ts.map +1 -0
- package/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.js +99 -0
- package/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.js.map +1 -0
- package/funcs/realtimeCanvasPerformInpaintingLCM.d.ts +15 -0
- package/funcs/realtimeCanvasPerformInpaintingLCM.d.ts.map +1 -0
- package/funcs/realtimeCanvasPerformInpaintingLCM.js +99 -0
- package/funcs/realtimeCanvasPerformInpaintingLCM.js.map +1 -0
- package/funcs/realtimeCanvasPerformInstantRefine.d.ts +15 -0
- package/funcs/realtimeCanvasPerformInstantRefine.d.ts.map +1 -0
- package/funcs/realtimeCanvasPerformInstantRefine.js +99 -0
- package/funcs/realtimeCanvasPerformInstantRefine.js.map +1 -0
- package/funcs/textureCreateTextureGeneration.d.ts +15 -0
- package/funcs/textureCreateTextureGeneration.d.ts.map +1 -0
- package/funcs/textureCreateTextureGeneration.js +99 -0
- package/funcs/textureCreateTextureGeneration.js.map +1 -0
- package/funcs/textureDeleteTextureGenerationById.d.ts +15 -0
- package/funcs/textureDeleteTextureGenerationById.d.ts.map +1 -0
- package/funcs/textureDeleteTextureGenerationById.js +107 -0
- package/funcs/textureDeleteTextureGenerationById.js.map +1 -0
- package/funcs/threeDModelAssetsDelete3DModelById.d.ts +15 -0
- package/funcs/threeDModelAssetsDelete3DModelById.d.ts.map +1 -0
- package/funcs/threeDModelAssetsDelete3DModelById.js +105 -0
- package/funcs/threeDModelAssetsDelete3DModelById.js.map +1 -0
- package/funcs/threeDModelAssetsUploadModelAsset.d.ts +15 -0
- package/funcs/threeDModelAssetsUploadModelAsset.d.ts.map +1 -0
- package/funcs/threeDModelAssetsUploadModelAsset.js +99 -0
- package/funcs/threeDModelAssetsUploadModelAsset.js.map +1 -0
- package/funcs/userGetUserSelf.d.ts +15 -0
- package/funcs/userGetUserSelf.d.ts.map +1 -0
- package/funcs/userGetUserSelf.js +90 -0
- package/funcs/userGetUserSelf.js.map +1 -0
- package/funcs/variationCreateUniversalUpscalerJob.d.ts +15 -0
- package/funcs/variationCreateUniversalUpscalerJob.d.ts.map +1 -0
- package/funcs/variationCreateUniversalUpscalerJob.js +99 -0
- package/funcs/variationCreateUniversalUpscalerJob.js.map +1 -0
- package/funcs/variationCreateVariationNoBG.d.ts +15 -0
- package/funcs/variationCreateVariationNoBG.d.ts.map +1 -0
- package/funcs/variationCreateVariationNoBG.js +99 -0
- package/funcs/variationCreateVariationNoBG.js.map +1 -0
- package/funcs/variationCreateVariationUnzoom.d.ts +15 -0
- package/funcs/variationCreateVariationUnzoom.d.ts.map +1 -0
- package/funcs/variationCreateVariationUnzoom.js +99 -0
- package/funcs/variationCreateVariationUnzoom.js.map +1 -0
- package/funcs/variationCreateVariationUpscale.d.ts +15 -0
- package/funcs/variationCreateVariationUpscale.d.ts.map +1 -0
- package/funcs/variationCreateVariationUpscale.js +99 -0
- package/funcs/variationCreateVariationUpscale.js.map +1 -0
- package/funcs/variationGetVariationById.d.ts +15 -0
- package/funcs/variationGetVariationById.d.ts.map +1 -0
- package/funcs/variationGetVariationById.js +103 -0
- package/funcs/variationGetVariationById.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +14 -0
- package/index.js.map +1 -1
- package/lib/config.d.ts +5 -3
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +50 -0
- package/lib/dlv.js.map +1 -0
- package/lib/files.d.ts +12 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +52 -0
- package/lib/files.js.map +1 -0
- package/lib/http.d.ts +11 -52
- package/lib/http.d.ts.map +1 -1
- package/lib/http.js +49 -173
- package/lib/http.js.map +1 -1
- package/lib/logger.d.ts +6 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +6 -0
- package/lib/logger.js.map +1 -0
- package/lib/matchers.d.ts +64 -0
- package/lib/matchers.d.ts.map +1 -0
- package/lib/matchers.js +206 -0
- package/lib/matchers.js.map +1 -0
- package/lib/retries.d.ts.map +1 -1
- package/lib/retries.js +2 -28
- package/lib/retries.js.map +1 -1
- package/lib/schemas.d.ts +8 -0
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +16 -1
- package/lib/schemas.js.map +1 -1
- package/lib/sdks.d.ts +14 -16
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +144 -27
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts +7 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +13 -1
- package/lib/security.js.map +1 -1
- package/package.json +2 -1
- package/sdk/dataset.d.ts +0 -3
- package/sdk/dataset.d.ts.map +1 -1
- package/sdk/dataset.js +11 -332
- package/sdk/dataset.js.map +1 -1
- package/sdk/elements.d.ts +0 -3
- package/sdk/elements.d.ts.map +1 -1
- package/sdk/elements.js +3 -93
- package/sdk/elements.js.map +1 -1
- package/sdk/image.d.ts +0 -3
- package/sdk/image.d.ts.map +1 -1
- package/sdk/image.js +9 -273
- package/sdk/image.js.map +1 -1
- package/sdk/initimages.d.ts +0 -3
- package/sdk/initimages.d.ts.map +1 -1
- package/sdk/initimages.js +9 -261
- package/sdk/initimages.js.map +1 -1
- package/sdk/models/errors/httpclienterrors.d.ts +44 -0
- package/sdk/models/errors/httpclienterrors.d.ts.map +1 -0
- package/sdk/models/errors/httpclienterrors.js +78 -0
- package/sdk/models/errors/httpclienterrors.js.map +1 -0
- package/sdk/models/errors/index.d.ts +1 -0
- package/sdk/models/errors/index.d.ts.map +1 -1
- package/sdk/models/errors/index.js +1 -0
- package/sdk/models/errors/index.js.map +1 -1
- package/sdk/models/errors/sdkvalidationerror.d.ts +4 -1
- package/sdk/models/errors/sdkvalidationerror.d.ts.map +1 -1
- package/sdk/models/errors/sdkvalidationerror.js +3 -5
- package/sdk/models/errors/sdkvalidationerror.js.map +1 -1
- package/sdk/models/operations/pricingcalculator.d.ts +5 -0
- package/sdk/models/operations/pricingcalculator.d.ts.map +1 -1
- package/sdk/models/operations/pricingcalculator.js +2 -0
- package/sdk/models/operations/pricingcalculator.js.map +1 -1
- package/sdk/models.d.ts +0 -3
- package/sdk/models.d.ts.map +1 -1
- package/sdk/models.js +9 -256
- package/sdk/models.js.map +1 -1
- package/sdk/motion.d.ts +0 -3
- package/sdk/motion.d.ts.map +1 -1
- package/sdk/motion.js +3 -102
- package/sdk/motion.js.map +1 -1
- package/sdk/pricingcalculator.d.ts +0 -3
- package/sdk/pricingcalculator.d.ts.map +1 -1
- package/sdk/pricingcalculator.js +3 -100
- package/sdk/pricingcalculator.js.map +1 -1
- package/sdk/prompt.d.ts +0 -3
- package/sdk/prompt.d.ts.map +1 -1
- package/sdk/prompt.js +5 -146
- package/sdk/prompt.js.map +1 -1
- package/sdk/realtimecanvas.d.ts +0 -3
- package/sdk/realtimecanvas.d.ts.map +1 -1
- package/sdk/realtimecanvas.js +9 -253
- package/sdk/realtimecanvas.js.map +1 -1
- package/sdk/sdk.d.ts +0 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -23
- package/sdk/sdk.js.map +1 -1
- package/sdk/texture.d.ts +0 -3
- package/sdk/texture.d.ts.map +1 -1
- package/sdk/texture.js +5 -159
- package/sdk/texture.js.map +1 -1
- package/sdk/threedmodelassets.d.ts +0 -3
- package/sdk/threedmodelassets.d.ts.map +1 -1
- package/sdk/threedmodelassets.js +5 -157
- package/sdk/threedmodelassets.js.map +1 -1
- package/sdk/types/constdatetime.d.ts +3 -0
- package/sdk/types/constdatetime.d.ts.map +1 -0
- package/sdk/types/constdatetime.js +37 -0
- package/sdk/types/constdatetime.js.map +1 -0
- package/sdk/types/fp.d.ts +31 -0
- package/sdk/types/fp.d.ts.map +1 -0
- package/sdk/types/fp.js +38 -0
- package/sdk/types/fp.js.map +1 -0
- package/sdk/types/index.d.ts +1 -0
- package/sdk/types/index.d.ts.map +1 -1
- package/sdk/types/operations.d.ts +22 -8
- package/sdk/types/operations.d.ts.map +1 -1
- package/sdk/types/operations.js +64 -2
- package/sdk/types/operations.js.map +1 -1
- package/sdk/types/streams.d.ts +2 -0
- package/sdk/types/streams.d.ts.map +1 -0
- package/sdk/types/streams.js +19 -0
- package/sdk/types/streams.js.map +1 -0
- package/sdk/user.d.ts +0 -3
- package/sdk/user.d.ts.map +1 -1
- package/sdk/user.js +3 -93
- package/sdk/user.js.map +1 -1
- package/sdk/variation.d.ts +0 -3
- package/sdk/variation.d.ts.map +1 -1
- package/sdk/variation.js +11 -310
- package/sdk/variation.js.map +1 -1
- package/src/core.ts +13 -0
- package/src/funcs/datasetCreateDataset.ts +127 -0
- package/src/funcs/datasetDeleteDatasetById.ts +133 -0
- package/src/funcs/datasetGetDatasetById.ts +132 -0
- package/src/funcs/datasetUploadDatasetImage.ts +139 -0
- package/src/funcs/datasetUploadDatasetImageFromGen.ts +139 -0
- package/src/funcs/elementsListElements.ts +109 -0
- package/src/funcs/imageCreateGeneration.ts +128 -0
- package/src/funcs/imageDeleteGenerationById.ts +133 -0
- package/src/funcs/imageGetGenerationById.ts +133 -0
- package/src/funcs/imageGetGenerationsByUserId.ts +149 -0
- package/src/funcs/initImagesDeleteInitImageById.ts +133 -0
- package/src/funcs/initImagesGetInitImageById.ts +133 -0
- package/src/funcs/initImagesUploadCanvasInitImage.ts +128 -0
- package/src/funcs/initImagesUploadInitImage.ts +127 -0
- package/src/funcs/modelsCreateModel.ts +127 -0
- package/src/funcs/modelsDeleteModelById.ts +132 -0
- package/src/funcs/modelsGetModelById.ts +132 -0
- package/src/funcs/modelsListPlatformModels.ts +110 -0
- package/src/funcs/motionCreateSVDMotionGeneration.ts +129 -0
- package/src/funcs/pricingCalculatorPricingCalculator.ts +128 -0
- package/src/funcs/promptPromptImprove.ts +127 -0
- package/src/funcs/promptPromptRandom.ts +109 -0
- package/src/funcs/realtimeCanvasCreateLCMGeneration.ts +129 -0
- package/src/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.ts +129 -0
- package/src/funcs/realtimeCanvasPerformInpaintingLCM.ts +129 -0
- package/src/funcs/realtimeCanvasPerformInstantRefine.ts +129 -0
- package/src/funcs/textureCreateTextureGeneration.ts +129 -0
- package/src/funcs/textureDeleteTextureGenerationById.ts +137 -0
- package/src/funcs/threeDModelAssetsDelete3DModelById.ts +136 -0
- package/src/funcs/threeDModelAssetsUploadModelAsset.ts +128 -0
- package/src/funcs/userGetUserSelf.ts +109 -0
- package/src/funcs/variationCreateUniversalUpscalerJob.ts +128 -0
- package/src/funcs/variationCreateVariationNoBG.ts +128 -0
- package/src/funcs/variationCreateVariationUnzoom.ts +129 -0
- package/src/funcs/variationCreateVariationUpscale.ts +129 -0
- package/src/funcs/variationGetVariationById.ts +133 -0
- package/src/index.ts +1 -0
- package/src/lib/config.ts +5 -3
- package/src/lib/dlv.ts +53 -0
- package/src/lib/files.ts +58 -0
- package/src/lib/http.ts +255 -438
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +305 -0
- package/src/lib/retries.ts +2 -41
- package/src/lib/schemas.ts +18 -0
- package/src/lib/sdks.ts +194 -35
- package/src/lib/security.ts +22 -1
- package/src/sdk/dataset.ts +11 -389
- package/src/sdk/elements.ts +3 -84
- package/src/sdk/image.ts +9 -319
- package/src/sdk/initimages.ts +9 -303
- package/src/sdk/models/errors/httpclienterrors.ts +62 -0
- package/src/sdk/models/errors/index.ts +1 -0
- package/src/sdk/models/errors/sdkvalidationerror.ts +8 -6
- package/src/sdk/models/operations/pricingcalculator.ts +7 -0
- package/src/sdk/models.ts +9 -292
- package/src/sdk/motion.ts +3 -103
- package/src/sdk/pricingcalculator.ts +3 -99
- package/src/sdk/prompt.ts +5 -152
- package/src/sdk/realtimecanvas.ts +9 -305
- package/src/sdk/sdk.ts +0 -29
- package/src/sdk/texture.ts +5 -175
- package/src/sdk/threedmodelassets.ts +5 -171
- package/src/sdk/types/constdatetime.ts +15 -0
- package/src/sdk/types/fp.ts +50 -0
- package/src/sdk/types/index.ts +1 -0
- package/src/sdk/types/operations.ts +81 -7
- package/src/sdk/types/streams.ts +21 -0
- package/src/sdk/user.ts +3 -84
- package/src/sdk/variation.ts +11 -374
package/src/sdk/initimages.ts
CHANGED
|
@@ -2,41 +2,15 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import * as schemas$ from "../lib/schemas.js";
|
|
5
|
+
import { initImagesDeleteInitImageById } from "../funcs/initImagesDeleteInitImageById.js";
|
|
6
|
+
import { initImagesGetInitImageById } from "../funcs/initImagesGetInitImageById.js";
|
|
7
|
+
import { initImagesUploadCanvasInitImage } from "../funcs/initImagesUploadCanvasInitImage.js";
|
|
8
|
+
import { initImagesUploadInitImage } from "../funcs/initImagesUploadInitImage.js";
|
|
10
9
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
10
|
import * as operations from "./models/operations/index.js";
|
|
11
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
12
12
|
|
|
13
13
|
export class InitImages extends ClientSDK {
|
|
14
|
-
private readonly options$: SDKOptions & { hooks?: SDKHooks };
|
|
15
|
-
|
|
16
|
-
constructor(options: SDKOptions = {}) {
|
|
17
|
-
const opt = options as unknown;
|
|
18
|
-
let hooks: SDKHooks;
|
|
19
|
-
if (
|
|
20
|
-
typeof opt === "object" &&
|
|
21
|
-
opt != null &&
|
|
22
|
-
"hooks" in opt &&
|
|
23
|
-
opt.hooks instanceof SDKHooks
|
|
24
|
-
) {
|
|
25
|
-
hooks = opt.hooks;
|
|
26
|
-
} else {
|
|
27
|
-
hooks = new SDKHooks();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
super({
|
|
31
|
-
client: options.httpClient || new HTTPClient(),
|
|
32
|
-
baseURL: serverURLFromOptions(options),
|
|
33
|
-
hooks,
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
this.options$ = { ...options, hooks };
|
|
37
|
-
void this.options$;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
14
|
/**
|
|
41
15
|
* Delete init image
|
|
42
16
|
*
|
|
@@ -47,76 +21,7 @@ export class InitImages extends ClientSDK {
|
|
|
47
21
|
id: string,
|
|
48
22
|
options?: RequestOptions
|
|
49
23
|
): Promise<operations.DeleteInitImageByIdResponse> {
|
|
50
|
-
|
|
51
|
-
id: id,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const payload$ = schemas$.parse(
|
|
55
|
-
input$,
|
|
56
|
-
(value$) => operations.DeleteInitImageByIdRequest$outboundSchema.parse(value$),
|
|
57
|
-
"Input validation failed"
|
|
58
|
-
);
|
|
59
|
-
const body$ = null;
|
|
60
|
-
|
|
61
|
-
const pathParams$ = {
|
|
62
|
-
id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }),
|
|
63
|
-
};
|
|
64
|
-
const path$ = this.templateURLComponent("/init-image/{id}")(pathParams$);
|
|
65
|
-
|
|
66
|
-
const query$ = "";
|
|
67
|
-
|
|
68
|
-
const headers$ = new Headers({
|
|
69
|
-
Accept: "application/json",
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
let security$;
|
|
73
|
-
if (typeof this.options$.bearerAuth === "function") {
|
|
74
|
-
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
75
|
-
} else if (this.options$.bearerAuth) {
|
|
76
|
-
security$ = { bearerAuth: this.options$.bearerAuth };
|
|
77
|
-
} else {
|
|
78
|
-
security$ = {};
|
|
79
|
-
}
|
|
80
|
-
const context = {
|
|
81
|
-
operationID: "deleteInitImageById",
|
|
82
|
-
oAuth2Scopes: [],
|
|
83
|
-
securitySource: this.options$.bearerAuth,
|
|
84
|
-
};
|
|
85
|
-
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
86
|
-
|
|
87
|
-
const request$ = this.createRequest$(
|
|
88
|
-
context,
|
|
89
|
-
{
|
|
90
|
-
security: securitySettings$,
|
|
91
|
-
method: "DELETE",
|
|
92
|
-
path: path$,
|
|
93
|
-
headers: headers$,
|
|
94
|
-
query: query$,
|
|
95
|
-
body: body$,
|
|
96
|
-
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
97
|
-
},
|
|
98
|
-
options
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
const response = await this.do$(request$, {
|
|
102
|
-
context,
|
|
103
|
-
errorCodes: [],
|
|
104
|
-
retryConfig: options?.retries || this.options$.retryConfig,
|
|
105
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
const responseFields$ = {
|
|
109
|
-
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
110
|
-
StatusCode: response.status,
|
|
111
|
-
RawResponse: response,
|
|
112
|
-
Headers: {},
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const [result$] = await this.matcher<operations.DeleteInitImageByIdResponse>()
|
|
116
|
-
.json(200, operations.DeleteInitImageByIdResponse$inboundSchema, { key: "object" })
|
|
117
|
-
.match(response, { extraFields: responseFields$ });
|
|
118
|
-
|
|
119
|
-
return result$;
|
|
24
|
+
return unwrapAsync(initImagesDeleteInitImageById(this, id, options));
|
|
120
25
|
}
|
|
121
26
|
|
|
122
27
|
/**
|
|
@@ -129,76 +34,7 @@ export class InitImages extends ClientSDK {
|
|
|
129
34
|
id: string,
|
|
130
35
|
options?: RequestOptions
|
|
131
36
|
): Promise<operations.GetInitImageByIdResponse> {
|
|
132
|
-
|
|
133
|
-
id: id,
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
const payload$ = schemas$.parse(
|
|
137
|
-
input$,
|
|
138
|
-
(value$) => operations.GetInitImageByIdRequest$outboundSchema.parse(value$),
|
|
139
|
-
"Input validation failed"
|
|
140
|
-
);
|
|
141
|
-
const body$ = null;
|
|
142
|
-
|
|
143
|
-
const pathParams$ = {
|
|
144
|
-
id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }),
|
|
145
|
-
};
|
|
146
|
-
const path$ = this.templateURLComponent("/init-image/{id}")(pathParams$);
|
|
147
|
-
|
|
148
|
-
const query$ = "";
|
|
149
|
-
|
|
150
|
-
const headers$ = new Headers({
|
|
151
|
-
Accept: "application/json",
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
let security$;
|
|
155
|
-
if (typeof this.options$.bearerAuth === "function") {
|
|
156
|
-
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
157
|
-
} else if (this.options$.bearerAuth) {
|
|
158
|
-
security$ = { bearerAuth: this.options$.bearerAuth };
|
|
159
|
-
} else {
|
|
160
|
-
security$ = {};
|
|
161
|
-
}
|
|
162
|
-
const context = {
|
|
163
|
-
operationID: "getInitImageById",
|
|
164
|
-
oAuth2Scopes: [],
|
|
165
|
-
securitySource: this.options$.bearerAuth,
|
|
166
|
-
};
|
|
167
|
-
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
168
|
-
|
|
169
|
-
const request$ = this.createRequest$(
|
|
170
|
-
context,
|
|
171
|
-
{
|
|
172
|
-
security: securitySettings$,
|
|
173
|
-
method: "GET",
|
|
174
|
-
path: path$,
|
|
175
|
-
headers: headers$,
|
|
176
|
-
query: query$,
|
|
177
|
-
body: body$,
|
|
178
|
-
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
179
|
-
},
|
|
180
|
-
options
|
|
181
|
-
);
|
|
182
|
-
|
|
183
|
-
const response = await this.do$(request$, {
|
|
184
|
-
context,
|
|
185
|
-
errorCodes: [],
|
|
186
|
-
retryConfig: options?.retries || this.options$.retryConfig,
|
|
187
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
const responseFields$ = {
|
|
191
|
-
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
192
|
-
StatusCode: response.status,
|
|
193
|
-
RawResponse: response,
|
|
194
|
-
Headers: {},
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
const [result$] = await this.matcher<operations.GetInitImageByIdResponse>()
|
|
198
|
-
.json(200, operations.GetInitImageByIdResponse$inboundSchema, { key: "object" })
|
|
199
|
-
.match(response, { extraFields: responseFields$ });
|
|
200
|
-
|
|
201
|
-
return result$;
|
|
37
|
+
return unwrapAsync(initImagesGetInitImageById(this, id, options));
|
|
202
38
|
}
|
|
203
39
|
|
|
204
40
|
/**
|
|
@@ -211,72 +47,7 @@ export class InitImages extends ClientSDK {
|
|
|
211
47
|
request: operations.UploadCanvasInitImageRequestBody,
|
|
212
48
|
options?: RequestOptions
|
|
213
49
|
): Promise<operations.UploadCanvasInitImageResponse> {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
const payload$ = schemas$.parse(
|
|
217
|
-
input$,
|
|
218
|
-
(value$) => operations.UploadCanvasInitImageRequestBody$outboundSchema.parse(value$),
|
|
219
|
-
"Input validation failed"
|
|
220
|
-
);
|
|
221
|
-
const body$ = encodeJSON$("body", payload$, { explode: true });
|
|
222
|
-
|
|
223
|
-
const path$ = this.templateURLComponent("/canvas-init-image")();
|
|
224
|
-
|
|
225
|
-
const query$ = "";
|
|
226
|
-
|
|
227
|
-
const headers$ = new Headers({
|
|
228
|
-
"Content-Type": "application/json",
|
|
229
|
-
Accept: "application/json",
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
let security$;
|
|
233
|
-
if (typeof this.options$.bearerAuth === "function") {
|
|
234
|
-
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
235
|
-
} else if (this.options$.bearerAuth) {
|
|
236
|
-
security$ = { bearerAuth: this.options$.bearerAuth };
|
|
237
|
-
} else {
|
|
238
|
-
security$ = {};
|
|
239
|
-
}
|
|
240
|
-
const context = {
|
|
241
|
-
operationID: "uploadCanvasInitImage",
|
|
242
|
-
oAuth2Scopes: [],
|
|
243
|
-
securitySource: this.options$.bearerAuth,
|
|
244
|
-
};
|
|
245
|
-
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
246
|
-
|
|
247
|
-
const request$ = this.createRequest$(
|
|
248
|
-
context,
|
|
249
|
-
{
|
|
250
|
-
security: securitySettings$,
|
|
251
|
-
method: "POST",
|
|
252
|
-
path: path$,
|
|
253
|
-
headers: headers$,
|
|
254
|
-
query: query$,
|
|
255
|
-
body: body$,
|
|
256
|
-
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
257
|
-
},
|
|
258
|
-
options
|
|
259
|
-
);
|
|
260
|
-
|
|
261
|
-
const response = await this.do$(request$, {
|
|
262
|
-
context,
|
|
263
|
-
errorCodes: [],
|
|
264
|
-
retryConfig: options?.retries || this.options$.retryConfig,
|
|
265
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
const responseFields$ = {
|
|
269
|
-
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
270
|
-
StatusCode: response.status,
|
|
271
|
-
RawResponse: response,
|
|
272
|
-
Headers: {},
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
const [result$] = await this.matcher<operations.UploadCanvasInitImageResponse>()
|
|
276
|
-
.json(200, operations.UploadCanvasInitImageResponse$inboundSchema, { key: "object" })
|
|
277
|
-
.match(response, { extraFields: responseFields$ });
|
|
278
|
-
|
|
279
|
-
return result$;
|
|
50
|
+
return unwrapAsync(initImagesUploadCanvasInitImage(this, request, options));
|
|
280
51
|
}
|
|
281
52
|
|
|
282
53
|
/**
|
|
@@ -289,71 +60,6 @@ export class InitImages extends ClientSDK {
|
|
|
289
60
|
request: operations.UploadInitImageRequestBody,
|
|
290
61
|
options?: RequestOptions
|
|
291
62
|
): Promise<operations.UploadInitImageResponse> {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
const payload$ = schemas$.parse(
|
|
295
|
-
input$,
|
|
296
|
-
(value$) => operations.UploadInitImageRequestBody$outboundSchema.parse(value$),
|
|
297
|
-
"Input validation failed"
|
|
298
|
-
);
|
|
299
|
-
const body$ = encodeJSON$("body", payload$, { explode: true });
|
|
300
|
-
|
|
301
|
-
const path$ = this.templateURLComponent("/init-image")();
|
|
302
|
-
|
|
303
|
-
const query$ = "";
|
|
304
|
-
|
|
305
|
-
const headers$ = new Headers({
|
|
306
|
-
"Content-Type": "application/json",
|
|
307
|
-
Accept: "application/json",
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
let security$;
|
|
311
|
-
if (typeof this.options$.bearerAuth === "function") {
|
|
312
|
-
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
313
|
-
} else if (this.options$.bearerAuth) {
|
|
314
|
-
security$ = { bearerAuth: this.options$.bearerAuth };
|
|
315
|
-
} else {
|
|
316
|
-
security$ = {};
|
|
317
|
-
}
|
|
318
|
-
const context = {
|
|
319
|
-
operationID: "uploadInitImage",
|
|
320
|
-
oAuth2Scopes: [],
|
|
321
|
-
securitySource: this.options$.bearerAuth,
|
|
322
|
-
};
|
|
323
|
-
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
324
|
-
|
|
325
|
-
const request$ = this.createRequest$(
|
|
326
|
-
context,
|
|
327
|
-
{
|
|
328
|
-
security: securitySettings$,
|
|
329
|
-
method: "POST",
|
|
330
|
-
path: path$,
|
|
331
|
-
headers: headers$,
|
|
332
|
-
query: query$,
|
|
333
|
-
body: body$,
|
|
334
|
-
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
335
|
-
},
|
|
336
|
-
options
|
|
337
|
-
);
|
|
338
|
-
|
|
339
|
-
const response = await this.do$(request$, {
|
|
340
|
-
context,
|
|
341
|
-
errorCodes: [],
|
|
342
|
-
retryConfig: options?.retries || this.options$.retryConfig,
|
|
343
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
344
|
-
});
|
|
345
|
-
|
|
346
|
-
const responseFields$ = {
|
|
347
|
-
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
348
|
-
StatusCode: response.status,
|
|
349
|
-
RawResponse: response,
|
|
350
|
-
Headers: {},
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
const [result$] = await this.matcher<operations.UploadInitImageResponse>()
|
|
354
|
-
.json(200, operations.UploadInitImageResponse$inboundSchema, { key: "object" })
|
|
355
|
-
.match(response, { extraFields: responseFields$ });
|
|
356
|
-
|
|
357
|
-
return result$;
|
|
63
|
+
return unwrapAsync(initImagesUploadInitImage(this, request, options));
|
|
358
64
|
}
|
|
359
65
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Base class for all HTTP errors.
|
|
7
|
+
*/
|
|
8
|
+
export class HTTPClientError extends Error {
|
|
9
|
+
/** The underlying cause of the error. */
|
|
10
|
+
override readonly cause: unknown;
|
|
11
|
+
override name = "HTTPClientError";
|
|
12
|
+
constructor(message: string, opts?: { cause?: unknown }) {
|
|
13
|
+
let msg = message;
|
|
14
|
+
if (opts?.cause) {
|
|
15
|
+
msg += `: ${opts.cause}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
super(msg, opts);
|
|
19
|
+
// In older runtimes, the cause field would not have been assigned through
|
|
20
|
+
// the super() call.
|
|
21
|
+
if (typeof this.cause === "undefined") {
|
|
22
|
+
this.cause = opts?.cause;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
29
|
+
*/
|
|
30
|
+
export class UnexpectedClientError extends HTTPClientError {
|
|
31
|
+
override name = "UnexpectedClientError";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* An error that is raised when any inputs used to create a request are invalid.
|
|
36
|
+
*/
|
|
37
|
+
export class InvalidRequestError extends HTTPClientError {
|
|
38
|
+
override name = "InvalidRequestError";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An error that is raised when a HTTP request was aborted by the client error.
|
|
43
|
+
*/
|
|
44
|
+
export class RequestAbortedError extends HTTPClientError {
|
|
45
|
+
override readonly name = "RequestAbortedError";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
50
|
+
* signal timeout.
|
|
51
|
+
*/
|
|
52
|
+
export class RequestTimeoutError extends HTTPClientError {
|
|
53
|
+
override readonly name = "RequestTimeoutError";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* An error that is raised when a HTTP client is unable to make a request to
|
|
58
|
+
* a server.
|
|
59
|
+
*/
|
|
60
|
+
export class ConnectionError extends HTTPClientError {
|
|
61
|
+
override readonly name = "ConnectionError";
|
|
62
|
+
}
|
|
@@ -10,15 +10,17 @@ export class SDKValidationError extends Error {
|
|
|
10
10
|
*/
|
|
11
11
|
public readonly rawValue: unknown;
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* The raw message that failed validation.
|
|
15
|
+
*/
|
|
16
|
+
public readonly rawMessage: unknown;
|
|
17
|
+
|
|
13
18
|
constructor(message: string, cause: unknown, rawValue: unknown) {
|
|
14
|
-
super(message);
|
|
19
|
+
super(`${message}: ${cause}`);
|
|
15
20
|
this.name = "SDKValidationError";
|
|
16
21
|
this.cause = cause;
|
|
17
22
|
this.rawValue = rawValue;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
public override toString(): string {
|
|
21
|
-
return `${this.message}: ${this.cause}`;
|
|
23
|
+
this.rawMessage = message;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
/**
|
|
@@ -28,7 +30,7 @@ export class SDKValidationError extends Error {
|
|
|
28
30
|
*/
|
|
29
31
|
public pretty(): string {
|
|
30
32
|
if (this.cause instanceof z.ZodError) {
|
|
31
|
-
return `${this.
|
|
33
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
32
34
|
} else {
|
|
33
35
|
return this.toString();
|
|
34
36
|
}
|
|
@@ -56,6 +56,10 @@ export type PricingCalculatorPricingCalculatorObject = {
|
|
|
56
56
|
* Enable to use custom model.
|
|
57
57
|
*/
|
|
58
58
|
isModelCustom?: boolean | null | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Enable to use Phoenix model.
|
|
61
|
+
*/
|
|
62
|
+
isPhoenix?: boolean | null | undefined;
|
|
59
63
|
/**
|
|
60
64
|
* Enable to use SDXL model.
|
|
61
65
|
*/
|
|
@@ -289,6 +293,7 @@ export const PricingCalculatorPricingCalculatorObject$inboundSchema: z.ZodType<
|
|
|
289
293
|
imageWidth: z.number().int().optional(),
|
|
290
294
|
inferenceSteps: z.number().int().optional(),
|
|
291
295
|
isModelCustom: z.nullable(z.boolean()).optional(),
|
|
296
|
+
isPhoenix: z.nullable(z.boolean()).optional(),
|
|
292
297
|
isSDXL: z.nullable(z.boolean()).optional(),
|
|
293
298
|
isSDXLLightning: z.nullable(z.boolean()).optional(),
|
|
294
299
|
loraCount: z.nullable(z.number().int()).optional(),
|
|
@@ -307,6 +312,7 @@ export type PricingCalculatorPricingCalculatorObject$Outbound = {
|
|
|
307
312
|
imageWidth?: number | undefined;
|
|
308
313
|
inferenceSteps?: number | undefined;
|
|
309
314
|
isModelCustom?: boolean | null | undefined;
|
|
315
|
+
isPhoenix?: boolean | null | undefined;
|
|
310
316
|
isSDXL?: boolean | null | undefined;
|
|
311
317
|
isSDXLLightning?: boolean | null | undefined;
|
|
312
318
|
loraCount?: number | null | undefined;
|
|
@@ -329,6 +335,7 @@ export const PricingCalculatorPricingCalculatorObject$outboundSchema: z.ZodType<
|
|
|
329
335
|
imageWidth: z.number().int().optional(),
|
|
330
336
|
inferenceSteps: z.number().int().optional(),
|
|
331
337
|
isModelCustom: z.nullable(z.boolean()).optional(),
|
|
338
|
+
isPhoenix: z.nullable(z.boolean()).optional(),
|
|
332
339
|
isSDXL: z.nullable(z.boolean()).optional(),
|
|
333
340
|
isSDXLLightning: z.nullable(z.boolean()).optional(),
|
|
334
341
|
loraCount: z.nullable(z.number().int()).optional(),
|