diff --git a/.gitignore b/.gitignore index 4327024..87c408c 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/__tests__ /funcs /core.* /esm diff --git a/.npmignore b/.npmignore index 3ef05d1..06cd8ab 100644 --- a/.npmignore +++ b/.npmignore @@ -7,3 +7,4 @@ /cjs /.tshy /.tshy-* +/__tests__ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c3972b5..0671711 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: edadaac9-e645-4ef4-a6c7-a1f73bc19385 management: - docChecksum: 4f2a40193a1ee14be648834f76a40ec4 + docChecksum: 10310c36cca44ad9ea65148525284fda docVersion: v1.0.0 - speakeasyVersion: 1.390.1 - generationVersion: 2.409.0 - releaseVersion: 4.15.0 - configChecksum: b84f01af0008ac1b7a7605a35024c1b6 + speakeasyVersion: 1.400.1 + generationVersion: 2.420.2 + releaseVersion: 4.16.0 + configChecksum: 26a72f3fa5d977cd7e905279006ab1bd repoURL: https://github.com/Leonardo-Interactive/leonardo-ts-sdk.git repoSubDirectory: . installationURL: https://github.com/Leonardo-Interactive/leonardo-ts-sdk @@ -15,10 +15,11 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.11 - core: 3.16.0 + core: 3.17.5 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 devContainers: 2.90.0 + enumUnions: 0.1.0 envVarSecurityUsage: 0.1.1 flattening: 2.81.1 globalSecurity: 2.82.11 @@ -30,271 +31,138 @@ features: retries: 2.83.0 sdkHooks: 0.1.0 generatedFiles: - - src/funcs/initImagesDeleteInitImageById.ts - - src/funcs/initImagesGetInitImageById.ts - - src/funcs/initImagesUploadCanvasInitImage.ts - - src/funcs/initImagesUploadInitImage.ts - - src/funcs/datasetCreateDataset.ts - - src/funcs/datasetDeleteDatasetById.ts - - src/funcs/datasetGetDatasetById.ts - - src/funcs/datasetUploadDatasetImage.ts - - src/funcs/datasetUploadDatasetImageFromGen.ts - - src/funcs/elementsListElements.ts - - src/funcs/imageCreateGeneration.ts - - src/funcs/imageDeleteGenerationById.ts - - src/funcs/imageGetGenerationById.ts - - src/funcs/imageGetGenerationsByUserId.ts - - src/funcs/realtimeCanvasCreateLCMGeneration.ts - - src/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.ts - - src/funcs/realtimeCanvasPerformInpaintingLCM.ts - - src/funcs/realtimeCanvasPerformInstantRefine.ts - - src/funcs/motionCreateSVDMotionGeneration.ts - - src/funcs/textureCreateTextureGeneration.ts - - src/funcs/textureDeleteTextureGenerationById.ts - - src/funcs/userGetUserSelf.ts - - src/funcs/modelsCreateModel.ts - - src/funcs/modelsDeleteModelById.ts - - src/funcs/modelsGetModelById.ts - - src/funcs/modelsListPlatformModels.ts - - src/funcs/threeDModelAssetsDelete3DModelById.ts - - src/funcs/threeDModelAssetsUploadModelAsset.ts - - src/funcs/pricingCalculatorPricingCalculator.ts - - src/funcs/promptPromptImprove.ts - - src/funcs/promptPromptRandom.ts - - src/funcs/variationCreateUniversalUpscalerJob.ts - - src/funcs/variationCreateVariationNoBG.ts - - src/funcs/variationCreateVariationUnzoom.ts - - src/funcs/variationCreateVariationUpscale.ts - - src/funcs/variationGetVariationById.ts - - src/sdk/initimages.ts - - src/sdk/dataset.ts - - src/sdk/elements.ts - - src/sdk/image.ts - - src/sdk/realtimecanvas.ts - - src/sdk/motion.ts - - src/sdk/texture.ts - - src/sdk/user.ts - - src/sdk/models.ts - - src/sdk/threedmodelassets.ts - - src/sdk/pricingcalculator.ts - - src/sdk/prompt.ts - - src/sdk/variation.ts - - src/sdk/sdk.ts + - .devcontainer/README.md + - .devcontainer/devcontainer.json + - .devcontainer/setup.sh - .eslintrc.cjs + - .gitattributes - .npmignore + - CONTRIBUTING.md - FUNCTIONS.md - RUNTIMES.md - - jsr.json - - package.json - - src/core.ts - - src/index.ts - - src/lib/base64.ts - - src/lib/config.ts - - src/lib/dlv.ts - - src/lib/encodings.ts - - src/lib/files.ts - - src/lib/http.ts - - src/lib/is-plain-object.ts - - src/lib/logger.ts - - src/lib/matchers.ts - - src/lib/primitives.ts - - src/lib/retries.ts - - src/lib/schemas.ts - - src/lib/sdks.ts - - src/lib/security.ts - - src/lib/url.ts - - src/sdk/index.ts - - src/sdk/models/errors/httpclienterrors.ts - - src/sdk/models/errors/sdkerror.ts - - src/sdk/models/errors/sdkvalidationerror.ts - - src/sdk/types/blobs.ts - - src/sdk/types/constdatetime.ts - - src/sdk/types/enums.ts - - src/sdk/types/fp.ts - - src/sdk/types/index.ts - - src/sdk/types/operations.ts - - src/sdk/types/rfcdate.ts - - src/sdk/types/streams.ts - - tsconfig.json - - src/sdk/models/operations/deleteinitimagebyid.ts - - src/sdk/models/operations/getinitimagebyid.ts - - src/sdk/models/operations/uploadcanvasinitimage.ts - - src/sdk/models/operations/uploadinitimage.ts - - src/sdk/models/operations/createdataset.ts - - src/sdk/models/operations/deletedatasetbyid.ts - - src/sdk/models/operations/getdatasetbyid.ts - - src/sdk/models/operations/uploaddatasetimage.ts - - src/sdk/models/operations/uploaddatasetimagefromgen.ts - - src/sdk/models/operations/listelements.ts - - src/sdk/models/operations/creategeneration.ts - - src/sdk/models/operations/deletegenerationbyid.ts - - src/sdk/models/operations/getgenerationbyid.ts - - src/sdk/models/operations/getgenerationsbyuserid.ts - - src/sdk/models/operations/createlcmgeneration.ts - - src/sdk/models/operations/performalchemyupscalelcm.ts - - src/sdk/models/operations/performinpaintinglcm.ts - - src/sdk/models/operations/performinstantrefine.ts - - src/sdk/models/operations/createsvdmotiongeneration.ts - - src/sdk/models/operations/createtexturegeneration.ts - - src/sdk/models/operations/deletetexturegenerationbyid.ts - - src/sdk/models/operations/getuserself.ts - - src/sdk/models/operations/createmodel.ts - - src/sdk/models/operations/deletemodelbyid.ts - - src/sdk/models/operations/getmodelbyid.ts - - src/sdk/models/operations/listplatformmodels.ts - - src/sdk/models/operations/delete3dmodelbyid.ts - - src/sdk/models/operations/uploadmodelasset.ts - - src/sdk/models/operations/pricingcalculator.ts - - src/sdk/models/operations/promptimprove.ts - - src/sdk/models/operations/promptrandom.ts - - src/sdk/models/operations/createuniversalupscalerjob.ts - - src/sdk/models/operations/createvariationnobg.ts - - src/sdk/models/operations/createvariationunzoom.ts - - src/sdk/models/operations/createvariationupscale.ts - - src/sdk/models/operations/getvariationbyid.ts - - src/sdk/models/shared/sdversions.ts - - src/sdk/models/shared/sdgenerationschedulers.ts - - src/sdk/models/shared/sdgenerationstyle.ts - - src/sdk/models/shared/elementinput.ts - - src/sdk/models/shared/controlnetinput.ts - - src/sdk/models/shared/controlnettype.ts - - src/sdk/models/shared/canvasrequesttype.ts - - src/sdk/models/shared/jobstatus.ts - - src/sdk/models/shared/variationtype.ts - - src/sdk/models/shared/lcmgenerationstyle.ts - - src/sdk/models/shared/strength.ts - - src/sdk/models/shared/custommodeltype.ts - - src/sdk/models/shared/pricingcalculatorservices.ts - - src/sdk/models/shared/universalupscalerstyle.ts - - src/sdk/models/shared/security.ts - - src/sdk/models/errors/index.ts - - src/sdk/models/operations/index.ts - - src/sdk/models/shared/index.ts - - docs/sdk/models/operations/deleteinitimagebyidrequest.md - - docs/sdk/models/operations/initimages.md - - docs/sdk/models/operations/deleteinitimagebyidresponsebody.md - - docs/sdk/models/operations/deleteinitimagebyidresponse.md - - docs/sdk/models/operations/getinitimagebyidrequest.md - - docs/sdk/models/operations/getinitimagebyidinitimages.md - - docs/sdk/models/operations/getinitimagebyidresponsebody.md - - docs/sdk/models/operations/getinitimagebyidresponse.md - - docs/sdk/models/operations/uploadcanvasinitimagerequestbody.md + - USAGE.md + - docs/lib/utils/retryconfig.md + - docs/sdk/models/operations/calculateproductionapiservicecost.md - docs/sdk/models/operations/canvasinitimageuploadoutput.md - - docs/sdk/models/operations/uploadcanvasinitimageresponsebody.md - - docs/sdk/models/operations/uploadcanvasinitimageresponse.md - - docs/sdk/models/operations/uploadinitimagerequestbody.md - - docs/sdk/models/operations/initimageuploadoutput.md - - docs/sdk/models/operations/uploadinitimageresponsebody.md - - docs/sdk/models/operations/uploadinitimageresponse.md - docs/sdk/models/operations/createdatasetrequestbody.md - - docs/sdk/models/operations/datasets.md - - docs/sdk/models/operations/createdatasetresponsebody.md - docs/sdk/models/operations/createdatasetresponse.md - - docs/sdk/models/operations/deletedatasetbyidrequest.md - - docs/sdk/models/operations/deletedatasetbyiddatasets.md - - docs/sdk/models/operations/deletedatasetbyidresponsebody.md - - docs/sdk/models/operations/deletedatasetbyidresponse.md - - docs/sdk/models/operations/getdatasetbyidrequest.md - - docs/sdk/models/operations/datasetimages.md - - docs/sdk/models/operations/getdatasetbyiddatasets.md - - docs/sdk/models/operations/getdatasetbyidresponsebody.md - - docs/sdk/models/operations/getdatasetbyidresponse.md - - docs/sdk/models/operations/uploaddatasetimagerequestbody.md - - docs/sdk/models/operations/uploaddatasetimagerequest.md - - docs/sdk/models/operations/datasetuploadoutput.md - - docs/sdk/models/operations/uploaddatasetimageresponsebody.md - - docs/sdk/models/operations/uploaddatasetimageresponse.md - - docs/sdk/models/operations/uploaddatasetimagefromgenrequestbody.md - - docs/sdk/models/operations/uploaddatasetimagefromgenrequest.md - - docs/sdk/models/operations/datasetgenuploadoutput.md - - docs/sdk/models/operations/uploaddatasetimagefromgenresponsebody.md - - docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md - - docs/sdk/models/operations/loras.md - - docs/sdk/models/operations/listelementsresponsebody.md - - docs/sdk/models/operations/listelementsresponse.md - - docs/sdk/models/operations/transparencytype.md + - docs/sdk/models/operations/createdatasetresponsebody.md - docs/sdk/models/operations/creategenerationrequestbody.md - - docs/sdk/models/operations/sdgenerationoutput.md - - docs/sdk/models/operations/creategenerationresponsebody.md - docs/sdk/models/operations/creategenerationresponse.md + - docs/sdk/models/operations/creategenerationresponsebody.md + - docs/sdk/models/operations/createlcmgenerationrequestbody.md + - docs/sdk/models/operations/createlcmgenerationresponse.md + - docs/sdk/models/operations/createlcmgenerationresponsebody.md + - docs/sdk/models/operations/createmodelrequestbody.md + - docs/sdk/models/operations/createmodelresponse.md + - docs/sdk/models/operations/createmodelresponsebody.md + - docs/sdk/models/operations/createsvdmotiongenerationrequestbody.md + - docs/sdk/models/operations/createsvdmotiongenerationresponse.md + - docs/sdk/models/operations/createsvdmotiongenerationresponsebody.md + - docs/sdk/models/operations/createtexturegenerationrequestbody.md + - docs/sdk/models/operations/createtexturegenerationresponse.md + - docs/sdk/models/operations/createtexturegenerationresponsebody.md + - docs/sdk/models/operations/createuniversalupscalerjobrequestbody.md + - docs/sdk/models/operations/createuniversalupscalerjobresponse.md + - docs/sdk/models/operations/createuniversalupscalerjobresponsebody.md + - docs/sdk/models/operations/createvariationnobgrequestbody.md + - docs/sdk/models/operations/createvariationnobgresponse.md + - docs/sdk/models/operations/createvariationnobgresponsebody.md + - docs/sdk/models/operations/createvariationunzoomrequestbody.md + - docs/sdk/models/operations/createvariationunzoomresponse.md + - docs/sdk/models/operations/createvariationunzoomresponsebody.md + - docs/sdk/models/operations/createvariationupscalerequestbody.md + - docs/sdk/models/operations/createvariationupscaleresponse.md + - docs/sdk/models/operations/createvariationupscaleresponsebody.md + - docs/sdk/models/operations/createvariationupscalesdupscalejoboutput.md + - docs/sdk/models/operations/custommodels.md + - docs/sdk/models/operations/datasetgenuploadoutput.md + - docs/sdk/models/operations/datasetimages.md + - docs/sdk/models/operations/datasets.md + - docs/sdk/models/operations/datasetuploadoutput.md + - docs/sdk/models/operations/delete3dmodelbyidrequest.md + - docs/sdk/models/operations/delete3dmodelbyidrequestbody.md + - docs/sdk/models/operations/delete3dmodelbyidresponse.md + - docs/sdk/models/operations/delete3dmodelbyidresponsebody.md + - docs/sdk/models/operations/deletedatasetbyiddatasets.md + - docs/sdk/models/operations/deletedatasetbyidrequest.md + - docs/sdk/models/operations/deletedatasetbyidresponse.md + - docs/sdk/models/operations/deletedatasetbyidresponsebody.md - docs/sdk/models/operations/deletegenerationbyidrequest.md - - docs/sdk/models/operations/generations.md - - docs/sdk/models/operations/deletegenerationbyidresponsebody.md - docs/sdk/models/operations/deletegenerationbyidresponse.md - - docs/sdk/models/operations/getgenerationbyidrequest.md - - docs/sdk/models/operations/getgenerationbyidgeneratedimagevariationgeneric.md + - docs/sdk/models/operations/deletegenerationbyidresponsebody.md + - docs/sdk/models/operations/deleteinitimagebyidrequest.md + - docs/sdk/models/operations/deleteinitimagebyidresponse.md + - docs/sdk/models/operations/deleteinitimagebyidresponsebody.md + - docs/sdk/models/operations/deletemodelbyidrequest.md + - docs/sdk/models/operations/deletemodelbyidresponse.md + - docs/sdk/models/operations/deletemodelbyidresponsebody.md + - docs/sdk/models/operations/deletetexturegenerationbyidrequest.md + - docs/sdk/models/operations/deletetexturegenerationbyidrequestbody.md + - docs/sdk/models/operations/deletetexturegenerationbyidresponse.md + - docs/sdk/models/operations/deletetexturegenerationbyidresponsebody.md + - docs/sdk/models/operations/elements.md - docs/sdk/models/operations/generatedimages.md - - docs/sdk/models/operations/getgenerationbyidloras.md + - docs/sdk/models/operations/generatedimagevariationgeneric.md - docs/sdk/models/operations/generationelements.md + - docs/sdk/models/operations/generations.md + - docs/sdk/models/operations/getdatasetbyiddatasets.md + - docs/sdk/models/operations/getdatasetbyidrequest.md + - docs/sdk/models/operations/getdatasetbyidresponse.md + - docs/sdk/models/operations/getdatasetbyidresponsebody.md + - docs/sdk/models/operations/getgenerationbyidgeneratedimagevariationgeneric.md - docs/sdk/models/operations/getgenerationbyidgenerations.md - - docs/sdk/models/operations/getgenerationbyidresponsebody.md + - docs/sdk/models/operations/getgenerationbyidloras.md + - docs/sdk/models/operations/getgenerationbyidrequest.md - docs/sdk/models/operations/getgenerationbyidresponse.md - - docs/sdk/models/operations/getgenerationsbyuseridrequest.md - - docs/sdk/models/operations/getgenerationsbyuseridgeneratedimagevariationgeneric.md + - docs/sdk/models/operations/getgenerationbyidresponsebody.md - docs/sdk/models/operations/getgenerationsbyuseridgeneratedimages.md - - docs/sdk/models/operations/elements.md + - docs/sdk/models/operations/getgenerationsbyuseridgeneratedimagevariationgeneric.md - docs/sdk/models/operations/getgenerationsbyuseridgenerationelements.md - docs/sdk/models/operations/getgenerationsbyuseridgenerations.md - - docs/sdk/models/operations/getgenerationsbyuseridresponsebody.md + - docs/sdk/models/operations/getgenerationsbyuseridrequest.md - docs/sdk/models/operations/getgenerationsbyuseridresponse.md - - docs/sdk/models/operations/createlcmgenerationrequestbody.md - - docs/sdk/models/operations/lcmgenerationoutput.md - - docs/sdk/models/operations/createlcmgenerationresponsebody.md - - docs/sdk/models/operations/createlcmgenerationresponse.md - - docs/sdk/models/operations/performalchemyupscalelcmrequestbody.md - - docs/sdk/models/operations/performalchemyupscalelcmlcmgenerationoutput.md - - docs/sdk/models/operations/performalchemyupscalelcmresponsebody.md - - docs/sdk/models/operations/performalchemyupscalelcmresponse.md - - docs/sdk/models/operations/performinpaintinglcmrequestbody.md - - docs/sdk/models/operations/performinpaintinglcmlcmgenerationoutput.md - - docs/sdk/models/operations/performinpaintinglcmresponsebody.md - - docs/sdk/models/operations/performinpaintinglcmresponse.md - - docs/sdk/models/operations/performinstantrefinerequestbody.md - - docs/sdk/models/operations/performinstantrefinelcmgenerationoutput.md - - docs/sdk/models/operations/performinstantrefineresponsebody.md - - docs/sdk/models/operations/performinstantrefineresponse.md - - docs/sdk/models/operations/createsvdmotiongenerationrequestbody.md - - docs/sdk/models/operations/motionsvdgenerationoutput.md - - docs/sdk/models/operations/createsvdmotiongenerationresponsebody.md - - docs/sdk/models/operations/createsvdmotiongenerationresponse.md - - docs/sdk/models/operations/createtexturegenerationrequestbody.md - - docs/sdk/models/operations/texturegenerationjoboutput.md - - docs/sdk/models/operations/createtexturegenerationresponsebody.md - - docs/sdk/models/operations/createtexturegenerationresponse.md - - docs/sdk/models/operations/deletetexturegenerationbyidrequestbody.md - - docs/sdk/models/operations/deletetexturegenerationbyidrequest.md - - docs/sdk/models/operations/modelassettexturegenerations.md - - docs/sdk/models/operations/deletetexturegenerationbyidresponsebody.md - - docs/sdk/models/operations/deletetexturegenerationbyidresponse.md - - docs/sdk/models/operations/users.md - - docs/sdk/models/operations/userdetails.md - - docs/sdk/models/operations/getuserselfresponsebody.md - - docs/sdk/models/operations/getuserselfresponse.md - - docs/sdk/models/operations/createmodelrequestbody.md - - docs/sdk/models/operations/sdtrainingoutput.md - - docs/sdk/models/operations/createmodelresponsebody.md - - docs/sdk/models/operations/createmodelresponse.md - - docs/sdk/models/operations/deletemodelbyidrequest.md - - docs/sdk/models/operations/custommodels.md - - docs/sdk/models/operations/deletemodelbyidresponsebody.md - - docs/sdk/models/operations/deletemodelbyidresponse.md - - docs/sdk/models/operations/getmodelbyidrequest.md + - docs/sdk/models/operations/getgenerationsbyuseridresponsebody.md + - docs/sdk/models/operations/getinitimagebyidinitimages.md + - docs/sdk/models/operations/getinitimagebyidrequest.md + - docs/sdk/models/operations/getinitimagebyidresponse.md + - docs/sdk/models/operations/getinitimagebyidresponsebody.md - docs/sdk/models/operations/getmodelbyidcustommodels.md - - docs/sdk/models/operations/getmodelbyidresponsebody.md + - docs/sdk/models/operations/getmodelbyidrequest.md - docs/sdk/models/operations/getmodelbyidresponse.md - - docs/sdk/models/operations/listplatformmodelsgeneratedimages.md + - docs/sdk/models/operations/getmodelbyidresponsebody.md + - docs/sdk/models/operations/getuserselfresponse.md + - docs/sdk/models/operations/getuserselfresponsebody.md + - docs/sdk/models/operations/getvariationbyidrequest.md + - docs/sdk/models/operations/getvariationbyidresponse.md + - docs/sdk/models/operations/getvariationbyidresponsebody.md + - docs/sdk/models/operations/initimages.md + - docs/sdk/models/operations/initimageuploadoutput.md + - docs/sdk/models/operations/lcmgenerationoutput.md + - docs/sdk/models/operations/listelementsresponse.md + - docs/sdk/models/operations/listelementsresponsebody.md - docs/sdk/models/operations/listplatformmodelscustommodels.md - - docs/sdk/models/operations/listplatformmodelsresponsebody.md + - docs/sdk/models/operations/listplatformmodelsgeneratedimages.md - docs/sdk/models/operations/listplatformmodelsresponse.md - - docs/sdk/models/operations/delete3dmodelbyidrequestbody.md - - docs/sdk/models/operations/delete3dmodelbyidrequest.md + - docs/sdk/models/operations/listplatformmodelsresponsebody.md + - docs/sdk/models/operations/loras.md - docs/sdk/models/operations/modelassets.md - - docs/sdk/models/operations/delete3dmodelbyidresponsebody.md - - docs/sdk/models/operations/delete3dmodelbyidresponse.md - - docs/sdk/models/operations/uploadmodelassetrequestbody.md + - docs/sdk/models/operations/modelassettexturegenerations.md - docs/sdk/models/operations/modelassetuploadoutput.md - - docs/sdk/models/operations/uploadmodelassetresponsebody.md - - docs/sdk/models/operations/uploadmodelassetresponse.md + - docs/sdk/models/operations/motionsvdgenerationoutput.md + - docs/sdk/models/operations/objectt.md + - docs/sdk/models/operations/performalchemyupscalelcmlcmgenerationoutput.md + - docs/sdk/models/operations/performalchemyupscalelcmrequestbody.md + - docs/sdk/models/operations/performalchemyupscalelcmresponse.md + - docs/sdk/models/operations/performalchemyupscalelcmresponsebody.md + - docs/sdk/models/operations/performinpaintinglcmlcmgenerationoutput.md + - docs/sdk/models/operations/performinpaintinglcmrequestbody.md + - docs/sdk/models/operations/performinpaintinglcmresponse.md + - docs/sdk/models/operations/performinpaintinglcmresponsebody.md + - docs/sdk/models/operations/performinstantrefinelcmgenerationoutput.md + - docs/sdk/models/operations/performinstantrefinerequestbody.md + - docs/sdk/models/operations/performinstantrefineresponse.md + - docs/sdk/models/operations/performinstantrefineresponsebody.md - docs/sdk/models/operations/pricingcalculatorobject.md - docs/sdk/models/operations/pricingcalculatorpricingcalculatorobject.md - docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestobject.md @@ -302,76 +170,344 @@ generatedFiles: - docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsobject.md - docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamstexturegenerationobject.md - docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerobject.md - - docs/sdk/models/operations/objectt.md + - docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerultraobject.md - docs/sdk/models/operations/pricingcalculatorrequestbody.md - - docs/sdk/models/operations/calculateproductionapiservicecost.md - - docs/sdk/models/operations/pricingcalculatorresponsebody.md - docs/sdk/models/operations/pricingcalculatorresponse.md - - docs/sdk/models/operations/promptimproverequestbody.md + - docs/sdk/models/operations/pricingcalculatorresponsebody.md - docs/sdk/models/operations/promptgenerationoutput.md - - docs/sdk/models/operations/promptimproveresponsebody.md + - docs/sdk/models/operations/promptimproverequestbody.md - docs/sdk/models/operations/promptimproveresponse.md + - docs/sdk/models/operations/promptimproveresponsebody.md - docs/sdk/models/operations/promptrandompromptgenerationoutput.md - - docs/sdk/models/operations/promptrandomresponsebody.md - docs/sdk/models/operations/promptrandomresponse.md - - docs/sdk/models/operations/createuniversalupscalerjobrequestbody.md - - docs/sdk/models/operations/universalupscaleroutput.md - - docs/sdk/models/operations/createuniversalupscalerjobresponsebody.md - - docs/sdk/models/operations/createuniversalupscalerjobresponse.md - - docs/sdk/models/operations/createvariationnobgrequestbody.md - - docs/sdk/models/operations/sdupscalejoboutput.md - - docs/sdk/models/operations/createvariationnobgresponsebody.md - - docs/sdk/models/operations/createvariationnobgresponse.md - - docs/sdk/models/operations/createvariationunzoomrequestbody.md + - docs/sdk/models/operations/promptrandomresponsebody.md + - docs/sdk/models/operations/sdgenerationoutput.md + - docs/sdk/models/operations/sdtrainingoutput.md - docs/sdk/models/operations/sdunzoomoutput.md - - docs/sdk/models/operations/createvariationunzoomresponsebody.md - - docs/sdk/models/operations/createvariationunzoomresponse.md - - docs/sdk/models/operations/createvariationupscalerequestbody.md - - docs/sdk/models/operations/createvariationupscalesdupscalejoboutput.md - - docs/sdk/models/operations/createvariationupscaleresponsebody.md - - docs/sdk/models/operations/createvariationupscaleresponse.md - - docs/sdk/models/operations/getvariationbyidrequest.md - - docs/sdk/models/operations/generatedimagevariationgeneric.md - - docs/sdk/models/operations/getvariationbyidresponsebody.md - - docs/sdk/models/operations/getvariationbyidresponse.md - - docs/sdk/models/shared/sdversions.md - - docs/sdk/models/shared/sdgenerationschedulers.md - - docs/sdk/models/shared/sdgenerationstyle.md - - docs/sdk/models/shared/elementinput.md - - docs/sdk/models/shared/initimagetype.md - - docs/sdk/models/shared/strengthtype.md + - docs/sdk/models/operations/sdupscalejoboutput.md + - docs/sdk/models/operations/texturegenerationjoboutput.md + - docs/sdk/models/operations/transparencytype.md + - docs/sdk/models/operations/universalupscaleroutput.md + - docs/sdk/models/operations/uploadcanvasinitimagerequestbody.md + - docs/sdk/models/operations/uploadcanvasinitimageresponse.md + - docs/sdk/models/operations/uploadcanvasinitimageresponsebody.md + - docs/sdk/models/operations/uploaddatasetimagefromgenrequest.md + - docs/sdk/models/operations/uploaddatasetimagefromgenrequestbody.md + - docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md + - docs/sdk/models/operations/uploaddatasetimagefromgenresponsebody.md + - docs/sdk/models/operations/uploaddatasetimagerequest.md + - docs/sdk/models/operations/uploaddatasetimagerequestbody.md + - docs/sdk/models/operations/uploaddatasetimageresponse.md + - docs/sdk/models/operations/uploaddatasetimageresponsebody.md + - docs/sdk/models/operations/uploadinitimagerequestbody.md + - docs/sdk/models/operations/uploadinitimageresponse.md + - docs/sdk/models/operations/uploadinitimageresponsebody.md + - docs/sdk/models/operations/uploadmodelassetrequestbody.md + - docs/sdk/models/operations/uploadmodelassetresponse.md + - docs/sdk/models/operations/uploadmodelassetresponsebody.md + - docs/sdk/models/operations/userdetails.md + - docs/sdk/models/operations/users.md + - docs/sdk/models/shared/canvasrequesttype.md - docs/sdk/models/shared/controlnetinput.md - docs/sdk/models/shared/controlnettype.md - - docs/sdk/models/shared/canvasrequesttype.md + - docs/sdk/models/shared/custommodeltype.md + - docs/sdk/models/shared/elementinput.md + - docs/sdk/models/shared/initimagetype.md - docs/sdk/models/shared/jobstatus.md - - docs/sdk/models/shared/variationtype.md - docs/sdk/models/shared/lcmgenerationstyle.md - - docs/sdk/models/shared/strength.md - - docs/sdk/models/shared/custommodeltype.md - docs/sdk/models/shared/pricingcalculatorservices.md - - docs/sdk/models/shared/universalupscalerstyle.md + - docs/sdk/models/shared/sdgenerationschedulers.md + - docs/sdk/models/shared/sdgenerationstyle.md + - docs/sdk/models/shared/sdversions.md - docs/sdk/models/shared/security.md - - docs/sdks/leonardo/README.md - - docs/lib/utils/retryconfig.md - - docs/sdks/initimages/README.md + - docs/sdk/models/shared/strength.md + - docs/sdk/models/shared/strengthtype.md + - docs/sdk/models/shared/universalupscalerstyle.md + - docs/sdk/models/shared/universalupscalerultrastyle.md + - docs/sdk/models/shared/variationtype.md - docs/sdks/dataset/README.md - docs/sdks/elements/README.md - docs/sdks/image/README.md - - docs/sdks/realtimecanvas/README.md - - docs/sdks/motion/README.md - - docs/sdks/texture/README.md - - docs/sdks/user/README.md + - docs/sdks/initimages/README.md + - docs/sdks/leonardo/README.md - docs/sdks/models/README.md - - docs/sdks/threedmodelassets/README.md + - docs/sdks/motion/README.md - docs/sdks/pricingcalculator/README.md - docs/sdks/prompt/README.md + - docs/sdks/realtimecanvas/README.md + - docs/sdks/texture/README.md + - docs/sdks/threedmodelassets/README.md + - docs/sdks/user/README.md - docs/sdks/variation/README.md - - USAGE.md - - .gitattributes - - .devcontainer/README.md - - .devcontainer/devcontainer.json - - .devcontainer/setup.sh + - jsr.json + - package.json + - src/core.ts + - src/funcs/datasetCreateDataset.ts + - src/funcs/datasetDeleteDatasetById.ts + - src/funcs/datasetGetDatasetById.ts + - src/funcs/datasetUploadDatasetImage.ts + - src/funcs/datasetUploadDatasetImageFromGen.ts + - src/funcs/elementsListElements.ts + - src/funcs/imageCreateGeneration.ts + - src/funcs/imageDeleteGenerationById.ts + - src/funcs/imageGetGenerationById.ts + - src/funcs/imageGetGenerationsByUserId.ts + - src/funcs/initImagesDeleteInitImageById.ts + - src/funcs/initImagesGetInitImageById.ts + - src/funcs/initImagesUploadCanvasInitImage.ts + - src/funcs/initImagesUploadInitImage.ts + - src/funcs/modelsCreateModel.ts + - src/funcs/modelsDeleteModelById.ts + - src/funcs/modelsGetModelById.ts + - src/funcs/modelsListPlatformModels.ts + - src/funcs/motionCreateSVDMotionGeneration.ts + - src/funcs/pricingCalculatorPricingCalculator.ts + - src/funcs/promptPromptImprove.ts + - src/funcs/promptPromptRandom.ts + - src/funcs/realtimeCanvasCreateLCMGeneration.ts + - src/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.ts + - src/funcs/realtimeCanvasPerformInpaintingLCM.ts + - src/funcs/realtimeCanvasPerformInstantRefine.ts + - src/funcs/textureCreateTextureGeneration.ts + - src/funcs/textureDeleteTextureGenerationById.ts + - src/funcs/threeDModelAssetsDelete3DModelById.ts + - src/funcs/threeDModelAssetsUploadModelAsset.ts + - src/funcs/userGetUserSelf.ts + - src/funcs/variationCreateUniversalUpscalerJob.ts + - src/funcs/variationCreateVariationNoBG.ts + - src/funcs/variationCreateVariationUnzoom.ts + - src/funcs/variationCreateVariationUpscale.ts + - src/funcs/variationGetVariationById.ts - src/hooks/hooks.ts - - src/hooks/types.ts - src/hooks/index.ts - - CONTRIBUTING.md + - src/hooks/types.ts + - src/index.ts + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/dlv.ts + - src/lib/encodings.ts + - src/lib/files.ts + - src/lib/http.ts + - src/lib/is-plain-object.ts + - src/lib/logger.ts + - src/lib/matchers.ts + - src/lib/primitives.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/sdk/dataset.ts + - src/sdk/elements.ts + - src/sdk/image.ts + - src/sdk/index.ts + - src/sdk/initimages.ts + - src/sdk/models.ts + - src/sdk/models/errors/httpclienterrors.ts + - src/sdk/models/errors/index.ts + - src/sdk/models/errors/sdkerror.ts + - src/sdk/models/errors/sdkvalidationerror.ts + - src/sdk/models/operations/createdataset.ts + - src/sdk/models/operations/creategeneration.ts + - src/sdk/models/operations/createlcmgeneration.ts + - src/sdk/models/operations/createmodel.ts + - src/sdk/models/operations/createsvdmotiongeneration.ts + - src/sdk/models/operations/createtexturegeneration.ts + - src/sdk/models/operations/createuniversalupscalerjob.ts + - src/sdk/models/operations/createvariationnobg.ts + - src/sdk/models/operations/createvariationunzoom.ts + - src/sdk/models/operations/createvariationupscale.ts + - src/sdk/models/operations/delete3dmodelbyid.ts + - src/sdk/models/operations/deletedatasetbyid.ts + - src/sdk/models/operations/deletegenerationbyid.ts + - src/sdk/models/operations/deleteinitimagebyid.ts + - src/sdk/models/operations/deletemodelbyid.ts + - src/sdk/models/operations/deletetexturegenerationbyid.ts + - src/sdk/models/operations/getdatasetbyid.ts + - src/sdk/models/operations/getgenerationbyid.ts + - src/sdk/models/operations/getgenerationsbyuserid.ts + - src/sdk/models/operations/getinitimagebyid.ts + - src/sdk/models/operations/getmodelbyid.ts + - src/sdk/models/operations/getuserself.ts + - src/sdk/models/operations/getvariationbyid.ts + - src/sdk/models/operations/index.ts + - src/sdk/models/operations/listelements.ts + - src/sdk/models/operations/listplatformmodels.ts + - src/sdk/models/operations/performalchemyupscalelcm.ts + - src/sdk/models/operations/performinpaintinglcm.ts + - src/sdk/models/operations/performinstantrefine.ts + - src/sdk/models/operations/pricingcalculator.ts + - src/sdk/models/operations/promptimprove.ts + - src/sdk/models/operations/promptrandom.ts + - src/sdk/models/operations/uploadcanvasinitimage.ts + - src/sdk/models/operations/uploaddatasetimage.ts + - src/sdk/models/operations/uploaddatasetimagefromgen.ts + - src/sdk/models/operations/uploadinitimage.ts + - src/sdk/models/operations/uploadmodelasset.ts + - src/sdk/models/shared/canvasrequesttype.ts + - src/sdk/models/shared/controlnetinput.ts + - src/sdk/models/shared/controlnettype.ts + - src/sdk/models/shared/custommodeltype.ts + - src/sdk/models/shared/elementinput.ts + - src/sdk/models/shared/index.ts + - src/sdk/models/shared/jobstatus.ts + - src/sdk/models/shared/lcmgenerationstyle.ts + - src/sdk/models/shared/pricingcalculatorservices.ts + - src/sdk/models/shared/sdgenerationschedulers.ts + - src/sdk/models/shared/sdgenerationstyle.ts + - src/sdk/models/shared/sdversions.ts + - src/sdk/models/shared/security.ts + - src/sdk/models/shared/strength.ts + - src/sdk/models/shared/universalupscalerstyle.ts + - src/sdk/models/shared/universalupscalerultrastyle.ts + - src/sdk/models/shared/variationtype.ts + - src/sdk/motion.ts + - src/sdk/pricingcalculator.ts + - src/sdk/prompt.ts + - src/sdk/realtimecanvas.ts + - src/sdk/sdk.ts + - src/sdk/texture.ts + - src/sdk/threedmodelassets.ts + - src/sdk/types/blobs.ts + - src/sdk/types/constdatetime.ts + - src/sdk/types/enums.ts + - src/sdk/types/fp.ts + - src/sdk/types/index.ts + - src/sdk/types/operations.ts + - src/sdk/types/rfcdate.ts + - src/sdk/types/streams.ts + - src/sdk/user.ts + - src/sdk/variation.ts + - tsconfig.json +examples: + deleteInitImageById: + speakeasy-default-delete-init-image-by-id: + parameters: + path: + id: "" + getInitImageById: + speakeasy-default-get-init-image-by-id: + parameters: + path: + id: "" + uploadCanvasInitImage: + speakeasy-default-upload-canvas-init-image: + requestBody: + application/json: {"initExtension": "", "maskExtension": ""} + uploadInitImage: + speakeasy-default-upload-init-image: + requestBody: + application/json: {"extension": "png"} + createDataset: + speakeasy-default-create-dataset: + requestBody: + application/json: {"name": ""} + deleteDatasetById: + speakeasy-default-delete-dataset-by-id: + parameters: + path: + id: "" + getDatasetById: + speakeasy-default-get-dataset-by-id: + parameters: + path: + id: "" + uploadDatasetImage: + speakeasy-default-upload-dataset-image: + parameters: + path: + datasetId: "" + requestBody: + application/json: {"extension": "mpg4"} + uploadDatasetImageFromGen: + speakeasy-default-upload-dataset-image-from-gen: + parameters: + path: + datasetId: "" + requestBody: + application/json: {"generatedImageId": ""} + listElements: + speakeasy-default-list-elements: {} + createGeneration: + speakeasy-default-create-generation: {} + deleteGenerationById: + speakeasy-default-delete-generation-by-id: + parameters: + path: + id: "" + getGenerationById: + speakeasy-default-get-generation-by-id: + parameters: + path: + id: "" + getGenerationsByUserId: + speakeasy-default-get-generations-by-user-id: + parameters: + path: + userId: "" + query: {} + createLCMGeneration: + speakeasy-default-create-LCM-generation: {} + performAlchemyUpscaleLCM: + speakeasy-default-perform-alchemy-upscale-LCM: {} + performInpaintingLCM: + speakeasy-default-perform-inpainting-LCM: {} + performInstantRefine: + speakeasy-default-perform-instant-refine: {} + createSVDMotionGeneration: + speakeasy-default-create-SVD-motion-generation: {} + createTextureGeneration: + speakeasy-default-create-texture-generation: {} + deleteTextureGenerationById: + speakeasy-default-delete-texture-generation-by-id: + parameters: + path: + id: "" + getUserSelf: + speakeasy-default-get-user-self: {} + createModel: + speakeasy-default-create-model: + requestBody: + application/json: {"datasetId": "", "instance_prompt": "", "name": ""} + deleteModelById: + speakeasy-default-delete-model-by-id: + parameters: + path: + id: "" + getModelById: + speakeasy-default-get-model-by-id: + parameters: + path: + id: "" + listPlatformModels: + speakeasy-default-list-platform-models: {} + delete3DModelById: + speakeasy-default-delete3-D-model-by-id: + parameters: + path: + id: "" + uploadModelAsset: + speakeasy-default-upload-model-asset: {} + pricingCalculator: + speakeasy-default-pricing-calculator: {} + promptImprove: + speakeasy-default-prompt-improve: + requestBody: + application/json: {"prompt": ""} + promptRandom: + speakeasy-default-prompt-random: {} + CreateUniversalUpscalerJob: + speakeasy-default-create-universal-upscaler-job: {} + createVariationNoBG: + speakeasy-default-create-variation-no-BG: + requestBody: + application/json: {"id": ""} + createVariationUnzoom: + speakeasy-default-create-variation-unzoom: {} + createVariationUpscale: + speakeasy-default-create-variation-upscale: {} + getVariationById: + speakeasy-default-get-variation-by-id: + parameters: + path: + id: "" diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ee72e3b..6469208 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.390.1 +speakeasyVersion: 1.400.1 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:68e860e0700bdd24e58887950df28e1cd3e479f87591681c86693ca856b68d91 - sourceBlobDigest: sha256:7795ce93c2cd2bed48f77a05eead55d73ce1d93227c230ae806913736ad38d19 + sourceRevisionDigest: sha256:10952aeb2e058c7510384583df32fa9c234f4ed3c747b21dccc7739bf0611c54 + sourceBlobDigest: sha256:e7afecf93b03aba9f1c49b6db4b19ed1ae9f965bf4309cc2e5066f11d783eb16 tags: - latest - main @@ -11,9 +11,8 @@ targets: leonardo-ts-sdk: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:68e860e0700bdd24e58887950df28e1cd3e479f87591681c86693ca856b68d91 - sourceBlobDigest: sha256:7795ce93c2cd2bed48f77a05eead55d73ce1d93227c230ae806913736ad38d19 - outLocation: ./ + sourceRevisionDigest: sha256:10952aeb2e058c7510384583df32fa9c234f4ed3c747b21dccc7739bf0611c54 + sourceBlobDigest: sha256:e7afecf93b03aba9f1c49b6db4b19ed1ae9f965bf4309cc2e5066f11d783eb16 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 3bb6b74..bf78523 100755 --- a/README.md +++ b/README.md @@ -75,14 +75,14 @@ To get access to the API and fetch an API key, please sign up for [access](https import { Leonardo } from "@leonardo-ai/sdk"; const leonardo = new Leonardo({ - bearerAuth: "", + bearerAuth: "", }); async function run() { - const result = await leonardo.initImages.deleteInitImageById(""); + const result = await leonardo.initImages.deleteInitImageById(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -93,12 +93,8 @@ run(); ## Available Resources and Operations -### [initImages](docs/sdks/initimages/README.md) - -* [deleteInitImageById](docs/sdks/initimages/README.md#deleteinitimagebyid) - Delete init image -* [getInitImageById](docs/sdks/initimages/README.md#getinitimagebyid) - Get single init image -* [uploadCanvasInitImage](docs/sdks/initimages/README.md#uploadcanvasinitimage) - Upload Canvas Editor init and mask image -* [uploadInitImage](docs/sdks/initimages/README.md#uploadinitimage) - Upload init image +
+Available methods ### [dataset](docs/sdks/dataset/README.md) @@ -119,25 +115,13 @@ run(); * [getGenerationById](docs/sdks/image/README.md#getgenerationbyid) - Get a Single Generation * [getGenerationsByUserId](docs/sdks/image/README.md#getgenerationsbyuserid) - Get generations by user ID -### [realtimeCanvas](docs/sdks/realtimecanvas/README.md) - -* [createLCMGeneration](docs/sdks/realtimecanvas/README.md#createlcmgeneration) - Create LCM Generation -* [performAlchemyUpscaleLCM](docs/sdks/realtimecanvas/README.md#performalchemyupscalelcm) - Perform Alchemy Upscale on a LCM image -* [performInpaintingLCM](docs/sdks/realtimecanvas/README.md#performinpaintinglcm) - Perform inpainting on a LCM image -* [performInstantRefine](docs/sdks/realtimecanvas/README.md#performinstantrefine) - Perform instant refine on a LCM image - -### [motion](docs/sdks/motion/README.md) - -* [createSVDMotionGeneration](docs/sdks/motion/README.md#createsvdmotiongeneration) - Create SVD Motion Generation - -### [texture](docs/sdks/texture/README.md) - -* [createTextureGeneration](docs/sdks/texture/README.md#createtexturegeneration) - Create Texture Generation -* [deleteTextureGenerationById](docs/sdks/texture/README.md#deletetexturegenerationbyid) - Delete Texture Generation by ID +### [initImages](docs/sdks/initimages/README.md) -### [user](docs/sdks/user/README.md) +* [deleteInitImageById](docs/sdks/initimages/README.md#deleteinitimagebyid) - Delete init image +* [getInitImageById](docs/sdks/initimages/README.md#getinitimagebyid) - Get single init image +* [uploadCanvasInitImage](docs/sdks/initimages/README.md#uploadcanvasinitimage) - Upload Canvas Editor init and mask image +* [uploadInitImage](docs/sdks/initimages/README.md#uploadinitimage) - Upload init image -* [getUserSelf](docs/sdks/user/README.md#getuserself) - Get user information ### [models](docs/sdks/models/README.md) @@ -146,10 +130,9 @@ run(); * [getModelById](docs/sdks/models/README.md#getmodelbyid) - Get a Single Custom Model by ID * [listPlatformModels](docs/sdks/models/README.md#listplatformmodels) - List Platform Models -### [threeDModelAssets](docs/sdks/threedmodelassets/README.md) +### [motion](docs/sdks/motion/README.md) -* [delete3DModelById](docs/sdks/threedmodelassets/README.md#delete3dmodelbyid) - Delete 3D Model by ID -* [uploadModelAsset](docs/sdks/threedmodelassets/README.md#uploadmodelasset) - Upload 3D Model +* [createSVDMotionGeneration](docs/sdks/motion/README.md#createsvdmotiongeneration) - Create SVD Motion Generation ### [pricingCalculator](docs/sdks/pricingcalculator/README.md) @@ -160,6 +143,27 @@ run(); * [promptImprove](docs/sdks/prompt/README.md#promptimprove) - Improve a Prompt * [promptRandom](docs/sdks/prompt/README.md#promptrandom) - Generate a Random prompt +### [realtimeCanvas](docs/sdks/realtimecanvas/README.md) + +* [createLCMGeneration](docs/sdks/realtimecanvas/README.md#createlcmgeneration) - Create LCM Generation +* [performAlchemyUpscaleLCM](docs/sdks/realtimecanvas/README.md#performalchemyupscalelcm) - Perform Alchemy Upscale on a LCM image +* [performInpaintingLCM](docs/sdks/realtimecanvas/README.md#performinpaintinglcm) - Perform inpainting on a LCM image +* [performInstantRefine](docs/sdks/realtimecanvas/README.md#performinstantrefine) - Perform instant refine on a LCM image + +### [texture](docs/sdks/texture/README.md) + +* [createTextureGeneration](docs/sdks/texture/README.md#createtexturegeneration) - Create Texture Generation +* [deleteTextureGenerationById](docs/sdks/texture/README.md#deletetexturegenerationbyid) - Delete Texture Generation by ID + +### [threeDModelAssets](docs/sdks/threedmodelassets/README.md) + +* [delete3DModelById](docs/sdks/threedmodelassets/README.md#delete3dmodelbyid) - Delete 3D Model by ID +* [uploadModelAsset](docs/sdks/threedmodelassets/README.md#uploadmodelasset) - Upload 3D Model + +### [user](docs/sdks/user/README.md) + +* [getUserSelf](docs/sdks/user/README.md#getuserself) - Get user information + ### [variation](docs/sdks/variation/README.md) * [createUniversalUpscalerJob](docs/sdks/variation/README.md#createuniversalupscalerjob) - Create using Universal Upscaler @@ -167,6 +171,8 @@ run(); * [createVariationUnzoom](docs/sdks/variation/README.md#createvariationunzoom) - Create unzoom * [createVariationUpscale](docs/sdks/variation/README.md#createvariationupscale) - Create upscale * [getVariationById](docs/sdks/variation/README.md#getvariationbyid) - Get variation by ID + +
@@ -192,30 +198,30 @@ import { Leonardo } from "@leonardo-ai/sdk"; import { SDKValidationError } from "@leonardo-ai/sdk/sdk/models/errors"; const leonardo = new Leonardo({ - bearerAuth: "", + bearerAuth: "", }); async function run() { - let result; - try { - result = await leonardo.initImages.deleteInitImageById(""); - } catch (err) { - switch (true) { - case err instanceof SDKValidationError: { - // Validation errors can be pretty-printed - console.error(err.pretty()); - // Raw value may also be inspected - console.error(err.rawValue); - return; - } - default: { - throw err; - } - } - } + let result; + try { + result = await leonardo.initImages.deleteInitImageById(""); // Handle the result console.log(result); + } catch (err) { + switch (true) { + case (err instanceof SDKValidationError): { + // Validation errors can be pretty-printed + console.error(err.pretty()); + // Raw value may also be inspected + console.error(err.rawValue); + return; + } + default: { + throw err; + } + } + } } run(); @@ -291,15 +297,15 @@ You can override the default server globally by passing a server index to the `s import { Leonardo } from "@leonardo-ai/sdk"; const leonardo = new Leonardo({ - serverIdx: 0, - bearerAuth: "", + serverIdx: 0, + bearerAuth: "", }); async function run() { - const result = await leonardo.initImages.deleteInitImageById(""); + const result = await leonardo.initImages.deleteInitImageById(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -315,15 +321,15 @@ The default server can also be overridden globally by passing a URL to the `serv import { Leonardo } from "@leonardo-ai/sdk"; const leonardo = new Leonardo({ - serverURL: "https://cloud.leonardo.ai/api/rest/v1", - bearerAuth: "", + serverURL: "https://cloud.leonardo.ai/api/rest/v1", + bearerAuth: "", }); async function run() { - const result = await leonardo.initImages.deleteInitImageById(""); + const result = await leonardo.initImages.deleteInitImageById(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -349,14 +355,14 @@ To authenticate with the API the `bearerAuth` parameter must be set when initial import { Leonardo } from "@leonardo-ai/sdk"; const leonardo = new Leonardo({ - bearerAuth: "", + bearerAuth: "", }); async function run() { - const result = await leonardo.initImages.deleteInitImageById(""); + const result = await leonardo.initImages.deleteInitImageById(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -436,25 +442,25 @@ To change the default retry strategy for a single API call, simply provide a ret import { Leonardo } from "@leonardo-ai/sdk"; const leonardo = new Leonardo({ - bearerAuth: "", + bearerAuth: "", }); async function run() { - const result = await leonardo.initImages.deleteInitImageById("", { - retries: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, - }, - }); + const result = await leonardo.initImages.deleteInitImageById("", { + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -466,24 +472,24 @@ If you'd like to override the default retry strategy for all operations that sup import { Leonardo } from "@leonardo-ai/sdk"; const leonardo = new Leonardo({ - retryConfig: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, }, - bearerAuth: "", + retryConnectionErrors: false, + }, + bearerAuth: "", }); async function run() { - const result = await leonardo.initImages.deleteInitImageById(""); + const result = await leonardo.initImages.deleteInitImageById(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/RELEASES.md b/RELEASES.md index 34ab4ea..391ebd3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -2449,4 +2449,14 @@ Based on: ### Generated - [typescript v4.15.0] . ### Releases -- [NPM v4.15.0] https://www.npmjs.com/package/@leonardo-ai/sdk/v/4.15.0 - . \ No newline at end of file +- [NPM v4.15.0] https://www.npmjs.com/package/@leonardo-ai/sdk/v/4.15.0 - . + +## 2024-09-20 06:02:01 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.400.1 (2.420.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v4.16.0] . +### Releases +- [NPM v4.16.0] https://www.npmjs.com/package/@leonardo-ai/sdk/v/4.16.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index afe2c67..92d2eb3 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3,14 +3,14 @@ import { Leonardo } from "@leonardo-ai/sdk"; const leonardo = new Leonardo({ - bearerAuth: "", + bearerAuth: "", }); async function run() { - const result = await leonardo.initImages.deleteInitImageById(""); + const result = await leonardo.initImages.deleteInitImageById(""); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/docs/sdk/models/operations/createdatasetrequestbody.md b/docs/sdk/models/operations/createdatasetrequestbody.md index d05f738..766e03c 100644 --- a/docs/sdk/models/operations/createdatasetrequestbody.md +++ b/docs/sdk/models/operations/createdatasetrequestbody.md @@ -8,7 +8,7 @@ Query parameters to be provided in the request body as a JSON object import { CreateDatasetRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateDatasetRequestBody = { - name: "", + name: "", }; ``` diff --git a/docs/sdk/models/operations/createdatasetresponse.md b/docs/sdk/models/operations/createdatasetresponse.md index 1a130fe..21ba663 100644 --- a/docs/sdk/models/operations/createdatasetresponse.md +++ b/docs/sdk/models/operations/createdatasetresponse.md @@ -6,11 +6,11 @@ import { CreateDatasetResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateDatasetResponse = { - contentType: "", - statusCode: 544883, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 544883, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/creategenerationrequestbody.md b/docs/sdk/models/operations/creategenerationrequestbody.md index 7205669..e3a7a2e 100644 --- a/docs/sdk/models/operations/creategenerationrequestbody.md +++ b/docs/sdk/models/operations/creategenerationrequestbody.md @@ -53,6 +53,7 @@ let value: CreateGenerationRequestBody = {}; | `seed` | *number* | :heavy_minus_sign: | N/A | | `tiling` | *boolean* | :heavy_minus_sign: | Whether the generated images should tile on all axis. | | `transparency` | [operations.TransparencyType](../../../sdk/models/operations/transparencytype.md) | :heavy_minus_sign: | Which type of transparency this image should use | +| `ultra` | *boolean* | :heavy_minus_sign: | Enable to use Ultra mode. Note: can not be used with Alchemy. | | `unzoom` | *boolean* | :heavy_minus_sign: | Whether the generated images should be unzoomed (requires unzoomAmount and init_image_id to be set). | | `unzoomAmount` | *number* | :heavy_minus_sign: | How much the image should be unzoomed (requires an init_image_id and unzoom to be set to true). | | `upscaleRatio` | *number* | :heavy_minus_sign: | How much the image should be upscaled. (Enterprise Only) | diff --git a/docs/sdk/models/operations/creategenerationresponse.md b/docs/sdk/models/operations/creategenerationresponse.md index a48c15b..5bb58eb 100644 --- a/docs/sdk/models/operations/creategenerationresponse.md +++ b/docs/sdk/models/operations/creategenerationresponse.md @@ -6,11 +6,11 @@ import { CreateGenerationResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateGenerationResponse = { - contentType: "", - statusCode: 56713, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 56713, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/createlcmgenerationrequestbody.md b/docs/sdk/models/operations/createlcmgenerationrequestbody.md index 78aaca5..1ced569 100644 --- a/docs/sdk/models/operations/createlcmgenerationrequestbody.md +++ b/docs/sdk/models/operations/createlcmgenerationrequestbody.md @@ -8,8 +8,8 @@ Query parameters can also be provided in the request body as a JSON object import { CreateLCMGenerationRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateLCMGenerationRequestBody = { - imageDataUrl: "", - prompt: "", + imageDataUrl: "", + prompt: "", }; ``` diff --git a/docs/sdk/models/operations/createlcmgenerationresponse.md b/docs/sdk/models/operations/createlcmgenerationresponse.md index 38c0aee..c252a76 100644 --- a/docs/sdk/models/operations/createlcmgenerationresponse.md +++ b/docs/sdk/models/operations/createlcmgenerationresponse.md @@ -6,11 +6,11 @@ import { CreateLCMGenerationResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateLCMGenerationResponse = { - contentType: "", - statusCode: 477665, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 477665, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/createmodelrequestbody.md b/docs/sdk/models/operations/createmodelrequestbody.md index f620e61..1b2f95e 100644 --- a/docs/sdk/models/operations/createmodelrequestbody.md +++ b/docs/sdk/models/operations/createmodelrequestbody.md @@ -8,9 +8,9 @@ Query parameters to be provided in the request body as a JSON object import { CreateModelRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateModelRequestBody = { - datasetId: "", - instancePrompt: "", - name: "", + datasetId: "", + instancePrompt: "", + name: "", }; ``` diff --git a/docs/sdk/models/operations/createmodelresponse.md b/docs/sdk/models/operations/createmodelresponse.md index dcb55c5..65af2a0 100644 --- a/docs/sdk/models/operations/createmodelresponse.md +++ b/docs/sdk/models/operations/createmodelresponse.md @@ -6,11 +6,11 @@ import { CreateModelResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateModelResponse = { - contentType: "", - statusCode: 836079, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 836079, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/createsvdmotiongenerationrequestbody.md b/docs/sdk/models/operations/createsvdmotiongenerationrequestbody.md index a01d96c..37a2133 100644 --- a/docs/sdk/models/operations/createsvdmotiongenerationrequestbody.md +++ b/docs/sdk/models/operations/createsvdmotiongenerationrequestbody.md @@ -8,7 +8,7 @@ Query parameters can also be provided in the request body as a JSON object import { CreateSVDMotionGenerationRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateSVDMotionGenerationRequestBody = { - imageId: "", + imageId: "", }; ``` diff --git a/docs/sdk/models/operations/createsvdmotiongenerationresponse.md b/docs/sdk/models/operations/createsvdmotiongenerationresponse.md index b6d4c33..7ed2a0e 100644 --- a/docs/sdk/models/operations/createsvdmotiongenerationresponse.md +++ b/docs/sdk/models/operations/createsvdmotiongenerationresponse.md @@ -6,11 +6,11 @@ import { CreateSVDMotionGenerationResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateSVDMotionGenerationResponse = { - contentType: "", - statusCode: 479977, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 479977, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/createtexturegenerationresponse.md b/docs/sdk/models/operations/createtexturegenerationresponse.md index 113754a..169c0cf 100644 --- a/docs/sdk/models/operations/createtexturegenerationresponse.md +++ b/docs/sdk/models/operations/createtexturegenerationresponse.md @@ -6,11 +6,11 @@ import { CreateTextureGenerationResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateTextureGenerationResponse = { - contentType: "", - statusCode: 568045, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 568045, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/createuniversalupscalerjobrequestbody.md b/docs/sdk/models/operations/createuniversalupscalerjobrequestbody.md index 3ed0a9f..9491d5b 100644 --- a/docs/sdk/models/operations/createuniversalupscalerjobrequestbody.md +++ b/docs/sdk/models/operations/createuniversalupscalerjobrequestbody.md @@ -12,12 +12,15 @@ let value: CreateUniversalUpscalerJobRequestBody = {}; ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `creativityStrength` | *number* | :heavy_minus_sign: | The creativity strength of the universal upscaler, must be integer between 1 and 10 | -| `generatedImageId` | *string* | :heavy_minus_sign: | The ID of the generated image | -| `initImageId` | *string* | :heavy_minus_sign: | The ID of the init image uploaded | -| `prompt` | *string* | :heavy_minus_sign: | The prompt for the universal upscaler | -| `upscaleMultiplier` | *number* | :heavy_minus_sign: | The upscale multiplier of the universal upscaler, must be number between 1.00 and 2.00 | -| `upscalerStyle` | [shared.UniversalUpscalerStyle](../../../sdk/models/shared/universalupscalerstyle.md) | :heavy_minus_sign: | The style to upscale images using universal upscaler with. | -| `variationId` | *string* | :heavy_minus_sign: | The ID of the variation image | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `creativityStrength` | *number* | :heavy_minus_sign: | The creativity strength of the universal upscaler. Must be between 1 and 10. | +| `detailContrast` | *number* | :heavy_minus_sign: | The detail contrast of the universal upscaler. Must be between 1 and 10. Can only be used with ultraUpscaleStyle. | +| `generatedImageId` | *string* | :heavy_minus_sign: | The ID of the generated image. | +| `initImageId` | *string* | :heavy_minus_sign: | The ID of the init image uploaded. | +| `prompt` | *string* | :heavy_minus_sign: | The prompt for the universal upscaler. | +| `similarity` | *number* | :heavy_minus_sign: | The similarity of the universal upscaler. Must be between 1 and 10. Can only be used with ultraUpscaleStyle. | +| `ultraUpscaleStyle` | [shared.UniversalUpscalerUltraStyle](../../../sdk/models/shared/universalupscalerultrastyle.md) | :heavy_minus_sign: | The ultra style to upscale images using universal upscaler with. Can not be used with upscalerStyle. | +| `upscaleMultiplier` | *number* | :heavy_minus_sign: | The upscale multiplier of the universal upscaler. Must be between 1.0 and 2.0. | +| `upscalerStyle` | [shared.UniversalUpscalerStyle](../../../sdk/models/shared/universalupscalerstyle.md) | :heavy_minus_sign: | The style to upscale images using universal upscaler with. Can not be used with ultraUpscaleStyle. | +| `variationId` | *string* | :heavy_minus_sign: | The ID of the variation image. | \ No newline at end of file diff --git a/docs/sdk/models/operations/createuniversalupscalerjobresponse.md b/docs/sdk/models/operations/createuniversalupscalerjobresponse.md index 8b9204e..ebbf074 100644 --- a/docs/sdk/models/operations/createuniversalupscalerjobresponse.md +++ b/docs/sdk/models/operations/createuniversalupscalerjobresponse.md @@ -6,11 +6,11 @@ import { CreateUniversalUpscalerJobResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateUniversalUpscalerJobResponse = { - contentType: "", - statusCode: 778157, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 778157, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/createvariationnobgrequestbody.md b/docs/sdk/models/operations/createvariationnobgrequestbody.md index 52e0e46..9de5868 100644 --- a/docs/sdk/models/operations/createvariationnobgrequestbody.md +++ b/docs/sdk/models/operations/createvariationnobgrequestbody.md @@ -8,7 +8,7 @@ Query parameters are provided in the request body as a JSON object import { CreateVariationNoBGRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateVariationNoBGRequestBody = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/createvariationnobgresponse.md b/docs/sdk/models/operations/createvariationnobgresponse.md index 3c71370..50f8438 100644 --- a/docs/sdk/models/operations/createvariationnobgresponse.md +++ b/docs/sdk/models/operations/createvariationnobgresponse.md @@ -6,11 +6,11 @@ import { CreateVariationNoBGResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateVariationNoBGResponse = { - contentType: "", - statusCode: 140350, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 140350, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/createvariationunzoomresponse.md b/docs/sdk/models/operations/createvariationunzoomresponse.md index 1e8c34c..1b2b38c 100644 --- a/docs/sdk/models/operations/createvariationunzoomresponse.md +++ b/docs/sdk/models/operations/createvariationunzoomresponse.md @@ -6,11 +6,11 @@ import { CreateVariationUnzoomResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateVariationUnzoomResponse = { - contentType: "", - statusCode: 870013, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 870013, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/createvariationupscalerequestbody.md b/docs/sdk/models/operations/createvariationupscalerequestbody.md index 5daa64d..e5b49cf 100644 --- a/docs/sdk/models/operations/createvariationupscalerequestbody.md +++ b/docs/sdk/models/operations/createvariationupscalerequestbody.md @@ -8,7 +8,7 @@ Query parameters are provided in the request body as a JSON object import { CreateVariationUpscaleRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateVariationUpscaleRequestBody = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/createvariationupscaleresponse.md b/docs/sdk/models/operations/createvariationupscaleresponse.md index 20a2a78..188e84e 100644 --- a/docs/sdk/models/operations/createvariationupscaleresponse.md +++ b/docs/sdk/models/operations/createvariationupscaleresponse.md @@ -6,11 +6,11 @@ import { CreateVariationUpscaleResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: CreateVariationUpscaleResponse = { - contentType: "", - statusCode: 870088, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 870088, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/delete3dmodelbyidrequest.md b/docs/sdk/models/operations/delete3dmodelbyidrequest.md index 8d308da..2abfd92 100644 --- a/docs/sdk/models/operations/delete3dmodelbyidrequest.md +++ b/docs/sdk/models/operations/delete3dmodelbyidrequest.md @@ -6,7 +6,7 @@ import { Delete3DModelByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: Delete3DModelByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/delete3dmodelbyidresponse.md b/docs/sdk/models/operations/delete3dmodelbyidresponse.md index ea42f49..10f9a1f 100644 --- a/docs/sdk/models/operations/delete3dmodelbyidresponse.md +++ b/docs/sdk/models/operations/delete3dmodelbyidresponse.md @@ -6,11 +6,11 @@ import { Delete3DModelByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: Delete3DModelByIdResponse = { - contentType: "", - statusCode: 648172, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 648172, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/deletedatasetbyidrequest.md b/docs/sdk/models/operations/deletedatasetbyidrequest.md index 46da31a..8cfe8e9 100644 --- a/docs/sdk/models/operations/deletedatasetbyidrequest.md +++ b/docs/sdk/models/operations/deletedatasetbyidrequest.md @@ -6,7 +6,7 @@ import { DeleteDatasetByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteDatasetByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/deletedatasetbyidresponse.md b/docs/sdk/models/operations/deletedatasetbyidresponse.md index 05c58b2..cd2f1be 100644 --- a/docs/sdk/models/operations/deletedatasetbyidresponse.md +++ b/docs/sdk/models/operations/deletedatasetbyidresponse.md @@ -6,11 +6,11 @@ import { DeleteDatasetByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteDatasetByIdResponse = { - contentType: "", - statusCode: 847252, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 847252, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/deletegenerationbyidrequest.md b/docs/sdk/models/operations/deletegenerationbyidrequest.md index a3c803a..429d25e 100644 --- a/docs/sdk/models/operations/deletegenerationbyidrequest.md +++ b/docs/sdk/models/operations/deletegenerationbyidrequest.md @@ -6,7 +6,7 @@ import { DeleteGenerationByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteGenerationByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/deletegenerationbyidresponse.md b/docs/sdk/models/operations/deletegenerationbyidresponse.md index 25dc769..f81f6d8 100644 --- a/docs/sdk/models/operations/deletegenerationbyidresponse.md +++ b/docs/sdk/models/operations/deletegenerationbyidresponse.md @@ -6,11 +6,11 @@ import { DeleteGenerationByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteGenerationByIdResponse = { - contentType: "", - statusCode: 963663, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 963663, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/deleteinitimagebyidrequest.md b/docs/sdk/models/operations/deleteinitimagebyidrequest.md index 5a6191e..ca012a5 100644 --- a/docs/sdk/models/operations/deleteinitimagebyidrequest.md +++ b/docs/sdk/models/operations/deleteinitimagebyidrequest.md @@ -6,7 +6,7 @@ import { DeleteInitImageByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteInitImageByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/deleteinitimagebyidresponse.md b/docs/sdk/models/operations/deleteinitimagebyidresponse.md index 9d56a2d..3a3c646 100644 --- a/docs/sdk/models/operations/deleteinitimagebyidresponse.md +++ b/docs/sdk/models/operations/deleteinitimagebyidresponse.md @@ -6,11 +6,11 @@ import { DeleteInitImageByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteInitImageByIdResponse = { - contentType: "", - statusCode: 548814, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 548814, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/deletemodelbyidrequest.md b/docs/sdk/models/operations/deletemodelbyidrequest.md index 4e79d44..9da8c39 100644 --- a/docs/sdk/models/operations/deletemodelbyidrequest.md +++ b/docs/sdk/models/operations/deletemodelbyidrequest.md @@ -6,7 +6,7 @@ import { DeleteModelByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteModelByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/deletemodelbyidresponse.md b/docs/sdk/models/operations/deletemodelbyidresponse.md index 568c250..4a4975c 100644 --- a/docs/sdk/models/operations/deletemodelbyidresponse.md +++ b/docs/sdk/models/operations/deletemodelbyidresponse.md @@ -6,11 +6,11 @@ import { DeleteModelByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteModelByIdResponse = { - contentType: "", - statusCode: 71036, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 71036, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/deletetexturegenerationbyidrequest.md b/docs/sdk/models/operations/deletetexturegenerationbyidrequest.md index 3240532..3247f1a 100644 --- a/docs/sdk/models/operations/deletetexturegenerationbyidrequest.md +++ b/docs/sdk/models/operations/deletetexturegenerationbyidrequest.md @@ -6,7 +6,7 @@ import { DeleteTextureGenerationByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteTextureGenerationByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/deletetexturegenerationbyidresponse.md b/docs/sdk/models/operations/deletetexturegenerationbyidresponse.md index 03290c8..34a25dd 100644 --- a/docs/sdk/models/operations/deletetexturegenerationbyidresponse.md +++ b/docs/sdk/models/operations/deletetexturegenerationbyidresponse.md @@ -6,11 +6,11 @@ import { DeleteTextureGenerationByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: DeleteTextureGenerationByIdResponse = { - contentType: "", - statusCode: 392785, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 392785, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getdatasetbyidrequest.md b/docs/sdk/models/operations/getdatasetbyidrequest.md index c378e67..7cd102b 100644 --- a/docs/sdk/models/operations/getdatasetbyidrequest.md +++ b/docs/sdk/models/operations/getdatasetbyidrequest.md @@ -6,7 +6,7 @@ import { GetDatasetByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetDatasetByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/getdatasetbyidresponse.md b/docs/sdk/models/operations/getdatasetbyidresponse.md index dfafea6..7eafc59 100644 --- a/docs/sdk/models/operations/getdatasetbyidresponse.md +++ b/docs/sdk/models/operations/getdatasetbyidresponse.md @@ -6,11 +6,11 @@ import { GetDatasetByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetDatasetByIdResponse = { - contentType: "", - statusCode: 423655, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 423655, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getgenerationbyidgenerations.md b/docs/sdk/models/operations/getgenerationbyidgenerations.md index 2bbae36..31a39ef 100644 --- a/docs/sdk/models/operations/getgenerationbyidgenerations.md +++ b/docs/sdk/models/operations/getgenerationbyidgenerations.md @@ -36,4 +36,5 @@ let value: GetGenerationByIdGenerations = {}; | `scheduler` | [shared.SdGenerationSchedulers](../../../sdk/models/shared/sdgenerationschedulers.md) | :heavy_minus_sign: | The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. | | `sdVersion` | [shared.SdVersions](../../../sdk/models/shared/sdversions.md) | :heavy_minus_sign: | The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models | | `seed` | *number* | :heavy_minus_sign: | N/A | -| `status` | [shared.JobStatus](../../../sdk/models/shared/jobstatus.md) | :heavy_minus_sign: | The status of the current task. | \ No newline at end of file +| `status` | [shared.JobStatus](../../../sdk/models/shared/jobstatus.md) | :heavy_minus_sign: | The status of the current task. | +| `ultra` | *boolean* | :heavy_minus_sign: | If ultra generation mode was used. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenerationbyidrequest.md b/docs/sdk/models/operations/getgenerationbyidrequest.md index afadc5f..8c5da57 100644 --- a/docs/sdk/models/operations/getgenerationbyidrequest.md +++ b/docs/sdk/models/operations/getgenerationbyidrequest.md @@ -6,7 +6,7 @@ import { GetGenerationByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetGenerationByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/getgenerationbyidresponse.md b/docs/sdk/models/operations/getgenerationbyidresponse.md index c7de14e..35ed45a 100644 --- a/docs/sdk/models/operations/getgenerationbyidresponse.md +++ b/docs/sdk/models/operations/getgenerationbyidresponse.md @@ -6,11 +6,11 @@ import { GetGenerationByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetGenerationByIdResponse = { - contentType: "", - statusCode: 272656, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 272656, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getgenerationsbyuseridgenerations.md b/docs/sdk/models/operations/getgenerationsbyuseridgenerations.md index 89d18ee..83b517d 100644 --- a/docs/sdk/models/operations/getgenerationsbyuseridgenerations.md +++ b/docs/sdk/models/operations/getgenerationsbyuseridgenerations.md @@ -36,4 +36,5 @@ let value: GetGenerationsByUserIdGenerations = {}; | `scheduler` | [shared.SdGenerationSchedulers](../../../sdk/models/shared/sdgenerationschedulers.md) | :heavy_minus_sign: | The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. | | `sdVersion` | [shared.SdVersions](../../../sdk/models/shared/sdversions.md) | :heavy_minus_sign: | The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models | | `seed` | *number* | :heavy_minus_sign: | N/A | -| `status` | [shared.JobStatus](../../../sdk/models/shared/jobstatus.md) | :heavy_minus_sign: | The status of the current task. | \ No newline at end of file +| `status` | [shared.JobStatus](../../../sdk/models/shared/jobstatus.md) | :heavy_minus_sign: | The status of the current task. | +| `ultra` | *boolean* | :heavy_minus_sign: | If ultra generation mode was used. | \ No newline at end of file diff --git a/docs/sdk/models/operations/getgenerationsbyuseridrequest.md b/docs/sdk/models/operations/getgenerationsbyuseridrequest.md index 69bfc28..5d4fe4f 100644 --- a/docs/sdk/models/operations/getgenerationsbyuseridrequest.md +++ b/docs/sdk/models/operations/getgenerationsbyuseridrequest.md @@ -6,7 +6,7 @@ import { GetGenerationsByUserIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetGenerationsByUserIdRequest = { - userId: "", + userId: "", }; ``` diff --git a/docs/sdk/models/operations/getgenerationsbyuseridresponse.md b/docs/sdk/models/operations/getgenerationsbyuseridresponse.md index 7eaafae..f65e7ee 100644 --- a/docs/sdk/models/operations/getgenerationsbyuseridresponse.md +++ b/docs/sdk/models/operations/getgenerationsbyuseridresponse.md @@ -6,11 +6,11 @@ import { GetGenerationsByUserIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetGenerationsByUserIdResponse = { - contentType: "", - statusCode: 383441, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 383441, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getinitimagebyidrequest.md b/docs/sdk/models/operations/getinitimagebyidrequest.md index cb3c21a..1579f2c 100644 --- a/docs/sdk/models/operations/getinitimagebyidrequest.md +++ b/docs/sdk/models/operations/getinitimagebyidrequest.md @@ -6,7 +6,7 @@ import { GetInitImageByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetInitImageByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/getinitimagebyidresponse.md b/docs/sdk/models/operations/getinitimagebyidresponse.md index 8cea9fb..c948b47 100644 --- a/docs/sdk/models/operations/getinitimagebyidresponse.md +++ b/docs/sdk/models/operations/getinitimagebyidresponse.md @@ -6,11 +6,11 @@ import { GetInitImageByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetInitImageByIdResponse = { - contentType: "", - statusCode: 592845, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 592845, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getmodelbyidrequest.md b/docs/sdk/models/operations/getmodelbyidrequest.md index 8fd36e0..251dbaa 100644 --- a/docs/sdk/models/operations/getmodelbyidrequest.md +++ b/docs/sdk/models/operations/getmodelbyidrequest.md @@ -6,7 +6,7 @@ import { GetModelByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetModelByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/getmodelbyidresponse.md b/docs/sdk/models/operations/getmodelbyidresponse.md index f78b1d0..c18467c 100644 --- a/docs/sdk/models/operations/getmodelbyidresponse.md +++ b/docs/sdk/models/operations/getmodelbyidresponse.md @@ -6,11 +6,11 @@ import { GetModelByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetModelByIdResponse = { - contentType: "", - statusCode: 337396, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 337396, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getuserselfresponse.md b/docs/sdk/models/operations/getuserselfresponse.md index c3c889c..9f6bc15 100644 --- a/docs/sdk/models/operations/getuserselfresponse.md +++ b/docs/sdk/models/operations/getuserselfresponse.md @@ -6,11 +6,11 @@ import { GetUserSelfResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetUserSelfResponse = { - contentType: "", - statusCode: 925597, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 925597, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getvariationbyidrequest.md b/docs/sdk/models/operations/getvariationbyidrequest.md index d6d62c4..c8edaa7 100644 --- a/docs/sdk/models/operations/getvariationbyidrequest.md +++ b/docs/sdk/models/operations/getvariationbyidrequest.md @@ -6,7 +6,7 @@ import { GetVariationByIdRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetVariationByIdRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/getvariationbyidresponse.md b/docs/sdk/models/operations/getvariationbyidresponse.md index a156112..38d43d2 100644 --- a/docs/sdk/models/operations/getvariationbyidresponse.md +++ b/docs/sdk/models/operations/getvariationbyidresponse.md @@ -6,11 +6,11 @@ import { GetVariationByIdResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: GetVariationByIdResponse = { - contentType: "", - statusCode: 978619, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 978619, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/listelementsresponse.md b/docs/sdk/models/operations/listelementsresponse.md index abceedb..cbb880d 100644 --- a/docs/sdk/models/operations/listelementsresponse.md +++ b/docs/sdk/models/operations/listelementsresponse.md @@ -6,11 +6,11 @@ import { ListElementsResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: ListElementsResponse = { - contentType: "", - statusCode: 297534, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 297534, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/listplatformmodelsresponse.md b/docs/sdk/models/operations/listplatformmodelsresponse.md index 59ade8a..368bc38 100644 --- a/docs/sdk/models/operations/listplatformmodelsresponse.md +++ b/docs/sdk/models/operations/listplatformmodelsresponse.md @@ -6,11 +6,11 @@ import { ListPlatformModelsResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: ListPlatformModelsResponse = { - contentType: "", - statusCode: 87129, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 87129, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/objectt.md b/docs/sdk/models/operations/objectt.md index 07482bc..d772efc 100644 --- a/docs/sdk/models/operations/objectt.md +++ b/docs/sdk/models/operations/objectt.md @@ -12,12 +12,13 @@ let value: ObjectT = {}; ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `fantasyAvatarGeneration` | [operations.PricingCalculatorObject](../../../sdk/models/operations/pricingcalculatorobject.md) | :heavy_minus_sign: | Parameters for FANTASY_AVATAR_GENERATION service | -| `imageGeneration` | [operations.PricingCalculatorPricingCalculatorObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorobject.md) | :heavy_minus_sign: | Parameters for IMAGE_GENERATION service | -| `lcmGeneration` | [operations.PricingCalculatorPricingCalculatorRequestObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestobject.md) | :heavy_minus_sign: | Parameters for LCM_GENERATION service | -| `modelTraining` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyobject.md) | :heavy_minus_sign: | Parameters for MODEL_TRAINING service | -| `motionGeneration` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsobject.md) | :heavy_minus_sign: | Parameters for MOTION_GENERATION service | -| `textureGeneration` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamstexturegenerationobject.md) | :heavy_minus_sign: | Parameters for TEXTURE_GENERATION service | -| `universalUpscaler` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerobject.md) | :heavy_minus_sign: | Parameters for UNIVERSAL_UPSCALER service | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `fantasyAvatarGeneration` | [operations.PricingCalculatorObject](../../../sdk/models/operations/pricingcalculatorobject.md) | :heavy_minus_sign: | Parameters for FANTASY_AVATAR_GENERATION service | +| `imageGeneration` | [operations.PricingCalculatorPricingCalculatorObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorobject.md) | :heavy_minus_sign: | Parameters for IMAGE_GENERATION service | +| `lcmGeneration` | [operations.PricingCalculatorPricingCalculatorRequestObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestobject.md) | :heavy_minus_sign: | Parameters for LCM_GENERATION service | +| `modelTraining` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyobject.md) | :heavy_minus_sign: | Parameters for MODEL_TRAINING service | +| `motionGeneration` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsobject.md) | :heavy_minus_sign: | Parameters for MOTION_GENERATION service | +| `textureGeneration` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamstexturegenerationobject.md) | :heavy_minus_sign: | Parameters for TEXTURE_GENERATION service | +| `universalUpscaler` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerobject.md) | :heavy_minus_sign: | Parameters for UNIVERSAL_UPSCALER service | +| `universalUpscalerUltra` | [operations.PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject](../../../sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerultraobject.md) | :heavy_minus_sign: | Parameters for UNIVERSAL_UPSCALER_ULTRA service | \ No newline at end of file diff --git a/docs/sdk/models/operations/performalchemyupscalelcmrequestbody.md b/docs/sdk/models/operations/performalchemyupscalelcmrequestbody.md index 506f0b0..421d734 100644 --- a/docs/sdk/models/operations/performalchemyupscalelcmrequestbody.md +++ b/docs/sdk/models/operations/performalchemyupscalelcmrequestbody.md @@ -8,8 +8,8 @@ Query parameters can also be provided in the request body as a JSON object import { PerformAlchemyUpscaleLCMRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PerformAlchemyUpscaleLCMRequestBody = { - imageDataUrl: "", - prompt: "", + imageDataUrl: "", + prompt: "", }; ``` diff --git a/docs/sdk/models/operations/performalchemyupscalelcmresponse.md b/docs/sdk/models/operations/performalchemyupscalelcmresponse.md index 826b534..25e1c64 100644 --- a/docs/sdk/models/operations/performalchemyupscalelcmresponse.md +++ b/docs/sdk/models/operations/performalchemyupscalelcmresponse.md @@ -6,11 +6,11 @@ import { PerformAlchemyUpscaleLCMResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PerformAlchemyUpscaleLCMResponse = { - contentType: "", - statusCode: 791725, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 791725, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/performinpaintinglcmrequestbody.md b/docs/sdk/models/operations/performinpaintinglcmrequestbody.md index 1904529..11acb9f 100644 --- a/docs/sdk/models/operations/performinpaintinglcmrequestbody.md +++ b/docs/sdk/models/operations/performinpaintinglcmrequestbody.md @@ -8,9 +8,9 @@ Query parameters can also be provided in the request body as a JSON object import { PerformInpaintingLCMRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PerformInpaintingLCMRequestBody = { - imageDataUrl: "", - maskDataUrl: "", - prompt: "", + imageDataUrl: "", + maskDataUrl: "", + prompt: "", }; ``` diff --git a/docs/sdk/models/operations/performinpaintinglcmresponse.md b/docs/sdk/models/operations/performinpaintinglcmresponse.md index 20674eb..871c553 100644 --- a/docs/sdk/models/operations/performinpaintinglcmresponse.md +++ b/docs/sdk/models/operations/performinpaintinglcmresponse.md @@ -6,11 +6,11 @@ import { PerformInpaintingLCMResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PerformInpaintingLCMResponse = { - contentType: "", - statusCode: 812169, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 812169, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/performinstantrefinerequestbody.md b/docs/sdk/models/operations/performinstantrefinerequestbody.md index 9665eaa..b5d2bd6 100644 --- a/docs/sdk/models/operations/performinstantrefinerequestbody.md +++ b/docs/sdk/models/operations/performinstantrefinerequestbody.md @@ -8,8 +8,8 @@ Query parameters can also be provided in the request body as a JSON object import { PerformInstantRefineRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PerformInstantRefineRequestBody = { - imageDataUrl: "", - prompt: "", + imageDataUrl: "", + prompt: "", }; ``` diff --git a/docs/sdk/models/operations/performinstantrefineresponse.md b/docs/sdk/models/operations/performinstantrefineresponse.md index 9170c9b..fa0b39e 100644 --- a/docs/sdk/models/operations/performinstantrefineresponse.md +++ b/docs/sdk/models/operations/performinstantrefineresponse.md @@ -6,11 +6,11 @@ import { PerformInstantRefineResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PerformInstantRefineResponse = { - contentType: "", - statusCode: 528895, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 528895, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorobject.md b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorobject.md index 665ef6a..06aa2ce 100644 --- a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorobject.md +++ b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorobject.md @@ -28,4 +28,5 @@ let value: PricingCalculatorPricingCalculatorObject = {}; | `numImages` | *number* | :heavy_minus_sign: | The number of images to generate. Must be between 1 and 8. If either width or height is over 768, must be between 1 and 4. | | `promptMagic` | *boolean* | :heavy_minus_sign: | Enable to use Prompt Magic. | | `promptMagicStrength` | *number* | :heavy_minus_sign: | Strength of prompt magic. Must be a float between 0.1 and 1.0 | -| `promptMagicVersion` | *string* | :heavy_minus_sign: | Prompt magic version v2 or v3, for use when promptMagic: true | \ No newline at end of file +| `promptMagicVersion` | *string* | :heavy_minus_sign: | Prompt magic version v2 or v3, for use when promptMagic: true | +| `ultra` | *boolean* | :heavy_minus_sign: | Enable to use Ultra mode. | \ No newline at end of file diff --git a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsobject.md b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsobject.md index 0aafb41..bb34710 100644 --- a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsobject.md +++ b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsobject.md @@ -7,7 +7,8 @@ Parameters for MOTION_GENERATION service ```typescript import { PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject } from "@leonardo-ai/sdk/sdk/models/operations"; -let value: PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject = {}; +let value: + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject = {}; ``` ## Fields diff --git a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamstexturegenerationobject.md b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamstexturegenerationobject.md index 3af8acf..5be3276 100644 --- a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamstexturegenerationobject.md +++ b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamstexturegenerationobject.md @@ -9,7 +9,8 @@ import { PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject, } from "@leonardo-ai/sdk/sdk/models/operations"; -let value: PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject = +let value: + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject = {}; ``` diff --git a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerobject.md b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerobject.md index 8a70e6f..1a65021 100644 --- a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerobject.md +++ b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerobject.md @@ -9,7 +9,8 @@ import { PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject, } from "@leonardo-ai/sdk/sdk/models/operations"; -let value: PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject = +let value: + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject = {}; ``` diff --git a/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerultraobject.md b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerultraobject.md new file mode 100644 index 0000000..0619059 --- /dev/null +++ b/docs/sdk/models/operations/pricingcalculatorpricingcalculatorrequestrequestbodyserviceparamsuniversalupscalerultraobject.md @@ -0,0 +1,23 @@ +# PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject + +Parameters for UNIVERSAL_UPSCALER_ULTRA service + +## Example Usage + +```typescript +import { + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject, +} from "@leonardo-ai/sdk/sdk/models/operations"; + +let value: + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject = + {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `inputHeight` | *number* | :heavy_minus_sign: | The input height of the image. | +| `inputWidth` | *number* | :heavy_minus_sign: | The input width of the image. | +| `upscaleMultiplier` | *number* | :heavy_minus_sign: | The upscale multiplier of the universal upscaler. Must be between 1.00 and 2.00. | \ No newline at end of file diff --git a/docs/sdk/models/operations/pricingcalculatorresponse.md b/docs/sdk/models/operations/pricingcalculatorresponse.md index ca7b508..d4ccba2 100644 --- a/docs/sdk/models/operations/pricingcalculatorresponse.md +++ b/docs/sdk/models/operations/pricingcalculatorresponse.md @@ -6,11 +6,11 @@ import { PricingCalculatorResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PricingCalculatorResponse = { - contentType: "", - statusCode: 368241, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 368241, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/promptimproverequestbody.md b/docs/sdk/models/operations/promptimproverequestbody.md index e75e238..afac868 100644 --- a/docs/sdk/models/operations/promptimproverequestbody.md +++ b/docs/sdk/models/operations/promptimproverequestbody.md @@ -8,7 +8,7 @@ Query parameters to be provided in the request body as a JSON object import { PromptImproveRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PromptImproveRequestBody = { - prompt: "", + prompt: "", }; ``` diff --git a/docs/sdk/models/operations/promptimproveresponse.md b/docs/sdk/models/operations/promptimproveresponse.md index 774c1b0..97a7614 100644 --- a/docs/sdk/models/operations/promptimproveresponse.md +++ b/docs/sdk/models/operations/promptimproveresponse.md @@ -6,11 +6,11 @@ import { PromptImproveResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PromptImproveResponse = { - contentType: "", - statusCode: 832620, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 832620, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/promptrandomresponse.md b/docs/sdk/models/operations/promptrandomresponse.md index 711d5ad..ee08bf6 100644 --- a/docs/sdk/models/operations/promptrandomresponse.md +++ b/docs/sdk/models/operations/promptrandomresponse.md @@ -6,11 +6,11 @@ import { PromptRandomResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: PromptRandomResponse = { - contentType: "", - statusCode: 957156, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 957156, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/uploadcanvasinitimagerequestbody.md b/docs/sdk/models/operations/uploadcanvasinitimagerequestbody.md index dbaf0ff..a85bcab 100644 --- a/docs/sdk/models/operations/uploadcanvasinitimagerequestbody.md +++ b/docs/sdk/models/operations/uploadcanvasinitimagerequestbody.md @@ -8,8 +8,8 @@ Query parameters provided in the request body as a JSON object import { UploadCanvasInitImageRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadCanvasInitImageRequestBody = { - initExtension: "", - maskExtension: "", + initExtension: "", + maskExtension: "", }; ``` diff --git a/docs/sdk/models/operations/uploadcanvasinitimageresponse.md b/docs/sdk/models/operations/uploadcanvasinitimageresponse.md index fbad916..f2e55c6 100644 --- a/docs/sdk/models/operations/uploadcanvasinitimageresponse.md +++ b/docs/sdk/models/operations/uploadcanvasinitimageresponse.md @@ -6,11 +6,11 @@ import { UploadCanvasInitImageResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadCanvasInitImageResponse = { - contentType: "", - statusCode: 715190, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 715190, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/uploaddatasetimagefromgenrequest.md b/docs/sdk/models/operations/uploaddatasetimagefromgenrequest.md index 3395f5a..2eabeff 100644 --- a/docs/sdk/models/operations/uploaddatasetimagefromgenrequest.md +++ b/docs/sdk/models/operations/uploaddatasetimagefromgenrequest.md @@ -6,10 +6,10 @@ import { UploadDatasetImageFromGenRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadDatasetImageFromGenRequest = { - requestBody: { - generatedImageId: "", - }, - datasetId: "", + requestBody: { + generatedImageId: "", + }, + datasetId: "", }; ``` diff --git a/docs/sdk/models/operations/uploaddatasetimagefromgenrequestbody.md b/docs/sdk/models/operations/uploaddatasetimagefromgenrequestbody.md index 310b0c0..e7df072 100644 --- a/docs/sdk/models/operations/uploaddatasetimagefromgenrequestbody.md +++ b/docs/sdk/models/operations/uploaddatasetimagefromgenrequestbody.md @@ -8,7 +8,7 @@ Query parameters to be provided in the request body as a JSON object import { UploadDatasetImageFromGenRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadDatasetImageFromGenRequestBody = { - generatedImageId: "", + generatedImageId: "", }; ``` diff --git a/docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md b/docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md index 033eef1..a195329 100644 --- a/docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md +++ b/docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md @@ -6,11 +6,11 @@ import { UploadDatasetImageFromGenResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadDatasetImageFromGenResponse = { - contentType: "", - statusCode: 437587, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 437587, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/uploaddatasetimagerequest.md b/docs/sdk/models/operations/uploaddatasetimagerequest.md index 5d837ea..7d52c52 100644 --- a/docs/sdk/models/operations/uploaddatasetimagerequest.md +++ b/docs/sdk/models/operations/uploaddatasetimagerequest.md @@ -6,10 +6,10 @@ import { UploadDatasetImageRequest } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadDatasetImageRequest = { - requestBody: { - extension: "gif", - }, - datasetId: "", + requestBody: { + extension: "gif", + }, + datasetId: "", }; ``` diff --git a/docs/sdk/models/operations/uploaddatasetimagerequestbody.md b/docs/sdk/models/operations/uploaddatasetimagerequestbody.md index f4b80fc..2a1565e 100644 --- a/docs/sdk/models/operations/uploaddatasetimagerequestbody.md +++ b/docs/sdk/models/operations/uploaddatasetimagerequestbody.md @@ -8,7 +8,7 @@ Query parameters provided in the request body as a JSON object import { UploadDatasetImageRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadDatasetImageRequestBody = { - extension: "gif", + extension: "gif", }; ``` diff --git a/docs/sdk/models/operations/uploaddatasetimageresponse.md b/docs/sdk/models/operations/uploaddatasetimageresponse.md index cbe0a78..4d634c1 100644 --- a/docs/sdk/models/operations/uploaddatasetimageresponse.md +++ b/docs/sdk/models/operations/uploaddatasetimageresponse.md @@ -6,11 +6,11 @@ import { UploadDatasetImageResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadDatasetImageResponse = { - contentType: "", - statusCode: 384382, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 384382, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/uploadinitimagerequestbody.md b/docs/sdk/models/operations/uploadinitimagerequestbody.md index 4e57e8b..7cf0ba8 100644 --- a/docs/sdk/models/operations/uploadinitimagerequestbody.md +++ b/docs/sdk/models/operations/uploadinitimagerequestbody.md @@ -8,7 +8,7 @@ Query parameters provided in the request body as a JSON object import { UploadInitImageRequestBody } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadInitImageRequestBody = { - extension: "m1v", + extension: "m1v", }; ``` diff --git a/docs/sdk/models/operations/uploadinitimageresponse.md b/docs/sdk/models/operations/uploadinitimageresponse.md index 8cfbcd6..4af6728 100644 --- a/docs/sdk/models/operations/uploadinitimageresponse.md +++ b/docs/sdk/models/operations/uploadinitimageresponse.md @@ -6,11 +6,11 @@ import { UploadInitImageResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadInitImageResponse = { - contentType: "", - statusCode: 857946, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 857946, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/uploadmodelassetresponse.md b/docs/sdk/models/operations/uploadmodelassetresponse.md index c4875a9..51ce2db 100644 --- a/docs/sdk/models/operations/uploadmodelassetresponse.md +++ b/docs/sdk/models/operations/uploadmodelassetresponse.md @@ -6,11 +6,11 @@ import { UploadModelAssetResponse } from "@leonardo-ai/sdk/sdk/models/operations"; let value: UploadModelAssetResponse = { - contentType: "", - statusCode: 20218, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 20218, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/shared/pricingcalculatorservices.md b/docs/sdk/models/shared/pricingcalculatorservices.md index f2da4ee..c4d8ee7 100644 --- a/docs/sdk/models/shared/pricingcalculatorservices.md +++ b/docs/sdk/models/shared/pricingcalculatorservices.md @@ -7,7 +7,7 @@ The services to be chosen for calculating the API credit cost. ```typescript import { PricingCalculatorServices } from "@leonardo-ai/sdk/sdk/models/shared"; -let value: PricingCalculatorServices = PricingCalculatorServices.LcmGeneration; +let value: PricingCalculatorServices = PricingCalculatorServices.ModelTraining; ``` ## Values @@ -20,4 +20,5 @@ let value: PricingCalculatorServices = PricingCalculatorServices.LcmGeneration; | `LcmGeneration` | LCM_GENERATION | | `ModelTraining` | MODEL_TRAINING | | `TextureGeneration` | TEXTURE_GENERATION | -| `UniversalUpscaler` | UNIVERSAL_UPSCALER | \ No newline at end of file +| `UniversalUpscaler` | UNIVERSAL_UPSCALER | +| `UniversalUpscalerUltra` | UNIVERSAL_UPSCALER_ULTRA | \ No newline at end of file diff --git a/docs/sdk/models/shared/security.md b/docs/sdk/models/shared/security.md index 8b6ccf2..95be1e4 100644 --- a/docs/sdk/models/shared/security.md +++ b/docs/sdk/models/shared/security.md @@ -6,7 +6,7 @@ import { Security } from "@leonardo-ai/sdk/sdk/models/shared"; let value: Security = { - bearerAuth: "", + bearerAuth: "", }; ``` diff --git a/docs/sdk/models/shared/universalupscalerstyle.md b/docs/sdk/models/shared/universalupscalerstyle.md index 4e1904d..c133865 100644 --- a/docs/sdk/models/shared/universalupscalerstyle.md +++ b/docs/sdk/models/shared/universalupscalerstyle.md @@ -1,6 +1,6 @@ # UniversalUpscalerStyle -The style to upscale images using universal upscaler with. +The style to upscale images using universal upscaler with. Can not be used with ultraUpscaleStyle. ## Example Usage diff --git a/docs/sdk/models/shared/universalupscalerultrastyle.md b/docs/sdk/models/shared/universalupscalerultrastyle.md new file mode 100644 index 0000000..aff092d --- /dev/null +++ b/docs/sdk/models/shared/universalupscalerultrastyle.md @@ -0,0 +1,18 @@ +# UniversalUpscalerUltraStyle + +The ultra style to upscale images using universal upscaler with. Can not be used with upscalerStyle. + +## Example Usage + +```typescript +import { UniversalUpscalerUltraStyle } from "@leonardo-ai/sdk/sdk/models/shared"; + +let value: UniversalUpscalerUltraStyle = UniversalUpscalerUltraStyle.Realistic; +``` + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Artistic` | ARTISTIC | +| `Realistic` | REALISTIC | \ No newline at end of file diff --git a/docs/sdks/dataset/README.md b/docs/sdks/dataset/README.md index 80e9eca..ad72fea 100644 --- a/docs/sdks/dataset/README.md +++ b/docs/sdks/dataset/README.md @@ -28,7 +28,7 @@ async function run() { const result = await leonardo.dataset.createDataset({ name: "", }); - + // Handle the result console.log(result) } @@ -103,7 +103,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.dataset.deleteDatasetById(""); - + // Handle the result console.log(result) } @@ -176,7 +176,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.dataset.getDatasetById(""); - + // Handle the result console.log(result) } @@ -251,7 +251,7 @@ async function run() { const result = await leonardo.dataset.uploadDatasetImage({ extension: "mpg4", }, ""); - + // Handle the result console.log(result) } @@ -275,7 +275,7 @@ const leonardo = new LeonardoCore({ async function run() { const res = await datasetUploadDatasetImage(leonardo, { - extension: "gif", + extension: "mpg4", }, ""); if (!res.ok) { @@ -329,7 +329,7 @@ async function run() { const result = await leonardo.dataset.uploadDatasetImageFromGen({ generatedImageId: "", }, ""); - + // Handle the result console.log(result) } diff --git a/docs/sdks/elements/README.md b/docs/sdks/elements/README.md index beb531a..238acde 100644 --- a/docs/sdks/elements/README.md +++ b/docs/sdks/elements/README.md @@ -22,7 +22,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.elements.listElements(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/image/README.md b/docs/sdks/image/README.md index 71af9a9..c63c809 100644 --- a/docs/sdks/image/README.md +++ b/docs/sdks/image/README.md @@ -25,7 +25,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.image.createGeneration({}); - + // Handle the result console.log(result) } @@ -98,7 +98,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.image.deleteGenerationById(""); - + // Handle the result console.log(result) } @@ -171,7 +171,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.image.getGenerationById(""); - + // Handle the result console.log(result) } @@ -244,7 +244,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.image.getGenerationsByUserId(""); - + // Handle the result console.log(result) } diff --git a/docs/sdks/initimages/README.md b/docs/sdks/initimages/README.md index 446e3e0..d2a1073 100644 --- a/docs/sdks/initimages/README.md +++ b/docs/sdks/initimages/README.md @@ -25,7 +25,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.initImages.deleteInitImageById(""); - + // Handle the result console.log(result) } @@ -98,7 +98,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.initImages.getInitImageById(""); - + // Handle the result console.log(result) } @@ -174,7 +174,7 @@ async function run() { initExtension: "", maskExtension: "", }); - + // Handle the result console.log(result) } @@ -252,7 +252,7 @@ async function run() { const result = await leonardo.initImages.uploadInitImage({ extension: "png", }); - + // Handle the result console.log(result) } diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index d72fdad..e7a9738 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -29,7 +29,7 @@ async function run() { instancePrompt: "", name: "", }); - + // Handle the result console.log(result) } @@ -106,7 +106,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.models.deleteModelById(""); - + // Handle the result console.log(result) } @@ -179,7 +179,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.models.getModelById(""); - + // Handle the result console.log(result) } @@ -252,7 +252,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.models.listPlatformModels(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/motion/README.md b/docs/sdks/motion/README.md index 56fbd3e..3d7be37 100644 --- a/docs/sdks/motion/README.md +++ b/docs/sdks/motion/README.md @@ -22,7 +22,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.motion.createSVDMotionGeneration(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/pricingcalculator/README.md b/docs/sdks/pricingcalculator/README.md index 79a3f04..93803f8 100644 --- a/docs/sdks/pricingcalculator/README.md +++ b/docs/sdks/pricingcalculator/README.md @@ -22,7 +22,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.pricingCalculator.pricingCalculator(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/prompt/README.md b/docs/sdks/prompt/README.md index af7fefa..0275c7a 100644 --- a/docs/sdks/prompt/README.md +++ b/docs/sdks/prompt/README.md @@ -25,7 +25,7 @@ async function run() { const result = await leonardo.prompt.promptImprove({ prompt: "", }); - + // Handle the result console.log(result) } @@ -100,7 +100,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.prompt.promptRandom(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/realtimecanvas/README.md b/docs/sdks/realtimecanvas/README.md index 139e7aa..fb527c2 100644 --- a/docs/sdks/realtimecanvas/README.md +++ b/docs/sdks/realtimecanvas/README.md @@ -25,7 +25,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.realtimeCanvas.createLCMGeneration(); - + // Handle the result console.log(result) } @@ -98,7 +98,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.realtimeCanvas.performAlchemyUpscaleLCM(); - + // Handle the result console.log(result) } @@ -171,7 +171,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.realtimeCanvas.performInpaintingLCM(); - + // Handle the result console.log(result) } @@ -244,7 +244,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.realtimeCanvas.performInstantRefine(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/texture/README.md b/docs/sdks/texture/README.md index fa34513..5c4f115 100644 --- a/docs/sdks/texture/README.md +++ b/docs/sdks/texture/README.md @@ -23,7 +23,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.texture.createTextureGeneration(); - + // Handle the result console.log(result) } @@ -96,7 +96,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.texture.deleteTextureGenerationById(""); - + // Handle the result console.log(result) } diff --git a/docs/sdks/threedmodelassets/README.md b/docs/sdks/threedmodelassets/README.md index 642c257..4ebfacf 100644 --- a/docs/sdks/threedmodelassets/README.md +++ b/docs/sdks/threedmodelassets/README.md @@ -23,7 +23,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.threeDModelAssets.delete3DModelById(""); - + // Handle the result console.log(result) } @@ -97,7 +97,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.threeDModelAssets.uploadModelAsset(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/user/README.md b/docs/sdks/user/README.md index b775796..d033d51 100644 --- a/docs/sdks/user/README.md +++ b/docs/sdks/user/README.md @@ -22,7 +22,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.user.getUserSelf(); - + // Handle the result console.log(result) } diff --git a/docs/sdks/variation/README.md b/docs/sdks/variation/README.md index de2e89b..163f7d1 100644 --- a/docs/sdks/variation/README.md +++ b/docs/sdks/variation/README.md @@ -26,7 +26,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.variation.createUniversalUpscalerJob({}); - + // Handle the result console.log(result) } @@ -101,7 +101,7 @@ async function run() { const result = await leonardo.variation.createVariationNoBG({ id: "", }); - + // Handle the result console.log(result) } @@ -176,7 +176,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.variation.createVariationUnzoom(); - + // Handle the result console.log(result) } @@ -249,7 +249,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.variation.createVariationUpscale(); - + // Handle the result console.log(result) } @@ -322,7 +322,7 @@ const leonardo = new Leonardo({ async function run() { const result = await leonardo.variation.getVariationById(""); - + // Handle the result console.log(result) } diff --git a/gen.yaml b/gen.yaml index 4590919..a159d01 100644 --- a/gen.yaml +++ b/gen.yaml @@ -13,7 +13,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 4.15.0 + version: 4.16.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/jsr.json b/jsr.json index b32c66c..283bdeb 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@leonardo-ai/sdk", - "version": "4.15.0", + "version": "4.16.0", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 95902e3..5a036f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,13 @@ { "name": "@leonardo-ai/sdk", - "version": "4.15.0", + "version": "4.16.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@leonardo-ai/sdk", - "version": "4.15.0", + "version": "4.16.0", "devDependencies": { - "@types/node": "^18.19.3", "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", "eslint": "^8.57.0", @@ -210,16 +209,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/node": { - "version": "18.19.49", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.49.tgz", - "integrity": "sha512-ALCeIR6n0nQ7j0FUF1ycOhrp6+XutJWqEu/vtdEqXFUQwkBfgUA5cEg3ZNmjWGF/ZYA/FcF9QMkL55Ar0O6UrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, "node_modules/@types/semver": { "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", @@ -2941,13 +2930,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true, - "license": "MIT" - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -3189,15 +3171,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "@types/node": { - "version": "18.19.49", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.49.tgz", - "integrity": "sha512-ALCeIR6n0nQ7j0FUF1ycOhrp6+XutJWqEu/vtdEqXFUQwkBfgUA5cEg3ZNmjWGF/ZYA/FcF9QMkL55Ar0O6UrA==", - "dev": true, - "requires": { - "undici-types": "~5.26.4" - } - }, "@types/semver": { "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", @@ -5127,12 +5100,6 @@ "which-boxed-primitive": "^1.0.2" } }, - "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index 6c50f41..c542d70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@leonardo-ai/sdk", - "version": "4.15.0", + "version": "4.16.0", "author": "leonardoai", "main": "./index.js", "sideEffects": false, @@ -12,13 +12,12 @@ "scripts": { "lint": "eslint --max-warnings=0 src", "build": "tsc", - "prepare": "npm run build" + "prepublishOnly": "npm run build" }, "peerDependencies": { "zod": ">= 3" }, "devDependencies": { - "@types/node": "^18.19.3", "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", "eslint": "^8.57.0", diff --git a/src/funcs/datasetCreateDataset.ts b/src/funcs/datasetCreateDataset.ts index 9280bdc..b466c31 100644 --- a/src/funcs/datasetCreateDataset.ts +++ b/src/funcs/datasetCreateDataset.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,100 +28,101 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint creates a new dataset */ export async function datasetCreateDataset( - client$: LeonardoCore, - request: operations.CreateDatasetRequestBody, - options?: RequestOptions + client$: LeonardoCore, + request: operations.CreateDatasetRequestBody, + options?: RequestOptions, ): Promise< - Result< - operations.CreateDatasetResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateDatasetResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateDatasetRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateDatasetRequestBody$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/datasets")(); + const path$ = pathToFunc("/datasets")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createDataset", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createDataset", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateDatasetResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateDatasetResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateDatasetResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateDatasetResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/datasetDeleteDatasetById.ts b/src/funcs/datasetDeleteDatasetById.ts index 97b924c..ba2dec7 100644 --- a/src/funcs/datasetDeleteDatasetById.ts +++ b/src/funcs/datasetDeleteDatasetById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,106 +28,109 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint deletes the specific dataset */ export async function datasetDeleteDatasetById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteDatasetByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteDatasetByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteDatasetByIdRequest = { - id: id, - }; + const input$: operations.DeleteDatasetByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteDatasetByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.DeleteDatasetByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/datasets/{id}")(pathParams$); + const path$ = pathToFunc("/datasets/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "deleteDatasetById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "deleteDatasetById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.DeleteDatasetByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeleteDatasetByIdResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.DeleteDatasetByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeleteDatasetByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/datasetGetDatasetById.ts b/src/funcs/datasetGetDatasetById.ts index 805f598..6722636 100644 --- a/src/funcs/datasetGetDatasetById.ts +++ b/src/funcs/datasetGetDatasetById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,105 +28,108 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint gets the specific dataset */ export async function datasetGetDatasetById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetDatasetByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetDatasetByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetDatasetByIdRequest = { - id: id, - }; + const input$: operations.GetDatasetByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetDatasetByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetDatasetByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/datasets/{id}")(pathParams$); + const path$ = pathToFunc("/datasets/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "getDatasetById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "getDatasetById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetDatasetByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetDatasetByIdResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetDatasetByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetDatasetByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/datasetUploadDatasetImage.ts b/src/funcs/datasetUploadDatasetImage.ts index 3ecbfd4..5a0d690 100644 --- a/src/funcs/datasetUploadDatasetImage.ts +++ b/src/funcs/datasetUploadDatasetImage.ts @@ -3,18 +3,21 @@ */ import { LeonardoCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,112 +31,112 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint returns presigned details to upload a dataset image to S3 */ export async function datasetUploadDatasetImage( - client$: LeonardoCore, - requestBody: operations.UploadDatasetImageRequestBody, - datasetId: string, - options?: RequestOptions + client$: LeonardoCore, + requestBody: operations.UploadDatasetImageRequestBody, + datasetId: string, + options?: RequestOptions, ): Promise< - Result< - operations.UploadDatasetImageResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UploadDatasetImageResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UploadDatasetImageRequest = { - requestBody: requestBody, - datasetId: datasetId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UploadDatasetImageRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const input$: operations.UploadDatasetImageRequest = { + requestBody: requestBody, + datasetId: datasetId, + }; - const pathParams$ = { - datasetId: encodeSimple$("datasetId", payload$.datasetId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UploadDatasetImageRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const path$ = pathToFunc("/datasets/{datasetId}/upload")(pathParams$); + const pathParams$ = { + datasetId: encodeSimple$("datasetId", payload$.datasetId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/datasets/{datasetId}/upload")(pathParams$); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "uploadDatasetImage", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "uploadDatasetImage", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.UploadDatasetImageResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UploadDatasetImageResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.UploadDatasetImageResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UploadDatasetImageResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/datasetUploadDatasetImageFromGen.ts b/src/funcs/datasetUploadDatasetImageFromGen.ts index 623f433..1f15061 100644 --- a/src/funcs/datasetUploadDatasetImageFromGen.ts +++ b/src/funcs/datasetUploadDatasetImageFromGen.ts @@ -3,18 +3,21 @@ */ import { LeonardoCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,112 +31,112 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will upload a previously generated image to the dataset */ export async function datasetUploadDatasetImageFromGen( - client$: LeonardoCore, - requestBody: operations.UploadDatasetImageFromGenRequestBody, - datasetId: string, - options?: RequestOptions + client$: LeonardoCore, + requestBody: operations.UploadDatasetImageFromGenRequestBody, + datasetId: string, + options?: RequestOptions, ): Promise< - Result< - operations.UploadDatasetImageFromGenResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UploadDatasetImageFromGenResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UploadDatasetImageFromGenRequest = { - requestBody: requestBody, - datasetId: datasetId, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UploadDatasetImageFromGenRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const input$: operations.UploadDatasetImageFromGenRequest = { + requestBody: requestBody, + datasetId: datasetId, + }; - const pathParams$ = { - datasetId: encodeSimple$("datasetId", payload$.datasetId, { - explode: false, - charEncoding: "percent", - }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UploadDatasetImageFromGenRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const path$ = pathToFunc("/datasets/{datasetId}/upload/gen")(pathParams$); + const pathParams$ = { + datasetId: encodeSimple$("datasetId", payload$.datasetId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/datasets/{datasetId}/upload/gen")(pathParams$); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "uploadDatasetImageFromGen", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "uploadDatasetImageFromGen", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.UploadDatasetImageFromGenResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UploadDatasetImageFromGenResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.UploadDatasetImageFromGenResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UploadDatasetImageFromGenResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/elementsListElements.ts b/src/funcs/elementsListElements.ts index 4188e9f..531b166 100644 --- a/src/funcs/elementsListElements.ts +++ b/src/funcs/elementsListElements.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -26,84 +26,84 @@ import { Result } from "../sdk/types/fp.js"; * Get a list of public Elements available for use with generations. */ export async function elementsListElements( - client$: LeonardoCore, - options?: RequestOptions + client$: LeonardoCore, + options?: RequestOptions, ): Promise< - Result< - operations.ListElementsResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListElementsResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/elements")(); + const path$ = pathToFunc("/elements")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "listElements", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "listElements", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.ListElementsResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListElementsResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.ListElementsResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListElementsResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/imageCreateGeneration.ts b/src/funcs/imageCreateGeneration.ts index 01eb96e..ddb054a 100644 --- a/src/funcs/imageCreateGeneration.ts +++ b/src/funcs/imageCreateGeneration.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,101 +28,101 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will generate images */ export async function imageCreateGeneration( - client$: LeonardoCore, - request: operations.CreateGenerationRequestBody, - options?: RequestOptions + client$: LeonardoCore, + request: operations.CreateGenerationRequestBody, + options?: RequestOptions, ): Promise< - Result< - operations.CreateGenerationResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateGenerationResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateGenerationRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateGenerationRequestBody$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/generations")(); + const path$ = pathToFunc("/generations")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createGeneration", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createGeneration", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateGenerationResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateGenerationResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateGenerationResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateGenerationResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/imageDeleteGenerationById.ts b/src/funcs/imageDeleteGenerationById.ts index f6b2481..319f253 100644 --- a/src/funcs/imageDeleteGenerationById.ts +++ b/src/funcs/imageDeleteGenerationById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,106 +28,109 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint deletes a specific generation */ export async function imageDeleteGenerationById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteGenerationByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteGenerationByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteGenerationByIdRequest = { - id: id, - }; + const input$: operations.DeleteGenerationByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteGenerationByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.DeleteGenerationByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/generations/{id}")(pathParams$); + const path$ = pathToFunc("/generations/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "deleteGenerationById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "deleteGenerationById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.DeleteGenerationByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeleteGenerationByIdResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.DeleteGenerationByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeleteGenerationByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/imageGetGenerationById.ts b/src/funcs/imageGetGenerationById.ts index 4f5cfe9..44bbe95 100644 --- a/src/funcs/imageGetGenerationById.ts +++ b/src/funcs/imageGetGenerationById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,106 +28,109 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will provide information about a specific generation */ export async function imageGetGenerationById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetGenerationByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetGenerationByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetGenerationByIdRequest = { - id: id, - }; + const input$: operations.GetGenerationByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetGenerationByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetGenerationByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/generations/{id}")(pathParams$); + const path$ = pathToFunc("/generations/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "getGenerationById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "getGenerationById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetGenerationByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetGenerationByIdResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetGenerationByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetGenerationByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/imageGetGenerationsByUserId.ts b/src/funcs/imageGetGenerationsByUserId.ts index c2821db..88b0b30 100644 --- a/src/funcs/imageGetGenerationsByUserId.ts +++ b/src/funcs/imageGetGenerationsByUserId.ts @@ -4,8 +4,8 @@ import { LeonardoCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -31,119 +31,119 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint returns all generations by a specific user */ export async function imageGetGenerationsByUserId( - client$: LeonardoCore, - userId: string, - limit?: number | undefined, - offset?: number | undefined, - options?: RequestOptions + client$: LeonardoCore, + userId: string, + limit?: number | undefined, + offset?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetGenerationsByUserIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetGenerationsByUserIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetGenerationsByUserIdRequest = { - limit: limit, - offset: offset, - userId: userId, - }; + const input$: operations.GetGenerationsByUserIdRequest = { + limit: limit, + offset: offset, + userId: userId, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetGenerationsByUserIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetGenerationsByUserIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - userId: encodeSimple$("userId", payload$.userId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + userId: encodeSimple$("userId", payload$.userId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/generations/user/{userId}")(pathParams$); + const path$ = pathToFunc("/generations/user/{userId}")(pathParams$); - const query$ = encodeFormQuery$({ - limit: payload$.limit, - offset: payload$.offset, - }); + const query$ = encodeFormQuery$({ + "limit": payload$.limit, + "offset": payload$.offset, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "getGenerationsByUserId", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "getGenerationsByUserId", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetGenerationsByUserIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetGenerationsByUserIdResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetGenerationsByUserIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetGenerationsByUserIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/initImagesDeleteInitImageById.ts b/src/funcs/initImagesDeleteInitImageById.ts index 5e322ef..aea8702 100644 --- a/src/funcs/initImagesDeleteInitImageById.ts +++ b/src/funcs/initImagesDeleteInitImageById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,106 +28,109 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint deletes an init image */ export async function initImagesDeleteInitImageById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteInitImageByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteInitImageByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteInitImageByIdRequest = { - id: id, - }; + const input$: operations.DeleteInitImageByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteInitImageByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.DeleteInitImageByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/init-image/{id}")(pathParams$); + const path$ = pathToFunc("/init-image/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "deleteInitImageById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "deleteInitImageById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.DeleteInitImageByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeleteInitImageByIdResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.DeleteInitImageByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeleteInitImageByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/initImagesGetInitImageById.ts b/src/funcs/initImagesGetInitImageById.ts index 177d205..72ca3d8 100644 --- a/src/funcs/initImagesGetInitImageById.ts +++ b/src/funcs/initImagesGetInitImageById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,106 +28,108 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will return a single init image */ export async function initImagesGetInitImageById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetInitImageByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetInitImageByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetInitImageByIdRequest = { - id: id, - }; + const input$: operations.GetInitImageByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetInitImageByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetInitImageByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/init-image/{id}")(pathParams$); + const path$ = pathToFunc("/init-image/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "getInitImageById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "getInitImageById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetInitImageByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetInitImageByIdResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetInitImageByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetInitImageByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/initImagesUploadCanvasInitImage.ts b/src/funcs/initImagesUploadCanvasInitImage.ts index 74e7553..ff7f1b6 100644 --- a/src/funcs/initImagesUploadCanvasInitImage.ts +++ b/src/funcs/initImagesUploadCanvasInitImage.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,101 +28,101 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint returns presigned details to upload an init image and a mask image to S3 */ export async function initImagesUploadCanvasInitImage( - client$: LeonardoCore, - request: operations.UploadCanvasInitImageRequestBody, - options?: RequestOptions + client$: LeonardoCore, + request: operations.UploadCanvasInitImageRequestBody, + options?: RequestOptions, ): Promise< - Result< - operations.UploadCanvasInitImageResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UploadCanvasInitImageResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UploadCanvasInitImageRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UploadCanvasInitImageRequestBody$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/canvas-init-image")(); + const path$ = pathToFunc("/canvas-init-image")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "uploadCanvasInitImage", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "uploadCanvasInitImage", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.UploadCanvasInitImageResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UploadCanvasInitImageResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.UploadCanvasInitImageResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UploadCanvasInitImageResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/initImagesUploadInitImage.ts b/src/funcs/initImagesUploadInitImage.ts index ed80526..0180c7a 100644 --- a/src/funcs/initImagesUploadInitImage.ts +++ b/src/funcs/initImagesUploadInitImage.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,100 +28,101 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint returns presigned details to upload an init image to S3 */ export async function initImagesUploadInitImage( - client$: LeonardoCore, - request: operations.UploadInitImageRequestBody, - options?: RequestOptions + client$: LeonardoCore, + request: operations.UploadInitImageRequestBody, + options?: RequestOptions, ): Promise< - Result< - operations.UploadInitImageResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UploadInitImageResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UploadInitImageRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UploadInitImageRequestBody$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/init-image")(); + const path$ = pathToFunc("/init-image")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "uploadInitImage", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "uploadInitImage", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.UploadInitImageResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UploadInitImageResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.UploadInitImageResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UploadInitImageResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/modelsCreateModel.ts b/src/funcs/modelsCreateModel.ts index 46f520f..466b8c5 100644 --- a/src/funcs/modelsCreateModel.ts +++ b/src/funcs/modelsCreateModel.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,100 +28,100 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will train a new custom model */ export async function modelsCreateModel( - client$: LeonardoCore, - request: operations.CreateModelRequestBody, - options?: RequestOptions + client$: LeonardoCore, + request: operations.CreateModelRequestBody, + options?: RequestOptions, ): Promise< - Result< - operations.CreateModelResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateModelResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateModelRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateModelRequestBody$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/models")(); + const path$ = pathToFunc("/models")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createModel", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createModel", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateModelResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateModelResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateModelResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateModelResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/modelsDeleteModelById.ts b/src/funcs/modelsDeleteModelById.ts index fe9aa40..93bbeb6 100644 --- a/src/funcs/modelsDeleteModelById.ts +++ b/src/funcs/modelsDeleteModelById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,105 +28,108 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will delete a specific custom model */ export async function modelsDeleteModelById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteModelByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteModelByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteModelByIdRequest = { - id: id, - }; + const input$: operations.DeleteModelByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteModelByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteModelByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/models/{id}")(pathParams$); + const path$ = pathToFunc("/models/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "deleteModelById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "deleteModelById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.DeleteModelByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeleteModelByIdResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.DeleteModelByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeleteModelByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/modelsGetModelById.ts b/src/funcs/modelsGetModelById.ts index c15381f..80d8d6b 100644 --- a/src/funcs/modelsGetModelById.ts +++ b/src/funcs/modelsGetModelById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,105 +28,108 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint gets the specific custom model */ export async function modelsGetModelById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetModelByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetModelByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetModelByIdRequest = { - id: id, - }; + const input$: operations.GetModelByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetModelByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetModelByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/models/{id}")(pathParams$); + const path$ = pathToFunc("/models/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "getModelById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "getModelById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetModelByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetModelByIdResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetModelByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetModelByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/modelsListPlatformModels.ts b/src/funcs/modelsListPlatformModels.ts index f08a553..9157937 100644 --- a/src/funcs/modelsListPlatformModels.ts +++ b/src/funcs/modelsListPlatformModels.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -26,85 +26,84 @@ import { Result } from "../sdk/types/fp.js"; * Get a list of public Platform Models available for use with generations. */ export async function modelsListPlatformModels( - client$: LeonardoCore, - options?: RequestOptions + client$: LeonardoCore, + options?: RequestOptions, ): Promise< - Result< - operations.ListPlatformModelsResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListPlatformModelsResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/platformModels")(); + const path$ = pathToFunc("/platformModels")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "listPlatformModels", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "listPlatformModels", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.ListPlatformModelsResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListPlatformModelsResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.ListPlatformModelsResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListPlatformModelsResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/motionCreateSVDMotionGeneration.ts b/src/funcs/motionCreateSVDMotionGeneration.ts index 033dd78..9dd1b8d 100644 --- a/src/funcs/motionCreateSVDMotionGeneration.ts +++ b/src/funcs/motionCreateSVDMotionGeneration.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,102 +28,104 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will generate a SVD motion generation. */ export async function motionCreateSVDMotionGeneration( - client$: LeonardoCore, - request?: operations.CreateSVDMotionGenerationRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.CreateSVDMotionGenerationRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateSVDMotionGenerationResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateSVDMotionGenerationResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.CreateSVDMotionGenerationRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateSVDMotionGenerationRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/generations-motion-svd")(); + const path$ = pathToFunc("/generations-motion-svd")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createSVDMotionGeneration", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createSVDMotionGeneration", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateSVDMotionGenerationResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateSVDMotionGenerationResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateSVDMotionGenerationResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateSVDMotionGenerationResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/pricingCalculatorPricingCalculator.ts b/src/funcs/pricingCalculatorPricingCalculator.ts index 31b7574..ef8b5ec 100644 --- a/src/funcs/pricingCalculatorPricingCalculator.ts +++ b/src/funcs/pricingCalculatorPricingCalculator.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,101 +28,105 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint returns the cost used for generating images using a particular service type. */ export async function pricingCalculatorPricingCalculator( - client$: LeonardoCore, - request?: operations.PricingCalculatorRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.PricingCalculatorRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.PricingCalculatorResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PricingCalculatorResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.PricingCalculatorRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PricingCalculatorRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/pricing-calculator")(); + const path$ = pathToFunc("/pricing-calculator")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "pricingCalculator", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "pricingCalculator", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PricingCalculatorResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.PricingCalculatorResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PricingCalculatorResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.PricingCalculatorResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/promptPromptImprove.ts b/src/funcs/promptPromptImprove.ts index 5b3d550..91a3783 100644 --- a/src/funcs/promptPromptImprove.ts +++ b/src/funcs/promptPromptImprove.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,100 +28,101 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint returns a improved prompt */ export async function promptPromptImprove( - client$: LeonardoCore, - request: operations.PromptImproveRequestBody, - options?: RequestOptions + client$: LeonardoCore, + request: operations.PromptImproveRequestBody, + options?: RequestOptions, ): Promise< - Result< - operations.PromptImproveResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PromptImproveResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.PromptImproveRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PromptImproveRequestBody$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/prompt/improve")(); + const path$ = pathToFunc("/prompt/improve")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "promptImprove", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "promptImprove", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PromptImproveResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.PromptImproveResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PromptImproveResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.PromptImproveResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/promptPromptRandom.ts b/src/funcs/promptPromptRandom.ts index 9e4819d..beeeb31 100644 --- a/src/funcs/promptPromptRandom.ts +++ b/src/funcs/promptPromptRandom.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -26,84 +26,84 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint returns a random prompt */ export async function promptPromptRandom( - client$: LeonardoCore, - options?: RequestOptions + client$: LeonardoCore, + options?: RequestOptions, ): Promise< - Result< - operations.PromptRandomResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PromptRandomResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/prompt/random")(); + const path$ = pathToFunc("/prompt/random")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "promptRandom", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "promptRandom", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PromptRandomResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.PromptRandomResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PromptRandomResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.PromptRandomResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/realtimeCanvasCreateLCMGeneration.ts b/src/funcs/realtimeCanvasCreateLCMGeneration.ts index a73d95b..d252e2a 100644 --- a/src/funcs/realtimeCanvasCreateLCMGeneration.ts +++ b/src/funcs/realtimeCanvasCreateLCMGeneration.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,102 +28,105 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will generate a LCM image generation. */ export async function realtimeCanvasCreateLCMGeneration( - client$: LeonardoCore, - request?: operations.CreateLCMGenerationRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.CreateLCMGenerationRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateLCMGenerationResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateLCMGenerationResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.CreateLCMGenerationRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateLCMGenerationRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/generations-lcm")(); + const path$ = pathToFunc("/generations-lcm")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createLCMGeneration", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createLCMGeneration", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateLCMGenerationResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateLCMGenerationResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateLCMGenerationResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateLCMGenerationResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.ts b/src/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.ts index c51235c..c94391b 100644 --- a/src/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.ts +++ b/src/funcs/realtimeCanvasPerformAlchemyUpscaleLCM.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,102 +28,104 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will perform Alchemy Upscale on a LCM image */ export async function realtimeCanvasPerformAlchemyUpscaleLCM( - client$: LeonardoCore, - request?: operations.PerformAlchemyUpscaleLCMRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.PerformAlchemyUpscaleLCMRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.PerformAlchemyUpscaleLCMResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PerformAlchemyUpscaleLCMResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.PerformAlchemyUpscaleLCMRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PerformAlchemyUpscaleLCMRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/lcm-upscale")(); + const path$ = pathToFunc("/lcm-upscale")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "performAlchemyUpscaleLCM", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "performAlchemyUpscaleLCM", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PerformAlchemyUpscaleLCMResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.PerformAlchemyUpscaleLCMResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PerformAlchemyUpscaleLCMResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.PerformAlchemyUpscaleLCMResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/realtimeCanvasPerformInpaintingLCM.ts b/src/funcs/realtimeCanvasPerformInpaintingLCM.ts index c638299..8a77298 100644 --- a/src/funcs/realtimeCanvasPerformInpaintingLCM.ts +++ b/src/funcs/realtimeCanvasPerformInpaintingLCM.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,102 +28,104 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will perform a inpainting on a LCM image */ export async function realtimeCanvasPerformInpaintingLCM( - client$: LeonardoCore, - request?: operations.PerformInpaintingLCMRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.PerformInpaintingLCMRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.PerformInpaintingLCMResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PerformInpaintingLCMResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.PerformInpaintingLCMRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PerformInpaintingLCMRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/lcm-inpainting")(); + const path$ = pathToFunc("/lcm-inpainting")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "performInpaintingLCM", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "performInpaintingLCM", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PerformInpaintingLCMResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.PerformInpaintingLCMResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PerformInpaintingLCMResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.PerformInpaintingLCMResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/realtimeCanvasPerformInstantRefine.ts b/src/funcs/realtimeCanvasPerformInstantRefine.ts index b3cebfd..117b406 100644 --- a/src/funcs/realtimeCanvasPerformInstantRefine.ts +++ b/src/funcs/realtimeCanvasPerformInstantRefine.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,102 +28,104 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will perform instant refine on a LCM image */ export async function realtimeCanvasPerformInstantRefine( - client$: LeonardoCore, - request?: operations.PerformInstantRefineRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.PerformInstantRefineRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.PerformInstantRefineResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PerformInstantRefineResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.PerformInstantRefineRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PerformInstantRefineRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/lcm-instant-refine")(); + const path$ = pathToFunc("/lcm-instant-refine")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "performInstantRefine", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "performInstantRefine", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PerformInstantRefineResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.PerformInstantRefineResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PerformInstantRefineResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.PerformInstantRefineResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/textureCreateTextureGeneration.ts b/src/funcs/textureCreateTextureGeneration.ts index 6dcefea..35d99a8 100644 --- a/src/funcs/textureCreateTextureGeneration.ts +++ b/src/funcs/textureCreateTextureGeneration.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,102 +28,104 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will generate a texture generation. */ export async function textureCreateTextureGeneration( - client$: LeonardoCore, - request?: operations.CreateTextureGenerationRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.CreateTextureGenerationRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateTextureGenerationResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateTextureGenerationResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.CreateTextureGenerationRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateTextureGenerationRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/generations-texture")(); + const path$ = pathToFunc("/generations-texture")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createTextureGeneration", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createTextureGeneration", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateTextureGenerationResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateTextureGenerationResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateTextureGenerationResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateTextureGenerationResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/textureDeleteTextureGenerationById.ts b/src/funcs/textureDeleteTextureGenerationById.ts index 933bdde..adb7493 100644 --- a/src/funcs/textureDeleteTextureGenerationById.ts +++ b/src/funcs/textureDeleteTextureGenerationById.ts @@ -3,18 +3,21 @@ */ import { LeonardoCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,110 +31,114 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint deletes the specific texture generation. */ export async function textureDeleteTextureGenerationById( - client$: LeonardoCore, - id: string, - requestBody?: operations.DeleteTextureGenerationByIdRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + id: string, + requestBody?: operations.DeleteTextureGenerationByIdRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteTextureGenerationByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteTextureGenerationByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteTextureGenerationByIdRequest = { - requestBody: requestBody, - id: id, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteTextureGenerationByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const input$: operations.DeleteTextureGenerationByIdRequest = { + requestBody: requestBody, + id: id, + }; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.DeleteTextureGenerationByIdRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const path$ = pathToFunc("/generations-texture/{id}")(pathParams$); + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/generations-texture/{id}")(pathParams$); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "deleteTextureGenerationById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "deleteTextureGenerationById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.DeleteTextureGenerationByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.DeleteTextureGenerationByIdResponse$inboundSchema, { - key: "object", - }) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.DeleteTextureGenerationByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeleteTextureGenerationByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/threeDModelAssetsDelete3DModelById.ts b/src/funcs/threeDModelAssetsDelete3DModelById.ts index 2df8e95..f3a8482 100644 --- a/src/funcs/threeDModelAssetsDelete3DModelById.ts +++ b/src/funcs/threeDModelAssetsDelete3DModelById.ts @@ -3,18 +3,21 @@ */ import { LeonardoCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,109 +31,112 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint deletes the specific 3D Model */ export async function threeDModelAssetsDelete3DModelById( - client$: LeonardoCore, - id: string, - requestBody?: operations.Delete3DModelByIdRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + id: string, + requestBody?: operations.Delete3DModelByIdRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.Delete3DModelByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.Delete3DModelByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.Delete3DModelByIdRequest = { - requestBody: requestBody, - id: id, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.Delete3DModelByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const input$: operations.Delete3DModelByIdRequest = { + requestBody: requestBody, + id: id, + }; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.Delete3DModelByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const path$ = pathToFunc("/models-3d/{id}")(pathParams$); + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/models-3d/{id}")(pathParams$); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "delete3DModelById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "delete3DModelById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.Delete3DModelByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.Delete3DModelByIdResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.Delete3DModelByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.Delete3DModelByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/threeDModelAssetsUploadModelAsset.ts b/src/funcs/threeDModelAssetsUploadModelAsset.ts index f70b069..988c758 100644 --- a/src/funcs/threeDModelAssetsUploadModelAsset.ts +++ b/src/funcs/threeDModelAssetsUploadModelAsset.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,101 +28,105 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint returns presigned details to upload a 3D model to S3 */ export async function threeDModelAssetsUploadModelAsset( - client$: LeonardoCore, - request?: operations.UploadModelAssetRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.UploadModelAssetRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UploadModelAssetResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UploadModelAssetResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UploadModelAssetRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UploadModelAssetRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/models-3d/upload")(); + const path$ = pathToFunc("/models-3d/upload")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "uploadModelAsset", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "uploadModelAsset", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.UploadModelAssetResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UploadModelAssetResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.UploadModelAssetResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UploadModelAssetResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/userGetUserSelf.ts b/src/funcs/userGetUserSelf.ts index 06b5a59..5c35e58 100644 --- a/src/funcs/userGetUserSelf.ts +++ b/src/funcs/userGetUserSelf.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -26,84 +26,84 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will return your user information such as your user id, username, token renewal date and current amounts of the following: subscription tokens, gpt (prompt generation) tokens, and model training tokens */ export async function userGetUserSelf( - client$: LeonardoCore, - options?: RequestOptions + client$: LeonardoCore, + options?: RequestOptions, ): Promise< - Result< - operations.GetUserSelfResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetUserSelfResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/me")(); + const path$ = pathToFunc("/me")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "getUserSelf", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "getUserSelf", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetUserSelfResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetUserSelfResponse$inboundSchema, { key: "object" }))(response, { - extraFields: responseFields$, - }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetUserSelfResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetUserSelfResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/variationCreateUniversalUpscalerJob.ts b/src/funcs/variationCreateUniversalUpscalerJob.ts index 958925f..e724eb9 100644 --- a/src/funcs/variationCreateUniversalUpscalerJob.ts +++ b/src/funcs/variationCreateUniversalUpscalerJob.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,101 +28,103 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will create a high resolution image using Universal Upscaler */ export async function variationCreateUniversalUpscalerJob( - client$: LeonardoCore, - request: operations.CreateUniversalUpscalerJobRequestBody, - options?: RequestOptions + client$: LeonardoCore, + request: operations.CreateUniversalUpscalerJobRequestBody, + options?: RequestOptions, ): Promise< - Result< - operations.CreateUniversalUpscalerJobResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateUniversalUpscalerJobResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateUniversalUpscalerJobRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateUniversalUpscalerJobRequestBody$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/variations/universal-upscaler")(); + const path$ = pathToFunc("/variations/universal-upscaler")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "CreateUniversalUpscalerJob", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "CreateUniversalUpscalerJob", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateUniversalUpscalerJobResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateUniversalUpscalerJobResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateUniversalUpscalerJobResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateUniversalUpscalerJobResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/variationCreateVariationNoBG.ts b/src/funcs/variationCreateVariationNoBG.ts index 4f714f0..b7a6041 100644 --- a/src/funcs/variationCreateVariationNoBG.ts +++ b/src/funcs/variationCreateVariationNoBG.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,101 +28,101 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will create a no background variation of the provided image ID */ export async function variationCreateVariationNoBG( - client$: LeonardoCore, - request: operations.CreateVariationNoBGRequestBody, - options?: RequestOptions + client$: LeonardoCore, + request: operations.CreateVariationNoBGRequestBody, + options?: RequestOptions, ): Promise< - Result< - operations.CreateVariationNoBGResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateVariationNoBGResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateVariationNoBGRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateVariationNoBGRequestBody$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/variations/nobg")(); + const path$ = pathToFunc("/variations/nobg")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createVariationNoBG", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createVariationNoBG", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateVariationNoBGResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateVariationNoBGResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateVariationNoBGResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateVariationNoBGResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/variationCreateVariationUnzoom.ts b/src/funcs/variationCreateVariationUnzoom.ts index d439c0d..21f37b5 100644 --- a/src/funcs/variationCreateVariationUnzoom.ts +++ b/src/funcs/variationCreateVariationUnzoom.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,102 +28,104 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will create an unzoom variation for the provided image ID */ export async function variationCreateVariationUnzoom( - client$: LeonardoCore, - request?: operations.CreateVariationUnzoomRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.CreateVariationUnzoomRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateVariationUnzoomResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateVariationUnzoomResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.CreateVariationUnzoomRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateVariationUnzoomRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/variations/unzoom")(); + const path$ = pathToFunc("/variations/unzoom")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createVariationUnzoom", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createVariationUnzoom", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateVariationUnzoomResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateVariationUnzoomResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateVariationUnzoomResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateVariationUnzoomResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/variationCreateVariationUpscale.ts b/src/funcs/variationCreateVariationUpscale.ts index ee89d8f..2f51f0a 100644 --- a/src/funcs/variationCreateVariationUpscale.ts +++ b/src/funcs/variationCreateVariationUpscale.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,102 +28,104 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will create an upscale for the provided image ID */ export async function variationCreateVariationUpscale( - client$: LeonardoCore, - request?: operations.CreateVariationUpscaleRequestBody | undefined, - options?: RequestOptions + client$: LeonardoCore, + request?: operations.CreateVariationUpscaleRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateVariationUpscaleResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateVariationUpscaleResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.CreateVariationUpscaleRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateVariationUpscaleRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/variations/upscale")(); + const path$ = pathToFunc("/variations/upscale")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "createVariationUpscale", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "createVariationUpscale", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreateVariationUpscaleResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateVariationUpscaleResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreateVariationUpscaleResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateVariationUpscaleResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/variationGetVariationById.ts b/src/funcs/variationGetVariationById.ts index e8245b1..21d7545 100644 --- a/src/funcs/variationGetVariationById.ts +++ b/src/funcs/variationGetVariationById.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -28,106 +28,108 @@ import { Result } from "../sdk/types/fp.js"; * This endpoint will get the variation by ID */ export async function variationGetVariationById( - client$: LeonardoCore, - id: string, - options?: RequestOptions + client$: LeonardoCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetVariationByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetVariationByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetVariationByIdRequest = { - id: id, - }; + const input$: operations.GetVariationByIdRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetVariationByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetVariationByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/variations/{id}")(pathParams$); + const path$ = pathToFunc("/variations/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); - const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; - const context = { - operationID: "getVariationById", - oAuth2Scopes: [], - securitySource: client$.options$.bearerAuth, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const bearerAuth$ = await extractSecurity(client$.options$.bearerAuth); + const security$ = bearerAuth$ == null ? {} : { bearerAuth: bearerAuth$ }; + const context = { + operationID: "getVariationById", + oAuth2Scopes: [], + securitySource: client$.options$.bearerAuth, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetVariationByIdResponse, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetVariationByIdResponse$inboundSchema, { key: "object" }))( - response, - { extraFields: responseFields$ } - ); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetVariationByIdResponse, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetVariationByIdResponse$inboundSchema, { + key: "object", + }), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts index 27751fd..e892d77 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -4,96 +4,106 @@ import { RequestInput } from "../lib/http.js"; import { - AfterErrorContext, - AfterErrorHook, - AfterSuccessContext, - AfterSuccessHook, - BeforeRequestContext, - BeforeRequestHook, - BeforeCreateRequestHook, - BeforeCreateRequestContext, - Hooks, - SDKInitHook, - SDKInitOptions, + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hooks, + SDKInitHook, + SDKInitOptions, } from "./types.js"; export class SDKHooks implements Hooks { - sdkInitHooks: SDKInitHook[] = []; - beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; - beforeRequestHooks: BeforeRequestHook[] = []; - afterSuccessHooks: AfterSuccessHook[] = []; - afterErrorHooks: AfterErrorHook[] = []; - - constructor() {} - - registerSDKInitHook(hook: SDKInitHook) { - this.sdkInitHooks.push(hook); - } - - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { - this.beforeCreateRequestHooks.push(hook); + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { + this.beforeCreateRequestHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + beforeCreateRequest( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ): RequestInput { + let inp = input; + + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); } - registerBeforeRequestHook(hook: BeforeRequestHook) { - this.beforeRequestHooks.push(hook); - } - - registerAfterSuccessHook(hook: AfterSuccessHook) { - this.afterSuccessHooks.push(hook); - } + return inp; + } - registerAfterErrorHook(hook: AfterErrorHook) { - this.afterErrorHooks.push(hook); - } + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + let req = request; - sdkInit(opts: SDKInitOptions): SDKInitOptions { - return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); } - beforeCreateRequest(hookCtx: BeforeCreateRequestContext, input: RequestInput): RequestInput { - let inp = input; + return req; + } - for (const hook of this.beforeCreateRequestHooks) { - inp = hook.beforeCreateRequest(hookCtx, inp); - } + async afterSuccess( + hookCtx: AfterSuccessContext, + response: Response, + ): Promise { + let res = response; - return inp; + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); } - async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise { - let req = request; - - for (const hook of this.beforeRequestHooks) { - req = await hook.beforeRequest(hookCtx, req); - } - - return req; + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; } - async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise { - let res = response; - - for (const hook of this.afterSuccessHooks) { - res = await hook.afterSuccess(hookCtx, res); - } - - return res; - } - - async afterError( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ): Promise<{ response: Response | null; error: unknown }> { - let res = response; - let err = error; - - for (const hook of this.afterErrorHooks) { - const result = await hook.afterError(hookCtx, res, err); - res = result.response; - err = result.error; - } - - return { response: res, error: err }; - } + return { response: res, error: err }; + } } diff --git a/src/hooks/index.ts b/src/hooks/index.ts index 8f0e4db..f60ec7a 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -2,5 +2,5 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./types.js"; export * from "./hooks.js"; +export * from "./types.js"; diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 3a31914..656b9e3 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -5,16 +5,16 @@ import { HTTPClient, RequestInput } from "../lib/http.js"; export type HookContext = { - operationID: string; - oAuth2Scopes?: string[]; - securitySource?: any | (() => Promise); + operationID: string; + oAuth2Scopes?: string[]; + securitySource?: any | (() => Promise); }; export type Awaitable = T | Promise; export type SDKInitOptions = { - baseURL: URL | null; - client: HTTPClient; + baseURL: URL | null; + client: HTTPClient; }; export type BeforeCreateRequestContext = HookContext & {}; @@ -27,63 +27,72 @@ export type AfterErrorContext = HookContext & {}; * hook can return a new baseURL and HTTP client to be used by the SDK. */ export interface SDKInitHook { - sdkInit: (opts: SDKInitOptions) => SDKInitOptions; + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; } export interface BeforeCreateRequestHook { - /** - * A hook that is called before the SDK creates a `Request` object. The hook - * can modify how a request is constructed since certain modifications, like - * changing the request URL, cannot be done on a request object directly. - */ - beforeCreateRequest: (hookCtx: BeforeCreateRequestContext, input: RequestInput) => RequestInput; + /** + * A hook that is called before the SDK creates a `Request` object. The hook + * can modify how a request is constructed since certain modifications, like + * changing the request URL, cannot be done on a request object directly. + */ + beforeCreateRequest: ( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ) => RequestInput; } export interface BeforeRequestHook { - /** - * A hook that is called before the SDK sends a request. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * replace the request before it is sent or throw an error to stop the - * request from being sent. - */ - beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable; + /** + * A hook that is called before the SDK sends a request. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * replace the request before it is sent or throw an error to stop the + * request from being sent. + */ + beforeRequest: ( + hookCtx: BeforeRequestContext, + request: Request, + ) => Awaitable; } export interface AfterSuccessHook { - /** - * A hook that is called after the SDK receives a response. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * modify the response before it is handled or throw an error to stop the - * response from being handled. - */ - afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable; + /** + * A hook that is called after the SDK receives a response. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ + afterSuccess: ( + hookCtx: AfterSuccessContext, + response: Response, + ) => Awaitable; } export interface AfterErrorHook { - /** - * A hook that is called after the SDK encounters an error, or a - * non-successful response. The hook can introduce instrumentation code such - * as logging, tracing and metrics or modify the response or error values. - */ - afterError: ( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ) => Awaitable<{ - response: Response | null; - error: unknown; - }>; + /** + * A hook that is called after the SDK encounters an error, or a + * non-successful response. The hook can introduce instrumentation code such + * as logging, tracing and metrics or modify the response or error values. + */ + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; } export interface Hooks { - /** Registers a hook to be used by the SDK for initialization event. */ - registerSDKInitHook(hook: SDKInitHook): void; - /** Registers a hook to be used by the SDK for to modify `Request` construction. */ - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; - /** Registers a hook to be used by the SDK for the before request event. */ - registerBeforeRequestHook(hook: BeforeRequestHook): void; - /** Registers a hook to be used by the SDK for the after success event. */ - registerAfterSuccessHook(hook: AfterSuccessHook): void; - /** Registers a hook to be used by the SDK for the after error event. */ - registerAfterErrorHook(hook: AfterErrorHook): void; + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for to modify `Request` construction. */ + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; } diff --git a/src/index.ts b/src/index.ts index c6fc7f0..5ddc765 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./sdk/sdk.js"; export * from "./lib/config.js"; export * as files from "./lib/files.js"; +export * from "./sdk/sdk.js"; diff --git a/src/lib/config.ts b/src/lib/config.ts index 073e6fe..439e87c 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -11,53 +11,53 @@ import { Params, pathToFunc } from "./url.js"; * Contains the list of servers available to the SDK */ export const ServerList = [ - /** - * Leonardo.Ai API server - */ - "https://cloud.leonardo.ai/api/rest/v1", + /** + * Leonardo.Ai API server + */ + "https://cloud.leonardo.ai/api/rest/v1", ] as const; export type SDKOptions = { - bearerAuth?: string | (() => Promise); - - httpClient?: HTTPClient; - /** - * Allows overriding the default server used by the SDK - */ - serverIdx?: number; - /** - * Allows overriding the default server URL used by the SDK - */ - serverURL?: string; - /** - * Allows overriding the default retry config used by the SDK - */ - retryConfig?: RetryConfig; - timeoutMs?: number; - debugLogger?: Logger; + bearerAuth?: string | (() => Promise); + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; + timeoutMs?: number; + debugLogger?: Logger; }; export function serverURLFromOptions(options: SDKOptions): URL | null { - let serverURL = options.serverURL; + let serverURL = options.serverURL; - const params: Params = {}; + const params: Params = {}; - if (!serverURL) { - const serverIdx = options.serverIdx ?? 0; - if (serverIdx < 0 || serverIdx >= ServerList.length) { - throw new Error(`Invalid server index ${serverIdx}`); - } - serverURL = ServerList[serverIdx] || ""; + if (!serverURL) { + const serverIdx = options.serverIdx ?? 0; + if (serverIdx < 0 || serverIdx >= ServerList.length) { + throw new Error(`Invalid server index ${serverIdx}`); } + serverURL = ServerList[serverIdx] || ""; + } - const u = pathToFunc(serverURL)(params); - return new URL(u); + const u = pathToFunc(serverURL)(params); + return new URL(u); } export const SDK_METADATA = { - language: "typescript", - openapiDocVersion: "v1.0.0", - sdkVersion: "4.15.0", - genVersion: "2.409.0", - userAgent: "speakeasy-sdk/typescript 4.15.0 2.409.0 v1.0.0 @leonardo-ai/sdk", + language: "typescript", + openapiDocVersion: "v1.0.0", + sdkVersion: "4.16.0", + genVersion: "2.420.2", + userAgent: "speakeasy-sdk/typescript 4.16.0 2.420.2 v1.0.0 @leonardo-ai/sdk", } as const; diff --git a/src/lib/files.ts b/src/lib/files.ts index 69028c7..19e0804 100644 --- a/src/lib/files.ts +++ b/src/lib/files.ts @@ -2,24 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { Readable } from "stream"; -import { createReadStream } from "fs"; -import { readFile } from "fs/promises"; - -export function toStream(filePath: string): ReadableStream { - return Readable.toWeb( - createReadStream(filePath), - ) as ReadableStream; -} - -export async function toByteArray(filePath: string): Promise { - return readFile(filePath); -} - -export async function toString(filePath: string): Promise { - return readFile(filePath, "utf8"); -} - /** * Consumes a stream and returns a concatenated array buffer. Useful in * situations where we need to read the whole file because it forms part of a diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index 923764e..1ff641e 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -2,268 +2,282 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { safeParse } from "./schemas.js"; -import { StatusCodePredicate, matchResponse, matchStatusCode } from "./http.js"; -import { isPlainObject } from "./is-plain-object.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import { Result } from "../sdk/types/fp.js"; +import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; +import { isPlainObject } from "./is-plain-object.js"; +import { safeParse } from "./schemas.js"; -export type Encoding = "json" | "text" | "bytes" | "stream" | "sse" | "nil" | "fail"; +export type Encoding = + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; const DEFAULT_CONTENT_TYPES: Record = { - json: "application/json", - text: "text/plain", - bytes: "application/octet-stream", - stream: "application/octet-stream", - sse: "text/event-stream", - nil: "*", - fail: "*", + json: "application/json", + text: "text/plain", + bytes: "application/octet-stream", + stream: "application/octet-stream", + sse: "text/event-stream", + nil: "*", + fail: "*", }; type Schema = { parse(raw: unknown): T }; -type MatchOptions = { ctype?: string; hdrs?: boolean; key?: string; sseSentinel?: string }; +type MatchOptions = { + ctype?: string; + hdrs?: boolean; + key?: string; + sseSentinel?: string; +}; export type ValueMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; }; export type ErrorMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; - err: true; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; }; export type FailMatcher = { - enc: "fail"; - codes: StatusCodePredicate; + enc: "fail"; + codes: StatusCodePredicate; }; export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; export function jsonErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "json", codes, schema }; + return { ...options, err: true, enc: "json", codes, schema }; } export function json( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "json", codes, schema }; + return { ...options, enc: "json", codes, schema }; } export function textErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "text", codes, schema }; + return { ...options, err: true, enc: "text", codes, schema }; } export function text( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "text", codes, schema }; + return { ...options, enc: "text", codes, schema }; } export function bytesErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "bytes", codes, schema }; + return { ...options, err: true, enc: "bytes", codes, schema }; } export function bytes( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "bytes", codes, schema }; + return { ...options, enc: "bytes", codes, schema }; } export function streamErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "stream", codes, schema }; + return { ...options, err: true, enc: "stream", codes, schema }; } export function stream( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "stream", codes, schema }; + return { ...options, enc: "stream", codes, schema }; } export function sseErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "sse", codes, schema }; + return { ...options, err: true, enc: "sse", codes, schema }; } export function sse( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "sse", codes, schema }; + return { ...options, enc: "sse", codes, schema }; } export function nilErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "nil", codes, schema }; + return { ...options, err: true, enc: "nil", codes, schema }; } export function nil( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "nil", codes, schema }; + return { ...options, enc: "nil", codes, schema }; } export function fail(codes: StatusCodePredicate): FailMatcher { - return { enc: "fail", codes }; + return { enc: "fail", codes }; } -export type MatchedValue = Matchers extends Matcher[] ? T : never; -export type MatchedError = Matchers extends Matcher[] ? E : never; +export type MatchedValue = Matchers extends Matcher[] + ? T + : never; +export type MatchedError = Matchers extends Matcher[] + ? E + : never; export type MatchFunc = ( - response: Response, - options?: { resultKey?: string; extraFields?: Record } + response: Response, + options?: { resultKey?: string; extraFields?: Record }, ) => Promise<[result: Result, raw: unknown]>; export function match( - ...matchers: Array> + ...matchers: Array> ): MatchFunc { - return async function matchFunc( - response: Response, - options?: { resultKey?: string; extraFields?: Record } - ): Promise<[result: Result, raw: unknown]> { - let raw: unknown; - let matcher: Matcher | undefined; - for (const match of matchers) { - const { codes } = match; - const ctpattern = "ctype" in match ? match.ctype : DEFAULT_CONTENT_TYPES[match.enc]; - if (ctpattern && matchResponse(response, codes, ctpattern)) { - matcher = match; - break; - } else if (!ctpattern && matchStatusCode(response, codes)) { - matcher = match; - break; - } - } + return async function matchFunc( + response: Response, + options?: { resultKey?: string; extraFields?: Record }, + ): Promise< + [result: Result, raw: unknown] + > { + let raw: unknown; + let matcher: Matcher | undefined; + for (const match of matchers) { + const { codes } = match; + const ctpattern = "ctype" in match + ? match.ctype + : DEFAULT_CONTENT_TYPES[match.enc]; + if (ctpattern && matchResponse(response, codes, ctpattern)) { + matcher = match; + break; + } else if (!ctpattern && matchStatusCode(response, codes)) { + matcher = match; + break; + } + } - if (!matcher) { - const responseBody = await response.text(); - return [ - { - ok: false, - error: new SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ), - }, - responseBody, - ]; - } + if (!matcher) { + const responseBody = await response.text(); + return [{ + ok: false, + error: new SDKError( + "Unexpected API response status or content-type", + response, + responseBody, + ), + }, responseBody]; + } - const encoding = matcher.enc; - switch (encoding) { - case "json": - raw = await response.json(); - break; - case "bytes": - raw = await response.arrayBuffer(); - break; - case "stream": - raw = response.body; - break; - case "text": - raw = await response.text(); - break; - case "sse": - raw = response.body; - break; - case "nil": - raw = await discardResponseBody(response); - break; - case "fail": - raw = await response.text(); - break; - default: - encoding satisfies never; - throw new Error(`Unsupported response type: ${encoding}`); - } + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "bytes": + raw = await response.arrayBuffer(); + break; + case "stream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "nil": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await response.text(); + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } - if (matcher.enc === "fail") { - return [ - { - ok: false, - error: new SDKError( - "API error occurred", - response, - typeof raw === "string" ? raw : "" - ), - }, - raw, - ]; - } + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new SDKError( + "API error occurred", + response, + typeof raw === "string" ? raw : "", + ), + }, raw]; + } - const resultKey = matcher.key || options?.resultKey; - let data: unknown; + const resultKey = matcher.key || options?.resultKey; + let data: unknown; - if ("err" in matcher) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else if (resultKey) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - [resultKey]: raw, - }; - } else { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - }; - } + if ("err" in matcher) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + }; + } else { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + }; + } - if ("err" in matcher) { - const result = safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ); - return [result.ok ? { ok: false, error: result.value } : result, raw]; - } else { - return [ - safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ), - raw, - ]; - } - }; + if ("err" in matcher) { + const result = safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ), + raw, + ]; + } + }; } const headerValRE = /, */; @@ -272,13 +286,13 @@ const headerValRE = /, */; * entries. Values are represented as an array to account for repeated headers. */ export function unpackHeaders(headers: Headers): Record { - const out: Record = {}; + const out: Record = {}; - for (const [k, v] of headers.entries()) { - out[k] = v.split(headerValRE); - } + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } - return out; + return out; } /** @@ -288,18 +302,18 @@ export function unpackHeaders(headers: Headers): Record { * https://undici.nodejs.org/#/?id=garbage-collection */ export async function discardResponseBody(res: Response) { - const reader = res.body?.getReader(); - if (reader == null) { - return; - } + const reader = res.body?.getReader(); + if (reader == null) { + return; + } - try { - let done = false; - while (!done) { - const res = await reader.read(); - done = res.done; - } - } finally { - reader.releaseLock(); + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; } + } finally { + reader.releaseLock(); + } } diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 3eda511..a2ad30d 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -2,7 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod"; +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import { ERR, OK, Result } from "../sdk/types/fp.js"; @@ -11,15 +18,19 @@ import { ERR, OK, Result } from "../sdk/types/fp.js"; * intercepts this error and converts it to an SDKValidationError so as to not * leak Zod implementation details to user code. */ -export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMessage: string): Out { - try { - return fn(rawValue); - } catch (err) { - if (err instanceof ZodError) { - throw new SDKValidationError(errorMessage, err, rawValue); - } - throw err; +export function parse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new SDKValidationError(errorMessage, err, rawValue); } + throw err; + } } /** @@ -28,47 +39,48 @@ export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMes * leak Zod implementation details to user code. */ export function safeParse( - rawValue: Inp, - fn: (value: Inp) => Out, - errorMessage: string + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, ): Result { - try { - return OK(fn(rawValue)); - } catch (err) { - return ERR(new SDKValidationError(errorMessage, err, rawValue)); - } + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR(new SDKValidationError(errorMessage, err, rawValue)); + } } export function collectExtraKeys< - Shape extends ZodRawShape, - Catchall extends ZodTypeAny, - K extends string + Shape extends ZodRawShape, + Catchall extends ZodTypeAny, + K extends string, >( - obj: ZodObject, - extrasKey: K + obj: ZodObject, + extrasKey: K, ): ZodEffects< - typeof obj, - output> & { - [k in K]: Record>; - } + typeof obj, + & output> + & { + [k in K]: Record>; + } > { - return obj.transform((val) => { - const extras: Record> = {}; - const { shape } = obj; - for (const [key] of Object.entries(val)) { - if (key in shape) { - continue; - } + return obj.transform((val) => { + const extras: Record> = {}; + const { shape } = obj; + for (const [key] of Object.entries(val)) { + if (key in shape) { + continue; + } - const v = val[key]; - if (typeof v === "undefined") { - continue; - } + const v = val[key]; + if (typeof v === "undefined") { + continue; + } - extras[key] = v; - delete val[key]; - } + extras[key] = v; + delete val[key]; + } - return { ...val, [extrasKey]: extras }; - }); + return { ...val, [extrasKey]: extras }; + }); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 4a53181..dc42cb9 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -2,368 +2,383 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { - HTTPClient, - matchContentType, - matchStatusCode, - isAbortError, - isTimeoutError, - isConnectionError, -} from "./http.js"; -import { SecurityState } from "./security.js"; -import { retry, RetryConfig } from "./retries.js"; -import { Logger } from "./logger.js"; -import { encodeForm } from "./encodings.js"; -import { stringToBase64 } from "./base64.js"; -import { SDKOptions, SDK_METADATA, serverURLFromOptions } from "./config.js"; import { SDKHooks } from "../hooks/hooks.js"; import { HookContext } from "../hooks/types.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { ERR, OK, Result } from "../sdk/types/fp.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { + HTTPClient, + isAbortError, + isConnectionError, + isTimeoutError, + matchContentType, + matchStatusCode, +} from "./http.js"; +import { Logger } from "./logger.js"; +import { retry, RetryConfig } from "./retries.js"; +import { SecurityState } from "./security.js"; export type RequestOptions = { - /** - * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If - * `fetchOptions.signal` is set then it will take precedence over this option. - */ - timeoutMs?: number; - /** - * Set or override a retry policy on HTTP calls. - */ - retries?: RetryConfig; - /** - * Specifies the status codes which should be retried using the given retry policy. - */ - retryCodes?: string[]; - /** - * Sets various request options on the `fetch` call made by an SDK method. - * - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} - */ - fetchOptions?: Omit; + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * Sets various request options on the `fetch` call made by an SDK method. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} + */ + fetchOptions?: Omit; }; type RequestConfig = { - method: string; - path: string; - baseURL?: string | URL; - query?: string; - body?: RequestInit["body"]; - headers?: HeadersInit; - security?: SecurityState | null; - uaHeader?: string; - timeoutMs?: number; + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + timeoutMs?: number; }; const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; -const webWorkerLike = - typeof gt === "object" && - gt != null && - "importScripts" in gt && - typeof gt["importScripts"] === "function"; -const isBrowserLike = - webWorkerLike || - (typeof navigator !== "undefined" && "serviceWorker" in navigator) || - (typeof window === "object" && typeof window.document !== "undefined"); +const webWorkerLike = typeof gt === "object" + && gt != null + && "importScripts" in gt + && typeof gt["importScripts"] === "function"; +const isBrowserLike = webWorkerLike + || (typeof navigator !== "undefined" && "serviceWorker" in navigator) + || (typeof window === "object" && typeof window.document !== "undefined"); export class ClientSDK { - private readonly httpClient: HTTPClient; - protected readonly baseURL: URL | null; - protected readonly hooks$: SDKHooks; - protected readonly logger?: Logger | undefined; - public readonly options$: SDKOptions & { hooks?: SDKHooks }; - - constructor(options: SDKOptions = {}) { - const opt = options as unknown; - if ( - typeof opt === "object" && - opt != null && - "hooks" in opt && - opt.hooks instanceof SDKHooks - ) { - this.hooks$ = opt.hooks; - } else { - this.hooks$ = new SDKHooks(); - } - this.options$ = { ...options, hooks: this.hooks$ }; + private readonly httpClient: HTTPClient; + protected readonly baseURL: URL | null; + protected readonly hooks$: SDKHooks; + protected readonly logger?: Logger | undefined; + public readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.hooks$ = opt.hooks; + } else { + this.hooks$ = new SDKHooks(); + } + this.options$ = { ...options, hooks: this.hooks$ }; - const url = serverURLFromOptions(options); - if (url) { - url.pathname = url.pathname.replace(/\/+$/, "") + "/"; - } - const { baseURL, client } = this.hooks$.sdkInit({ - baseURL: url, - client: options.httpClient || new HTTPClient(), - }); - this.baseURL = baseURL; - this.httpClient = client; - this.logger = options.debugLogger; + const url = serverURLFromOptions(options); + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; } + const { baseURL, client } = this.hooks$.sdkInit({ + baseURL: url, + client: options.httpClient || new HTTPClient(), + }); + this.baseURL = baseURL; + this.httpClient = client; + this.logger = options.debugLogger; + } + + public createRequest$( + context: HookContext, + conf: RequestConfig, + options?: RequestOptions, + ): Result { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this.baseURL; + if (!base) { + return ERR(new InvalidRequestError("No base URL provided for operation")); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); - public createRequest$( - context: HookContext, - conf: RequestConfig, - options?: RequestOptions - ): Result { - const { method, path, query, headers: opHeaders, security } = conf; + if (path) { + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } - const base = conf.baseURL ?? this.baseURL; - if (!base) { - return ERR(new InvalidRequestError("No base URL provided for operation")); - } - const reqURL = new URL(base); - const inputURL = new URL(path, reqURL); + let finalQuery = query || ""; - if (path) { - reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); - } + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } - let finalQuery = query || ""; + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } - const secQuery: string[] = []; - for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); - } - if (secQuery.length) { - finalQuery += `&${secQuery.join("&")}`; - } + const headers = new Headers(opHeaders); - if (finalQuery) { - const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q}`; - } + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64( + [username || "", password || ""].join(":"), + ); + headers.set("Authorization", `Basic ${encoded}`); + } - const headers = new Headers(opHeaders); + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } - const username = security?.basic.username; - const password = security?.basic.password; - if (username != null || password != null) { - const encoded = stringToBase64([username || "", password || ""].join(":")); - headers.set("Authorization", `Basic ${encoded}`); - } + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); - const securityHeaders = new Headers(security?.headers || {}); - for (const [k, v] of securityHeaders) { - headers.set(k, v); - } + const userHeaders = new Headers(options?.fetchOptions?.headers); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } - let cookie = headers.get("cookie") || ""; - for (const [k, v] of Object.entries(security?.cookies || {})) { - cookie += `; ${k}=${v}`; - } - cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; - headers.set("cookie", cookie); + // Only set user agent header in non-browser-like environments since CORS + // policy disallows setting it in browsers e.g. Chrome throws an error. + if (!isBrowserLike) { + headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); + } - const userHeaders = new Headers(options?.fetchOptions?.headers); - for (const [k, v] of userHeaders) { - headers.set(k, v); - } + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + fetchOptions.signal = timeoutSignal; + } + } - // Only set user agent header in non-browser-like environments since CORS - // policy disallows setting it in browsers e.g. Chrome throws an error. - if (!isBrowserLike) { - headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); - } + if (conf.body instanceof ReadableStream) { + if (!fetchOptions) { + fetchOptions = { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + duplex: "half", + }; + } else { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + fetchOptions.duplex = "half"; + } + } - let fetchOptions = options?.fetchOptions; - if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { - const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - if (!fetchOptions) { - fetchOptions = { signal: timeoutSignal }; - } else { - fetchOptions.signal = timeoutSignal; - } - } + let input; + try { + input = this.hooks$.beforeCreateRequest(context, { + url: reqURL, + options: { + ...fetchOptions, + body: conf.body ?? null, + headers, + method, + }, + }); + } catch (err: unknown) { + return ERR( + new UnexpectedClientError("Create request hook failed to execute", { + cause: err, + }), + ); + } + + return OK(new Request(input.url, input.options)); + } + + public async do$( + request: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + retryConfig?: RetryConfig | undefined; + retryCodes?: string[] | undefined; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + const { context, errorCodes } = options; + const retryConfig = options.retryConfig || { strategy: "none" }; + const retryCodes = options.retryCodes || []; + + return retry( + async () => { + const req = await this.hooks$.beforeRequest(context, request.clone()); + await logRequest(this.logger, req).catch((e) => + this.logger?.log("Failed to log request:", e) + ); - if (conf.body instanceof ReadableStream) { - if (!fetchOptions) { - fetchOptions = { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - duplex: "half", - }; - } else { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - fetchOptions.duplex = "half"; - } + let response = await this.httpClient.request(req); + + if (matchStatusCode(response, errorCodes)) { + const result = await this.hooks$.afterError(context, response, null); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.hooks$.afterSuccess(context, response); } - let input; - try { - input = this.hooks$.beforeCreateRequest(context, { - url: reqURL, - options: { - ...fetchOptions, - body: conf.body ?? null, - headers, - method, - }, - }); - } catch (err: unknown) { + await logResponse(this.logger, response, req) + .catch(e => this.logger?.log("Failed to log response:", e)); + + return response; + }, + { config: retryConfig, statusCodes: retryCodes }, + ).then( + (r) => OK(r), + (err) => { + switch (true) { + case isAbortError(err): return ERR( - new UnexpectedClientError("Create request hook failed to execute", { cause: err }) + new RequestAbortedError("Request aborted by client", { + cause: err, + }), + ); + case isTimeoutError(err): + return ERR( + new RequestTimeoutError("Request timed out", { cause: err }), + ); + case isConnectionError(err): + return ERR( + new ConnectionError("Unable to make request", { cause: err }), + ); + default: + return ERR( + new UnexpectedClientError("Unexpected HTTP client error", { + cause: err, + }), ); } - - return OK(new Request(input.url, input.options)); - } - - public async do$( - request: Request, - options: { - context: HookContext; - errorCodes: number | string | (number | string)[]; - retryConfig?: RetryConfig | undefined; - retryCodes?: string[] | undefined; - } - ): Promise< - Result< - Response, - RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError - > - > { - const { context, errorCodes } = options; - const retryConfig = options.retryConfig || { strategy: "none" }; - const retryCodes = options.retryCodes || []; - - return retry( - async () => { - const req = await this.hooks$.beforeRequest(context, request.clone()); - await logRequest(this.logger, req).catch((e) => - this.logger?.log("Failed to log request:", e) - ); - - let response = await this.httpClient.request(req); - - if (matchStatusCode(response, errorCodes)) { - const result = await this.hooks$.afterError(context, response, null); - if (result.error) { - throw result.error; - } - response = result.response || response; - } else { - response = await this.hooks$.afterSuccess(context, response); - } - - await logResponse(this.logger, response, req).catch((e) => - this.logger?.log("Failed to log response:", e) - ); - - return response; - }, - { config: retryConfig, statusCodes: retryCodes } - ).then( - (r) => OK(r), - (err) => { - switch (true) { - case isAbortError(err): - return ERR( - new RequestAbortedError("Request aborted by client", { cause: err }) - ); - case isTimeoutError(err): - return ERR(new RequestTimeoutError("Request timed out", { cause: err })); - case isConnectionError(err): - return ERR(new ConnectionError("Unable to make request", { cause: err })); - default: - return ERR( - new UnexpectedClientError("Unexpected HTTP client error", { - cause: err, - }) - ); - } - } - ); - } + }, + ); + } } const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; async function logRequest(logger: Logger | undefined, req: Request) { - if (!logger) { - return; - } - - const contentType = req.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`> Request: ${req.method} ${req.url}`); - - logger.group("Headers:"); - for (const [k, v] of req.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case jsonLikeContentTypeRE.test(ct): - logger.log(await req.clone().json()); - break; - case ct.startsWith("text/"): - logger.log(await req.clone().text()); - break; - case ct === "multipart/form-data": { - const body = await req.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; + if (!logger) { + return; + } + + const contentType = req.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`> Request: ${req.method} ${req.url}`); + + logger.group("Headers:"); + for (const [k, v] of req.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case jsonLikeContentTypeRE.test(ct): + logger.log(await req.clone().json()); + break; + case ct.startsWith("text/"): + logger.log(await req.clone().text()); + break; + case ct === "multipart/form-data": { + const body = await req.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } - logger.groupEnd(); + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - logger.groupEnd(); + logger.groupEnd(); } -async function logResponse(logger: Logger | undefined, res: Response, req: Request) { - if (!logger) { - return; - } - - const contentType = res.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`< Response: ${req.method} ${req.url}`); - logger.log("Status Code:", res.status, res.statusText); - - logger.group("Headers:"); - for (const [k, v] of res.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case matchContentType(res, "application/json") || jsonLikeContentTypeRE.test(ct): - logger.log(await res.clone().json()); - break; - case matchContentType(res, "text/event-stream"): - logger.log(`<${contentType}>`); - break; - case matchContentType(res, "text/*"): - logger.log(await res.clone().text()); - break; - case matchContentType(res, "multipart/form-data"): { - const body = await res.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; +async function logResponse( + logger: Logger | undefined, + res: Response, + req: Request, +) { + if (!logger) { + return; + } + + const contentType = res.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`< Response: ${req.method} ${req.url}`); + logger.log("Status Code:", res.status, res.statusText); + + logger.group("Headers:"); + for (const [k, v] of res.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case matchContentType(res, "application/json") + || jsonLikeContentTypeRE.test(ct): + logger.log(await res.clone().json()); + break; + case matchContentType(res, "text/event-stream"): + logger.log(`<${contentType}>`); + break; + case matchContentType(res, "text/*"): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "multipart/form-data"): { + const body = await res.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } - logger.groupEnd(); + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - logger.groupEnd(); + logger.groupEnd(); } diff --git a/src/lib/security.ts b/src/lib/security.ts index f64aea7..29ac5f2 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -5,199 +5,213 @@ import * as shared from "../sdk/models/shared/index.js"; export enum SecurityErrorCode { - Incomplete = "incomplete", - UnrecognisedSecurityType = "unrecognized_security_type", + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", } export class SecurityError extends Error { - constructor(public code: SecurityErrorCode, message: string) { - super(message); - this.name = "SecurityError"; - } - - static incomplete(): SecurityError { - return new SecurityError( - SecurityErrorCode.Incomplete, - "Security requirements not met in order to perform the operation" - ); - } - static unrecognizedType(type: string): SecurityError { - return new SecurityError( - SecurityErrorCode.UnrecognisedSecurityType, - `Unrecognised security type: ${type}` - ); - } + constructor( + public code: SecurityErrorCode, + message: string, + ) { + super(message); + this.name = "SecurityError"; + } + + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation", + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}`, + ); + } } export type SecurityState = { - basic: { username?: string | undefined; password?: string | undefined }; - headers: Record; - queryParams: Record; - cookies: Record; + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; }; type SecurityInputBasic = { - type: "http:basic"; - value: { username?: string | undefined; password?: string | undefined } | null | undefined; + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; }; type SecurityInputBearer = { - type: "http:bearer"; - value: string | null | undefined; - fieldName: string; + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputAPIKey = { - type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; - value: string | null | undefined; - fieldName: string; + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOIDC = { - type: "openIdConnect"; - value: string | null | undefined; - fieldName: string; + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2 = { - type: "oauth2"; - value: string | null | undefined; - fieldName: string; + type: "oauth2"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2ClientCredentials = { - type: "oauth2:client_credentials"; - value: string | null | undefined; - fieldName: string; + type: "oauth2:client_credentials"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputCustom = { - type: "http:custom"; - value: any | null | undefined; - fieldName: string; + type: "http:custom"; + value: any | null | undefined; + fieldName: string; }; export type SecurityInput = - | SecurityInputBasic - | SecurityInputBearer - | SecurityInputAPIKey - | SecurityInputOAuth2 - | SecurityInputOAuth2ClientCredentials - | SecurityInputOIDC - | SecurityInputCustom; - -export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null { - const state: SecurityState = { - basic: { username: "", password: "" }, - headers: {}, - queryParams: {}, - cookies: {}, - }; - - const option = options.find((opts) => { - return opts.every((o) => { - if (o.value == null) { - return false; - } else if (o.type === "http:basic") { - return o.value.username != null || o.value.password != null; - } else if (o.type === "http:custom") { - return null; - } else if (typeof o.value === "string") { - return !!o.value; - } else { - throw new Error( - `Unrecognized security type: ${o.type} (value type: ${typeof o.value})` - ); - } - }); - }); - if (option == null) { + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOIDC + | SecurityInputCustom; + +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: { username: "", password: "" }, + headers: {}, + queryParams: {}, + cookies: {}, + }; + + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (o.type === "http:custom") { return null; + } else if (typeof o.value === "string") { + return !!o.value; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o + .value})`, + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; } - option.forEach((spec) => { - if (spec.value == null) { - return; - } - - const { type } = spec; - - switch (type) { - case "apiKey:header": - state.headers[spec.fieldName] = spec.value; - break; - case "apiKey:query": - state.queryParams[spec.fieldName] = spec.value; - break; - case "apiKey:cookie": - state.cookies[spec.fieldName] = spec.value; - break; - case "http:basic": - applyBasic(state, spec); - break; - case "http:custom": - break; - case "http:bearer": - applyBearer(state, spec); - break; - case "oauth2": - applyBearer(state, spec); - break; - case "oauth2:client_credentials": - break; - case "openIdConnect": - applyBearer(state, spec); - break; - default: - spec satisfies never; - throw SecurityError.unrecognizedType(type); - } - }); + const { type } = spec; + + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:custom": + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); - return state; + return state; } -function applyBasic(state: SecurityState, spec: SecurityInputBasic) { - if (spec.value == null) { - return; - } +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } - state.basic = spec.value; + state.basic = spec.value; } function applyBearer( - state: SecurityState, - spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC + state: SecurityState, + spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC, ) { - if (spec.value == null) { - return; - } + if (spec.value == null) { + return; + } - let value = spec.value; - if (value.slice(0, 7).toLowerCase() !== "bearer ") { - value = `Bearer ${value}`; - } + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } - state.headers[spec.fieldName] = value; + state.headers[spec.fieldName] = value; } export function resolveGlobalSecurity( - security: Partial | null | undefined + security: Partial | null | undefined, ): SecurityState | null { - return resolveSecurity([ - { - fieldName: "Authorization", - type: "http:bearer", - value: security?.bearerAuth, - }, - ]); + return resolveSecurity( + [ + { + fieldName: "Authorization", + type: "http:bearer", + value: security?.bearerAuth, + }, + ], + ); } -export async function extractSecurity>( - sec: T | (() => Promise) | undefined -): Promise { - if (sec == null) { - return; - } +export async function extractSecurity< + T extends string | Record, +>(sec: T | (() => Promise) | undefined): Promise { + if (sec == null) { + return; + } - return typeof sec === "function" ? sec() : sec; + return typeof sec === "function" ? sec() : sec; } diff --git a/src/sdk/dataset.ts b/src/sdk/dataset.ts index 5c869cb..6efd449 100644 --- a/src/sdk/dataset.ts +++ b/src/sdk/dataset.ts @@ -12,70 +12,92 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Dataset extends ClientSDK { - /** - * Create a Dataset - * - * @remarks - * This endpoint creates a new dataset - */ - async createDataset( - request: operations.CreateDatasetRequestBody, - options?: RequestOptions - ): Promise { - return unwrapAsync(datasetCreateDataset(this, request, options)); - } + /** + * Create a Dataset + * + * @remarks + * This endpoint creates a new dataset + */ + async createDataset( + request: operations.CreateDatasetRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(datasetCreateDataset( + this, + request, + options, + )); + } - /** - * Delete a Single Dataset by ID - * - * @remarks - * This endpoint deletes the specific dataset - */ - async deleteDatasetById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(datasetDeleteDatasetById(this, id, options)); - } + /** + * Delete a Single Dataset by ID + * + * @remarks + * This endpoint deletes the specific dataset + */ + async deleteDatasetById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(datasetDeleteDatasetById( + this, + id, + options, + )); + } - /** - * Get a Single Dataset by ID - * - * @remarks - * This endpoint gets the specific dataset - */ - async getDatasetById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(datasetGetDatasetById(this, id, options)); - } + /** + * Get a Single Dataset by ID + * + * @remarks + * This endpoint gets the specific dataset + */ + async getDatasetById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(datasetGetDatasetById( + this, + id, + options, + )); + } - /** - * Upload dataset image - * - * @remarks - * This endpoint returns presigned details to upload a dataset image to S3 - */ - async uploadDatasetImage( - requestBody: operations.UploadDatasetImageRequestBody, - datasetId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(datasetUploadDatasetImage(this, requestBody, datasetId, options)); - } + /** + * Upload dataset image + * + * @remarks + * This endpoint returns presigned details to upload a dataset image to S3 + */ + async uploadDatasetImage( + requestBody: operations.UploadDatasetImageRequestBody, + datasetId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(datasetUploadDatasetImage( + this, + requestBody, + datasetId, + options, + )); + } - /** - * Upload a Single Generated Image to a Dataset - * - * @remarks - * This endpoint will upload a previously generated image to the dataset - */ - async uploadDatasetImageFromGen( - requestBody: operations.UploadDatasetImageFromGenRequestBody, - datasetId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(datasetUploadDatasetImageFromGen(this, requestBody, datasetId, options)); - } + /** + * Upload a Single Generated Image to a Dataset + * + * @remarks + * This endpoint will upload a previously generated image to the dataset + */ + async uploadDatasetImageFromGen( + requestBody: operations.UploadDatasetImageFromGenRequestBody, + datasetId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(datasetUploadDatasetImageFromGen( + this, + requestBody, + datasetId, + options, + )); + } } diff --git a/src/sdk/elements.ts b/src/sdk/elements.ts index bec08c8..f0f52e8 100644 --- a/src/sdk/elements.ts +++ b/src/sdk/elements.ts @@ -8,13 +8,18 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Elements extends ClientSDK { - /** - * List Elements - * - * @remarks - * Get a list of public Elements available for use with generations. - */ - async listElements(options?: RequestOptions): Promise { - return unwrapAsync(elementsListElements(this, options)); - } + /** + * List Elements + * + * @remarks + * Get a list of public Elements available for use with generations. + */ + async listElements( + options?: RequestOptions, + ): Promise { + return unwrapAsync(elementsListElements( + this, + options, + )); + } } diff --git a/src/sdk/image.ts b/src/sdk/image.ts index bbf4d7b..ccb82bd 100644 --- a/src/sdk/image.ts +++ b/src/sdk/image.ts @@ -11,57 +11,75 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Image extends ClientSDK { - /** - * Create a Generation of Images - * - * @remarks - * This endpoint will generate images - */ - async createGeneration( - request: operations.CreateGenerationRequestBody, - options?: RequestOptions - ): Promise { - return unwrapAsync(imageCreateGeneration(this, request, options)); - } + /** + * Create a Generation of Images + * + * @remarks + * This endpoint will generate images + */ + async createGeneration( + request: operations.CreateGenerationRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(imageCreateGeneration( + this, + request, + options, + )); + } - /** - * Delete a Single Generation - * - * @remarks - * This endpoint deletes a specific generation - */ - async deleteGenerationById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(imageDeleteGenerationById(this, id, options)); - } + /** + * Delete a Single Generation + * + * @remarks + * This endpoint deletes a specific generation + */ + async deleteGenerationById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(imageDeleteGenerationById( + this, + id, + options, + )); + } - /** - * Get a Single Generation - * - * @remarks - * This endpoint will provide information about a specific generation - */ - async getGenerationById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(imageGetGenerationById(this, id, options)); - } + /** + * Get a Single Generation + * + * @remarks + * This endpoint will provide information about a specific generation + */ + async getGenerationById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(imageGetGenerationById( + this, + id, + options, + )); + } - /** - * Get generations by user ID - * - * @remarks - * This endpoint returns all generations by a specific user - */ - async getGenerationsByUserId( - userId: string, - limit?: number | undefined, - offset?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(imageGetGenerationsByUserId(this, userId, limit, offset, options)); - } + /** + * Get generations by user ID + * + * @remarks + * This endpoint returns all generations by a specific user + */ + async getGenerationsByUserId( + userId: string, + limit?: number | undefined, + offset?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(imageGetGenerationsByUserId( + this, + userId, + limit, + offset, + options, + )); + } } diff --git a/src/sdk/initimages.ts b/src/sdk/initimages.ts index e8707e1..cee197f 100644 --- a/src/sdk/initimages.ts +++ b/src/sdk/initimages.ts @@ -11,55 +11,71 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class InitImages extends ClientSDK { - /** - * Delete init image - * - * @remarks - * This endpoint deletes an init image - */ - async deleteInitImageById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(initImagesDeleteInitImageById(this, id, options)); - } + /** + * Delete init image + * + * @remarks + * This endpoint deletes an init image + */ + async deleteInitImageById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(initImagesDeleteInitImageById( + this, + id, + options, + )); + } - /** - * Get single init image - * - * @remarks - * This endpoint will return a single init image - */ - async getInitImageById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(initImagesGetInitImageById(this, id, options)); - } + /** + * Get single init image + * + * @remarks + * This endpoint will return a single init image + */ + async getInitImageById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(initImagesGetInitImageById( + this, + id, + options, + )); + } - /** - * Upload Canvas Editor init and mask image - * - * @remarks - * This endpoint returns presigned details to upload an init image and a mask image to S3 - */ - async uploadCanvasInitImage( - request: operations.UploadCanvasInitImageRequestBody, - options?: RequestOptions - ): Promise { - return unwrapAsync(initImagesUploadCanvasInitImage(this, request, options)); - } + /** + * Upload Canvas Editor init and mask image + * + * @remarks + * This endpoint returns presigned details to upload an init image and a mask image to S3 + */ + async uploadCanvasInitImage( + request: operations.UploadCanvasInitImageRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(initImagesUploadCanvasInitImage( + this, + request, + options, + )); + } - /** - * Upload init image - * - * @remarks - * This endpoint returns presigned details to upload an init image to S3 - */ - async uploadInitImage( - request: operations.UploadInitImageRequestBody, - options?: RequestOptions - ): Promise { - return unwrapAsync(initImagesUploadInitImage(this, request, options)); - } + /** + * Upload init image + * + * @remarks + * This endpoint returns presigned details to upload an init image to S3 + */ + async uploadInitImage( + request: operations.UploadInitImageRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(initImagesUploadInitImage( + this, + request, + options, + )); + } } diff --git a/src/sdk/models.ts b/src/sdk/models.ts index 3ebd86d..1ac7df6 100644 --- a/src/sdk/models.ts +++ b/src/sdk/models.ts @@ -11,54 +11,69 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Models extends ClientSDK { - /** - * Train a Custom Model - * - * @remarks - * This endpoint will train a new custom model - */ - async createModel( - request: operations.CreateModelRequestBody, - options?: RequestOptions - ): Promise { - return unwrapAsync(modelsCreateModel(this, request, options)); - } + /** + * Train a Custom Model + * + * @remarks + * This endpoint will train a new custom model + */ + async createModel( + request: operations.CreateModelRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(modelsCreateModel( + this, + request, + options, + )); + } - /** - * Delete a Single Custom Model by ID - * - * @remarks - * This endpoint will delete a specific custom model - */ - async deleteModelById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(modelsDeleteModelById(this, id, options)); - } + /** + * Delete a Single Custom Model by ID + * + * @remarks + * This endpoint will delete a specific custom model + */ + async deleteModelById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(modelsDeleteModelById( + this, + id, + options, + )); + } - /** - * Get a Single Custom Model by ID - * - * @remarks - * This endpoint gets the specific custom model - */ - async getModelById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(modelsGetModelById(this, id, options)); - } + /** + * Get a Single Custom Model by ID + * + * @remarks + * This endpoint gets the specific custom model + */ + async getModelById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(modelsGetModelById( + this, + id, + options, + )); + } - /** - * List Platform Models - * - * @remarks - * Get a list of public Platform Models available for use with generations. - */ - async listPlatformModels( - options?: RequestOptions - ): Promise { - return unwrapAsync(modelsListPlatformModels(this, options)); - } + /** + * List Platform Models + * + * @remarks + * Get a list of public Platform Models available for use with generations. + */ + async listPlatformModels( + options?: RequestOptions, + ): Promise { + return unwrapAsync(modelsListPlatformModels( + this, + options, + )); + } } diff --git a/src/sdk/models/errors/httpclienterrors.ts b/src/sdk/models/errors/httpclienterrors.ts index cdb2995..b34f612 100644 --- a/src/sdk/models/errors/httpclienterrors.ts +++ b/src/sdk/models/errors/httpclienterrors.ts @@ -6,43 +6,43 @@ * Base class for all HTTP errors. */ export class HTTPClientError extends Error { - /** The underlying cause of the error. */ - override readonly cause: unknown; - override name = "HTTPClientError"; - constructor(message: string, opts?: { cause?: unknown }) { - let msg = message; - if (opts?.cause) { - msg += `: ${opts.cause}`; - } + /** The underlying cause of the error. */ + override readonly cause: unknown; + override name = "HTTPClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + let msg = message; + if (opts?.cause) { + msg += `: ${opts.cause}`; + } - super(msg, opts); - // In older runtimes, the cause field would not have been assigned through - // the super() call. - if (typeof this.cause === "undefined") { - this.cause = opts?.cause; - } + super(msg, opts); + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = opts?.cause; } + } } /** * An error to capture unrecognised or unexpected errors when making HTTP calls. */ export class UnexpectedClientError extends HTTPClientError { - override name = "UnexpectedClientError"; + override name = "UnexpectedClientError"; } /** * An error that is raised when any inputs used to create a request are invalid. */ export class InvalidRequestError extends HTTPClientError { - override name = "InvalidRequestError"; + override name = "InvalidRequestError"; } /** * An error that is raised when a HTTP request was aborted by the client error. */ export class RequestAbortedError extends HTTPClientError { - override readonly name = "RequestAbortedError"; + override readonly name = "RequestAbortedError"; } /** @@ -50,7 +50,7 @@ export class RequestAbortedError extends HTTPClientError { * signal timeout. */ export class RequestTimeoutError extends HTTPClientError { - override readonly name = "RequestTimeoutError"; + override readonly name = "RequestTimeoutError"; } /** @@ -58,5 +58,5 @@ export class RequestTimeoutError extends HTTPClientError { * a server. */ export class ConnectionError extends HTTPClientError { - override readonly name = "ConnectionError"; + override readonly name = "ConnectionError"; } diff --git a/src/sdk/models/errors/sdkerror.ts b/src/sdk/models/errors/sdkerror.ts index 80e3aa4..001f465 100644 --- a/src/sdk/models/errors/sdkerror.ts +++ b/src/sdk/models/errors/sdkerror.ts @@ -3,23 +3,25 @@ */ export class SDKError extends Error { - public readonly statusCode: number; - public readonly contentType: string; + public readonly statusCode: number; + public readonly contentType: string; - constructor( - message: string, - public readonly rawResponse: Response, - public readonly body: string = "" - ) { - const statusCode = rawResponse.status; - const contentType = rawResponse.headers.get("content-type") || ""; - const bodyString = body.length > 0 ? `\n${body}` : ""; + constructor( + message: string, + public readonly rawResponse: Response, + public readonly body: string = "", + ) { + const statusCode = rawResponse.status; + const contentType = rawResponse.headers.get("content-type") || ""; + const bodyString = body.length > 0 ? `\n${body}` : ""; - super(`${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`); + super( + `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, + ); - this.statusCode = statusCode; - this.contentType = contentType; + this.statusCode = statusCode; + this.contentType = contentType; - this.name = "SDKError"; - } + this.name = "SDKError"; + } } diff --git a/src/sdk/models/operations/createdataset.ts b/src/sdk/models/operations/createdataset.ts index 41717cd..15c3fe3 100644 --- a/src/sdk/models/operations/createdataset.ts +++ b/src/sdk/models/operations/createdataset.ts @@ -2,83 +2,83 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters to be provided in the request body as a JSON object */ export type CreateDatasetRequestBody = { - /** - * A description for the dataset. - */ - description?: string | null | undefined; - /** - * The name of the dataset. - */ - name: string; + /** + * A description for the dataset. + */ + description?: string | null | undefined; + /** + * The name of the dataset. + */ + name: string; }; /** * columns and relationships of "datasets" */ export type Datasets = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** * Responses for POST /datasets */ export type CreateDatasetResponseBody = { - /** - * columns and relationships of "datasets" - */ - insertDatasetsOne?: Datasets | null | undefined; + /** + * columns and relationships of "datasets" + */ + insertDatasetsOne?: Datasets | null | undefined; }; export type CreateDatasetResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /datasets - */ - object?: CreateDatasetResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /datasets + */ + object?: CreateDatasetResponseBody | undefined; }; /** @internal */ export const CreateDatasetRequestBody$inboundSchema: z.ZodType< - CreateDatasetRequestBody, - z.ZodTypeDef, - unknown + CreateDatasetRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - description: z.nullable(z.string()).optional(), - name: z.string(), + description: z.nullable(z.string()).optional(), + name: z.string(), }); /** @internal */ export type CreateDatasetRequestBody$Outbound = { - description?: string | null | undefined; - name: string; + description?: string | null | undefined; + name: string; }; /** @internal */ export const CreateDatasetRequestBody$outboundSchema: z.ZodType< - CreateDatasetRequestBody$Outbound, - z.ZodTypeDef, - CreateDatasetRequestBody + CreateDatasetRequestBody$Outbound, + z.ZodTypeDef, + CreateDatasetRequestBody > = z.object({ - description: z.nullable(z.string()).optional(), - name: z.string(), + description: z.nullable(z.string()).optional(), + name: z.string(), }); /** @@ -86,150 +86,151 @@ export const CreateDatasetRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateDatasetRequestBody$ { - /** @deprecated use `CreateDatasetRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateDatasetRequestBody$inboundSchema; - /** @deprecated use `CreateDatasetRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateDatasetRequestBody$outboundSchema; - /** @deprecated use `CreateDatasetRequestBody$Outbound` instead. */ - export type Outbound = CreateDatasetRequestBody$Outbound; + /** @deprecated use `CreateDatasetRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateDatasetRequestBody$inboundSchema; + /** @deprecated use `CreateDatasetRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateDatasetRequestBody$outboundSchema; + /** @deprecated use `CreateDatasetRequestBody$Outbound` instead. */ + export type Outbound = CreateDatasetRequestBody$Outbound; } /** @internal */ -export const Datasets$inboundSchema: z.ZodType = z.object({ - id: z.nullable(z.string()).optional(), +export const Datasets$inboundSchema: z.ZodType< + Datasets, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), }); /** @internal */ export type Datasets$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ -export const Datasets$outboundSchema: z.ZodType = - z.object({ - id: z.nullable(z.string()).optional(), - }); +export const Datasets$outboundSchema: z.ZodType< + Datasets$Outbound, + z.ZodTypeDef, + Datasets +> = z.object({ + id: z.nullable(z.string()).optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Datasets$ { - /** @deprecated use `Datasets$inboundSchema` instead. */ - export const inboundSchema = Datasets$inboundSchema; - /** @deprecated use `Datasets$outboundSchema` instead. */ - export const outboundSchema = Datasets$outboundSchema; - /** @deprecated use `Datasets$Outbound` instead. */ - export type Outbound = Datasets$Outbound; + /** @deprecated use `Datasets$inboundSchema` instead. */ + export const inboundSchema = Datasets$inboundSchema; + /** @deprecated use `Datasets$outboundSchema` instead. */ + export const outboundSchema = Datasets$outboundSchema; + /** @deprecated use `Datasets$Outbound` instead. */ + export type Outbound = Datasets$Outbound; } /** @internal */ export const CreateDatasetResponseBody$inboundSchema: z.ZodType< - CreateDatasetResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - insert_datasets_one: z.nullable(z.lazy(() => Datasets$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - insert_datasets_one: "insertDatasetsOne", - }); - }); + CreateDatasetResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + insert_datasets_one: z.nullable(z.lazy(() => Datasets$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "insert_datasets_one": "insertDatasetsOne", + }); +}); /** @internal */ export type CreateDatasetResponseBody$Outbound = { - insert_datasets_one?: Datasets$Outbound | null | undefined; + insert_datasets_one?: Datasets$Outbound | null | undefined; }; /** @internal */ export const CreateDatasetResponseBody$outboundSchema: z.ZodType< - CreateDatasetResponseBody$Outbound, - z.ZodTypeDef, - CreateDatasetResponseBody -> = z - .object({ - insertDatasetsOne: z.nullable(z.lazy(() => Datasets$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - insertDatasetsOne: "insert_datasets_one", - }); - }); + CreateDatasetResponseBody$Outbound, + z.ZodTypeDef, + CreateDatasetResponseBody +> = z.object({ + insertDatasetsOne: z.nullable(z.lazy(() => Datasets$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + insertDatasetsOne: "insert_datasets_one", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateDatasetResponseBody$ { - /** @deprecated use `CreateDatasetResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateDatasetResponseBody$inboundSchema; - /** @deprecated use `CreateDatasetResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateDatasetResponseBody$outboundSchema; - /** @deprecated use `CreateDatasetResponseBody$Outbound` instead. */ - export type Outbound = CreateDatasetResponseBody$Outbound; + /** @deprecated use `CreateDatasetResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateDatasetResponseBody$inboundSchema; + /** @deprecated use `CreateDatasetResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateDatasetResponseBody$outboundSchema; + /** @deprecated use `CreateDatasetResponseBody$Outbound` instead. */ + export type Outbound = CreateDatasetResponseBody$Outbound; } /** @internal */ export const CreateDatasetResponse$inboundSchema: z.ZodType< - CreateDatasetResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateDatasetResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateDatasetResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateDatasetResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateDatasetResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateDatasetResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateDatasetResponseBody$Outbound | undefined; }; /** @internal */ export const CreateDatasetResponse$outboundSchema: z.ZodType< - CreateDatasetResponse$Outbound, - z.ZodTypeDef, - CreateDatasetResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateDatasetResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateDatasetResponse$Outbound, + z.ZodTypeDef, + CreateDatasetResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateDatasetResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateDatasetResponse$ { - /** @deprecated use `CreateDatasetResponse$inboundSchema` instead. */ - export const inboundSchema = CreateDatasetResponse$inboundSchema; - /** @deprecated use `CreateDatasetResponse$outboundSchema` instead. */ - export const outboundSchema = CreateDatasetResponse$outboundSchema; - /** @deprecated use `CreateDatasetResponse$Outbound` instead. */ - export type Outbound = CreateDatasetResponse$Outbound; + /** @deprecated use `CreateDatasetResponse$inboundSchema` instead. */ + export const inboundSchema = CreateDatasetResponse$inboundSchema; + /** @deprecated use `CreateDatasetResponse$outboundSchema` instead. */ + export const outboundSchema = CreateDatasetResponse$outboundSchema; + /** @deprecated use `CreateDatasetResponse$Outbound` instead. */ + export type Outbound = CreateDatasetResponse$Outbound; } diff --git a/src/sdk/models/operations/creategeneration.ts b/src/sdk/models/operations/creategeneration.ts index 2df97c1..b8467d3 100644 --- a/src/sdk/models/operations/creategeneration.ts +++ b/src/sdk/models/operations/creategeneration.ts @@ -2,463 +2,480 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * Which type of transparency this image should use */ export enum TransparencyType { - Disabled = "disabled", - ForegroundOnly = "foreground_only", + Disabled = "disabled", + ForegroundOnly = "foreground_only", } /** * Query parameters to be provided in the request body as a JSON object */ export type CreateGenerationRequestBody = { - /** - * Enable to use Alchemy. Note: The appropriate Alchemy version is selected for the specified model. For example, XL models will use Alchemy V2. - */ - alchemy?: boolean | null | undefined; - /** - * The ID of an initial image to use in Canvas Editor request. - */ - canvasInitId?: string | null | undefined; - /** - * The ID of a mask image to use in Canvas Editor request. - */ - canvasMaskId?: string | null | undefined; - /** - * Whether the generation is for the Canvas Editor feature. - */ - canvasRequest?: boolean | null | undefined; - /** - * The type of request for the Canvas Editor. - */ - canvasRequestType?: shared.CanvasRequestType | null | undefined; - /** - * Contrast Ratio to use with Alchemy. Must be a float between 0 and 1 inclusive. - */ - contrastRatio?: number | null | undefined; - /** - * This parameter will be deprecated in September 2024. Please use the controlnets array instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - controlNet?: boolean | null | undefined; - /** - * This parameter will be deprecated in September 2024. Please use the controlnets array instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - controlNetType?: shared.ControlnetType | undefined; - controlnets?: Array | null | undefined; - elements?: Array | null | undefined; - /** - * Enable to use the Expanded Domain feature of Alchemy. - */ - expandedDomain?: boolean | null | undefined; - /** - * Enable to use the Fantasy Avatar feature. - */ - fantasyAvatar?: boolean | null | undefined; - /** - * How strongly the generation should reflect the prompt. 7 is recommended. Must be between 1 and 20. - */ - guidanceScale?: number | null | undefined; - /** - * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features. - */ - height?: number | null | undefined; - /** - * Enable to use the High Contrast feature of Prompt Magic. Note: Controls RAW mode. Set to false to enable RAW mode. - */ - highContrast?: boolean | null | undefined; - /** - * Enable to use the High Resolution feature of Prompt Magic. - */ - highResolution?: boolean | null | undefined; - imagePromptWeight?: number | null | undefined; - imagePrompts?: Array | null | undefined; - /** - * The ID of an existing image to use in image2image. - */ - initGenerationImageId?: string | null | undefined; - /** - * The ID of an Init Image to use in image2image. - */ - initImageId?: string | null | undefined; - /** - * How strongly the generated images should reflect the original image in image2image. Must be a float between 0.1 and 0.9. - */ - initStrength?: number | null | undefined; - /** - * The model ID used for image generation. If not provided, uses sd_version to determine the version of Stable Diffusion to use. In-app, model IDs are under the Finetune Models menu. Click on the platform model or your custom model, then click View More. For platform models, you can also use the List Platform Models API. - */ - modelId?: string | null | undefined; - /** - * The negative prompt used for the image generation - */ - negativePrompt?: string | null | undefined; - /** - * The number of images to generate. Must be between 1 and 8. If either width or height is over 768, must be between 1 and 4. - */ - numImages?: number | null | undefined; - /** - * The Step Count to use for the generation. Must be between 10 and 60. Default is 15. - */ - numInferenceSteps?: number | null | undefined; - /** - * Enable the photoReal feature. Requires enabling alchemy and unspecifying modelId (for photoRealVersion V1). - */ - photoReal?: boolean | null | undefined; - /** - * Depth of field of photoReal. Must be 0.55 for low, 0.5 for medium, or 0.45 for high. Defaults to 0.55 if not specified. - */ - photoRealStrength?: number | null | undefined; - /** - * The version of photoReal to use. Must be v1 or v2. - */ - photoRealVersion?: string | null | undefined; - /** - * The style to generate images with. When photoReal is enabled, refer to the Guide section for a full list. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE. - */ - presetStyle?: shared.SdGenerationStyle | null | undefined; - /** - * The prompt used to generate images - */ - prompt?: string | undefined; - /** - * Enable to use Prompt Magic. - */ - promptMagic?: boolean | null | undefined; - /** - * Strength of prompt magic. Must be a float between 0.1 and 1.0 - */ - promptMagicStrength?: number | null | undefined; - /** - * Prompt magic version v2 or v3, for use when promptMagic: true - */ - promptMagicVersion?: string | null | undefined; - /** - * Whether the generated images should show in the community feed. - */ - public?: boolean | null | undefined; - /** - * The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. - */ - scheduler?: shared.SdGenerationSchedulers | undefined; - /** - * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models - */ - sdVersion?: shared.SdVersions | undefined; - seed?: number | null | undefined; - /** - * Whether the generated images should tile on all axis. - */ - tiling?: boolean | null | undefined; - /** - * Which type of transparency this image should use - */ - transparency?: TransparencyType | null | undefined; - /** - * Whether the generated images should be unzoomed (requires unzoomAmount and init_image_id to be set). - */ - unzoom?: boolean | null | undefined; - /** - * How much the image should be unzoomed (requires an init_image_id and unzoom to be set to true). - */ - unzoomAmount?: number | null | undefined; - /** - * How much the image should be upscaled. (Enterprise Only) - */ - upscaleRatio?: number | null | undefined; - /** - * This parameter will be deprecated in September 2024. Please use the controlnets array instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - weighting?: number | null | undefined; - /** - * The input width of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features. - */ - width?: number | null | undefined; + /** + * Enable to use Alchemy. Note: The appropriate Alchemy version is selected for the specified model. For example, XL models will use Alchemy V2. + */ + alchemy?: boolean | null | undefined; + /** + * The ID of an initial image to use in Canvas Editor request. + */ + canvasInitId?: string | null | undefined; + /** + * The ID of a mask image to use in Canvas Editor request. + */ + canvasMaskId?: string | null | undefined; + /** + * Whether the generation is for the Canvas Editor feature. + */ + canvasRequest?: boolean | null | undefined; + /** + * The type of request for the Canvas Editor. + */ + canvasRequestType?: shared.CanvasRequestType | null | undefined; + /** + * Contrast Ratio to use with Alchemy. Must be a float between 0 and 1 inclusive. + */ + contrastRatio?: number | null | undefined; + /** + * This parameter will be deprecated in September 2024. Please use the controlnets array instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + controlNet?: boolean | null | undefined; + /** + * This parameter will be deprecated in September 2024. Please use the controlnets array instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + controlNetType?: shared.ControlnetType | undefined; + controlnets?: Array | null | undefined; + elements?: Array | null | undefined; + /** + * Enable to use the Expanded Domain feature of Alchemy. + */ + expandedDomain?: boolean | null | undefined; + /** + * Enable to use the Fantasy Avatar feature. + */ + fantasyAvatar?: boolean | null | undefined; + /** + * How strongly the generation should reflect the prompt. 7 is recommended. Must be between 1 and 20. + */ + guidanceScale?: number | null | undefined; + /** + * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features. + */ + height?: number | null | undefined; + /** + * Enable to use the High Contrast feature of Prompt Magic. Note: Controls RAW mode. Set to false to enable RAW mode. + */ + highContrast?: boolean | null | undefined; + /** + * Enable to use the High Resolution feature of Prompt Magic. + */ + highResolution?: boolean | null | undefined; + imagePromptWeight?: number | null | undefined; + imagePrompts?: Array | null | undefined; + /** + * The ID of an existing image to use in image2image. + */ + initGenerationImageId?: string | null | undefined; + /** + * The ID of an Init Image to use in image2image. + */ + initImageId?: string | null | undefined; + /** + * How strongly the generated images should reflect the original image in image2image. Must be a float between 0.1 and 0.9. + */ + initStrength?: number | null | undefined; + /** + * The model ID used for image generation. If not provided, uses sd_version to determine the version of Stable Diffusion to use. In-app, model IDs are under the Finetune Models menu. Click on the platform model or your custom model, then click View More. For platform models, you can also use the List Platform Models API. + */ + modelId?: string | null | undefined; + /** + * The negative prompt used for the image generation + */ + negativePrompt?: string | null | undefined; + /** + * The number of images to generate. Must be between 1 and 8. If either width or height is over 768, must be between 1 and 4. + */ + numImages?: number | null | undefined; + /** + * The Step Count to use for the generation. Must be between 10 and 60. Default is 15. + */ + numInferenceSteps?: number | null | undefined; + /** + * Enable the photoReal feature. Requires enabling alchemy and unspecifying modelId (for photoRealVersion V1). + */ + photoReal?: boolean | null | undefined; + /** + * Depth of field of photoReal. Must be 0.55 for low, 0.5 for medium, or 0.45 for high. Defaults to 0.55 if not specified. + */ + photoRealStrength?: number | null | undefined; + /** + * The version of photoReal to use. Must be v1 or v2. + */ + photoRealVersion?: string | null | undefined; + /** + * The style to generate images with. When photoReal is enabled, refer to the Guide section for a full list. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE. + */ + presetStyle?: shared.SdGenerationStyle | null | undefined; + /** + * The prompt used to generate images + */ + prompt?: string | undefined; + /** + * Enable to use Prompt Magic. + */ + promptMagic?: boolean | null | undefined; + /** + * Strength of prompt magic. Must be a float between 0.1 and 1.0 + */ + promptMagicStrength?: number | null | undefined; + /** + * Prompt magic version v2 or v3, for use when promptMagic: true + */ + promptMagicVersion?: string | null | undefined; + /** + * Whether the generated images should show in the community feed. + */ + public?: boolean | null | undefined; + /** + * The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. + */ + scheduler?: shared.SdGenerationSchedulers | undefined; + /** + * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models + */ + sdVersion?: shared.SdVersions | undefined; + seed?: number | null | undefined; + /** + * Whether the generated images should tile on all axis. + */ + tiling?: boolean | null | undefined; + /** + * Which type of transparency this image should use + */ + transparency?: TransparencyType | null | undefined; + /** + * Enable to use Ultra mode. Note: can not be used with Alchemy. + */ + ultra?: boolean | null | undefined; + /** + * Whether the generated images should be unzoomed (requires unzoomAmount and init_image_id to be set). + */ + unzoom?: boolean | null | undefined; + /** + * How much the image should be unzoomed (requires an init_image_id and unzoom to be set to true). + */ + unzoomAmount?: number | null | undefined; + /** + * How much the image should be upscaled. (Enterprise Only) + */ + upscaleRatio?: number | null | undefined; + /** + * This parameter will be deprecated in September 2024. Please use the controlnets array instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + weighting?: number | null | undefined; + /** + * The input width of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features. + */ + width?: number | null | undefined; }; export type SDGenerationOutput = { - /** - * API Credits Cost for Image Generation. Available for Production API Users. - */ - apiCreditCost?: number | null | undefined; - generationId?: string | undefined; + /** + * API Credits Cost for Image Generation. Available for Production API Users. + */ + apiCreditCost?: number | null | undefined; + generationId?: string | undefined; }; /** * Responses for POST /generations */ export type CreateGenerationResponseBody = { - sdGenerationJob?: SDGenerationOutput | null | undefined; + sdGenerationJob?: SDGenerationOutput | null | undefined; }; export type CreateGenerationResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /generations - */ - object?: CreateGenerationResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /generations + */ + object?: CreateGenerationResponseBody | undefined; }; /** @internal */ -export const TransparencyType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(TransparencyType); +export const TransparencyType$inboundSchema: z.ZodNativeEnum< + typeof TransparencyType +> = z.nativeEnum(TransparencyType); /** @internal */ -export const TransparencyType$outboundSchema: z.ZodNativeEnum = - TransparencyType$inboundSchema; +export const TransparencyType$outboundSchema: z.ZodNativeEnum< + typeof TransparencyType +> = TransparencyType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TransparencyType$ { - /** @deprecated use `TransparencyType$inboundSchema` instead. */ - export const inboundSchema = TransparencyType$inboundSchema; - /** @deprecated use `TransparencyType$outboundSchema` instead. */ - export const outboundSchema = TransparencyType$outboundSchema; + /** @deprecated use `TransparencyType$inboundSchema` instead. */ + export const inboundSchema = TransparencyType$inboundSchema; + /** @deprecated use `TransparencyType$outboundSchema` instead. */ + export const outboundSchema = TransparencyType$outboundSchema; } /** @internal */ export const CreateGenerationRequestBody$inboundSchema: z.ZodType< - CreateGenerationRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - alchemy: z.nullable(z.boolean().default(true)), - canvasInitId: z.nullable(z.string()).optional(), - canvasMaskId: z.nullable(z.string()).optional(), - canvasRequest: z.nullable(z.boolean()).optional(), - canvasRequestType: z.nullable(shared.CanvasRequestType$inboundSchema).optional(), - contrastRatio: z.nullable(z.number()).optional(), - controlNet: z.nullable(z.boolean()).optional(), - controlNetType: shared.ControlnetType$inboundSchema.optional(), - controlnets: z.nullable(z.array(shared.ControlnetInput$inboundSchema)).optional(), - elements: z.nullable(z.array(shared.ElementInput$inboundSchema)).optional(), - expandedDomain: z.nullable(z.boolean()).optional(), - fantasyAvatar: z.nullable(z.boolean()).optional(), - guidance_scale: z.nullable(z.number().int()).optional(), - height: z.nullable(z.number().int().default(768)), - highContrast: z.nullable(z.boolean()).optional(), - highResolution: z.nullable(z.boolean()).optional(), - imagePromptWeight: z.nullable(z.number()).optional(), - imagePrompts: z.nullable(z.array(z.string())).optional(), - init_generation_image_id: z.nullable(z.string()).optional(), - init_image_id: z.nullable(z.string()).optional(), - init_strength: z.nullable(z.number()).optional(), - modelId: z.nullable(z.string().default("b24e16ff-06e3-43eb-8d33-4416c2d75876")), - negative_prompt: z.nullable(z.string()).optional(), - num_images: z.nullable(z.number().int().default(4)), - num_inference_steps: z.nullable(z.number().int()).optional(), - photoReal: z.nullable(z.boolean()).optional(), - photoRealStrength: z.nullable(z.number()).optional(), - photoRealVersion: z.nullable(z.string()).optional(), - presetStyle: z.nullable( - shared.SdGenerationStyle$inboundSchema.default(shared.SdGenerationStyle.Dynamic) - ), - prompt: z.string().default("A majestic cat in the snow"), - promptMagic: z.nullable(z.boolean()).optional(), - promptMagicStrength: z.nullable(z.number()).optional(), - promptMagicVersion: z.nullable(z.string()).optional(), - public: z.nullable(z.boolean()).optional(), - scheduler: shared.SdGenerationSchedulers$inboundSchema.optional(), - sd_version: shared.SdVersions$inboundSchema.optional(), - seed: z.nullable(z.number().int()).optional(), - tiling: z.nullable(z.boolean()).optional(), - transparency: z.nullable(TransparencyType$inboundSchema).optional(), - unzoom: z.nullable(z.boolean()).optional(), - unzoomAmount: z.nullable(z.number()).optional(), - upscaleRatio: z.nullable(z.number()).optional(), - weighting: z.nullable(z.number()).optional(), - width: z.nullable(z.number().int().default(1024)), - }) - .transform((v) => { - return remap$(v, { - guidance_scale: "guidanceScale", - init_generation_image_id: "initGenerationImageId", - init_image_id: "initImageId", - init_strength: "initStrength", - negative_prompt: "negativePrompt", - num_images: "numImages", - num_inference_steps: "numInferenceSteps", - sd_version: "sdVersion", - }); - }); + CreateGenerationRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + alchemy: z.nullable(z.boolean().default(true)), + canvasInitId: z.nullable(z.string()).optional(), + canvasMaskId: z.nullable(z.string()).optional(), + canvasRequest: z.nullable(z.boolean()).optional(), + canvasRequestType: z.nullable(shared.CanvasRequestType$inboundSchema) + .optional(), + contrastRatio: z.nullable(z.number()).optional(), + controlNet: z.nullable(z.boolean()).optional(), + controlNetType: shared.ControlnetType$inboundSchema.optional(), + controlnets: z.nullable(z.array(shared.ControlnetInput$inboundSchema)) + .optional(), + elements: z.nullable(z.array(shared.ElementInput$inboundSchema)).optional(), + expandedDomain: z.nullable(z.boolean()).optional(), + fantasyAvatar: z.nullable(z.boolean()).optional(), + guidance_scale: z.nullable(z.number().int()).optional(), + height: z.nullable(z.number().int().default(768)), + highContrast: z.nullable(z.boolean()).optional(), + highResolution: z.nullable(z.boolean()).optional(), + imagePromptWeight: z.nullable(z.number()).optional(), + imagePrompts: z.nullable(z.array(z.string())).optional(), + init_generation_image_id: z.nullable(z.string()).optional(), + init_image_id: z.nullable(z.string()).optional(), + init_strength: z.nullable(z.number()).optional(), + modelId: z.nullable( + z.string().default("b24e16ff-06e3-43eb-8d33-4416c2d75876"), + ), + negative_prompt: z.nullable(z.string()).optional(), + num_images: z.nullable(z.number().int().default(4)), + num_inference_steps: z.nullable(z.number().int()).optional(), + photoReal: z.nullable(z.boolean()).optional(), + photoRealStrength: z.nullable(z.number()).optional(), + photoRealVersion: z.nullable(z.string()).optional(), + presetStyle: z.nullable( + shared.SdGenerationStyle$inboundSchema.default( + shared.SdGenerationStyle.Dynamic, + ), + ), + prompt: z.string().default("A majestic cat in the snow"), + promptMagic: z.nullable(z.boolean()).optional(), + promptMagicStrength: z.nullable(z.number()).optional(), + promptMagicVersion: z.nullable(z.string()).optional(), + public: z.nullable(z.boolean()).optional(), + scheduler: shared.SdGenerationSchedulers$inboundSchema.optional(), + sd_version: shared.SdVersions$inboundSchema.optional(), + seed: z.nullable(z.number().int()).optional(), + tiling: z.nullable(z.boolean()).optional(), + transparency: z.nullable(TransparencyType$inboundSchema).optional(), + ultra: z.nullable(z.boolean()).optional(), + unzoom: z.nullable(z.boolean()).optional(), + unzoomAmount: z.nullable(z.number()).optional(), + upscaleRatio: z.nullable(z.number()).optional(), + weighting: z.nullable(z.number()).optional(), + width: z.nullable(z.number().int().default(1024)), +}).transform((v) => { + return remap$(v, { + "guidance_scale": "guidanceScale", + "init_generation_image_id": "initGenerationImageId", + "init_image_id": "initImageId", + "init_strength": "initStrength", + "negative_prompt": "negativePrompt", + "num_images": "numImages", + "num_inference_steps": "numInferenceSteps", + "sd_version": "sdVersion", + }); +}); /** @internal */ export type CreateGenerationRequestBody$Outbound = { - alchemy: boolean | null; - canvasInitId?: string | null | undefined; - canvasMaskId?: string | null | undefined; - canvasRequest?: boolean | null | undefined; - canvasRequestType?: string | null | undefined; - contrastRatio?: number | null | undefined; - controlNet?: boolean | null | undefined; - controlNetType?: string | undefined; - controlnets?: Array | null | undefined; - elements?: Array | null | undefined; - expandedDomain?: boolean | null | undefined; - fantasyAvatar?: boolean | null | undefined; - guidance_scale?: number | null | undefined; - height: number | null; - highContrast?: boolean | null | undefined; - highResolution?: boolean | null | undefined; - imagePromptWeight?: number | null | undefined; - imagePrompts?: Array | null | undefined; - init_generation_image_id?: string | null | undefined; - init_image_id?: string | null | undefined; - init_strength?: number | null | undefined; - modelId: string | null; - negative_prompt?: string | null | undefined; - num_images: number | null; - num_inference_steps?: number | null | undefined; - photoReal?: boolean | null | undefined; - photoRealStrength?: number | null | undefined; - photoRealVersion?: string | null | undefined; - presetStyle: string | null; - prompt: string; - promptMagic?: boolean | null | undefined; - promptMagicStrength?: number | null | undefined; - promptMagicVersion?: string | null | undefined; - public?: boolean | null | undefined; - scheduler?: string | undefined; - sd_version?: string | undefined; - seed?: number | null | undefined; - tiling?: boolean | null | undefined; - transparency?: string | null | undefined; - unzoom?: boolean | null | undefined; - unzoomAmount?: number | null | undefined; - upscaleRatio?: number | null | undefined; - weighting?: number | null | undefined; - width: number | null; + alchemy: boolean | null; + canvasInitId?: string | null | undefined; + canvasMaskId?: string | null | undefined; + canvasRequest?: boolean | null | undefined; + canvasRequestType?: string | null | undefined; + contrastRatio?: number | null | undefined; + controlNet?: boolean | null | undefined; + controlNetType?: string | undefined; + controlnets?: Array | null | undefined; + elements?: Array | null | undefined; + expandedDomain?: boolean | null | undefined; + fantasyAvatar?: boolean | null | undefined; + guidance_scale?: number | null | undefined; + height: number | null; + highContrast?: boolean | null | undefined; + highResolution?: boolean | null | undefined; + imagePromptWeight?: number | null | undefined; + imagePrompts?: Array | null | undefined; + init_generation_image_id?: string | null | undefined; + init_image_id?: string | null | undefined; + init_strength?: number | null | undefined; + modelId: string | null; + negative_prompt?: string | null | undefined; + num_images: number | null; + num_inference_steps?: number | null | undefined; + photoReal?: boolean | null | undefined; + photoRealStrength?: number | null | undefined; + photoRealVersion?: string | null | undefined; + presetStyle: string | null; + prompt: string; + promptMagic?: boolean | null | undefined; + promptMagicStrength?: number | null | undefined; + promptMagicVersion?: string | null | undefined; + public?: boolean | null | undefined; + scheduler?: string | undefined; + sd_version?: string | undefined; + seed?: number | null | undefined; + tiling?: boolean | null | undefined; + transparency?: string | null | undefined; + ultra?: boolean | null | undefined; + unzoom?: boolean | null | undefined; + unzoomAmount?: number | null | undefined; + upscaleRatio?: number | null | undefined; + weighting?: number | null | undefined; + width: number | null; }; /** @internal */ export const CreateGenerationRequestBody$outboundSchema: z.ZodType< - CreateGenerationRequestBody$Outbound, - z.ZodTypeDef, - CreateGenerationRequestBody -> = z - .object({ - alchemy: z.nullable(z.boolean().default(true)), - canvasInitId: z.nullable(z.string()).optional(), - canvasMaskId: z.nullable(z.string()).optional(), - canvasRequest: z.nullable(z.boolean()).optional(), - canvasRequestType: z.nullable(shared.CanvasRequestType$outboundSchema).optional(), - contrastRatio: z.nullable(z.number()).optional(), - controlNet: z.nullable(z.boolean()).optional(), - controlNetType: shared.ControlnetType$outboundSchema.optional(), - controlnets: z.nullable(z.array(shared.ControlnetInput$outboundSchema)).optional(), - elements: z.nullable(z.array(shared.ElementInput$outboundSchema)).optional(), - expandedDomain: z.nullable(z.boolean()).optional(), - fantasyAvatar: z.nullable(z.boolean()).optional(), - guidanceScale: z.nullable(z.number().int()).optional(), - height: z.nullable(z.number().int().default(768)), - highContrast: z.nullable(z.boolean()).optional(), - highResolution: z.nullable(z.boolean()).optional(), - imagePromptWeight: z.nullable(z.number()).optional(), - imagePrompts: z.nullable(z.array(z.string())).optional(), - initGenerationImageId: z.nullable(z.string()).optional(), - initImageId: z.nullable(z.string()).optional(), - initStrength: z.nullable(z.number()).optional(), - modelId: z.nullable(z.string().default("b24e16ff-06e3-43eb-8d33-4416c2d75876")), - negativePrompt: z.nullable(z.string()).optional(), - numImages: z.nullable(z.number().int().default(4)), - numInferenceSteps: z.nullable(z.number().int()).optional(), - photoReal: z.nullable(z.boolean()).optional(), - photoRealStrength: z.nullable(z.number()).optional(), - photoRealVersion: z.nullable(z.string()).optional(), - presetStyle: z.nullable( - shared.SdGenerationStyle$outboundSchema.default(shared.SdGenerationStyle.Dynamic) - ), - prompt: z.string().default("A majestic cat in the snow"), - promptMagic: z.nullable(z.boolean()).optional(), - promptMagicStrength: z.nullable(z.number()).optional(), - promptMagicVersion: z.nullable(z.string()).optional(), - public: z.nullable(z.boolean()).optional(), - scheduler: shared.SdGenerationSchedulers$outboundSchema.optional(), - sdVersion: shared.SdVersions$outboundSchema.optional(), - seed: z.nullable(z.number().int()).optional(), - tiling: z.nullable(z.boolean()).optional(), - transparency: z.nullable(TransparencyType$outboundSchema).optional(), - unzoom: z.nullable(z.boolean()).optional(), - unzoomAmount: z.nullable(z.number()).optional(), - upscaleRatio: z.nullable(z.number()).optional(), - weighting: z.nullable(z.number()).optional(), - width: z.nullable(z.number().int().default(1024)), - }) - .transform((v) => { - return remap$(v, { - guidanceScale: "guidance_scale", - initGenerationImageId: "init_generation_image_id", - initImageId: "init_image_id", - initStrength: "init_strength", - negativePrompt: "negative_prompt", - numImages: "num_images", - numInferenceSteps: "num_inference_steps", - sdVersion: "sd_version", - }); - }); + CreateGenerationRequestBody$Outbound, + z.ZodTypeDef, + CreateGenerationRequestBody +> = z.object({ + alchemy: z.nullable(z.boolean().default(true)), + canvasInitId: z.nullable(z.string()).optional(), + canvasMaskId: z.nullable(z.string()).optional(), + canvasRequest: z.nullable(z.boolean()).optional(), + canvasRequestType: z.nullable(shared.CanvasRequestType$outboundSchema) + .optional(), + contrastRatio: z.nullable(z.number()).optional(), + controlNet: z.nullable(z.boolean()).optional(), + controlNetType: shared.ControlnetType$outboundSchema.optional(), + controlnets: z.nullable(z.array(shared.ControlnetInput$outboundSchema)) + .optional(), + elements: z.nullable(z.array(shared.ElementInput$outboundSchema)).optional(), + expandedDomain: z.nullable(z.boolean()).optional(), + fantasyAvatar: z.nullable(z.boolean()).optional(), + guidanceScale: z.nullable(z.number().int()).optional(), + height: z.nullable(z.number().int().default(768)), + highContrast: z.nullable(z.boolean()).optional(), + highResolution: z.nullable(z.boolean()).optional(), + imagePromptWeight: z.nullable(z.number()).optional(), + imagePrompts: z.nullable(z.array(z.string())).optional(), + initGenerationImageId: z.nullable(z.string()).optional(), + initImageId: z.nullable(z.string()).optional(), + initStrength: z.nullable(z.number()).optional(), + modelId: z.nullable( + z.string().default("b24e16ff-06e3-43eb-8d33-4416c2d75876"), + ), + negativePrompt: z.nullable(z.string()).optional(), + numImages: z.nullable(z.number().int().default(4)), + numInferenceSteps: z.nullable(z.number().int()).optional(), + photoReal: z.nullable(z.boolean()).optional(), + photoRealStrength: z.nullable(z.number()).optional(), + photoRealVersion: z.nullable(z.string()).optional(), + presetStyle: z.nullable( + shared.SdGenerationStyle$outboundSchema.default( + shared.SdGenerationStyle.Dynamic, + ), + ), + prompt: z.string().default("A majestic cat in the snow"), + promptMagic: z.nullable(z.boolean()).optional(), + promptMagicStrength: z.nullable(z.number()).optional(), + promptMagicVersion: z.nullable(z.string()).optional(), + public: z.nullable(z.boolean()).optional(), + scheduler: shared.SdGenerationSchedulers$outboundSchema.optional(), + sdVersion: shared.SdVersions$outboundSchema.optional(), + seed: z.nullable(z.number().int()).optional(), + tiling: z.nullable(z.boolean()).optional(), + transparency: z.nullable(TransparencyType$outboundSchema).optional(), + ultra: z.nullable(z.boolean()).optional(), + unzoom: z.nullable(z.boolean()).optional(), + unzoomAmount: z.nullable(z.number()).optional(), + upscaleRatio: z.nullable(z.number()).optional(), + weighting: z.nullable(z.number()).optional(), + width: z.nullable(z.number().int().default(1024)), +}).transform((v) => { + return remap$(v, { + guidanceScale: "guidance_scale", + initGenerationImageId: "init_generation_image_id", + initImageId: "init_image_id", + initStrength: "init_strength", + negativePrompt: "negative_prompt", + numImages: "num_images", + numInferenceSteps: "num_inference_steps", + sdVersion: "sd_version", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateGenerationRequestBody$ { - /** @deprecated use `CreateGenerationRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateGenerationRequestBody$inboundSchema; - /** @deprecated use `CreateGenerationRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateGenerationRequestBody$outboundSchema; - /** @deprecated use `CreateGenerationRequestBody$Outbound` instead. */ - export type Outbound = CreateGenerationRequestBody$Outbound; + /** @deprecated use `CreateGenerationRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateGenerationRequestBody$inboundSchema; + /** @deprecated use `CreateGenerationRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateGenerationRequestBody$outboundSchema; + /** @deprecated use `CreateGenerationRequestBody$Outbound` instead. */ + export type Outbound = CreateGenerationRequestBody$Outbound; } /** @internal */ export const SDGenerationOutput$inboundSchema: z.ZodType< - SDGenerationOutput, - z.ZodTypeDef, - unknown + SDGenerationOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - generationId: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + generationId: z.string().optional(), }); /** @internal */ export type SDGenerationOutput$Outbound = { - apiCreditCost?: number | null | undefined; - generationId?: string | undefined; + apiCreditCost?: number | null | undefined; + generationId?: string | undefined; }; /** @internal */ export const SDGenerationOutput$outboundSchema: z.ZodType< - SDGenerationOutput$Outbound, - z.ZodTypeDef, - SDGenerationOutput + SDGenerationOutput$Outbound, + z.ZodTypeDef, + SDGenerationOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - generationId: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + generationId: z.string().optional(), }); /** @@ -466,35 +483,37 @@ export const SDGenerationOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SDGenerationOutput$ { - /** @deprecated use `SDGenerationOutput$inboundSchema` instead. */ - export const inboundSchema = SDGenerationOutput$inboundSchema; - /** @deprecated use `SDGenerationOutput$outboundSchema` instead. */ - export const outboundSchema = SDGenerationOutput$outboundSchema; - /** @deprecated use `SDGenerationOutput$Outbound` instead. */ - export type Outbound = SDGenerationOutput$Outbound; + /** @deprecated use `SDGenerationOutput$inboundSchema` instead. */ + export const inboundSchema = SDGenerationOutput$inboundSchema; + /** @deprecated use `SDGenerationOutput$outboundSchema` instead. */ + export const outboundSchema = SDGenerationOutput$outboundSchema; + /** @deprecated use `SDGenerationOutput$Outbound` instead. */ + export type Outbound = SDGenerationOutput$Outbound; } /** @internal */ export const CreateGenerationResponseBody$inboundSchema: z.ZodType< - CreateGenerationResponseBody, - z.ZodTypeDef, - unknown + CreateGenerationResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - sdGenerationJob: z.nullable(z.lazy(() => SDGenerationOutput$inboundSchema)).optional(), + sdGenerationJob: z.nullable(z.lazy(() => SDGenerationOutput$inboundSchema)) + .optional(), }); /** @internal */ export type CreateGenerationResponseBody$Outbound = { - sdGenerationJob?: SDGenerationOutput$Outbound | null | undefined; + sdGenerationJob?: SDGenerationOutput$Outbound | null | undefined; }; /** @internal */ export const CreateGenerationResponseBody$outboundSchema: z.ZodType< - CreateGenerationResponseBody$Outbound, - z.ZodTypeDef, - CreateGenerationResponseBody + CreateGenerationResponseBody$Outbound, + z.ZodTypeDef, + CreateGenerationResponseBody > = z.object({ - sdGenerationJob: z.nullable(z.lazy(() => SDGenerationOutput$outboundSchema)).optional(), + sdGenerationJob: z.nullable(z.lazy(() => SDGenerationOutput$outboundSchema)) + .optional(), }); /** @@ -502,73 +521,69 @@ export const CreateGenerationResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateGenerationResponseBody$ { - /** @deprecated use `CreateGenerationResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateGenerationResponseBody$inboundSchema; - /** @deprecated use `CreateGenerationResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateGenerationResponseBody$outboundSchema; - /** @deprecated use `CreateGenerationResponseBody$Outbound` instead. */ - export type Outbound = CreateGenerationResponseBody$Outbound; + /** @deprecated use `CreateGenerationResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateGenerationResponseBody$inboundSchema; + /** @deprecated use `CreateGenerationResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateGenerationResponseBody$outboundSchema; + /** @deprecated use `CreateGenerationResponseBody$Outbound` instead. */ + export type Outbound = CreateGenerationResponseBody$Outbound; } /** @internal */ export const CreateGenerationResponse$inboundSchema: z.ZodType< - CreateGenerationResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateGenerationResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateGenerationResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateGenerationResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateGenerationResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateGenerationResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateGenerationResponseBody$Outbound | undefined; }; /** @internal */ export const CreateGenerationResponse$outboundSchema: z.ZodType< - CreateGenerationResponse$Outbound, - z.ZodTypeDef, - CreateGenerationResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateGenerationResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateGenerationResponse$Outbound, + z.ZodTypeDef, + CreateGenerationResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateGenerationResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateGenerationResponse$ { - /** @deprecated use `CreateGenerationResponse$inboundSchema` instead. */ - export const inboundSchema = CreateGenerationResponse$inboundSchema; - /** @deprecated use `CreateGenerationResponse$outboundSchema` instead. */ - export const outboundSchema = CreateGenerationResponse$outboundSchema; - /** @deprecated use `CreateGenerationResponse$Outbound` instead. */ - export type Outbound = CreateGenerationResponse$Outbound; + /** @deprecated use `CreateGenerationResponse$inboundSchema` instead. */ + export const inboundSchema = CreateGenerationResponse$inboundSchema; + /** @deprecated use `CreateGenerationResponse$outboundSchema` instead. */ + export const outboundSchema = CreateGenerationResponse$outboundSchema; + /** @deprecated use `CreateGenerationResponse$Outbound` instead. */ + export type Outbound = CreateGenerationResponse$Outbound; } diff --git a/src/sdk/models/operations/createlcmgeneration.ts b/src/sdk/models/operations/createlcmgeneration.ts index 4b960da..96e7886 100644 --- a/src/sdk/models/operations/createlcmgeneration.ts +++ b/src/sdk/models/operations/createlcmgeneration.ts @@ -2,133 +2,133 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * Query parameters can also be provided in the request body as a JSON object */ export type CreateLCMGenerationRequestBody = { - /** - * How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20. - */ - guidance?: number | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - height?: number | null | undefined; - /** - * Image data used to generate image. In base64 format. Prefix: `data:image/jpeg;base64,` - */ - imageDataUrl: string; - /** - * The prompt used to generate images - */ - prompt: string; - requestTimestamp?: string | undefined; - seed?: number | null | undefined; - /** - * The number of steps to use for the generation. Must be between 4 and 16. - */ - steps?: number | null | undefined; - /** - * Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1. - */ - strength?: number | null | undefined; - /** - * The style to generate LCM images with. - */ - style?: shared.LcmGenerationStyle | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - width?: number | null | undefined; + /** + * How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20. + */ + guidance?: number | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + height?: number | null | undefined; + /** + * Image data used to generate image. In base64 format. Prefix: `data:image/jpeg;base64,` + */ + imageDataUrl: string; + /** + * The prompt used to generate images + */ + prompt: string; + requestTimestamp?: string | undefined; + seed?: number | null | undefined; + /** + * The number of steps to use for the generation. Must be between 4 and 16. + */ + steps?: number | null | undefined; + /** + * Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1. + */ + strength?: number | null | undefined; + /** + * The style to generate LCM images with. + */ + style?: shared.LcmGenerationStyle | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + width?: number | null | undefined; }; export type LcmGenerationOutput = { - /** - * API credits cost, available for Production API users. - */ - apiCreditCost?: number | null | undefined; - imageDataUrl?: Array | undefined; - requestTimestamp?: string | undefined; + /** + * API credits cost, available for Production API users. + */ + apiCreditCost?: number | null | undefined; + imageDataUrl?: Array | undefined; + requestTimestamp?: string | undefined; }; /** * Responses for POST /generations-lcm */ export type CreateLCMGenerationResponseBody = { - lcmGenerationJob?: LcmGenerationOutput | null | undefined; + lcmGenerationJob?: LcmGenerationOutput | null | undefined; }; export type CreateLCMGenerationResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /generations-lcm - */ - object?: CreateLCMGenerationResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /generations-lcm + */ + object?: CreateLCMGenerationResponseBody | undefined; }; /** @internal */ export const CreateLCMGenerationRequestBody$inboundSchema: z.ZodType< - CreateLCMGenerationRequestBody, - z.ZodTypeDef, - unknown + CreateLCMGenerationRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - guidance: z.nullable(z.number()).optional(), - height: z.nullable(z.number().int().default(512)), - imageDataUrl: z.string(), - prompt: z.string(), - requestTimestamp: z.string().optional(), - seed: z.nullable(z.number().int()).optional(), - steps: z.nullable(z.number().int()).optional(), - strength: z.nullable(z.number()).optional(), - style: z.nullable(shared.LcmGenerationStyle$inboundSchema).optional(), - width: z.nullable(z.number().int().default(512)), + guidance: z.nullable(z.number()).optional(), + height: z.nullable(z.number().int().default(512)), + imageDataUrl: z.string(), + prompt: z.string(), + requestTimestamp: z.string().optional(), + seed: z.nullable(z.number().int()).optional(), + steps: z.nullable(z.number().int()).optional(), + strength: z.nullable(z.number()).optional(), + style: z.nullable(shared.LcmGenerationStyle$inboundSchema).optional(), + width: z.nullable(z.number().int().default(512)), }); /** @internal */ export type CreateLCMGenerationRequestBody$Outbound = { - guidance?: number | null | undefined; - height: number | null; - imageDataUrl: string; - prompt: string; - requestTimestamp?: string | undefined; - seed?: number | null | undefined; - steps?: number | null | undefined; - strength?: number | null | undefined; - style?: string | null | undefined; - width: number | null; + guidance?: number | null | undefined; + height: number | null; + imageDataUrl: string; + prompt: string; + requestTimestamp?: string | undefined; + seed?: number | null | undefined; + steps?: number | null | undefined; + strength?: number | null | undefined; + style?: string | null | undefined; + width: number | null; }; /** @internal */ export const CreateLCMGenerationRequestBody$outboundSchema: z.ZodType< - CreateLCMGenerationRequestBody$Outbound, - z.ZodTypeDef, - CreateLCMGenerationRequestBody + CreateLCMGenerationRequestBody$Outbound, + z.ZodTypeDef, + CreateLCMGenerationRequestBody > = z.object({ - guidance: z.nullable(z.number()).optional(), - height: z.nullable(z.number().int().default(512)), - imageDataUrl: z.string(), - prompt: z.string(), - requestTimestamp: z.string().optional(), - seed: z.nullable(z.number().int()).optional(), - steps: z.nullable(z.number().int()).optional(), - strength: z.nullable(z.number()).optional(), - style: z.nullable(shared.LcmGenerationStyle$outboundSchema).optional(), - width: z.nullable(z.number().int().default(512)), + guidance: z.nullable(z.number()).optional(), + height: z.nullable(z.number().int().default(512)), + imageDataUrl: z.string(), + prompt: z.string(), + requestTimestamp: z.string().optional(), + seed: z.nullable(z.number().int()).optional(), + steps: z.nullable(z.number().int()).optional(), + strength: z.nullable(z.number()).optional(), + style: z.nullable(shared.LcmGenerationStyle$outboundSchema).optional(), + width: z.nullable(z.number().int().default(512)), }); /** @@ -136,41 +136,41 @@ export const CreateLCMGenerationRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateLCMGenerationRequestBody$ { - /** @deprecated use `CreateLCMGenerationRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateLCMGenerationRequestBody$inboundSchema; - /** @deprecated use `CreateLCMGenerationRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateLCMGenerationRequestBody$outboundSchema; - /** @deprecated use `CreateLCMGenerationRequestBody$Outbound` instead. */ - export type Outbound = CreateLCMGenerationRequestBody$Outbound; + /** @deprecated use `CreateLCMGenerationRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateLCMGenerationRequestBody$inboundSchema; + /** @deprecated use `CreateLCMGenerationRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateLCMGenerationRequestBody$outboundSchema; + /** @deprecated use `CreateLCMGenerationRequestBody$Outbound` instead. */ + export type Outbound = CreateLCMGenerationRequestBody$Outbound; } /** @internal */ export const LcmGenerationOutput$inboundSchema: z.ZodType< - LcmGenerationOutput, - z.ZodTypeDef, - unknown + LcmGenerationOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - imageDataUrl: z.array(z.string()).optional(), - requestTimestamp: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + imageDataUrl: z.array(z.string()).optional(), + requestTimestamp: z.string().optional(), }); /** @internal */ export type LcmGenerationOutput$Outbound = { - apiCreditCost?: number | null | undefined; - imageDataUrl?: Array | undefined; - requestTimestamp?: string | undefined; + apiCreditCost?: number | null | undefined; + imageDataUrl?: Array | undefined; + requestTimestamp?: string | undefined; }; /** @internal */ export const LcmGenerationOutput$outboundSchema: z.ZodType< - LcmGenerationOutput$Outbound, - z.ZodTypeDef, - LcmGenerationOutput + LcmGenerationOutput$Outbound, + z.ZodTypeDef, + LcmGenerationOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - imageDataUrl: z.array(z.string()).optional(), - requestTimestamp: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + imageDataUrl: z.array(z.string()).optional(), + requestTimestamp: z.string().optional(), }); /** @@ -178,35 +178,37 @@ export const LcmGenerationOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LcmGenerationOutput$ { - /** @deprecated use `LcmGenerationOutput$inboundSchema` instead. */ - export const inboundSchema = LcmGenerationOutput$inboundSchema; - /** @deprecated use `LcmGenerationOutput$outboundSchema` instead. */ - export const outboundSchema = LcmGenerationOutput$outboundSchema; - /** @deprecated use `LcmGenerationOutput$Outbound` instead. */ - export type Outbound = LcmGenerationOutput$Outbound; + /** @deprecated use `LcmGenerationOutput$inboundSchema` instead. */ + export const inboundSchema = LcmGenerationOutput$inboundSchema; + /** @deprecated use `LcmGenerationOutput$outboundSchema` instead. */ + export const outboundSchema = LcmGenerationOutput$outboundSchema; + /** @deprecated use `LcmGenerationOutput$Outbound` instead. */ + export type Outbound = LcmGenerationOutput$Outbound; } /** @internal */ export const CreateLCMGenerationResponseBody$inboundSchema: z.ZodType< - CreateLCMGenerationResponseBody, - z.ZodTypeDef, - unknown + CreateLCMGenerationResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - lcmGenerationJob: z.nullable(z.lazy(() => LcmGenerationOutput$inboundSchema)).optional(), + lcmGenerationJob: z.nullable(z.lazy(() => LcmGenerationOutput$inboundSchema)) + .optional(), }); /** @internal */ export type CreateLCMGenerationResponseBody$Outbound = { - lcmGenerationJob?: LcmGenerationOutput$Outbound | null | undefined; + lcmGenerationJob?: LcmGenerationOutput$Outbound | null | undefined; }; /** @internal */ export const CreateLCMGenerationResponseBody$outboundSchema: z.ZodType< - CreateLCMGenerationResponseBody$Outbound, - z.ZodTypeDef, - CreateLCMGenerationResponseBody + CreateLCMGenerationResponseBody$Outbound, + z.ZodTypeDef, + CreateLCMGenerationResponseBody > = z.object({ - lcmGenerationJob: z.nullable(z.lazy(() => LcmGenerationOutput$outboundSchema)).optional(), + lcmGenerationJob: z.nullable(z.lazy(() => LcmGenerationOutput$outboundSchema)) + .optional(), }); /** @@ -214,73 +216,71 @@ export const CreateLCMGenerationResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateLCMGenerationResponseBody$ { - /** @deprecated use `CreateLCMGenerationResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateLCMGenerationResponseBody$inboundSchema; - /** @deprecated use `CreateLCMGenerationResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateLCMGenerationResponseBody$outboundSchema; - /** @deprecated use `CreateLCMGenerationResponseBody$Outbound` instead. */ - export type Outbound = CreateLCMGenerationResponseBody$Outbound; + /** @deprecated use `CreateLCMGenerationResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateLCMGenerationResponseBody$inboundSchema; + /** @deprecated use `CreateLCMGenerationResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateLCMGenerationResponseBody$outboundSchema; + /** @deprecated use `CreateLCMGenerationResponseBody$Outbound` instead. */ + export type Outbound = CreateLCMGenerationResponseBody$Outbound; } /** @internal */ export const CreateLCMGenerationResponse$inboundSchema: z.ZodType< - CreateLCMGenerationResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateLCMGenerationResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateLCMGenerationResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateLCMGenerationResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateLCMGenerationResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateLCMGenerationResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateLCMGenerationResponseBody$Outbound | undefined; }; /** @internal */ export const CreateLCMGenerationResponse$outboundSchema: z.ZodType< - CreateLCMGenerationResponse$Outbound, - z.ZodTypeDef, - CreateLCMGenerationResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateLCMGenerationResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateLCMGenerationResponse$Outbound, + z.ZodTypeDef, + CreateLCMGenerationResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateLCMGenerationResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateLCMGenerationResponse$ { - /** @deprecated use `CreateLCMGenerationResponse$inboundSchema` instead. */ - export const inboundSchema = CreateLCMGenerationResponse$inboundSchema; - /** @deprecated use `CreateLCMGenerationResponse$outboundSchema` instead. */ - export const outboundSchema = CreateLCMGenerationResponse$outboundSchema; - /** @deprecated use `CreateLCMGenerationResponse$Outbound` instead. */ - export type Outbound = CreateLCMGenerationResponse$Outbound; + /** @deprecated use `CreateLCMGenerationResponse$inboundSchema` instead. */ + export const inboundSchema = CreateLCMGenerationResponse$inboundSchema; + /** @deprecated use `CreateLCMGenerationResponse$outboundSchema` instead. */ + export const outboundSchema = CreateLCMGenerationResponse$outboundSchema; + /** @deprecated use `CreateLCMGenerationResponse$Outbound` instead. */ + export type Outbound = CreateLCMGenerationResponse$Outbound; } diff --git a/src/sdk/models/operations/createmodel.ts b/src/sdk/models/operations/createmodel.ts index 367596e..b9104d3 100644 --- a/src/sdk/models/operations/createmodel.ts +++ b/src/sdk/models/operations/createmodel.ts @@ -2,181 +2,184 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * Query parameters to be provided in the request body as a JSON object */ export type CreateModelRequestBody = { - /** - * The ID of the dataset to train the model on. - */ - datasetId: string; - /** - * The description of the model. - */ - description?: string | null | undefined; - /** - * The instance prompt to use during training. - */ - instancePrompt: string; - /** - * The category the most accurately reflects the model. - */ - modelType?: shared.CustomModelType | undefined; - /** - * The name of the model. - */ - name: string; - /** - * Whether or not the model is NSFW. - */ - nsfw?: boolean | null | undefined; - /** - * The resolution for training. Must be 512 or 768. - */ - resolution?: number | null | undefined; - /** - * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models - */ - sdVersion?: shared.SdVersions | undefined; - /** - * When training using the PIXEL_ART model type, this influences the training strength. - */ - strength?: shared.Strength | undefined; + /** + * The ID of the dataset to train the model on. + */ + datasetId: string; + /** + * The description of the model. + */ + description?: string | null | undefined; + /** + * The instance prompt to use during training. + */ + instancePrompt: string; + /** + * The category the most accurately reflects the model. + */ + modelType?: shared.CustomModelType | undefined; + /** + * The name of the model. + */ + name: string; + /** + * Whether or not the model is NSFW. + */ + nsfw?: boolean | null | undefined; + /** + * The resolution for training. Must be 512 or 768. + */ + resolution?: number | null | undefined; + /** + * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models + */ + sdVersion?: shared.SdVersions | undefined; + /** + * When training using the PIXEL_ART model type, this influences the training strength. + */ + strength?: shared.Strength | undefined; }; export type SDTrainingOutput = { - /** - * API Credits Cost for Model Training. Available for Production API Users. - */ - apiCreditCost?: number | null | undefined; - customModelId?: string | undefined; + /** + * API Credits Cost for Model Training. Available for Production API Users. + */ + apiCreditCost?: number | null | undefined; + customModelId?: string | undefined; }; /** * Responses for POST /models */ export type CreateModelResponseBody = { - sdTrainingJob?: SDTrainingOutput | null | undefined; + sdTrainingJob?: SDTrainingOutput | null | undefined; }; export type CreateModelResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /models - */ - object?: CreateModelResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /models + */ + object?: CreateModelResponseBody | undefined; }; /** @internal */ export const CreateModelRequestBody$inboundSchema: z.ZodType< - CreateModelRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - datasetId: z.string(), - description: z.nullable(z.string().default("")), - instance_prompt: z.string(), - modelType: shared.CustomModelType$inboundSchema.default(shared.CustomModelType.General), - name: z.string(), - nsfw: z.nullable(z.boolean().default(false)), - resolution: z.nullable(z.number().int().default(512)), - sd_Version: shared.SdVersions$inboundSchema.optional(), - strength: shared.Strength$inboundSchema.default(shared.Strength.Medium), - }) - .transform((v) => { - return remap$(v, { - instance_prompt: "instancePrompt", - sd_Version: "sdVersion", - }); - }); + CreateModelRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + datasetId: z.string(), + description: z.nullable(z.string().default("")), + instance_prompt: z.string(), + modelType: shared.CustomModelType$inboundSchema.default( + shared.CustomModelType.General, + ), + name: z.string(), + nsfw: z.nullable(z.boolean().default(false)), + resolution: z.nullable(z.number().int().default(512)), + sd_Version: shared.SdVersions$inboundSchema.optional(), + strength: shared.Strength$inboundSchema.default(shared.Strength.Medium), +}).transform((v) => { + return remap$(v, { + "instance_prompt": "instancePrompt", + "sd_Version": "sdVersion", + }); +}); /** @internal */ export type CreateModelRequestBody$Outbound = { - datasetId: string; - description: string | null; - instance_prompt: string; - modelType: string; - name: string; - nsfw: boolean | null; - resolution: number | null; - sd_Version?: string | undefined; - strength: string; + datasetId: string; + description: string | null; + instance_prompt: string; + modelType: string; + name: string; + nsfw: boolean | null; + resolution: number | null; + sd_Version?: string | undefined; + strength: string; }; /** @internal */ export const CreateModelRequestBody$outboundSchema: z.ZodType< - CreateModelRequestBody$Outbound, - z.ZodTypeDef, - CreateModelRequestBody -> = z - .object({ - datasetId: z.string(), - description: z.nullable(z.string().default("")), - instancePrompt: z.string(), - modelType: shared.CustomModelType$outboundSchema.default(shared.CustomModelType.General), - name: z.string(), - nsfw: z.nullable(z.boolean().default(false)), - resolution: z.nullable(z.number().int().default(512)), - sdVersion: shared.SdVersions$outboundSchema.optional(), - strength: shared.Strength$outboundSchema.default(shared.Strength.Medium), - }) - .transform((v) => { - return remap$(v, { - instancePrompt: "instance_prompt", - sdVersion: "sd_Version", - }); - }); + CreateModelRequestBody$Outbound, + z.ZodTypeDef, + CreateModelRequestBody +> = z.object({ + datasetId: z.string(), + description: z.nullable(z.string().default("")), + instancePrompt: z.string(), + modelType: shared.CustomModelType$outboundSchema.default( + shared.CustomModelType.General, + ), + name: z.string(), + nsfw: z.nullable(z.boolean().default(false)), + resolution: z.nullable(z.number().int().default(512)), + sdVersion: shared.SdVersions$outboundSchema.optional(), + strength: shared.Strength$outboundSchema.default(shared.Strength.Medium), +}).transform((v) => { + return remap$(v, { + instancePrompt: "instance_prompt", + sdVersion: "sd_Version", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateModelRequestBody$ { - /** @deprecated use `CreateModelRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateModelRequestBody$inboundSchema; - /** @deprecated use `CreateModelRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateModelRequestBody$outboundSchema; - /** @deprecated use `CreateModelRequestBody$Outbound` instead. */ - export type Outbound = CreateModelRequestBody$Outbound; + /** @deprecated use `CreateModelRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateModelRequestBody$inboundSchema; + /** @deprecated use `CreateModelRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateModelRequestBody$outboundSchema; + /** @deprecated use `CreateModelRequestBody$Outbound` instead. */ + export type Outbound = CreateModelRequestBody$Outbound; } /** @internal */ -export const SDTrainingOutput$inboundSchema: z.ZodType = - z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - customModelId: z.string().optional(), - }); +export const SDTrainingOutput$inboundSchema: z.ZodType< + SDTrainingOutput, + z.ZodTypeDef, + unknown +> = z.object({ + apiCreditCost: z.nullable(z.number().int()).optional(), + customModelId: z.string().optional(), +}); /** @internal */ export type SDTrainingOutput$Outbound = { - apiCreditCost?: number | null | undefined; - customModelId?: string | undefined; + apiCreditCost?: number | null | undefined; + customModelId?: string | undefined; }; /** @internal */ export const SDTrainingOutput$outboundSchema: z.ZodType< - SDTrainingOutput$Outbound, - z.ZodTypeDef, - SDTrainingOutput + SDTrainingOutput$Outbound, + z.ZodTypeDef, + SDTrainingOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - customModelId: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + customModelId: z.string().optional(), }); /** @@ -184,35 +187,37 @@ export const SDTrainingOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SDTrainingOutput$ { - /** @deprecated use `SDTrainingOutput$inboundSchema` instead. */ - export const inboundSchema = SDTrainingOutput$inboundSchema; - /** @deprecated use `SDTrainingOutput$outboundSchema` instead. */ - export const outboundSchema = SDTrainingOutput$outboundSchema; - /** @deprecated use `SDTrainingOutput$Outbound` instead. */ - export type Outbound = SDTrainingOutput$Outbound; + /** @deprecated use `SDTrainingOutput$inboundSchema` instead. */ + export const inboundSchema = SDTrainingOutput$inboundSchema; + /** @deprecated use `SDTrainingOutput$outboundSchema` instead. */ + export const outboundSchema = SDTrainingOutput$outboundSchema; + /** @deprecated use `SDTrainingOutput$Outbound` instead. */ + export type Outbound = SDTrainingOutput$Outbound; } /** @internal */ export const CreateModelResponseBody$inboundSchema: z.ZodType< - CreateModelResponseBody, - z.ZodTypeDef, - unknown + CreateModelResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - sdTrainingJob: z.nullable(z.lazy(() => SDTrainingOutput$inboundSchema)).optional(), + sdTrainingJob: z.nullable(z.lazy(() => SDTrainingOutput$inboundSchema)) + .optional(), }); /** @internal */ export type CreateModelResponseBody$Outbound = { - sdTrainingJob?: SDTrainingOutput$Outbound | null | undefined; + sdTrainingJob?: SDTrainingOutput$Outbound | null | undefined; }; /** @internal */ export const CreateModelResponseBody$outboundSchema: z.ZodType< - CreateModelResponseBody$Outbound, - z.ZodTypeDef, - CreateModelResponseBody + CreateModelResponseBody$Outbound, + z.ZodTypeDef, + CreateModelResponseBody > = z.object({ - sdTrainingJob: z.nullable(z.lazy(() => SDTrainingOutput$outboundSchema)).optional(), + sdTrainingJob: z.nullable(z.lazy(() => SDTrainingOutput$outboundSchema)) + .optional(), }); /** @@ -220,73 +225,69 @@ export const CreateModelResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateModelResponseBody$ { - /** @deprecated use `CreateModelResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateModelResponseBody$inboundSchema; - /** @deprecated use `CreateModelResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateModelResponseBody$outboundSchema; - /** @deprecated use `CreateModelResponseBody$Outbound` instead. */ - export type Outbound = CreateModelResponseBody$Outbound; + /** @deprecated use `CreateModelResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateModelResponseBody$inboundSchema; + /** @deprecated use `CreateModelResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateModelResponseBody$outboundSchema; + /** @deprecated use `CreateModelResponseBody$Outbound` instead. */ + export type Outbound = CreateModelResponseBody$Outbound; } /** @internal */ export const CreateModelResponse$inboundSchema: z.ZodType< - CreateModelResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateModelResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateModelResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateModelResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateModelResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateModelResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateModelResponseBody$Outbound | undefined; }; /** @internal */ export const CreateModelResponse$outboundSchema: z.ZodType< - CreateModelResponse$Outbound, - z.ZodTypeDef, - CreateModelResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateModelResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateModelResponse$Outbound, + z.ZodTypeDef, + CreateModelResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateModelResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateModelResponse$ { - /** @deprecated use `CreateModelResponse$inboundSchema` instead. */ - export const inboundSchema = CreateModelResponse$inboundSchema; - /** @deprecated use `CreateModelResponse$outboundSchema` instead. */ - export const outboundSchema = CreateModelResponse$outboundSchema; - /** @deprecated use `CreateModelResponse$Outbound` instead. */ - export type Outbound = CreateModelResponse$Outbound; + /** @deprecated use `CreateModelResponse$inboundSchema` instead. */ + export const inboundSchema = CreateModelResponse$inboundSchema; + /** @deprecated use `CreateModelResponse$outboundSchema` instead. */ + export const outboundSchema = CreateModelResponse$outboundSchema; + /** @deprecated use `CreateModelResponse$Outbound` instead. */ + export type Outbound = CreateModelResponse$Outbound; } diff --git a/src/sdk/models/operations/createsvdmotiongeneration.ts b/src/sdk/models/operations/createsvdmotiongeneration.ts index f29ee76..5abaa0e 100644 --- a/src/sdk/models/operations/createsvdmotiongeneration.ts +++ b/src/sdk/models/operations/createsvdmotiongeneration.ts @@ -2,102 +2,102 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters can also be provided in the request body as a JSON object */ export type CreateSVDMotionGenerationRequestBody = { - /** - * The ID of the image, supports generated images, variation images, and init images. - */ - imageId: string; - /** - * If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image. - */ - isInitImage?: boolean | null | undefined; - /** - * Whether the generation is public or not - */ - isPublic?: boolean | null | undefined; - /** - * If it is a variation image. - */ - isVariation?: boolean | null | undefined; - /** - * The motion strength. - */ - motionStrength?: number | null | undefined; + /** + * The ID of the image, supports generated images, variation images, and init images. + */ + imageId: string; + /** + * If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image. + */ + isInitImage?: boolean | null | undefined; + /** + * Whether the generation is public or not + */ + isPublic?: boolean | null | undefined; + /** + * If it is a variation image. + */ + isVariation?: boolean | null | undefined; + /** + * The motion strength. + */ + motionStrength?: number | null | undefined; }; export type MotionSvdGenerationOutput = { - /** - * API credits cost, available for Production API users. - */ - apiCreditCost?: number | null | undefined; - generationId?: string | undefined; + /** + * API credits cost, available for Production API users. + */ + apiCreditCost?: number | null | undefined; + generationId?: string | undefined; }; /** * Responses for POST /generations-motion-svd */ export type CreateSVDMotionGenerationResponseBody = { - sdGenerationJob?: MotionSvdGenerationOutput | null | undefined; + sdGenerationJob?: MotionSvdGenerationOutput | null | undefined; }; export type CreateSVDMotionGenerationResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /generations-motion-svd - */ - object?: CreateSVDMotionGenerationResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /generations-motion-svd + */ + object?: CreateSVDMotionGenerationResponseBody | undefined; }; /** @internal */ export const CreateSVDMotionGenerationRequestBody$inboundSchema: z.ZodType< - CreateSVDMotionGenerationRequestBody, - z.ZodTypeDef, - unknown + CreateSVDMotionGenerationRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - imageId: z.string(), - isInitImage: z.nullable(z.boolean()).optional(), - isPublic: z.nullable(z.boolean()).optional(), - isVariation: z.nullable(z.boolean()).optional(), - motionStrength: z.nullable(z.number().int()).optional(), + imageId: z.string(), + isInitImage: z.nullable(z.boolean()).optional(), + isPublic: z.nullable(z.boolean()).optional(), + isVariation: z.nullable(z.boolean()).optional(), + motionStrength: z.nullable(z.number().int()).optional(), }); /** @internal */ export type CreateSVDMotionGenerationRequestBody$Outbound = { - imageId: string; - isInitImage?: boolean | null | undefined; - isPublic?: boolean | null | undefined; - isVariation?: boolean | null | undefined; - motionStrength?: number | null | undefined; + imageId: string; + isInitImage?: boolean | null | undefined; + isPublic?: boolean | null | undefined; + isVariation?: boolean | null | undefined; + motionStrength?: number | null | undefined; }; /** @internal */ export const CreateSVDMotionGenerationRequestBody$outboundSchema: z.ZodType< - CreateSVDMotionGenerationRequestBody$Outbound, - z.ZodTypeDef, - CreateSVDMotionGenerationRequestBody + CreateSVDMotionGenerationRequestBody$Outbound, + z.ZodTypeDef, + CreateSVDMotionGenerationRequestBody > = z.object({ - imageId: z.string(), - isInitImage: z.nullable(z.boolean()).optional(), - isPublic: z.nullable(z.boolean()).optional(), - isVariation: z.nullable(z.boolean()).optional(), - motionStrength: z.nullable(z.number().int()).optional(), + imageId: z.string(), + isInitImage: z.nullable(z.boolean()).optional(), + isPublic: z.nullable(z.boolean()).optional(), + isVariation: z.nullable(z.boolean()).optional(), + motionStrength: z.nullable(z.number().int()).optional(), }); /** @@ -105,38 +105,40 @@ export const CreateSVDMotionGenerationRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateSVDMotionGenerationRequestBody$ { - /** @deprecated use `CreateSVDMotionGenerationRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateSVDMotionGenerationRequestBody$inboundSchema; - /** @deprecated use `CreateSVDMotionGenerationRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateSVDMotionGenerationRequestBody$outboundSchema; - /** @deprecated use `CreateSVDMotionGenerationRequestBody$Outbound` instead. */ - export type Outbound = CreateSVDMotionGenerationRequestBody$Outbound; + /** @deprecated use `CreateSVDMotionGenerationRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateSVDMotionGenerationRequestBody$inboundSchema; + /** @deprecated use `CreateSVDMotionGenerationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateSVDMotionGenerationRequestBody$outboundSchema; + /** @deprecated use `CreateSVDMotionGenerationRequestBody$Outbound` instead. */ + export type Outbound = CreateSVDMotionGenerationRequestBody$Outbound; } /** @internal */ export const MotionSvdGenerationOutput$inboundSchema: z.ZodType< - MotionSvdGenerationOutput, - z.ZodTypeDef, - unknown + MotionSvdGenerationOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - generationId: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + generationId: z.string().optional(), }); /** @internal */ export type MotionSvdGenerationOutput$Outbound = { - apiCreditCost?: number | null | undefined; - generationId?: string | undefined; + apiCreditCost?: number | null | undefined; + generationId?: string | undefined; }; /** @internal */ export const MotionSvdGenerationOutput$outboundSchema: z.ZodType< - MotionSvdGenerationOutput$Outbound, - z.ZodTypeDef, - MotionSvdGenerationOutput + MotionSvdGenerationOutput$Outbound, + z.ZodTypeDef, + MotionSvdGenerationOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - generationId: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + generationId: z.string().optional(), }); /** @@ -144,35 +146,39 @@ export const MotionSvdGenerationOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MotionSvdGenerationOutput$ { - /** @deprecated use `MotionSvdGenerationOutput$inboundSchema` instead. */ - export const inboundSchema = MotionSvdGenerationOutput$inboundSchema; - /** @deprecated use `MotionSvdGenerationOutput$outboundSchema` instead. */ - export const outboundSchema = MotionSvdGenerationOutput$outboundSchema; - /** @deprecated use `MotionSvdGenerationOutput$Outbound` instead. */ - export type Outbound = MotionSvdGenerationOutput$Outbound; + /** @deprecated use `MotionSvdGenerationOutput$inboundSchema` instead. */ + export const inboundSchema = MotionSvdGenerationOutput$inboundSchema; + /** @deprecated use `MotionSvdGenerationOutput$outboundSchema` instead. */ + export const outboundSchema = MotionSvdGenerationOutput$outboundSchema; + /** @deprecated use `MotionSvdGenerationOutput$Outbound` instead. */ + export type Outbound = MotionSvdGenerationOutput$Outbound; } /** @internal */ export const CreateSVDMotionGenerationResponseBody$inboundSchema: z.ZodType< - CreateSVDMotionGenerationResponseBody, - z.ZodTypeDef, - unknown + CreateSVDMotionGenerationResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - sdGenerationJob: z.nullable(z.lazy(() => MotionSvdGenerationOutput$inboundSchema)).optional(), + sdGenerationJob: z.nullable( + z.lazy(() => MotionSvdGenerationOutput$inboundSchema), + ).optional(), }); /** @internal */ export type CreateSVDMotionGenerationResponseBody$Outbound = { - sdGenerationJob?: MotionSvdGenerationOutput$Outbound | null | undefined; + sdGenerationJob?: MotionSvdGenerationOutput$Outbound | null | undefined; }; /** @internal */ export const CreateSVDMotionGenerationResponseBody$outboundSchema: z.ZodType< - CreateSVDMotionGenerationResponseBody$Outbound, - z.ZodTypeDef, - CreateSVDMotionGenerationResponseBody + CreateSVDMotionGenerationResponseBody$Outbound, + z.ZodTypeDef, + CreateSVDMotionGenerationResponseBody > = z.object({ - sdGenerationJob: z.nullable(z.lazy(() => MotionSvdGenerationOutput$outboundSchema)).optional(), + sdGenerationJob: z.nullable( + z.lazy(() => MotionSvdGenerationOutput$outboundSchema), + ).optional(), }); /** @@ -180,73 +186,74 @@ export const CreateSVDMotionGenerationResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateSVDMotionGenerationResponseBody$ { - /** @deprecated use `CreateSVDMotionGenerationResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateSVDMotionGenerationResponseBody$inboundSchema; - /** @deprecated use `CreateSVDMotionGenerationResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateSVDMotionGenerationResponseBody$outboundSchema; - /** @deprecated use `CreateSVDMotionGenerationResponseBody$Outbound` instead. */ - export type Outbound = CreateSVDMotionGenerationResponseBody$Outbound; + /** @deprecated use `CreateSVDMotionGenerationResponseBody$inboundSchema` instead. */ + export const inboundSchema = + CreateSVDMotionGenerationResponseBody$inboundSchema; + /** @deprecated use `CreateSVDMotionGenerationResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CreateSVDMotionGenerationResponseBody$outboundSchema; + /** @deprecated use `CreateSVDMotionGenerationResponseBody$Outbound` instead. */ + export type Outbound = CreateSVDMotionGenerationResponseBody$Outbound; } /** @internal */ export const CreateSVDMotionGenerationResponse$inboundSchema: z.ZodType< - CreateSVDMotionGenerationResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateSVDMotionGenerationResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateSVDMotionGenerationResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateSVDMotionGenerationResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateSVDMotionGenerationResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateSVDMotionGenerationResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateSVDMotionGenerationResponseBody$Outbound | undefined; }; /** @internal */ export const CreateSVDMotionGenerationResponse$outboundSchema: z.ZodType< - CreateSVDMotionGenerationResponse$Outbound, - z.ZodTypeDef, - CreateSVDMotionGenerationResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateSVDMotionGenerationResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateSVDMotionGenerationResponse$Outbound, + z.ZodTypeDef, + CreateSVDMotionGenerationResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateSVDMotionGenerationResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateSVDMotionGenerationResponse$ { - /** @deprecated use `CreateSVDMotionGenerationResponse$inboundSchema` instead. */ - export const inboundSchema = CreateSVDMotionGenerationResponse$inboundSchema; - /** @deprecated use `CreateSVDMotionGenerationResponse$outboundSchema` instead. */ - export const outboundSchema = CreateSVDMotionGenerationResponse$outboundSchema; - /** @deprecated use `CreateSVDMotionGenerationResponse$Outbound` instead. */ - export type Outbound = CreateSVDMotionGenerationResponse$Outbound; + /** @deprecated use `CreateSVDMotionGenerationResponse$inboundSchema` instead. */ + export const inboundSchema = CreateSVDMotionGenerationResponse$inboundSchema; + /** @deprecated use `CreateSVDMotionGenerationResponse$outboundSchema` instead. */ + export const outboundSchema = + CreateSVDMotionGenerationResponse$outboundSchema; + /** @deprecated use `CreateSVDMotionGenerationResponse$Outbound` instead. */ + export type Outbound = CreateSVDMotionGenerationResponse$Outbound; } diff --git a/src/sdk/models/operations/createtexturegeneration.ts b/src/sdk/models/operations/createtexturegeneration.ts index 8fc4d64..79aed8f 100644 --- a/src/sdk/models/operations/createtexturegeneration.ts +++ b/src/sdk/models/operations/createtexturegeneration.ts @@ -2,156 +2,153 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters can also be provided in the request body as a JSON object */ export type CreateTextureGenerationRequestBody = { - frontRotationOffset?: number | null | undefined; - modelAssetId?: string | undefined; - negativePrompt?: string | null | undefined; - preview?: boolean | null | undefined; - previewDirection?: string | null | undefined; - prompt?: string | undefined; - sdVersion?: string | null | undefined; - seed?: number | null | undefined; + frontRotationOffset?: number | null | undefined; + modelAssetId?: string | undefined; + negativePrompt?: string | null | undefined; + preview?: boolean | null | undefined; + previewDirection?: string | null | undefined; + prompt?: string | undefined; + sdVersion?: string | null | undefined; + seed?: number | null | undefined; }; export type TextureGenerationJobOutput = { - /** - * API Credits Cost for Texture Generation. Available for Production API Users. - */ - apiCreditCost?: number | null | undefined; - id?: string | undefined; + /** + * API Credits Cost for Texture Generation. Available for Production API Users. + */ + apiCreditCost?: number | null | undefined; + id?: string | undefined; }; /** * Responses for POST /api/rest/v1/generations-texture */ export type CreateTextureGenerationResponseBody = { - textureGenerationJob?: TextureGenerationJobOutput | null | undefined; + textureGenerationJob?: TextureGenerationJobOutput | null | undefined; }; export type CreateTextureGenerationResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /api/rest/v1/generations-texture - */ - object?: CreateTextureGenerationResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /api/rest/v1/generations-texture + */ + object?: CreateTextureGenerationResponseBody | undefined; }; /** @internal */ export const CreateTextureGenerationRequestBody$inboundSchema: z.ZodType< - CreateTextureGenerationRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - front_rotation_offset: z.nullable(z.number().int()).optional(), - modelAssetId: z.string().optional(), - negative_prompt: z.nullable(z.string()).optional(), - preview: z.nullable(z.boolean()).optional(), - preview_direction: z.nullable(z.string()).optional(), - prompt: z.string().optional(), - sd_version: z.nullable(z.string()).optional(), - seed: z.nullable(z.number().int()).optional(), - }) - .transform((v) => { - return remap$(v, { - front_rotation_offset: "frontRotationOffset", - negative_prompt: "negativePrompt", - preview_direction: "previewDirection", - sd_version: "sdVersion", - }); - }); + CreateTextureGenerationRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + front_rotation_offset: z.nullable(z.number().int()).optional(), + modelAssetId: z.string().optional(), + negative_prompt: z.nullable(z.string()).optional(), + preview: z.nullable(z.boolean()).optional(), + preview_direction: z.nullable(z.string()).optional(), + prompt: z.string().optional(), + sd_version: z.nullable(z.string()).optional(), + seed: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "front_rotation_offset": "frontRotationOffset", + "negative_prompt": "negativePrompt", + "preview_direction": "previewDirection", + "sd_version": "sdVersion", + }); +}); /** @internal */ export type CreateTextureGenerationRequestBody$Outbound = { - front_rotation_offset?: number | null | undefined; - modelAssetId?: string | undefined; - negative_prompt?: string | null | undefined; - preview?: boolean | null | undefined; - preview_direction?: string | null | undefined; - prompt?: string | undefined; - sd_version?: string | null | undefined; - seed?: number | null | undefined; + front_rotation_offset?: number | null | undefined; + modelAssetId?: string | undefined; + negative_prompt?: string | null | undefined; + preview?: boolean | null | undefined; + preview_direction?: string | null | undefined; + prompt?: string | undefined; + sd_version?: string | null | undefined; + seed?: number | null | undefined; }; /** @internal */ export const CreateTextureGenerationRequestBody$outboundSchema: z.ZodType< - CreateTextureGenerationRequestBody$Outbound, - z.ZodTypeDef, - CreateTextureGenerationRequestBody -> = z - .object({ - frontRotationOffset: z.nullable(z.number().int()).optional(), - modelAssetId: z.string().optional(), - negativePrompt: z.nullable(z.string()).optional(), - preview: z.nullable(z.boolean()).optional(), - previewDirection: z.nullable(z.string()).optional(), - prompt: z.string().optional(), - sdVersion: z.nullable(z.string()).optional(), - seed: z.nullable(z.number().int()).optional(), - }) - .transform((v) => { - return remap$(v, { - frontRotationOffset: "front_rotation_offset", - negativePrompt: "negative_prompt", - previewDirection: "preview_direction", - sdVersion: "sd_version", - }); - }); + CreateTextureGenerationRequestBody$Outbound, + z.ZodTypeDef, + CreateTextureGenerationRequestBody +> = z.object({ + frontRotationOffset: z.nullable(z.number().int()).optional(), + modelAssetId: z.string().optional(), + negativePrompt: z.nullable(z.string()).optional(), + preview: z.nullable(z.boolean()).optional(), + previewDirection: z.nullable(z.string()).optional(), + prompt: z.string().optional(), + sdVersion: z.nullable(z.string()).optional(), + seed: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + frontRotationOffset: "front_rotation_offset", + negativePrompt: "negative_prompt", + previewDirection: "preview_direction", + sdVersion: "sd_version", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTextureGenerationRequestBody$ { - /** @deprecated use `CreateTextureGenerationRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateTextureGenerationRequestBody$inboundSchema; - /** @deprecated use `CreateTextureGenerationRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateTextureGenerationRequestBody$outboundSchema; - /** @deprecated use `CreateTextureGenerationRequestBody$Outbound` instead. */ - export type Outbound = CreateTextureGenerationRequestBody$Outbound; + /** @deprecated use `CreateTextureGenerationRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateTextureGenerationRequestBody$inboundSchema; + /** @deprecated use `CreateTextureGenerationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateTextureGenerationRequestBody$outboundSchema; + /** @deprecated use `CreateTextureGenerationRequestBody$Outbound` instead. */ + export type Outbound = CreateTextureGenerationRequestBody$Outbound; } /** @internal */ export const TextureGenerationJobOutput$inboundSchema: z.ZodType< - TextureGenerationJobOutput, - z.ZodTypeDef, - unknown + TextureGenerationJobOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.string().optional(), }); /** @internal */ export type TextureGenerationJobOutput$Outbound = { - apiCreditCost?: number | null | undefined; - id?: string | undefined; + apiCreditCost?: number | null | undefined; + id?: string | undefined; }; /** @internal */ export const TextureGenerationJobOutput$outboundSchema: z.ZodType< - TextureGenerationJobOutput$Outbound, - z.ZodTypeDef, - TextureGenerationJobOutput + TextureGenerationJobOutput$Outbound, + z.ZodTypeDef, + TextureGenerationJobOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.string().optional(), }); /** @@ -159,39 +156,39 @@ export const TextureGenerationJobOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TextureGenerationJobOutput$ { - /** @deprecated use `TextureGenerationJobOutput$inboundSchema` instead. */ - export const inboundSchema = TextureGenerationJobOutput$inboundSchema; - /** @deprecated use `TextureGenerationJobOutput$outboundSchema` instead. */ - export const outboundSchema = TextureGenerationJobOutput$outboundSchema; - /** @deprecated use `TextureGenerationJobOutput$Outbound` instead. */ - export type Outbound = TextureGenerationJobOutput$Outbound; + /** @deprecated use `TextureGenerationJobOutput$inboundSchema` instead. */ + export const inboundSchema = TextureGenerationJobOutput$inboundSchema; + /** @deprecated use `TextureGenerationJobOutput$outboundSchema` instead. */ + export const outboundSchema = TextureGenerationJobOutput$outboundSchema; + /** @deprecated use `TextureGenerationJobOutput$Outbound` instead. */ + export type Outbound = TextureGenerationJobOutput$Outbound; } /** @internal */ export const CreateTextureGenerationResponseBody$inboundSchema: z.ZodType< - CreateTextureGenerationResponseBody, - z.ZodTypeDef, - unknown + CreateTextureGenerationResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - textureGenerationJob: z - .nullable(z.lazy(() => TextureGenerationJobOutput$inboundSchema)) - .optional(), + textureGenerationJob: z.nullable( + z.lazy(() => TextureGenerationJobOutput$inboundSchema), + ).optional(), }); /** @internal */ export type CreateTextureGenerationResponseBody$Outbound = { - textureGenerationJob?: TextureGenerationJobOutput$Outbound | null | undefined; + textureGenerationJob?: TextureGenerationJobOutput$Outbound | null | undefined; }; /** @internal */ export const CreateTextureGenerationResponseBody$outboundSchema: z.ZodType< - CreateTextureGenerationResponseBody$Outbound, - z.ZodTypeDef, - CreateTextureGenerationResponseBody + CreateTextureGenerationResponseBody$Outbound, + z.ZodTypeDef, + CreateTextureGenerationResponseBody > = z.object({ - textureGenerationJob: z - .nullable(z.lazy(() => TextureGenerationJobOutput$outboundSchema)) - .optional(), + textureGenerationJob: z.nullable( + z.lazy(() => TextureGenerationJobOutput$outboundSchema), + ).optional(), }); /** @@ -199,73 +196,73 @@ export const CreateTextureGenerationResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTextureGenerationResponseBody$ { - /** @deprecated use `CreateTextureGenerationResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateTextureGenerationResponseBody$inboundSchema; - /** @deprecated use `CreateTextureGenerationResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateTextureGenerationResponseBody$outboundSchema; - /** @deprecated use `CreateTextureGenerationResponseBody$Outbound` instead. */ - export type Outbound = CreateTextureGenerationResponseBody$Outbound; + /** @deprecated use `CreateTextureGenerationResponseBody$inboundSchema` instead. */ + export const inboundSchema = + CreateTextureGenerationResponseBody$inboundSchema; + /** @deprecated use `CreateTextureGenerationResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CreateTextureGenerationResponseBody$outboundSchema; + /** @deprecated use `CreateTextureGenerationResponseBody$Outbound` instead. */ + export type Outbound = CreateTextureGenerationResponseBody$Outbound; } /** @internal */ export const CreateTextureGenerationResponse$inboundSchema: z.ZodType< - CreateTextureGenerationResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateTextureGenerationResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateTextureGenerationResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateTextureGenerationResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateTextureGenerationResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateTextureGenerationResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateTextureGenerationResponseBody$Outbound | undefined; }; /** @internal */ export const CreateTextureGenerationResponse$outboundSchema: z.ZodType< - CreateTextureGenerationResponse$Outbound, - z.ZodTypeDef, - CreateTextureGenerationResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateTextureGenerationResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateTextureGenerationResponse$Outbound, + z.ZodTypeDef, + CreateTextureGenerationResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateTextureGenerationResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTextureGenerationResponse$ { - /** @deprecated use `CreateTextureGenerationResponse$inboundSchema` instead. */ - export const inboundSchema = CreateTextureGenerationResponse$inboundSchema; - /** @deprecated use `CreateTextureGenerationResponse$outboundSchema` instead. */ - export const outboundSchema = CreateTextureGenerationResponse$outboundSchema; - /** @deprecated use `CreateTextureGenerationResponse$Outbound` instead. */ - export type Outbound = CreateTextureGenerationResponse$Outbound; + /** @deprecated use `CreateTextureGenerationResponse$inboundSchema` instead. */ + export const inboundSchema = CreateTextureGenerationResponse$inboundSchema; + /** @deprecated use `CreateTextureGenerationResponse$outboundSchema` instead. */ + export const outboundSchema = CreateTextureGenerationResponse$outboundSchema; + /** @deprecated use `CreateTextureGenerationResponse$Outbound` instead. */ + export type Outbound = CreateTextureGenerationResponse$Outbound; } diff --git a/src/sdk/models/operations/createuniversalupscalerjob.ts b/src/sdk/models/operations/createuniversalupscalerjob.ts index e2f5057..b07d498 100644 --- a/src/sdk/models/operations/createuniversalupscalerjob.ts +++ b/src/sdk/models/operations/createuniversalupscalerjob.ts @@ -2,121 +2,150 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * Query parameters are provided in the request body as a JSON object */ export type CreateUniversalUpscalerJobRequestBody = { - /** - * The creativity strength of the universal upscaler, must be integer between 1 and 10 - */ - creativityStrength?: number | null | undefined; - /** - * The ID of the generated image - */ - generatedImageId?: string | null | undefined; - /** - * The ID of the init image uploaded - */ - initImageId?: string | null | undefined; - /** - * The prompt for the universal upscaler - */ - prompt?: string | null | undefined; - /** - * The upscale multiplier of the universal upscaler, must be number between 1.00 and 2.00 - */ - upscaleMultiplier?: number | null | undefined; - /** - * The style to upscale images using universal upscaler with. - */ - upscalerStyle?: shared.UniversalUpscalerStyle | null | undefined; - /** - * The ID of the variation image - */ - variationId?: string | null | undefined; + /** + * The creativity strength of the universal upscaler. Must be between 1 and 10. + */ + creativityStrength?: number | null | undefined; + /** + * The detail contrast of the universal upscaler. Must be between 1 and 10. Can only be used with ultraUpscaleStyle. + */ + detailContrast?: number | null | undefined; + /** + * The ID of the generated image. + */ + generatedImageId?: string | null | undefined; + /** + * The ID of the init image uploaded. + */ + initImageId?: string | null | undefined; + /** + * The prompt for the universal upscaler. + */ + prompt?: string | null | undefined; + /** + * The similarity of the universal upscaler. Must be between 1 and 10. Can only be used with ultraUpscaleStyle. + */ + similarity?: number | null | undefined; + /** + * The ultra style to upscale images using universal upscaler with. Can not be used with upscalerStyle. + */ + ultraUpscaleStyle?: shared.UniversalUpscalerUltraStyle | null | undefined; + /** + * The upscale multiplier of the universal upscaler. Must be between 1.0 and 2.0. + */ + upscaleMultiplier?: number | null | undefined; + /** + * The style to upscale images using universal upscaler with. Can not be used with ultraUpscaleStyle. + */ + upscalerStyle?: shared.UniversalUpscalerStyle | null | undefined; + /** + * The ID of the variation image. + */ + variationId?: string | null | undefined; }; export type UniversalUpscalerOutput = { - /** - * API Credits Cost for Universal Upscaler Variation. Available for Production API Users. - */ - apiCreditCost?: number | null | undefined; - id?: string | null | undefined; + /** + * API Credits Cost for Universal Upscaler Variation. Available for Production API Users. + */ + apiCreditCost?: number | null | undefined; + id?: string | null | undefined; }; /** * Responses for POST /variations/universal-upscaler */ export type CreateUniversalUpscalerJobResponseBody = { - universalUpscaler?: UniversalUpscalerOutput | undefined; + universalUpscaler?: UniversalUpscalerOutput | undefined; }; export type CreateUniversalUpscalerJobResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /variations/universal-upscaler - */ - object?: CreateUniversalUpscalerJobResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /variations/universal-upscaler + */ + object?: CreateUniversalUpscalerJobResponseBody | undefined; }; /** @internal */ export const CreateUniversalUpscalerJobRequestBody$inboundSchema: z.ZodType< - CreateUniversalUpscalerJobRequestBody, - z.ZodTypeDef, - unknown + CreateUniversalUpscalerJobRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - creativityStrength: z.nullable(z.number().int().default(5)), - generatedImageId: z.nullable(z.string()).optional(), - initImageId: z.nullable(z.string()).optional(), - prompt: z.nullable(z.string()).optional(), - upscaleMultiplier: z.nullable(z.number().default(1.5)), - upscalerStyle: z.nullable( - shared.UniversalUpscalerStyle$inboundSchema.default(shared.UniversalUpscalerStyle.General) + creativityStrength: z.nullable(z.number().int().default(5)), + detailContrast: z.nullable(z.number().int()).optional(), + generatedImageId: z.nullable(z.string()).optional(), + initImageId: z.nullable(z.string()).optional(), + prompt: z.nullable(z.string()).optional(), + similarity: z.nullable(z.number().int()).optional(), + ultraUpscaleStyle: z.nullable( + shared.UniversalUpscalerUltraStyle$inboundSchema, + ).optional(), + upscaleMultiplier: z.nullable(z.number().default(1.5)), + upscalerStyle: z.nullable( + shared.UniversalUpscalerStyle$inboundSchema.default( + shared.UniversalUpscalerStyle.General, ), - variationId: z.nullable(z.string()).optional(), + ), + variationId: z.nullable(z.string()).optional(), }); /** @internal */ export type CreateUniversalUpscalerJobRequestBody$Outbound = { - creativityStrength: number | null; - generatedImageId?: string | null | undefined; - initImageId?: string | null | undefined; - prompt?: string | null | undefined; - upscaleMultiplier: number | null; - upscalerStyle: string | null; - variationId?: string | null | undefined; + creativityStrength: number | null; + detailContrast?: number | null | undefined; + generatedImageId?: string | null | undefined; + initImageId?: string | null | undefined; + prompt?: string | null | undefined; + similarity?: number | null | undefined; + ultraUpscaleStyle?: string | null | undefined; + upscaleMultiplier: number | null; + upscalerStyle: string | null; + variationId?: string | null | undefined; }; /** @internal */ export const CreateUniversalUpscalerJobRequestBody$outboundSchema: z.ZodType< - CreateUniversalUpscalerJobRequestBody$Outbound, - z.ZodTypeDef, - CreateUniversalUpscalerJobRequestBody + CreateUniversalUpscalerJobRequestBody$Outbound, + z.ZodTypeDef, + CreateUniversalUpscalerJobRequestBody > = z.object({ - creativityStrength: z.nullable(z.number().int().default(5)), - generatedImageId: z.nullable(z.string()).optional(), - initImageId: z.nullable(z.string()).optional(), - prompt: z.nullable(z.string()).optional(), - upscaleMultiplier: z.nullable(z.number().default(1.5)), - upscalerStyle: z.nullable( - shared.UniversalUpscalerStyle$outboundSchema.default(shared.UniversalUpscalerStyle.General) + creativityStrength: z.nullable(z.number().int().default(5)), + detailContrast: z.nullable(z.number().int()).optional(), + generatedImageId: z.nullable(z.string()).optional(), + initImageId: z.nullable(z.string()).optional(), + prompt: z.nullable(z.string()).optional(), + similarity: z.nullable(z.number().int()).optional(), + ultraUpscaleStyle: z.nullable( + shared.UniversalUpscalerUltraStyle$outboundSchema, + ).optional(), + upscaleMultiplier: z.nullable(z.number().default(1.5)), + upscalerStyle: z.nullable( + shared.UniversalUpscalerStyle$outboundSchema.default( + shared.UniversalUpscalerStyle.General, ), - variationId: z.nullable(z.string()).optional(), + ), + variationId: z.nullable(z.string()).optional(), }); /** @@ -124,38 +153,40 @@ export const CreateUniversalUpscalerJobRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateUniversalUpscalerJobRequestBody$ { - /** @deprecated use `CreateUniversalUpscalerJobRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateUniversalUpscalerJobRequestBody$inboundSchema; - /** @deprecated use `CreateUniversalUpscalerJobRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateUniversalUpscalerJobRequestBody$outboundSchema; - /** @deprecated use `CreateUniversalUpscalerJobRequestBody$Outbound` instead. */ - export type Outbound = CreateUniversalUpscalerJobRequestBody$Outbound; + /** @deprecated use `CreateUniversalUpscalerJobRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateUniversalUpscalerJobRequestBody$inboundSchema; + /** @deprecated use `CreateUniversalUpscalerJobRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateUniversalUpscalerJobRequestBody$outboundSchema; + /** @deprecated use `CreateUniversalUpscalerJobRequestBody$Outbound` instead. */ + export type Outbound = CreateUniversalUpscalerJobRequestBody$Outbound; } /** @internal */ export const UniversalUpscalerOutput$inboundSchema: z.ZodType< - UniversalUpscalerOutput, - z.ZodTypeDef, - unknown + UniversalUpscalerOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.nullable(z.string()).optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.nullable(z.string()).optional(), }); /** @internal */ export type UniversalUpscalerOutput$Outbound = { - apiCreditCost?: number | null | undefined; - id?: string | null | undefined; + apiCreditCost?: number | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const UniversalUpscalerOutput$outboundSchema: z.ZodType< - UniversalUpscalerOutput$Outbound, - z.ZodTypeDef, - UniversalUpscalerOutput + UniversalUpscalerOutput$Outbound, + z.ZodTypeDef, + UniversalUpscalerOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.nullable(z.string()).optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -163,35 +194,37 @@ export const UniversalUpscalerOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UniversalUpscalerOutput$ { - /** @deprecated use `UniversalUpscalerOutput$inboundSchema` instead. */ - export const inboundSchema = UniversalUpscalerOutput$inboundSchema; - /** @deprecated use `UniversalUpscalerOutput$outboundSchema` instead. */ - export const outboundSchema = UniversalUpscalerOutput$outboundSchema; - /** @deprecated use `UniversalUpscalerOutput$Outbound` instead. */ - export type Outbound = UniversalUpscalerOutput$Outbound; + /** @deprecated use `UniversalUpscalerOutput$inboundSchema` instead. */ + export const inboundSchema = UniversalUpscalerOutput$inboundSchema; + /** @deprecated use `UniversalUpscalerOutput$outboundSchema` instead. */ + export const outboundSchema = UniversalUpscalerOutput$outboundSchema; + /** @deprecated use `UniversalUpscalerOutput$Outbound` instead. */ + export type Outbound = UniversalUpscalerOutput$Outbound; } /** @internal */ export const CreateUniversalUpscalerJobResponseBody$inboundSchema: z.ZodType< - CreateUniversalUpscalerJobResponseBody, - z.ZodTypeDef, - unknown + CreateUniversalUpscalerJobResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - universalUpscaler: z.lazy(() => UniversalUpscalerOutput$inboundSchema).optional(), + universalUpscaler: z.lazy(() => UniversalUpscalerOutput$inboundSchema) + .optional(), }); /** @internal */ export type CreateUniversalUpscalerJobResponseBody$Outbound = { - universalUpscaler?: UniversalUpscalerOutput$Outbound | undefined; + universalUpscaler?: UniversalUpscalerOutput$Outbound | undefined; }; /** @internal */ export const CreateUniversalUpscalerJobResponseBody$outboundSchema: z.ZodType< - CreateUniversalUpscalerJobResponseBody$Outbound, - z.ZodTypeDef, - CreateUniversalUpscalerJobResponseBody + CreateUniversalUpscalerJobResponseBody$Outbound, + z.ZodTypeDef, + CreateUniversalUpscalerJobResponseBody > = z.object({ - universalUpscaler: z.lazy(() => UniversalUpscalerOutput$outboundSchema).optional(), + universalUpscaler: z.lazy(() => UniversalUpscalerOutput$outboundSchema) + .optional(), }); /** @@ -199,73 +232,74 @@ export const CreateUniversalUpscalerJobResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateUniversalUpscalerJobResponseBody$ { - /** @deprecated use `CreateUniversalUpscalerJobResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateUniversalUpscalerJobResponseBody$inboundSchema; - /** @deprecated use `CreateUniversalUpscalerJobResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateUniversalUpscalerJobResponseBody$outboundSchema; - /** @deprecated use `CreateUniversalUpscalerJobResponseBody$Outbound` instead. */ - export type Outbound = CreateUniversalUpscalerJobResponseBody$Outbound; + /** @deprecated use `CreateUniversalUpscalerJobResponseBody$inboundSchema` instead. */ + export const inboundSchema = + CreateUniversalUpscalerJobResponseBody$inboundSchema; + /** @deprecated use `CreateUniversalUpscalerJobResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CreateUniversalUpscalerJobResponseBody$outboundSchema; + /** @deprecated use `CreateUniversalUpscalerJobResponseBody$Outbound` instead. */ + export type Outbound = CreateUniversalUpscalerJobResponseBody$Outbound; } /** @internal */ export const CreateUniversalUpscalerJobResponse$inboundSchema: z.ZodType< - CreateUniversalUpscalerJobResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateUniversalUpscalerJobResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateUniversalUpscalerJobResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateUniversalUpscalerJobResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateUniversalUpscalerJobResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateUniversalUpscalerJobResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateUniversalUpscalerJobResponseBody$Outbound | undefined; }; /** @internal */ export const CreateUniversalUpscalerJobResponse$outboundSchema: z.ZodType< - CreateUniversalUpscalerJobResponse$Outbound, - z.ZodTypeDef, - CreateUniversalUpscalerJobResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateUniversalUpscalerJobResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateUniversalUpscalerJobResponse$Outbound, + z.ZodTypeDef, + CreateUniversalUpscalerJobResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateUniversalUpscalerJobResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateUniversalUpscalerJobResponse$ { - /** @deprecated use `CreateUniversalUpscalerJobResponse$inboundSchema` instead. */ - export const inboundSchema = CreateUniversalUpscalerJobResponse$inboundSchema; - /** @deprecated use `CreateUniversalUpscalerJobResponse$outboundSchema` instead. */ - export const outboundSchema = CreateUniversalUpscalerJobResponse$outboundSchema; - /** @deprecated use `CreateUniversalUpscalerJobResponse$Outbound` instead. */ - export type Outbound = CreateUniversalUpscalerJobResponse$Outbound; + /** @deprecated use `CreateUniversalUpscalerJobResponse$inboundSchema` instead. */ + export const inboundSchema = CreateUniversalUpscalerJobResponse$inboundSchema; + /** @deprecated use `CreateUniversalUpscalerJobResponse$outboundSchema` instead. */ + export const outboundSchema = + CreateUniversalUpscalerJobResponse$outboundSchema; + /** @deprecated use `CreateUniversalUpscalerJobResponse$Outbound` instead. */ + export type Outbound = CreateUniversalUpscalerJobResponse$Outbound; } diff --git a/src/sdk/models/operations/createvariationnobg.ts b/src/sdk/models/operations/createvariationnobg.ts index c4e7a82..357c1d7 100644 --- a/src/sdk/models/operations/createvariationnobg.ts +++ b/src/sdk/models/operations/createvariationnobg.ts @@ -2,75 +2,75 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters are provided in the request body as a JSON object */ export type CreateVariationNoBGRequestBody = { - id: string; - isVariation?: boolean | undefined; + id: string; + isVariation?: boolean | undefined; }; export type SDUpscaleJobOutput = { - /** - * API Credits Cost for No Background Variation. Available for Production API Users. - */ - apiCreditCost?: number | null | undefined; - id?: string | null | undefined; + /** + * API Credits Cost for No Background Variation. Available for Production API Users. + */ + apiCreditCost?: number | null | undefined; + id?: string | null | undefined; }; /** * Responses for POST /variations/nobg */ export type CreateVariationNoBGResponseBody = { - sdNobgJob?: SDUpscaleJobOutput | undefined; + sdNobgJob?: SDUpscaleJobOutput | undefined; }; export type CreateVariationNoBGResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /variations/nobg - */ - object?: CreateVariationNoBGResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /variations/nobg + */ + object?: CreateVariationNoBGResponseBody | undefined; }; /** @internal */ export const CreateVariationNoBGRequestBody$inboundSchema: z.ZodType< - CreateVariationNoBGRequestBody, - z.ZodTypeDef, - unknown + CreateVariationNoBGRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - isVariation: z.boolean().optional(), + id: z.string(), + isVariation: z.boolean().optional(), }); /** @internal */ export type CreateVariationNoBGRequestBody$Outbound = { - id: string; - isVariation?: boolean | undefined; + id: string; + isVariation?: boolean | undefined; }; /** @internal */ export const CreateVariationNoBGRequestBody$outboundSchema: z.ZodType< - CreateVariationNoBGRequestBody$Outbound, - z.ZodTypeDef, - CreateVariationNoBGRequestBody + CreateVariationNoBGRequestBody$Outbound, + z.ZodTypeDef, + CreateVariationNoBGRequestBody > = z.object({ - id: z.string(), - isVariation: z.boolean().optional(), + id: z.string(), + isVariation: z.boolean().optional(), }); /** @@ -78,38 +78,38 @@ export const CreateVariationNoBGRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationNoBGRequestBody$ { - /** @deprecated use `CreateVariationNoBGRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateVariationNoBGRequestBody$inboundSchema; - /** @deprecated use `CreateVariationNoBGRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateVariationNoBGRequestBody$outboundSchema; - /** @deprecated use `CreateVariationNoBGRequestBody$Outbound` instead. */ - export type Outbound = CreateVariationNoBGRequestBody$Outbound; + /** @deprecated use `CreateVariationNoBGRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateVariationNoBGRequestBody$inboundSchema; + /** @deprecated use `CreateVariationNoBGRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateVariationNoBGRequestBody$outboundSchema; + /** @deprecated use `CreateVariationNoBGRequestBody$Outbound` instead. */ + export type Outbound = CreateVariationNoBGRequestBody$Outbound; } /** @internal */ export const SDUpscaleJobOutput$inboundSchema: z.ZodType< - SDUpscaleJobOutput, - z.ZodTypeDef, - unknown + SDUpscaleJobOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.nullable(z.string()).optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.nullable(z.string()).optional(), }); /** @internal */ export type SDUpscaleJobOutput$Outbound = { - apiCreditCost?: number | null | undefined; - id?: string | null | undefined; + apiCreditCost?: number | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const SDUpscaleJobOutput$outboundSchema: z.ZodType< - SDUpscaleJobOutput$Outbound, - z.ZodTypeDef, - SDUpscaleJobOutput + SDUpscaleJobOutput$Outbound, + z.ZodTypeDef, + SDUpscaleJobOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.nullable(z.string()).optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -117,35 +117,35 @@ export const SDUpscaleJobOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SDUpscaleJobOutput$ { - /** @deprecated use `SDUpscaleJobOutput$inboundSchema` instead. */ - export const inboundSchema = SDUpscaleJobOutput$inboundSchema; - /** @deprecated use `SDUpscaleJobOutput$outboundSchema` instead. */ - export const outboundSchema = SDUpscaleJobOutput$outboundSchema; - /** @deprecated use `SDUpscaleJobOutput$Outbound` instead. */ - export type Outbound = SDUpscaleJobOutput$Outbound; + /** @deprecated use `SDUpscaleJobOutput$inboundSchema` instead. */ + export const inboundSchema = SDUpscaleJobOutput$inboundSchema; + /** @deprecated use `SDUpscaleJobOutput$outboundSchema` instead. */ + export const outboundSchema = SDUpscaleJobOutput$outboundSchema; + /** @deprecated use `SDUpscaleJobOutput$Outbound` instead. */ + export type Outbound = SDUpscaleJobOutput$Outbound; } /** @internal */ export const CreateVariationNoBGResponseBody$inboundSchema: z.ZodType< - CreateVariationNoBGResponseBody, - z.ZodTypeDef, - unknown + CreateVariationNoBGResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - sdNobgJob: z.lazy(() => SDUpscaleJobOutput$inboundSchema).optional(), + sdNobgJob: z.lazy(() => SDUpscaleJobOutput$inboundSchema).optional(), }); /** @internal */ export type CreateVariationNoBGResponseBody$Outbound = { - sdNobgJob?: SDUpscaleJobOutput$Outbound | undefined; + sdNobgJob?: SDUpscaleJobOutput$Outbound | undefined; }; /** @internal */ export const CreateVariationNoBGResponseBody$outboundSchema: z.ZodType< - CreateVariationNoBGResponseBody$Outbound, - z.ZodTypeDef, - CreateVariationNoBGResponseBody + CreateVariationNoBGResponseBody$Outbound, + z.ZodTypeDef, + CreateVariationNoBGResponseBody > = z.object({ - sdNobgJob: z.lazy(() => SDUpscaleJobOutput$outboundSchema).optional(), + sdNobgJob: z.lazy(() => SDUpscaleJobOutput$outboundSchema).optional(), }); /** @@ -153,73 +153,71 @@ export const CreateVariationNoBGResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationNoBGResponseBody$ { - /** @deprecated use `CreateVariationNoBGResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateVariationNoBGResponseBody$inboundSchema; - /** @deprecated use `CreateVariationNoBGResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateVariationNoBGResponseBody$outboundSchema; - /** @deprecated use `CreateVariationNoBGResponseBody$Outbound` instead. */ - export type Outbound = CreateVariationNoBGResponseBody$Outbound; + /** @deprecated use `CreateVariationNoBGResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateVariationNoBGResponseBody$inboundSchema; + /** @deprecated use `CreateVariationNoBGResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateVariationNoBGResponseBody$outboundSchema; + /** @deprecated use `CreateVariationNoBGResponseBody$Outbound` instead. */ + export type Outbound = CreateVariationNoBGResponseBody$Outbound; } /** @internal */ export const CreateVariationNoBGResponse$inboundSchema: z.ZodType< - CreateVariationNoBGResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateVariationNoBGResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateVariationNoBGResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateVariationNoBGResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateVariationNoBGResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateVariationNoBGResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateVariationNoBGResponseBody$Outbound | undefined; }; /** @internal */ export const CreateVariationNoBGResponse$outboundSchema: z.ZodType< - CreateVariationNoBGResponse$Outbound, - z.ZodTypeDef, - CreateVariationNoBGResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateVariationNoBGResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateVariationNoBGResponse$Outbound, + z.ZodTypeDef, + CreateVariationNoBGResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateVariationNoBGResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationNoBGResponse$ { - /** @deprecated use `CreateVariationNoBGResponse$inboundSchema` instead. */ - export const inboundSchema = CreateVariationNoBGResponse$inboundSchema; - /** @deprecated use `CreateVariationNoBGResponse$outboundSchema` instead. */ - export const outboundSchema = CreateVariationNoBGResponse$outboundSchema; - /** @deprecated use `CreateVariationNoBGResponse$Outbound` instead. */ - export type Outbound = CreateVariationNoBGResponse$Outbound; + /** @deprecated use `CreateVariationNoBGResponse$inboundSchema` instead. */ + export const inboundSchema = CreateVariationNoBGResponse$inboundSchema; + /** @deprecated use `CreateVariationNoBGResponse$outboundSchema` instead. */ + export const outboundSchema = CreateVariationNoBGResponse$outboundSchema; + /** @deprecated use `CreateVariationNoBGResponse$Outbound` instead. */ + export type Outbound = CreateVariationNoBGResponse$Outbound; } diff --git a/src/sdk/models/operations/createvariationunzoom.ts b/src/sdk/models/operations/createvariationunzoom.ts index c941cc1..f69bc7d 100644 --- a/src/sdk/models/operations/createvariationunzoom.ts +++ b/src/sdk/models/operations/createvariationunzoom.ts @@ -2,75 +2,75 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters can also be provided in the request body as a JSON object */ export type CreateVariationUnzoomRequestBody = { - id?: string | undefined; - isVariation?: boolean | null | undefined; + id?: string | undefined; + isVariation?: boolean | null | undefined; }; export type SDUnzoomOutput = { - /** - * API Credits Cost for Unzoom Variation. Available for Production API Users. - */ - apiCreditCost?: number | null | undefined; - id?: string | undefined; + /** + * API Credits Cost for Unzoom Variation. Available for Production API Users. + */ + apiCreditCost?: number | null | undefined; + id?: string | undefined; }; /** * Responses for POST /api/rest/v1/variations/unzoom */ export type CreateVariationUnzoomResponseBody = { - sdUnzoomJob?: SDUnzoomOutput | null | undefined; + sdUnzoomJob?: SDUnzoomOutput | null | undefined; }; export type CreateVariationUnzoomResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /api/rest/v1/variations/unzoom - */ - object?: CreateVariationUnzoomResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /api/rest/v1/variations/unzoom + */ + object?: CreateVariationUnzoomResponseBody | undefined; }; /** @internal */ export const CreateVariationUnzoomRequestBody$inboundSchema: z.ZodType< - CreateVariationUnzoomRequestBody, - z.ZodTypeDef, - unknown + CreateVariationUnzoomRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string().optional(), - isVariation: z.nullable(z.boolean()).optional(), + id: z.string().optional(), + isVariation: z.nullable(z.boolean()).optional(), }); /** @internal */ export type CreateVariationUnzoomRequestBody$Outbound = { - id?: string | undefined; - isVariation?: boolean | null | undefined; + id?: string | undefined; + isVariation?: boolean | null | undefined; }; /** @internal */ export const CreateVariationUnzoomRequestBody$outboundSchema: z.ZodType< - CreateVariationUnzoomRequestBody$Outbound, - z.ZodTypeDef, - CreateVariationUnzoomRequestBody + CreateVariationUnzoomRequestBody$Outbound, + z.ZodTypeDef, + CreateVariationUnzoomRequestBody > = z.object({ - id: z.string().optional(), - isVariation: z.nullable(z.boolean()).optional(), + id: z.string().optional(), + isVariation: z.nullable(z.boolean()).optional(), }); /** @@ -78,35 +78,38 @@ export const CreateVariationUnzoomRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationUnzoomRequestBody$ { - /** @deprecated use `CreateVariationUnzoomRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateVariationUnzoomRequestBody$inboundSchema; - /** @deprecated use `CreateVariationUnzoomRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateVariationUnzoomRequestBody$outboundSchema; - /** @deprecated use `CreateVariationUnzoomRequestBody$Outbound` instead. */ - export type Outbound = CreateVariationUnzoomRequestBody$Outbound; + /** @deprecated use `CreateVariationUnzoomRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateVariationUnzoomRequestBody$inboundSchema; + /** @deprecated use `CreateVariationUnzoomRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateVariationUnzoomRequestBody$outboundSchema; + /** @deprecated use `CreateVariationUnzoomRequestBody$Outbound` instead. */ + export type Outbound = CreateVariationUnzoomRequestBody$Outbound; } /** @internal */ -export const SDUnzoomOutput$inboundSchema: z.ZodType = - z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.string().optional(), - }); +export const SDUnzoomOutput$inboundSchema: z.ZodType< + SDUnzoomOutput, + z.ZodTypeDef, + unknown +> = z.object({ + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.string().optional(), +}); /** @internal */ export type SDUnzoomOutput$Outbound = { - apiCreditCost?: number | null | undefined; - id?: string | undefined; + apiCreditCost?: number | null | undefined; + id?: string | undefined; }; /** @internal */ export const SDUnzoomOutput$outboundSchema: z.ZodType< - SDUnzoomOutput$Outbound, - z.ZodTypeDef, - SDUnzoomOutput + SDUnzoomOutput$Outbound, + z.ZodTypeDef, + SDUnzoomOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.string().optional(), }); /** @@ -114,35 +117,37 @@ export const SDUnzoomOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SDUnzoomOutput$ { - /** @deprecated use `SDUnzoomOutput$inboundSchema` instead. */ - export const inboundSchema = SDUnzoomOutput$inboundSchema; - /** @deprecated use `SDUnzoomOutput$outboundSchema` instead. */ - export const outboundSchema = SDUnzoomOutput$outboundSchema; - /** @deprecated use `SDUnzoomOutput$Outbound` instead. */ - export type Outbound = SDUnzoomOutput$Outbound; + /** @deprecated use `SDUnzoomOutput$inboundSchema` instead. */ + export const inboundSchema = SDUnzoomOutput$inboundSchema; + /** @deprecated use `SDUnzoomOutput$outboundSchema` instead. */ + export const outboundSchema = SDUnzoomOutput$outboundSchema; + /** @deprecated use `SDUnzoomOutput$Outbound` instead. */ + export type Outbound = SDUnzoomOutput$Outbound; } /** @internal */ export const CreateVariationUnzoomResponseBody$inboundSchema: z.ZodType< - CreateVariationUnzoomResponseBody, - z.ZodTypeDef, - unknown + CreateVariationUnzoomResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - sdUnzoomJob: z.nullable(z.lazy(() => SDUnzoomOutput$inboundSchema)).optional(), + sdUnzoomJob: z.nullable(z.lazy(() => SDUnzoomOutput$inboundSchema)) + .optional(), }); /** @internal */ export type CreateVariationUnzoomResponseBody$Outbound = { - sdUnzoomJob?: SDUnzoomOutput$Outbound | null | undefined; + sdUnzoomJob?: SDUnzoomOutput$Outbound | null | undefined; }; /** @internal */ export const CreateVariationUnzoomResponseBody$outboundSchema: z.ZodType< - CreateVariationUnzoomResponseBody$Outbound, - z.ZodTypeDef, - CreateVariationUnzoomResponseBody + CreateVariationUnzoomResponseBody$Outbound, + z.ZodTypeDef, + CreateVariationUnzoomResponseBody > = z.object({ - sdUnzoomJob: z.nullable(z.lazy(() => SDUnzoomOutput$outboundSchema)).optional(), + sdUnzoomJob: z.nullable(z.lazy(() => SDUnzoomOutput$outboundSchema)) + .optional(), }); /** @@ -150,73 +155,72 @@ export const CreateVariationUnzoomResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationUnzoomResponseBody$ { - /** @deprecated use `CreateVariationUnzoomResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateVariationUnzoomResponseBody$inboundSchema; - /** @deprecated use `CreateVariationUnzoomResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateVariationUnzoomResponseBody$outboundSchema; - /** @deprecated use `CreateVariationUnzoomResponseBody$Outbound` instead. */ - export type Outbound = CreateVariationUnzoomResponseBody$Outbound; + /** @deprecated use `CreateVariationUnzoomResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateVariationUnzoomResponseBody$inboundSchema; + /** @deprecated use `CreateVariationUnzoomResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CreateVariationUnzoomResponseBody$outboundSchema; + /** @deprecated use `CreateVariationUnzoomResponseBody$Outbound` instead. */ + export type Outbound = CreateVariationUnzoomResponseBody$Outbound; } /** @internal */ export const CreateVariationUnzoomResponse$inboundSchema: z.ZodType< - CreateVariationUnzoomResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateVariationUnzoomResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateVariationUnzoomResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateVariationUnzoomResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateVariationUnzoomResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateVariationUnzoomResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateVariationUnzoomResponseBody$Outbound | undefined; }; /** @internal */ export const CreateVariationUnzoomResponse$outboundSchema: z.ZodType< - CreateVariationUnzoomResponse$Outbound, - z.ZodTypeDef, - CreateVariationUnzoomResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateVariationUnzoomResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateVariationUnzoomResponse$Outbound, + z.ZodTypeDef, + CreateVariationUnzoomResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateVariationUnzoomResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationUnzoomResponse$ { - /** @deprecated use `CreateVariationUnzoomResponse$inboundSchema` instead. */ - export const inboundSchema = CreateVariationUnzoomResponse$inboundSchema; - /** @deprecated use `CreateVariationUnzoomResponse$outboundSchema` instead. */ - export const outboundSchema = CreateVariationUnzoomResponse$outboundSchema; - /** @deprecated use `CreateVariationUnzoomResponse$Outbound` instead. */ - export type Outbound = CreateVariationUnzoomResponse$Outbound; + /** @deprecated use `CreateVariationUnzoomResponse$inboundSchema` instead. */ + export const inboundSchema = CreateVariationUnzoomResponse$inboundSchema; + /** @deprecated use `CreateVariationUnzoomResponse$outboundSchema` instead. */ + export const outboundSchema = CreateVariationUnzoomResponse$outboundSchema; + /** @deprecated use `CreateVariationUnzoomResponse$Outbound` instead. */ + export type Outbound = CreateVariationUnzoomResponse$Outbound; } diff --git a/src/sdk/models/operations/createvariationupscale.ts b/src/sdk/models/operations/createvariationupscale.ts index c244f99..44c2c27 100644 --- a/src/sdk/models/operations/createvariationupscale.ts +++ b/src/sdk/models/operations/createvariationupscale.ts @@ -2,71 +2,71 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters are provided in the request body as a JSON object */ export type CreateVariationUpscaleRequestBody = { - id: string; + id: string; }; export type CreateVariationUpscaleSDUpscaleJobOutput = { - /** - * API Credits Cost for Upscale Variation. Available for Production API Users. - */ - apiCreditCost?: number | null | undefined; - id?: string | undefined; + /** + * API Credits Cost for Upscale Variation. Available for Production API Users. + */ + apiCreditCost?: number | null | undefined; + id?: string | undefined; }; /** * Responses for POST /variations/upscale */ export type CreateVariationUpscaleResponseBody = { - sdUpscaleJob?: CreateVariationUpscaleSDUpscaleJobOutput | null | undefined; + sdUpscaleJob?: CreateVariationUpscaleSDUpscaleJobOutput | null | undefined; }; export type CreateVariationUpscaleResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /variations/upscale - */ - object?: CreateVariationUpscaleResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /variations/upscale + */ + object?: CreateVariationUpscaleResponseBody | undefined; }; /** @internal */ export const CreateVariationUpscaleRequestBody$inboundSchema: z.ZodType< - CreateVariationUpscaleRequestBody, - z.ZodTypeDef, - unknown + CreateVariationUpscaleRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type CreateVariationUpscaleRequestBody$Outbound = { - id: string; + id: string; }; /** @internal */ export const CreateVariationUpscaleRequestBody$outboundSchema: z.ZodType< - CreateVariationUpscaleRequestBody$Outbound, - z.ZodTypeDef, - CreateVariationUpscaleRequestBody + CreateVariationUpscaleRequestBody$Outbound, + z.ZodTypeDef, + CreateVariationUpscaleRequestBody > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -74,38 +74,39 @@ export const CreateVariationUpscaleRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationUpscaleRequestBody$ { - /** @deprecated use `CreateVariationUpscaleRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateVariationUpscaleRequestBody$inboundSchema; - /** @deprecated use `CreateVariationUpscaleRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateVariationUpscaleRequestBody$outboundSchema; - /** @deprecated use `CreateVariationUpscaleRequestBody$Outbound` instead. */ - export type Outbound = CreateVariationUpscaleRequestBody$Outbound; + /** @deprecated use `CreateVariationUpscaleRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateVariationUpscaleRequestBody$inboundSchema; + /** @deprecated use `CreateVariationUpscaleRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateVariationUpscaleRequestBody$outboundSchema; + /** @deprecated use `CreateVariationUpscaleRequestBody$Outbound` instead. */ + export type Outbound = CreateVariationUpscaleRequestBody$Outbound; } /** @internal */ export const CreateVariationUpscaleSDUpscaleJobOutput$inboundSchema: z.ZodType< - CreateVariationUpscaleSDUpscaleJobOutput, - z.ZodTypeDef, - unknown + CreateVariationUpscaleSDUpscaleJobOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.string().optional(), }); /** @internal */ export type CreateVariationUpscaleSDUpscaleJobOutput$Outbound = { - apiCreditCost?: number | null | undefined; - id?: string | undefined; + apiCreditCost?: number | null | undefined; + id?: string | undefined; }; /** @internal */ export const CreateVariationUpscaleSDUpscaleJobOutput$outboundSchema: z.ZodType< - CreateVariationUpscaleSDUpscaleJobOutput$Outbound, - z.ZodTypeDef, - CreateVariationUpscaleSDUpscaleJobOutput + CreateVariationUpscaleSDUpscaleJobOutput$Outbound, + z.ZodTypeDef, + CreateVariationUpscaleSDUpscaleJobOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - id: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + id: z.string().optional(), }); /** @@ -113,39 +114,44 @@ export const CreateVariationUpscaleSDUpscaleJobOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationUpscaleSDUpscaleJobOutput$ { - /** @deprecated use `CreateVariationUpscaleSDUpscaleJobOutput$inboundSchema` instead. */ - export const inboundSchema = CreateVariationUpscaleSDUpscaleJobOutput$inboundSchema; - /** @deprecated use `CreateVariationUpscaleSDUpscaleJobOutput$outboundSchema` instead. */ - export const outboundSchema = CreateVariationUpscaleSDUpscaleJobOutput$outboundSchema; - /** @deprecated use `CreateVariationUpscaleSDUpscaleJobOutput$Outbound` instead. */ - export type Outbound = CreateVariationUpscaleSDUpscaleJobOutput$Outbound; + /** @deprecated use `CreateVariationUpscaleSDUpscaleJobOutput$inboundSchema` instead. */ + export const inboundSchema = + CreateVariationUpscaleSDUpscaleJobOutput$inboundSchema; + /** @deprecated use `CreateVariationUpscaleSDUpscaleJobOutput$outboundSchema` instead. */ + export const outboundSchema = + CreateVariationUpscaleSDUpscaleJobOutput$outboundSchema; + /** @deprecated use `CreateVariationUpscaleSDUpscaleJobOutput$Outbound` instead. */ + export type Outbound = CreateVariationUpscaleSDUpscaleJobOutput$Outbound; } /** @internal */ export const CreateVariationUpscaleResponseBody$inboundSchema: z.ZodType< - CreateVariationUpscaleResponseBody, - z.ZodTypeDef, - unknown + CreateVariationUpscaleResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - sdUpscaleJob: z - .nullable(z.lazy(() => CreateVariationUpscaleSDUpscaleJobOutput$inboundSchema)) - .optional(), + sdUpscaleJob: z.nullable( + z.lazy(() => CreateVariationUpscaleSDUpscaleJobOutput$inboundSchema), + ).optional(), }); /** @internal */ export type CreateVariationUpscaleResponseBody$Outbound = { - sdUpscaleJob?: CreateVariationUpscaleSDUpscaleJobOutput$Outbound | null | undefined; + sdUpscaleJob?: + | CreateVariationUpscaleSDUpscaleJobOutput$Outbound + | null + | undefined; }; /** @internal */ export const CreateVariationUpscaleResponseBody$outboundSchema: z.ZodType< - CreateVariationUpscaleResponseBody$Outbound, - z.ZodTypeDef, - CreateVariationUpscaleResponseBody + CreateVariationUpscaleResponseBody$Outbound, + z.ZodTypeDef, + CreateVariationUpscaleResponseBody > = z.object({ - sdUpscaleJob: z - .nullable(z.lazy(() => CreateVariationUpscaleSDUpscaleJobOutput$outboundSchema)) - .optional(), + sdUpscaleJob: z.nullable( + z.lazy(() => CreateVariationUpscaleSDUpscaleJobOutput$outboundSchema), + ).optional(), }); /** @@ -153,73 +159,72 @@ export const CreateVariationUpscaleResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationUpscaleResponseBody$ { - /** @deprecated use `CreateVariationUpscaleResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateVariationUpscaleResponseBody$inboundSchema; - /** @deprecated use `CreateVariationUpscaleResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateVariationUpscaleResponseBody$outboundSchema; - /** @deprecated use `CreateVariationUpscaleResponseBody$Outbound` instead. */ - export type Outbound = CreateVariationUpscaleResponseBody$Outbound; + /** @deprecated use `CreateVariationUpscaleResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateVariationUpscaleResponseBody$inboundSchema; + /** @deprecated use `CreateVariationUpscaleResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CreateVariationUpscaleResponseBody$outboundSchema; + /** @deprecated use `CreateVariationUpscaleResponseBody$Outbound` instead. */ + export type Outbound = CreateVariationUpscaleResponseBody$Outbound; } /** @internal */ export const CreateVariationUpscaleResponse$inboundSchema: z.ZodType< - CreateVariationUpscaleResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreateVariationUpscaleResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreateVariationUpscaleResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreateVariationUpscaleResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreateVariationUpscaleResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreateVariationUpscaleResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreateVariationUpscaleResponseBody$Outbound | undefined; }; /** @internal */ export const CreateVariationUpscaleResponse$outboundSchema: z.ZodType< - CreateVariationUpscaleResponse$Outbound, - z.ZodTypeDef, - CreateVariationUpscaleResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreateVariationUpscaleResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreateVariationUpscaleResponse$Outbound, + z.ZodTypeDef, + CreateVariationUpscaleResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreateVariationUpscaleResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateVariationUpscaleResponse$ { - /** @deprecated use `CreateVariationUpscaleResponse$inboundSchema` instead. */ - export const inboundSchema = CreateVariationUpscaleResponse$inboundSchema; - /** @deprecated use `CreateVariationUpscaleResponse$outboundSchema` instead. */ - export const outboundSchema = CreateVariationUpscaleResponse$outboundSchema; - /** @deprecated use `CreateVariationUpscaleResponse$Outbound` instead. */ - export type Outbound = CreateVariationUpscaleResponse$Outbound; + /** @deprecated use `CreateVariationUpscaleResponse$inboundSchema` instead. */ + export const inboundSchema = CreateVariationUpscaleResponse$inboundSchema; + /** @deprecated use `CreateVariationUpscaleResponse$outboundSchema` instead. */ + export const outboundSchema = CreateVariationUpscaleResponse$outboundSchema; + /** @deprecated use `CreateVariationUpscaleResponse$Outbound` instead. */ + export type Outbound = CreateVariationUpscaleResponse$Outbound; } diff --git a/src/sdk/models/operations/delete3dmodelbyid.ts b/src/sdk/models/operations/delete3dmodelbyid.ts index ef6b31d..fd60f6a 100644 --- a/src/sdk/models/operations/delete3dmodelbyid.ts +++ b/src/sdk/models/operations/delete3dmodelbyid.ts @@ -2,84 +2,84 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters can also be provided in the request body as a JSON object */ export type Delete3DModelByIdRequestBody = { - id?: string | null | undefined; + id?: string | null | undefined; }; export type Delete3DModelByIdRequest = { - /** - * Query parameters can also be provided in the request body as a JSON object - */ - requestBody?: Delete3DModelByIdRequestBody | undefined; - /** - * _"id" is required (enter it either in parameters or request body)_ - */ - id: string; + /** + * Query parameters can also be provided in the request body as a JSON object + */ + requestBody?: Delete3DModelByIdRequestBody | undefined; + /** + * _"id" is required (enter it either in parameters or request body)_ + */ + id: string; }; /** * columns and relationships of "model_assets" */ export type ModelAssets = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** * Responses for DELETE /api/rest/v1/models-3d/{id} */ export type Delete3DModelByIdResponseBody = { - /** - * columns and relationships of "model_assets" - */ - deleteModelAssetsByPk?: ModelAssets | null | undefined; + /** + * columns and relationships of "model_assets" + */ + deleteModelAssetsByPk?: ModelAssets | null | undefined; }; export type Delete3DModelByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for DELETE /api/rest/v1/models-3d/{id} - */ - object?: Delete3DModelByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for DELETE /api/rest/v1/models-3d/{id} + */ + object?: Delete3DModelByIdResponseBody | undefined; }; /** @internal */ export const Delete3DModelByIdRequestBody$inboundSchema: z.ZodType< - Delete3DModelByIdRequestBody, - z.ZodTypeDef, - unknown + Delete3DModelByIdRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @internal */ export type Delete3DModelByIdRequestBody$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const Delete3DModelByIdRequestBody$outboundSchema: z.ZodType< - Delete3DModelByIdRequestBody$Outbound, - z.ZodTypeDef, - Delete3DModelByIdRequestBody + Delete3DModelByIdRequestBody$Outbound, + z.ZodTypeDef, + Delete3DModelByIdRequestBody > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -87,82 +87,84 @@ export const Delete3DModelByIdRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Delete3DModelByIdRequestBody$ { - /** @deprecated use `Delete3DModelByIdRequestBody$inboundSchema` instead. */ - export const inboundSchema = Delete3DModelByIdRequestBody$inboundSchema; - /** @deprecated use `Delete3DModelByIdRequestBody$outboundSchema` instead. */ - export const outboundSchema = Delete3DModelByIdRequestBody$outboundSchema; - /** @deprecated use `Delete3DModelByIdRequestBody$Outbound` instead. */ - export type Outbound = Delete3DModelByIdRequestBody$Outbound; + /** @deprecated use `Delete3DModelByIdRequestBody$inboundSchema` instead. */ + export const inboundSchema = Delete3DModelByIdRequestBody$inboundSchema; + /** @deprecated use `Delete3DModelByIdRequestBody$outboundSchema` instead. */ + export const outboundSchema = Delete3DModelByIdRequestBody$outboundSchema; + /** @deprecated use `Delete3DModelByIdRequestBody$Outbound` instead. */ + export type Outbound = Delete3DModelByIdRequestBody$Outbound; } /** @internal */ export const Delete3DModelByIdRequest$inboundSchema: z.ZodType< - Delete3DModelByIdRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => Delete3DModelByIdRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + Delete3DModelByIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => Delete3DModelByIdRequestBody$inboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type Delete3DModelByIdRequest$Outbound = { - RequestBody?: Delete3DModelByIdRequestBody$Outbound | undefined; - id: string; + RequestBody?: Delete3DModelByIdRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const Delete3DModelByIdRequest$outboundSchema: z.ZodType< - Delete3DModelByIdRequest$Outbound, - z.ZodTypeDef, - Delete3DModelByIdRequest -> = z - .object({ - requestBody: z.lazy(() => Delete3DModelByIdRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + Delete3DModelByIdRequest$Outbound, + z.ZodTypeDef, + Delete3DModelByIdRequest +> = z.object({ + requestBody: z.lazy(() => Delete3DModelByIdRequestBody$outboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Delete3DModelByIdRequest$ { - /** @deprecated use `Delete3DModelByIdRequest$inboundSchema` instead. */ - export const inboundSchema = Delete3DModelByIdRequest$inboundSchema; - /** @deprecated use `Delete3DModelByIdRequest$outboundSchema` instead. */ - export const outboundSchema = Delete3DModelByIdRequest$outboundSchema; - /** @deprecated use `Delete3DModelByIdRequest$Outbound` instead. */ - export type Outbound = Delete3DModelByIdRequest$Outbound; + /** @deprecated use `Delete3DModelByIdRequest$inboundSchema` instead. */ + export const inboundSchema = Delete3DModelByIdRequest$inboundSchema; + /** @deprecated use `Delete3DModelByIdRequest$outboundSchema` instead. */ + export const outboundSchema = Delete3DModelByIdRequest$outboundSchema; + /** @deprecated use `Delete3DModelByIdRequest$Outbound` instead. */ + export type Outbound = Delete3DModelByIdRequest$Outbound; } /** @internal */ -export const ModelAssets$inboundSchema: z.ZodType = z.object({ - id: z.nullable(z.string()).optional(), +export const ModelAssets$inboundSchema: z.ZodType< + ModelAssets, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), }); /** @internal */ export type ModelAssets$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const ModelAssets$outboundSchema: z.ZodType< - ModelAssets$Outbound, - z.ZodTypeDef, - ModelAssets + ModelAssets$Outbound, + z.ZodTypeDef, + ModelAssets > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -170,121 +172,115 @@ export const ModelAssets$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ModelAssets$ { - /** @deprecated use `ModelAssets$inboundSchema` instead. */ - export const inboundSchema = ModelAssets$inboundSchema; - /** @deprecated use `ModelAssets$outboundSchema` instead. */ - export const outboundSchema = ModelAssets$outboundSchema; - /** @deprecated use `ModelAssets$Outbound` instead. */ - export type Outbound = ModelAssets$Outbound; + /** @deprecated use `ModelAssets$inboundSchema` instead. */ + export const inboundSchema = ModelAssets$inboundSchema; + /** @deprecated use `ModelAssets$outboundSchema` instead. */ + export const outboundSchema = ModelAssets$outboundSchema; + /** @deprecated use `ModelAssets$Outbound` instead. */ + export type Outbound = ModelAssets$Outbound; } /** @internal */ export const Delete3DModelByIdResponseBody$inboundSchema: z.ZodType< - Delete3DModelByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - delete_model_assets_by_pk: z.nullable(z.lazy(() => ModelAssets$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - delete_model_assets_by_pk: "deleteModelAssetsByPk", - }); - }); + Delete3DModelByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + delete_model_assets_by_pk: z.nullable(z.lazy(() => ModelAssets$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "delete_model_assets_by_pk": "deleteModelAssetsByPk", + }); +}); /** @internal */ export type Delete3DModelByIdResponseBody$Outbound = { - delete_model_assets_by_pk?: ModelAssets$Outbound | null | undefined; + delete_model_assets_by_pk?: ModelAssets$Outbound | null | undefined; }; /** @internal */ export const Delete3DModelByIdResponseBody$outboundSchema: z.ZodType< - Delete3DModelByIdResponseBody$Outbound, - z.ZodTypeDef, - Delete3DModelByIdResponseBody -> = z - .object({ - deleteModelAssetsByPk: z.nullable(z.lazy(() => ModelAssets$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - deleteModelAssetsByPk: "delete_model_assets_by_pk", - }); - }); + Delete3DModelByIdResponseBody$Outbound, + z.ZodTypeDef, + Delete3DModelByIdResponseBody +> = z.object({ + deleteModelAssetsByPk: z.nullable(z.lazy(() => ModelAssets$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + deleteModelAssetsByPk: "delete_model_assets_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Delete3DModelByIdResponseBody$ { - /** @deprecated use `Delete3DModelByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = Delete3DModelByIdResponseBody$inboundSchema; - /** @deprecated use `Delete3DModelByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = Delete3DModelByIdResponseBody$outboundSchema; - /** @deprecated use `Delete3DModelByIdResponseBody$Outbound` instead. */ - export type Outbound = Delete3DModelByIdResponseBody$Outbound; + /** @deprecated use `Delete3DModelByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = Delete3DModelByIdResponseBody$inboundSchema; + /** @deprecated use `Delete3DModelByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = Delete3DModelByIdResponseBody$outboundSchema; + /** @deprecated use `Delete3DModelByIdResponseBody$Outbound` instead. */ + export type Outbound = Delete3DModelByIdResponseBody$Outbound; } /** @internal */ export const Delete3DModelByIdResponse$inboundSchema: z.ZodType< - Delete3DModelByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => Delete3DModelByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + Delete3DModelByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => Delete3DModelByIdResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type Delete3DModelByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: Delete3DModelByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: Delete3DModelByIdResponseBody$Outbound | undefined; }; /** @internal */ export const Delete3DModelByIdResponse$outboundSchema: z.ZodType< - Delete3DModelByIdResponse$Outbound, - z.ZodTypeDef, - Delete3DModelByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => Delete3DModelByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + Delete3DModelByIdResponse$Outbound, + z.ZodTypeDef, + Delete3DModelByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => Delete3DModelByIdResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Delete3DModelByIdResponse$ { - /** @deprecated use `Delete3DModelByIdResponse$inboundSchema` instead. */ - export const inboundSchema = Delete3DModelByIdResponse$inboundSchema; - /** @deprecated use `Delete3DModelByIdResponse$outboundSchema` instead. */ - export const outboundSchema = Delete3DModelByIdResponse$outboundSchema; - /** @deprecated use `Delete3DModelByIdResponse$Outbound` instead. */ - export type Outbound = Delete3DModelByIdResponse$Outbound; + /** @deprecated use `Delete3DModelByIdResponse$inboundSchema` instead. */ + export const inboundSchema = Delete3DModelByIdResponse$inboundSchema; + /** @deprecated use `Delete3DModelByIdResponse$outboundSchema` instead. */ + export const outboundSchema = Delete3DModelByIdResponse$outboundSchema; + /** @deprecated use `Delete3DModelByIdResponse$Outbound` instead. */ + export type Outbound = Delete3DModelByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/deletedatasetbyid.ts b/src/sdk/models/operations/deletedatasetbyid.ts index 4cf0db9..872c469 100644 --- a/src/sdk/models/operations/deletedatasetbyid.ts +++ b/src/sdk/models/operations/deletedatasetbyid.ts @@ -2,73 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeleteDatasetByIdRequest = { - /** - * The ID of the dataset to delete. - */ - id: string; + /** + * The ID of the dataset to delete. + */ + id: string; }; /** * columns and relationships of "datasets" */ export type DeleteDatasetByIdDatasets = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** * Responses for DELETE /datasets/{id} */ export type DeleteDatasetByIdResponseBody = { - /** - * columns and relationships of "datasets" - */ - deleteDatasetsByPk?: DeleteDatasetByIdDatasets | null | undefined; + /** + * columns and relationships of "datasets" + */ + deleteDatasetsByPk?: DeleteDatasetByIdDatasets | null | undefined; }; export type DeleteDatasetByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for DELETE /datasets/{id} - */ - object?: DeleteDatasetByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for DELETE /datasets/{id} + */ + object?: DeleteDatasetByIdResponseBody | undefined; }; /** @internal */ export const DeleteDatasetByIdRequest$inboundSchema: z.ZodType< - DeleteDatasetByIdRequest, - z.ZodTypeDef, - unknown + DeleteDatasetByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type DeleteDatasetByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const DeleteDatasetByIdRequest$outboundSchema: z.ZodType< - DeleteDatasetByIdRequest$Outbound, - z.ZodTypeDef, - DeleteDatasetByIdRequest + DeleteDatasetByIdRequest$Outbound, + z.ZodTypeDef, + DeleteDatasetByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -76,35 +76,35 @@ export const DeleteDatasetByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteDatasetByIdRequest$ { - /** @deprecated use `DeleteDatasetByIdRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteDatasetByIdRequest$inboundSchema; - /** @deprecated use `DeleteDatasetByIdRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteDatasetByIdRequest$outboundSchema; - /** @deprecated use `DeleteDatasetByIdRequest$Outbound` instead. */ - export type Outbound = DeleteDatasetByIdRequest$Outbound; + /** @deprecated use `DeleteDatasetByIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteDatasetByIdRequest$inboundSchema; + /** @deprecated use `DeleteDatasetByIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteDatasetByIdRequest$outboundSchema; + /** @deprecated use `DeleteDatasetByIdRequest$Outbound` instead. */ + export type Outbound = DeleteDatasetByIdRequest$Outbound; } /** @internal */ export const DeleteDatasetByIdDatasets$inboundSchema: z.ZodType< - DeleteDatasetByIdDatasets, - z.ZodTypeDef, - unknown + DeleteDatasetByIdDatasets, + z.ZodTypeDef, + unknown > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @internal */ export type DeleteDatasetByIdDatasets$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const DeleteDatasetByIdDatasets$outboundSchema: z.ZodType< - DeleteDatasetByIdDatasets$Outbound, - z.ZodTypeDef, - DeleteDatasetByIdDatasets + DeleteDatasetByIdDatasets$Outbound, + z.ZodTypeDef, + DeleteDatasetByIdDatasets > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -112,125 +112,117 @@ export const DeleteDatasetByIdDatasets$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteDatasetByIdDatasets$ { - /** @deprecated use `DeleteDatasetByIdDatasets$inboundSchema` instead. */ - export const inboundSchema = DeleteDatasetByIdDatasets$inboundSchema; - /** @deprecated use `DeleteDatasetByIdDatasets$outboundSchema` instead. */ - export const outboundSchema = DeleteDatasetByIdDatasets$outboundSchema; - /** @deprecated use `DeleteDatasetByIdDatasets$Outbound` instead. */ - export type Outbound = DeleteDatasetByIdDatasets$Outbound; + /** @deprecated use `DeleteDatasetByIdDatasets$inboundSchema` instead. */ + export const inboundSchema = DeleteDatasetByIdDatasets$inboundSchema; + /** @deprecated use `DeleteDatasetByIdDatasets$outboundSchema` instead. */ + export const outboundSchema = DeleteDatasetByIdDatasets$outboundSchema; + /** @deprecated use `DeleteDatasetByIdDatasets$Outbound` instead. */ + export type Outbound = DeleteDatasetByIdDatasets$Outbound; } /** @internal */ export const DeleteDatasetByIdResponseBody$inboundSchema: z.ZodType< - DeleteDatasetByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - delete_datasets_by_pk: z - .nullable(z.lazy(() => DeleteDatasetByIdDatasets$inboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - delete_datasets_by_pk: "deleteDatasetsByPk", - }); - }); + DeleteDatasetByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + delete_datasets_by_pk: z.nullable( + z.lazy(() => DeleteDatasetByIdDatasets$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "delete_datasets_by_pk": "deleteDatasetsByPk", + }); +}); /** @internal */ export type DeleteDatasetByIdResponseBody$Outbound = { - delete_datasets_by_pk?: DeleteDatasetByIdDatasets$Outbound | null | undefined; + delete_datasets_by_pk?: DeleteDatasetByIdDatasets$Outbound | null | undefined; }; /** @internal */ export const DeleteDatasetByIdResponseBody$outboundSchema: z.ZodType< - DeleteDatasetByIdResponseBody$Outbound, - z.ZodTypeDef, - DeleteDatasetByIdResponseBody -> = z - .object({ - deleteDatasetsByPk: z - .nullable(z.lazy(() => DeleteDatasetByIdDatasets$outboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - deleteDatasetsByPk: "delete_datasets_by_pk", - }); - }); + DeleteDatasetByIdResponseBody$Outbound, + z.ZodTypeDef, + DeleteDatasetByIdResponseBody +> = z.object({ + deleteDatasetsByPk: z.nullable( + z.lazy(() => DeleteDatasetByIdDatasets$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + deleteDatasetsByPk: "delete_datasets_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteDatasetByIdResponseBody$ { - /** @deprecated use `DeleteDatasetByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteDatasetByIdResponseBody$inboundSchema; - /** @deprecated use `DeleteDatasetByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteDatasetByIdResponseBody$outboundSchema; - /** @deprecated use `DeleteDatasetByIdResponseBody$Outbound` instead. */ - export type Outbound = DeleteDatasetByIdResponseBody$Outbound; + /** @deprecated use `DeleteDatasetByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteDatasetByIdResponseBody$inboundSchema; + /** @deprecated use `DeleteDatasetByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteDatasetByIdResponseBody$outboundSchema; + /** @deprecated use `DeleteDatasetByIdResponseBody$Outbound` instead. */ + export type Outbound = DeleteDatasetByIdResponseBody$Outbound; } /** @internal */ export const DeleteDatasetByIdResponse$inboundSchema: z.ZodType< - DeleteDatasetByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => DeleteDatasetByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + DeleteDatasetByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => DeleteDatasetByIdResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type DeleteDatasetByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: DeleteDatasetByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: DeleteDatasetByIdResponseBody$Outbound | undefined; }; /** @internal */ export const DeleteDatasetByIdResponse$outboundSchema: z.ZodType< - DeleteDatasetByIdResponse$Outbound, - z.ZodTypeDef, - DeleteDatasetByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => DeleteDatasetByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + DeleteDatasetByIdResponse$Outbound, + z.ZodTypeDef, + DeleteDatasetByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => DeleteDatasetByIdResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteDatasetByIdResponse$ { - /** @deprecated use `DeleteDatasetByIdResponse$inboundSchema` instead. */ - export const inboundSchema = DeleteDatasetByIdResponse$inboundSchema; - /** @deprecated use `DeleteDatasetByIdResponse$outboundSchema` instead. */ - export const outboundSchema = DeleteDatasetByIdResponse$outboundSchema; - /** @deprecated use `DeleteDatasetByIdResponse$Outbound` instead. */ - export type Outbound = DeleteDatasetByIdResponse$Outbound; + /** @deprecated use `DeleteDatasetByIdResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteDatasetByIdResponse$inboundSchema; + /** @deprecated use `DeleteDatasetByIdResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteDatasetByIdResponse$outboundSchema; + /** @deprecated use `DeleteDatasetByIdResponse$Outbound` instead. */ + export type Outbound = DeleteDatasetByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/deletegenerationbyid.ts b/src/sdk/models/operations/deletegenerationbyid.ts index 7290d74..41bdf2e 100644 --- a/src/sdk/models/operations/deletegenerationbyid.ts +++ b/src/sdk/models/operations/deletegenerationbyid.ts @@ -2,73 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeleteGenerationByIdRequest = { - /** - * The ID of the generation to delete. - */ - id: string; + /** + * The ID of the generation to delete. + */ + id: string; }; /** * columns and relationships of "generations" */ export type Generations = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** * Responses for DELETE /generations/{id} */ export type DeleteGenerationByIdResponseBody = { - /** - * columns and relationships of "generations" - */ - deleteGenerationsByPk?: Generations | null | undefined; + /** + * columns and relationships of "generations" + */ + deleteGenerationsByPk?: Generations | null | undefined; }; export type DeleteGenerationByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for DELETE /generations/{id} - */ - object?: DeleteGenerationByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for DELETE /generations/{id} + */ + object?: DeleteGenerationByIdResponseBody | undefined; }; /** @internal */ export const DeleteGenerationByIdRequest$inboundSchema: z.ZodType< - DeleteGenerationByIdRequest, - z.ZodTypeDef, - unknown + DeleteGenerationByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type DeleteGenerationByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const DeleteGenerationByIdRequest$outboundSchema: z.ZodType< - DeleteGenerationByIdRequest$Outbound, - z.ZodTypeDef, - DeleteGenerationByIdRequest + DeleteGenerationByIdRequest$Outbound, + z.ZodTypeDef, + DeleteGenerationByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -76,31 +76,35 @@ export const DeleteGenerationByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteGenerationByIdRequest$ { - /** @deprecated use `DeleteGenerationByIdRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteGenerationByIdRequest$inboundSchema; - /** @deprecated use `DeleteGenerationByIdRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteGenerationByIdRequest$outboundSchema; - /** @deprecated use `DeleteGenerationByIdRequest$Outbound` instead. */ - export type Outbound = DeleteGenerationByIdRequest$Outbound; + /** @deprecated use `DeleteGenerationByIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteGenerationByIdRequest$inboundSchema; + /** @deprecated use `DeleteGenerationByIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteGenerationByIdRequest$outboundSchema; + /** @deprecated use `DeleteGenerationByIdRequest$Outbound` instead. */ + export type Outbound = DeleteGenerationByIdRequest$Outbound; } /** @internal */ -export const Generations$inboundSchema: z.ZodType = z.object({ - id: z.nullable(z.string()).optional(), +export const Generations$inboundSchema: z.ZodType< + Generations, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), }); /** @internal */ export type Generations$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const Generations$outboundSchema: z.ZodType< - Generations$Outbound, - z.ZodTypeDef, - Generations + Generations$Outbound, + z.ZodTypeDef, + Generations > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -108,121 +112,117 @@ export const Generations$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Generations$ { - /** @deprecated use `Generations$inboundSchema` instead. */ - export const inboundSchema = Generations$inboundSchema; - /** @deprecated use `Generations$outboundSchema` instead. */ - export const outboundSchema = Generations$outboundSchema; - /** @deprecated use `Generations$Outbound` instead. */ - export type Outbound = Generations$Outbound; + /** @deprecated use `Generations$inboundSchema` instead. */ + export const inboundSchema = Generations$inboundSchema; + /** @deprecated use `Generations$outboundSchema` instead. */ + export const outboundSchema = Generations$outboundSchema; + /** @deprecated use `Generations$Outbound` instead. */ + export type Outbound = Generations$Outbound; } /** @internal */ export const DeleteGenerationByIdResponseBody$inboundSchema: z.ZodType< - DeleteGenerationByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - delete_generations_by_pk: z.nullable(z.lazy(() => Generations$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - delete_generations_by_pk: "deleteGenerationsByPk", - }); - }); + DeleteGenerationByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + delete_generations_by_pk: z.nullable(z.lazy(() => Generations$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "delete_generations_by_pk": "deleteGenerationsByPk", + }); +}); /** @internal */ export type DeleteGenerationByIdResponseBody$Outbound = { - delete_generations_by_pk?: Generations$Outbound | null | undefined; + delete_generations_by_pk?: Generations$Outbound | null | undefined; }; /** @internal */ export const DeleteGenerationByIdResponseBody$outboundSchema: z.ZodType< - DeleteGenerationByIdResponseBody$Outbound, - z.ZodTypeDef, - DeleteGenerationByIdResponseBody -> = z - .object({ - deleteGenerationsByPk: z.nullable(z.lazy(() => Generations$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - deleteGenerationsByPk: "delete_generations_by_pk", - }); - }); + DeleteGenerationByIdResponseBody$Outbound, + z.ZodTypeDef, + DeleteGenerationByIdResponseBody +> = z.object({ + deleteGenerationsByPk: z.nullable(z.lazy(() => Generations$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + deleteGenerationsByPk: "delete_generations_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteGenerationByIdResponseBody$ { - /** @deprecated use `DeleteGenerationByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteGenerationByIdResponseBody$inboundSchema; - /** @deprecated use `DeleteGenerationByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteGenerationByIdResponseBody$outboundSchema; - /** @deprecated use `DeleteGenerationByIdResponseBody$Outbound` instead. */ - export type Outbound = DeleteGenerationByIdResponseBody$Outbound; + /** @deprecated use `DeleteGenerationByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteGenerationByIdResponseBody$inboundSchema; + /** @deprecated use `DeleteGenerationByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteGenerationByIdResponseBody$outboundSchema; + /** @deprecated use `DeleteGenerationByIdResponseBody$Outbound` instead. */ + export type Outbound = DeleteGenerationByIdResponseBody$Outbound; } /** @internal */ export const DeleteGenerationByIdResponse$inboundSchema: z.ZodType< - DeleteGenerationByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => DeleteGenerationByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + DeleteGenerationByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => DeleteGenerationByIdResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type DeleteGenerationByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: DeleteGenerationByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: DeleteGenerationByIdResponseBody$Outbound | undefined; }; /** @internal */ export const DeleteGenerationByIdResponse$outboundSchema: z.ZodType< - DeleteGenerationByIdResponse$Outbound, - z.ZodTypeDef, - DeleteGenerationByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => DeleteGenerationByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + DeleteGenerationByIdResponse$Outbound, + z.ZodTypeDef, + DeleteGenerationByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => DeleteGenerationByIdResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteGenerationByIdResponse$ { - /** @deprecated use `DeleteGenerationByIdResponse$inboundSchema` instead. */ - export const inboundSchema = DeleteGenerationByIdResponse$inboundSchema; - /** @deprecated use `DeleteGenerationByIdResponse$outboundSchema` instead. */ - export const outboundSchema = DeleteGenerationByIdResponse$outboundSchema; - /** @deprecated use `DeleteGenerationByIdResponse$Outbound` instead. */ - export type Outbound = DeleteGenerationByIdResponse$Outbound; + /** @deprecated use `DeleteGenerationByIdResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteGenerationByIdResponse$inboundSchema; + /** @deprecated use `DeleteGenerationByIdResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteGenerationByIdResponse$outboundSchema; + /** @deprecated use `DeleteGenerationByIdResponse$Outbound` instead. */ + export type Outbound = DeleteGenerationByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/deleteinitimagebyid.ts b/src/sdk/models/operations/deleteinitimagebyid.ts index dd02e95..863be24 100644 --- a/src/sdk/models/operations/deleteinitimagebyid.ts +++ b/src/sdk/models/operations/deleteinitimagebyid.ts @@ -2,73 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeleteInitImageByIdRequest = { - /** - * _"id" is required_ - */ - id: string; + /** + * _"id" is required_ + */ + id: string; }; /** * columns and relationships of "init_images" */ export type InitImages = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** * Responses for DELETE /init-image/{id} */ export type DeleteInitImageByIdResponseBody = { - /** - * columns and relationships of "init_images" - */ - deleteInitImagesByPk?: InitImages | null | undefined; + /** + * columns and relationships of "init_images" + */ + deleteInitImagesByPk?: InitImages | null | undefined; }; export type DeleteInitImageByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for DELETE /init-image/{id} - */ - object?: DeleteInitImageByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for DELETE /init-image/{id} + */ + object?: DeleteInitImageByIdResponseBody | undefined; }; /** @internal */ export const DeleteInitImageByIdRequest$inboundSchema: z.ZodType< - DeleteInitImageByIdRequest, - z.ZodTypeDef, - unknown + DeleteInitImageByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type DeleteInitImageByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const DeleteInitImageByIdRequest$outboundSchema: z.ZodType< - DeleteInitImageByIdRequest$Outbound, - z.ZodTypeDef, - DeleteInitImageByIdRequest + DeleteInitImageByIdRequest$Outbound, + z.ZodTypeDef, + DeleteInitImageByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -76,150 +76,153 @@ export const DeleteInitImageByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteInitImageByIdRequest$ { - /** @deprecated use `DeleteInitImageByIdRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteInitImageByIdRequest$inboundSchema; - /** @deprecated use `DeleteInitImageByIdRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteInitImageByIdRequest$outboundSchema; - /** @deprecated use `DeleteInitImageByIdRequest$Outbound` instead. */ - export type Outbound = DeleteInitImageByIdRequest$Outbound; + /** @deprecated use `DeleteInitImageByIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteInitImageByIdRequest$inboundSchema; + /** @deprecated use `DeleteInitImageByIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteInitImageByIdRequest$outboundSchema; + /** @deprecated use `DeleteInitImageByIdRequest$Outbound` instead. */ + export type Outbound = DeleteInitImageByIdRequest$Outbound; } /** @internal */ -export const InitImages$inboundSchema: z.ZodType = z.object({ - id: z.nullable(z.string()).optional(), +export const InitImages$inboundSchema: z.ZodType< + InitImages, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), }); /** @internal */ export type InitImages$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ -export const InitImages$outboundSchema: z.ZodType = - z.object({ - id: z.nullable(z.string()).optional(), - }); +export const InitImages$outboundSchema: z.ZodType< + InitImages$Outbound, + z.ZodTypeDef, + InitImages +> = z.object({ + id: z.nullable(z.string()).optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InitImages$ { - /** @deprecated use `InitImages$inboundSchema` instead. */ - export const inboundSchema = InitImages$inboundSchema; - /** @deprecated use `InitImages$outboundSchema` instead. */ - export const outboundSchema = InitImages$outboundSchema; - /** @deprecated use `InitImages$Outbound` instead. */ - export type Outbound = InitImages$Outbound; + /** @deprecated use `InitImages$inboundSchema` instead. */ + export const inboundSchema = InitImages$inboundSchema; + /** @deprecated use `InitImages$outboundSchema` instead. */ + export const outboundSchema = InitImages$outboundSchema; + /** @deprecated use `InitImages$Outbound` instead. */ + export type Outbound = InitImages$Outbound; } /** @internal */ export const DeleteInitImageByIdResponseBody$inboundSchema: z.ZodType< - DeleteInitImageByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - delete_init_images_by_pk: z.nullable(z.lazy(() => InitImages$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - delete_init_images_by_pk: "deleteInitImagesByPk", - }); - }); + DeleteInitImageByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + delete_init_images_by_pk: z.nullable(z.lazy(() => InitImages$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "delete_init_images_by_pk": "deleteInitImagesByPk", + }); +}); /** @internal */ export type DeleteInitImageByIdResponseBody$Outbound = { - delete_init_images_by_pk?: InitImages$Outbound | null | undefined; + delete_init_images_by_pk?: InitImages$Outbound | null | undefined; }; /** @internal */ export const DeleteInitImageByIdResponseBody$outboundSchema: z.ZodType< - DeleteInitImageByIdResponseBody$Outbound, - z.ZodTypeDef, - DeleteInitImageByIdResponseBody -> = z - .object({ - deleteInitImagesByPk: z.nullable(z.lazy(() => InitImages$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - deleteInitImagesByPk: "delete_init_images_by_pk", - }); - }); + DeleteInitImageByIdResponseBody$Outbound, + z.ZodTypeDef, + DeleteInitImageByIdResponseBody +> = z.object({ + deleteInitImagesByPk: z.nullable(z.lazy(() => InitImages$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + deleteInitImagesByPk: "delete_init_images_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteInitImageByIdResponseBody$ { - /** @deprecated use `DeleteInitImageByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteInitImageByIdResponseBody$inboundSchema; - /** @deprecated use `DeleteInitImageByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteInitImageByIdResponseBody$outboundSchema; - /** @deprecated use `DeleteInitImageByIdResponseBody$Outbound` instead. */ - export type Outbound = DeleteInitImageByIdResponseBody$Outbound; + /** @deprecated use `DeleteInitImageByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteInitImageByIdResponseBody$inboundSchema; + /** @deprecated use `DeleteInitImageByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteInitImageByIdResponseBody$outboundSchema; + /** @deprecated use `DeleteInitImageByIdResponseBody$Outbound` instead. */ + export type Outbound = DeleteInitImageByIdResponseBody$Outbound; } /** @internal */ export const DeleteInitImageByIdResponse$inboundSchema: z.ZodType< - DeleteInitImageByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => DeleteInitImageByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + DeleteInitImageByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => DeleteInitImageByIdResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type DeleteInitImageByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: DeleteInitImageByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: DeleteInitImageByIdResponseBody$Outbound | undefined; }; /** @internal */ export const DeleteInitImageByIdResponse$outboundSchema: z.ZodType< - DeleteInitImageByIdResponse$Outbound, - z.ZodTypeDef, - DeleteInitImageByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => DeleteInitImageByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + DeleteInitImageByIdResponse$Outbound, + z.ZodTypeDef, + DeleteInitImageByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => DeleteInitImageByIdResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteInitImageByIdResponse$ { - /** @deprecated use `DeleteInitImageByIdResponse$inboundSchema` instead. */ - export const inboundSchema = DeleteInitImageByIdResponse$inboundSchema; - /** @deprecated use `DeleteInitImageByIdResponse$outboundSchema` instead. */ - export const outboundSchema = DeleteInitImageByIdResponse$outboundSchema; - /** @deprecated use `DeleteInitImageByIdResponse$Outbound` instead. */ - export type Outbound = DeleteInitImageByIdResponse$Outbound; + /** @deprecated use `DeleteInitImageByIdResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteInitImageByIdResponse$inboundSchema; + /** @deprecated use `DeleteInitImageByIdResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteInitImageByIdResponse$outboundSchema; + /** @deprecated use `DeleteInitImageByIdResponse$Outbound` instead. */ + export type Outbound = DeleteInitImageByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/deletemodelbyid.ts b/src/sdk/models/operations/deletemodelbyid.ts index ebc30dd..340f294 100644 --- a/src/sdk/models/operations/deletemodelbyid.ts +++ b/src/sdk/models/operations/deletemodelbyid.ts @@ -2,73 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeleteModelByIdRequest = { - /** - * The ID of the model to delete. - */ - id: string; + /** + * The ID of the model to delete. + */ + id: string; }; /** * columns and relationships of "custom_models" */ export type CustomModels = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** * Responses for DELETE /models/{id} */ export type DeleteModelByIdResponseBody = { - /** - * columns and relationships of "custom_models" - */ - deleteCustomModelsByPk?: CustomModels | null | undefined; + /** + * columns and relationships of "custom_models" + */ + deleteCustomModelsByPk?: CustomModels | null | undefined; }; export type DeleteModelByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for DELETE /models/{id} - */ - object?: DeleteModelByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for DELETE /models/{id} + */ + object?: DeleteModelByIdResponseBody | undefined; }; /** @internal */ export const DeleteModelByIdRequest$inboundSchema: z.ZodType< - DeleteModelByIdRequest, - z.ZodTypeDef, - unknown + DeleteModelByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type DeleteModelByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const DeleteModelByIdRequest$outboundSchema: z.ZodType< - DeleteModelByIdRequest$Outbound, - z.ZodTypeDef, - DeleteModelByIdRequest + DeleteModelByIdRequest$Outbound, + z.ZodTypeDef, + DeleteModelByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -76,31 +76,35 @@ export const DeleteModelByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteModelByIdRequest$ { - /** @deprecated use `DeleteModelByIdRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteModelByIdRequest$inboundSchema; - /** @deprecated use `DeleteModelByIdRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteModelByIdRequest$outboundSchema; - /** @deprecated use `DeleteModelByIdRequest$Outbound` instead. */ - export type Outbound = DeleteModelByIdRequest$Outbound; + /** @deprecated use `DeleteModelByIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteModelByIdRequest$inboundSchema; + /** @deprecated use `DeleteModelByIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteModelByIdRequest$outboundSchema; + /** @deprecated use `DeleteModelByIdRequest$Outbound` instead. */ + export type Outbound = DeleteModelByIdRequest$Outbound; } /** @internal */ -export const CustomModels$inboundSchema: z.ZodType = z.object({ - id: z.nullable(z.string()).optional(), +export const CustomModels$inboundSchema: z.ZodType< + CustomModels, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), }); /** @internal */ export type CustomModels$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const CustomModels$outboundSchema: z.ZodType< - CustomModels$Outbound, - z.ZodTypeDef, - CustomModels + CustomModels$Outbound, + z.ZodTypeDef, + CustomModels > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -108,121 +112,116 @@ export const CustomModels$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomModels$ { - /** @deprecated use `CustomModels$inboundSchema` instead. */ - export const inboundSchema = CustomModels$inboundSchema; - /** @deprecated use `CustomModels$outboundSchema` instead. */ - export const outboundSchema = CustomModels$outboundSchema; - /** @deprecated use `CustomModels$Outbound` instead. */ - export type Outbound = CustomModels$Outbound; + /** @deprecated use `CustomModels$inboundSchema` instead. */ + export const inboundSchema = CustomModels$inboundSchema; + /** @deprecated use `CustomModels$outboundSchema` instead. */ + export const outboundSchema = CustomModels$outboundSchema; + /** @deprecated use `CustomModels$Outbound` instead. */ + export type Outbound = CustomModels$Outbound; } /** @internal */ export const DeleteModelByIdResponseBody$inboundSchema: z.ZodType< - DeleteModelByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - delete_custom_models_by_pk: z.nullable(z.lazy(() => CustomModels$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - delete_custom_models_by_pk: "deleteCustomModelsByPk", - }); - }); + DeleteModelByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + delete_custom_models_by_pk: z.nullable( + z.lazy(() => CustomModels$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "delete_custom_models_by_pk": "deleteCustomModelsByPk", + }); +}); /** @internal */ export type DeleteModelByIdResponseBody$Outbound = { - delete_custom_models_by_pk?: CustomModels$Outbound | null | undefined; + delete_custom_models_by_pk?: CustomModels$Outbound | null | undefined; }; /** @internal */ export const DeleteModelByIdResponseBody$outboundSchema: z.ZodType< - DeleteModelByIdResponseBody$Outbound, - z.ZodTypeDef, - DeleteModelByIdResponseBody -> = z - .object({ - deleteCustomModelsByPk: z.nullable(z.lazy(() => CustomModels$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - deleteCustomModelsByPk: "delete_custom_models_by_pk", - }); - }); + DeleteModelByIdResponseBody$Outbound, + z.ZodTypeDef, + DeleteModelByIdResponseBody +> = z.object({ + deleteCustomModelsByPk: z.nullable(z.lazy(() => CustomModels$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + deleteCustomModelsByPk: "delete_custom_models_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteModelByIdResponseBody$ { - /** @deprecated use `DeleteModelByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteModelByIdResponseBody$inboundSchema; - /** @deprecated use `DeleteModelByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteModelByIdResponseBody$outboundSchema; - /** @deprecated use `DeleteModelByIdResponseBody$Outbound` instead. */ - export type Outbound = DeleteModelByIdResponseBody$Outbound; + /** @deprecated use `DeleteModelByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteModelByIdResponseBody$inboundSchema; + /** @deprecated use `DeleteModelByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteModelByIdResponseBody$outboundSchema; + /** @deprecated use `DeleteModelByIdResponseBody$Outbound` instead. */ + export type Outbound = DeleteModelByIdResponseBody$Outbound; } /** @internal */ export const DeleteModelByIdResponse$inboundSchema: z.ZodType< - DeleteModelByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => DeleteModelByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + DeleteModelByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => DeleteModelByIdResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type DeleteModelByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: DeleteModelByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: DeleteModelByIdResponseBody$Outbound | undefined; }; /** @internal */ export const DeleteModelByIdResponse$outboundSchema: z.ZodType< - DeleteModelByIdResponse$Outbound, - z.ZodTypeDef, - DeleteModelByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => DeleteModelByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + DeleteModelByIdResponse$Outbound, + z.ZodTypeDef, + DeleteModelByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => DeleteModelByIdResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteModelByIdResponse$ { - /** @deprecated use `DeleteModelByIdResponse$inboundSchema` instead. */ - export const inboundSchema = DeleteModelByIdResponse$inboundSchema; - /** @deprecated use `DeleteModelByIdResponse$outboundSchema` instead. */ - export const outboundSchema = DeleteModelByIdResponse$outboundSchema; - /** @deprecated use `DeleteModelByIdResponse$Outbound` instead. */ - export type Outbound = DeleteModelByIdResponse$Outbound; + /** @deprecated use `DeleteModelByIdResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteModelByIdResponse$inboundSchema; + /** @deprecated use `DeleteModelByIdResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteModelByIdResponse$outboundSchema; + /** @deprecated use `DeleteModelByIdResponse$Outbound` instead. */ + export type Outbound = DeleteModelByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/deletetexturegenerationbyid.ts b/src/sdk/models/operations/deletetexturegenerationbyid.ts index bbafd76..65845c5 100644 --- a/src/sdk/models/operations/deletetexturegenerationbyid.ts +++ b/src/sdk/models/operations/deletetexturegenerationbyid.ts @@ -2,84 +2,87 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters can also be provided in the request body as a JSON object */ export type DeleteTextureGenerationByIdRequestBody = { - id?: string | null | undefined; + id?: string | null | undefined; }; export type DeleteTextureGenerationByIdRequest = { - /** - * Query parameters can also be provided in the request body as a JSON object - */ - requestBody?: DeleteTextureGenerationByIdRequestBody | undefined; - /** - * _"id" is required (enter it either in parameters or request body)_ - */ - id: string; + /** + * Query parameters can also be provided in the request body as a JSON object + */ + requestBody?: DeleteTextureGenerationByIdRequestBody | undefined; + /** + * _"id" is required (enter it either in parameters or request body)_ + */ + id: string; }; /** * columns and relationships of "model_asset_texture_generations" */ export type ModelAssetTextureGenerations = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** * Responses for DELETE /api/rest/v1/generations-texture/{id} */ export type DeleteTextureGenerationByIdResponseBody = { - /** - * columns and relationships of "model_asset_texture_generations" - */ - deleteModelAssetTextureGenerationsByPk?: ModelAssetTextureGenerations | null | undefined; + /** + * columns and relationships of "model_asset_texture_generations" + */ + deleteModelAssetTextureGenerationsByPk?: + | ModelAssetTextureGenerations + | null + | undefined; }; export type DeleteTextureGenerationByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for DELETE /api/rest/v1/generations-texture/{id} - */ - object?: DeleteTextureGenerationByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for DELETE /api/rest/v1/generations-texture/{id} + */ + object?: DeleteTextureGenerationByIdResponseBody | undefined; }; /** @internal */ export const DeleteTextureGenerationByIdRequestBody$inboundSchema: z.ZodType< - DeleteTextureGenerationByIdRequestBody, - z.ZodTypeDef, - unknown + DeleteTextureGenerationByIdRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @internal */ export type DeleteTextureGenerationByIdRequestBody$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const DeleteTextureGenerationByIdRequestBody$outboundSchema: z.ZodType< - DeleteTextureGenerationByIdRequestBody$Outbound, - z.ZodTypeDef, - DeleteTextureGenerationByIdRequestBody + DeleteTextureGenerationByIdRequestBody$Outbound, + z.ZodTypeDef, + DeleteTextureGenerationByIdRequestBody > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -87,86 +90,89 @@ export const DeleteTextureGenerationByIdRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteTextureGenerationByIdRequestBody$ { - /** @deprecated use `DeleteTextureGenerationByIdRequestBody$inboundSchema` instead. */ - export const inboundSchema = DeleteTextureGenerationByIdRequestBody$inboundSchema; - /** @deprecated use `DeleteTextureGenerationByIdRequestBody$outboundSchema` instead. */ - export const outboundSchema = DeleteTextureGenerationByIdRequestBody$outboundSchema; - /** @deprecated use `DeleteTextureGenerationByIdRequestBody$Outbound` instead. */ - export type Outbound = DeleteTextureGenerationByIdRequestBody$Outbound; + /** @deprecated use `DeleteTextureGenerationByIdRequestBody$inboundSchema` instead. */ + export const inboundSchema = + DeleteTextureGenerationByIdRequestBody$inboundSchema; + /** @deprecated use `DeleteTextureGenerationByIdRequestBody$outboundSchema` instead. */ + export const outboundSchema = + DeleteTextureGenerationByIdRequestBody$outboundSchema; + /** @deprecated use `DeleteTextureGenerationByIdRequestBody$Outbound` instead. */ + export type Outbound = DeleteTextureGenerationByIdRequestBody$Outbound; } /** @internal */ export const DeleteTextureGenerationByIdRequest$inboundSchema: z.ZodType< - DeleteTextureGenerationByIdRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => DeleteTextureGenerationByIdRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + DeleteTextureGenerationByIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => + DeleteTextureGenerationByIdRequestBody$inboundSchema + ).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type DeleteTextureGenerationByIdRequest$Outbound = { - RequestBody?: DeleteTextureGenerationByIdRequestBody$Outbound | undefined; - id: string; + RequestBody?: DeleteTextureGenerationByIdRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const DeleteTextureGenerationByIdRequest$outboundSchema: z.ZodType< - DeleteTextureGenerationByIdRequest$Outbound, - z.ZodTypeDef, - DeleteTextureGenerationByIdRequest -> = z - .object({ - requestBody: z.lazy(() => DeleteTextureGenerationByIdRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + DeleteTextureGenerationByIdRequest$Outbound, + z.ZodTypeDef, + DeleteTextureGenerationByIdRequest +> = z.object({ + requestBody: z.lazy(() => + DeleteTextureGenerationByIdRequestBody$outboundSchema + ).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteTextureGenerationByIdRequest$ { - /** @deprecated use `DeleteTextureGenerationByIdRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteTextureGenerationByIdRequest$inboundSchema; - /** @deprecated use `DeleteTextureGenerationByIdRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteTextureGenerationByIdRequest$outboundSchema; - /** @deprecated use `DeleteTextureGenerationByIdRequest$Outbound` instead. */ - export type Outbound = DeleteTextureGenerationByIdRequest$Outbound; + /** @deprecated use `DeleteTextureGenerationByIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteTextureGenerationByIdRequest$inboundSchema; + /** @deprecated use `DeleteTextureGenerationByIdRequest$outboundSchema` instead. */ + export const outboundSchema = + DeleteTextureGenerationByIdRequest$outboundSchema; + /** @deprecated use `DeleteTextureGenerationByIdRequest$Outbound` instead. */ + export type Outbound = DeleteTextureGenerationByIdRequest$Outbound; } /** @internal */ export const ModelAssetTextureGenerations$inboundSchema: z.ZodType< - ModelAssetTextureGenerations, - z.ZodTypeDef, - unknown + ModelAssetTextureGenerations, + z.ZodTypeDef, + unknown > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @internal */ export type ModelAssetTextureGenerations$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const ModelAssetTextureGenerations$outboundSchema: z.ZodType< - ModelAssetTextureGenerations$Outbound, - z.ZodTypeDef, - ModelAssetTextureGenerations + ModelAssetTextureGenerations$Outbound, + z.ZodTypeDef, + ModelAssetTextureGenerations > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -174,128 +180,128 @@ export const ModelAssetTextureGenerations$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ModelAssetTextureGenerations$ { - /** @deprecated use `ModelAssetTextureGenerations$inboundSchema` instead. */ - export const inboundSchema = ModelAssetTextureGenerations$inboundSchema; - /** @deprecated use `ModelAssetTextureGenerations$outboundSchema` instead. */ - export const outboundSchema = ModelAssetTextureGenerations$outboundSchema; - /** @deprecated use `ModelAssetTextureGenerations$Outbound` instead. */ - export type Outbound = ModelAssetTextureGenerations$Outbound; + /** @deprecated use `ModelAssetTextureGenerations$inboundSchema` instead. */ + export const inboundSchema = ModelAssetTextureGenerations$inboundSchema; + /** @deprecated use `ModelAssetTextureGenerations$outboundSchema` instead. */ + export const outboundSchema = ModelAssetTextureGenerations$outboundSchema; + /** @deprecated use `ModelAssetTextureGenerations$Outbound` instead. */ + export type Outbound = ModelAssetTextureGenerations$Outbound; } /** @internal */ export const DeleteTextureGenerationByIdResponseBody$inboundSchema: z.ZodType< - DeleteTextureGenerationByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - delete_model_asset_texture_generations_by_pk: z - .nullable(z.lazy(() => ModelAssetTextureGenerations$inboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - delete_model_asset_texture_generations_by_pk: "deleteModelAssetTextureGenerationsByPk", - }); - }); + DeleteTextureGenerationByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + delete_model_asset_texture_generations_by_pk: z.nullable( + z.lazy(() => ModelAssetTextureGenerations$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "delete_model_asset_texture_generations_by_pk": + "deleteModelAssetTextureGenerationsByPk", + }); +}); /** @internal */ export type DeleteTextureGenerationByIdResponseBody$Outbound = { - delete_model_asset_texture_generations_by_pk?: - | ModelAssetTextureGenerations$Outbound - | null - | undefined; + delete_model_asset_texture_generations_by_pk?: + | ModelAssetTextureGenerations$Outbound + | null + | undefined; }; /** @internal */ export const DeleteTextureGenerationByIdResponseBody$outboundSchema: z.ZodType< - DeleteTextureGenerationByIdResponseBody$Outbound, - z.ZodTypeDef, - DeleteTextureGenerationByIdResponseBody -> = z - .object({ - deleteModelAssetTextureGenerationsByPk: z - .nullable(z.lazy(() => ModelAssetTextureGenerations$outboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - deleteModelAssetTextureGenerationsByPk: "delete_model_asset_texture_generations_by_pk", - }); - }); + DeleteTextureGenerationByIdResponseBody$Outbound, + z.ZodTypeDef, + DeleteTextureGenerationByIdResponseBody +> = z.object({ + deleteModelAssetTextureGenerationsByPk: z.nullable( + z.lazy(() => ModelAssetTextureGenerations$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + deleteModelAssetTextureGenerationsByPk: + "delete_model_asset_texture_generations_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteTextureGenerationByIdResponseBody$ { - /** @deprecated use `DeleteTextureGenerationByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteTextureGenerationByIdResponseBody$inboundSchema; - /** @deprecated use `DeleteTextureGenerationByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteTextureGenerationByIdResponseBody$outboundSchema; - /** @deprecated use `DeleteTextureGenerationByIdResponseBody$Outbound` instead. */ - export type Outbound = DeleteTextureGenerationByIdResponseBody$Outbound; + /** @deprecated use `DeleteTextureGenerationByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = + DeleteTextureGenerationByIdResponseBody$inboundSchema; + /** @deprecated use `DeleteTextureGenerationByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = + DeleteTextureGenerationByIdResponseBody$outboundSchema; + /** @deprecated use `DeleteTextureGenerationByIdResponseBody$Outbound` instead. */ + export type Outbound = DeleteTextureGenerationByIdResponseBody$Outbound; } /** @internal */ export const DeleteTextureGenerationByIdResponse$inboundSchema: z.ZodType< - DeleteTextureGenerationByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => DeleteTextureGenerationByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + DeleteTextureGenerationByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => DeleteTextureGenerationByIdResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type DeleteTextureGenerationByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: DeleteTextureGenerationByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: DeleteTextureGenerationByIdResponseBody$Outbound | undefined; }; /** @internal */ export const DeleteTextureGenerationByIdResponse$outboundSchema: z.ZodType< - DeleteTextureGenerationByIdResponse$Outbound, - z.ZodTypeDef, - DeleteTextureGenerationByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => DeleteTextureGenerationByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + DeleteTextureGenerationByIdResponse$Outbound, + z.ZodTypeDef, + DeleteTextureGenerationByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => DeleteTextureGenerationByIdResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteTextureGenerationByIdResponse$ { - /** @deprecated use `DeleteTextureGenerationByIdResponse$inboundSchema` instead. */ - export const inboundSchema = DeleteTextureGenerationByIdResponse$inboundSchema; - /** @deprecated use `DeleteTextureGenerationByIdResponse$outboundSchema` instead. */ - export const outboundSchema = DeleteTextureGenerationByIdResponse$outboundSchema; - /** @deprecated use `DeleteTextureGenerationByIdResponse$Outbound` instead. */ - export type Outbound = DeleteTextureGenerationByIdResponse$Outbound; + /** @deprecated use `DeleteTextureGenerationByIdResponse$inboundSchema` instead. */ + export const inboundSchema = + DeleteTextureGenerationByIdResponse$inboundSchema; + /** @deprecated use `DeleteTextureGenerationByIdResponse$outboundSchema` instead. */ + export const outboundSchema = + DeleteTextureGenerationByIdResponse$outboundSchema; + /** @deprecated use `DeleteTextureGenerationByIdResponse$Outbound` instead. */ + export type Outbound = DeleteTextureGenerationByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/getdatasetbyid.ts b/src/sdk/models/operations/getdatasetbyid.ts index b1ab81a..a9612dc 100644 --- a/src/sdk/models/operations/getdatasetbyid.ts +++ b/src/sdk/models/operations/getdatasetbyid.ts @@ -2,87 +2,87 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetDatasetByIdRequest = { - /** - * The ID of the dataset to return. - */ - id: string; + /** + * The ID of the dataset to return. + */ + id: string; }; /** * columns and relationships of "dataset_images" */ export type DatasetImages = { - createdAt?: string | undefined; - id?: string | null | undefined; - url?: string | undefined; + createdAt?: string | undefined; + id?: string | null | undefined; + url?: string | undefined; }; /** * columns and relationships of "datasets" */ export type GetDatasetByIdDatasets = { - createdAt?: string | undefined; - datasetImages?: Array | undefined; - description?: string | null | undefined; - id?: string | null | undefined; - name?: string | undefined; - updatedAt?: string | undefined; + createdAt?: string | undefined; + datasetImages?: Array | undefined; + description?: string | null | undefined; + id?: string | null | undefined; + name?: string | undefined; + updatedAt?: string | undefined; }; /** * Responses for GET /datasets/{id} */ export type GetDatasetByIdResponseBody = { - /** - * columns and relationships of "datasets" - */ - datasetsByPk?: GetDatasetByIdDatasets | null | undefined; + /** + * columns and relationships of "datasets" + */ + datasetsByPk?: GetDatasetByIdDatasets | null | undefined; }; export type GetDatasetByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /datasets/{id} - */ - object?: GetDatasetByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /datasets/{id} + */ + object?: GetDatasetByIdResponseBody | undefined; }; /** @internal */ export const GetDatasetByIdRequest$inboundSchema: z.ZodType< - GetDatasetByIdRequest, - z.ZodTypeDef, - unknown + GetDatasetByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type GetDatasetByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetDatasetByIdRequest$outboundSchema: z.ZodType< - GetDatasetByIdRequest$Outbound, - z.ZodTypeDef, - GetDatasetByIdRequest + GetDatasetByIdRequest$Outbound, + z.ZodTypeDef, + GetDatasetByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -90,38 +90,41 @@ export const GetDatasetByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDatasetByIdRequest$ { - /** @deprecated use `GetDatasetByIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetDatasetByIdRequest$inboundSchema; - /** @deprecated use `GetDatasetByIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetDatasetByIdRequest$outboundSchema; - /** @deprecated use `GetDatasetByIdRequest$Outbound` instead. */ - export type Outbound = GetDatasetByIdRequest$Outbound; + /** @deprecated use `GetDatasetByIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetDatasetByIdRequest$inboundSchema; + /** @deprecated use `GetDatasetByIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetDatasetByIdRequest$outboundSchema; + /** @deprecated use `GetDatasetByIdRequest$Outbound` instead. */ + export type Outbound = GetDatasetByIdRequest$Outbound; } /** @internal */ -export const DatasetImages$inboundSchema: z.ZodType = - z.object({ - createdAt: z.string().optional(), - id: z.nullable(z.string()).optional(), - url: z.string().optional(), - }); +export const DatasetImages$inboundSchema: z.ZodType< + DatasetImages, + z.ZodTypeDef, + unknown +> = z.object({ + createdAt: z.string().optional(), + id: z.nullable(z.string()).optional(), + url: z.string().optional(), +}); /** @internal */ export type DatasetImages$Outbound = { - createdAt?: string | undefined; - id?: string | null | undefined; - url?: string | undefined; + createdAt?: string | undefined; + id?: string | null | undefined; + url?: string | undefined; }; /** @internal */ export const DatasetImages$outboundSchema: z.ZodType< - DatasetImages$Outbound, - z.ZodTypeDef, - DatasetImages + DatasetImages$Outbound, + z.ZodTypeDef, + DatasetImages > = z.object({ - createdAt: z.string().optional(), - id: z.nullable(z.string()).optional(), - url: z.string().optional(), + createdAt: z.string().optional(), + id: z.nullable(z.string()).optional(), + url: z.string().optional(), }); /** @@ -129,184 +132,174 @@ export const DatasetImages$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DatasetImages$ { - /** @deprecated use `DatasetImages$inboundSchema` instead. */ - export const inboundSchema = DatasetImages$inboundSchema; - /** @deprecated use `DatasetImages$outboundSchema` instead. */ - export const outboundSchema = DatasetImages$outboundSchema; - /** @deprecated use `DatasetImages$Outbound` instead. */ - export type Outbound = DatasetImages$Outbound; + /** @deprecated use `DatasetImages$inboundSchema` instead. */ + export const inboundSchema = DatasetImages$inboundSchema; + /** @deprecated use `DatasetImages$outboundSchema` instead. */ + export const outboundSchema = DatasetImages$outboundSchema; + /** @deprecated use `DatasetImages$Outbound` instead. */ + export type Outbound = DatasetImages$Outbound; } /** @internal */ export const GetDatasetByIdDatasets$inboundSchema: z.ZodType< - GetDatasetByIdDatasets, - z.ZodTypeDef, - unknown -> = z - .object({ - createdAt: z.string().optional(), - dataset_images: z.array(z.lazy(() => DatasetImages$inboundSchema)).optional(), - description: z.nullable(z.string()).optional(), - id: z.nullable(z.string()).optional(), - name: z.string().optional(), - updatedAt: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - dataset_images: "datasetImages", - }); - }); + GetDatasetByIdDatasets, + z.ZodTypeDef, + unknown +> = z.object({ + createdAt: z.string().optional(), + dataset_images: z.array(z.lazy(() => DatasetImages$inboundSchema)).optional(), + description: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), + name: z.string().optional(), + updatedAt: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "dataset_images": "datasetImages", + }); +}); /** @internal */ export type GetDatasetByIdDatasets$Outbound = { - createdAt?: string | undefined; - dataset_images?: Array | undefined; - description?: string | null | undefined; - id?: string | null | undefined; - name?: string | undefined; - updatedAt?: string | undefined; + createdAt?: string | undefined; + dataset_images?: Array | undefined; + description?: string | null | undefined; + id?: string | null | undefined; + name?: string | undefined; + updatedAt?: string | undefined; }; /** @internal */ export const GetDatasetByIdDatasets$outboundSchema: z.ZodType< - GetDatasetByIdDatasets$Outbound, - z.ZodTypeDef, - GetDatasetByIdDatasets -> = z - .object({ - createdAt: z.string().optional(), - datasetImages: z.array(z.lazy(() => DatasetImages$outboundSchema)).optional(), - description: z.nullable(z.string()).optional(), - id: z.nullable(z.string()).optional(), - name: z.string().optional(), - updatedAt: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - datasetImages: "dataset_images", - }); - }); + GetDatasetByIdDatasets$Outbound, + z.ZodTypeDef, + GetDatasetByIdDatasets +> = z.object({ + createdAt: z.string().optional(), + datasetImages: z.array(z.lazy(() => DatasetImages$outboundSchema)).optional(), + description: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), + name: z.string().optional(), + updatedAt: z.string().optional(), +}).transform((v) => { + return remap$(v, { + datasetImages: "dataset_images", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDatasetByIdDatasets$ { - /** @deprecated use `GetDatasetByIdDatasets$inboundSchema` instead. */ - export const inboundSchema = GetDatasetByIdDatasets$inboundSchema; - /** @deprecated use `GetDatasetByIdDatasets$outboundSchema` instead. */ - export const outboundSchema = GetDatasetByIdDatasets$outboundSchema; - /** @deprecated use `GetDatasetByIdDatasets$Outbound` instead. */ - export type Outbound = GetDatasetByIdDatasets$Outbound; + /** @deprecated use `GetDatasetByIdDatasets$inboundSchema` instead. */ + export const inboundSchema = GetDatasetByIdDatasets$inboundSchema; + /** @deprecated use `GetDatasetByIdDatasets$outboundSchema` instead. */ + export const outboundSchema = GetDatasetByIdDatasets$outboundSchema; + /** @deprecated use `GetDatasetByIdDatasets$Outbound` instead. */ + export type Outbound = GetDatasetByIdDatasets$Outbound; } /** @internal */ export const GetDatasetByIdResponseBody$inboundSchema: z.ZodType< - GetDatasetByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - datasets_by_pk: z.nullable(z.lazy(() => GetDatasetByIdDatasets$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - datasets_by_pk: "datasetsByPk", - }); - }); + GetDatasetByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + datasets_by_pk: z.nullable(z.lazy(() => GetDatasetByIdDatasets$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "datasets_by_pk": "datasetsByPk", + }); +}); /** @internal */ export type GetDatasetByIdResponseBody$Outbound = { - datasets_by_pk?: GetDatasetByIdDatasets$Outbound | null | undefined; + datasets_by_pk?: GetDatasetByIdDatasets$Outbound | null | undefined; }; /** @internal */ export const GetDatasetByIdResponseBody$outboundSchema: z.ZodType< - GetDatasetByIdResponseBody$Outbound, - z.ZodTypeDef, - GetDatasetByIdResponseBody -> = z - .object({ - datasetsByPk: z.nullable(z.lazy(() => GetDatasetByIdDatasets$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - datasetsByPk: "datasets_by_pk", - }); - }); + GetDatasetByIdResponseBody$Outbound, + z.ZodTypeDef, + GetDatasetByIdResponseBody +> = z.object({ + datasetsByPk: z.nullable(z.lazy(() => GetDatasetByIdDatasets$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + datasetsByPk: "datasets_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDatasetByIdResponseBody$ { - /** @deprecated use `GetDatasetByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetDatasetByIdResponseBody$inboundSchema; - /** @deprecated use `GetDatasetByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetDatasetByIdResponseBody$outboundSchema; - /** @deprecated use `GetDatasetByIdResponseBody$Outbound` instead. */ - export type Outbound = GetDatasetByIdResponseBody$Outbound; + /** @deprecated use `GetDatasetByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetDatasetByIdResponseBody$inboundSchema; + /** @deprecated use `GetDatasetByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetDatasetByIdResponseBody$outboundSchema; + /** @deprecated use `GetDatasetByIdResponseBody$Outbound` instead. */ + export type Outbound = GetDatasetByIdResponseBody$Outbound; } /** @internal */ export const GetDatasetByIdResponse$inboundSchema: z.ZodType< - GetDatasetByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetDatasetByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetDatasetByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetDatasetByIdResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetDatasetByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetDatasetByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetDatasetByIdResponseBody$Outbound | undefined; }; /** @internal */ export const GetDatasetByIdResponse$outboundSchema: z.ZodType< - GetDatasetByIdResponse$Outbound, - z.ZodTypeDef, - GetDatasetByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetDatasetByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetDatasetByIdResponse$Outbound, + z.ZodTypeDef, + GetDatasetByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetDatasetByIdResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDatasetByIdResponse$ { - /** @deprecated use `GetDatasetByIdResponse$inboundSchema` instead. */ - export const inboundSchema = GetDatasetByIdResponse$inboundSchema; - /** @deprecated use `GetDatasetByIdResponse$outboundSchema` instead. */ - export const outboundSchema = GetDatasetByIdResponse$outboundSchema; - /** @deprecated use `GetDatasetByIdResponse$Outbound` instead. */ - export type Outbound = GetDatasetByIdResponse$Outbound; + /** @deprecated use `GetDatasetByIdResponse$inboundSchema` instead. */ + export const inboundSchema = GetDatasetByIdResponse$inboundSchema; + /** @deprecated use `GetDatasetByIdResponse$outboundSchema` instead. */ + export const outboundSchema = GetDatasetByIdResponse$outboundSchema; + /** @deprecated use `GetDatasetByIdResponse$Outbound` instead. */ + export type Outbound = GetDatasetByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/getgenerationbyid.ts b/src/sdk/models/operations/getgenerationbyid.ts index 339188b..4246428 100644 --- a/src/sdk/models/operations/getgenerationbyid.ts +++ b/src/sdk/models/operations/getgenerationbyid.ts @@ -2,226 +2,230 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; export type GetGenerationByIdRequest = { - /** - * The ID of the generation to return. - */ - id: string; + /** + * The ID of the generation to return. + */ + id: string; }; /** * columns and relationships of "generated_image_variation_generic" */ export type GetGenerationByIdGeneratedImageVariationGeneric = { - id?: string | null | undefined; - /** - * The status of the current task. - */ - status?: shared.JobStatus | undefined; - /** - * The type of variation. - */ - transformType?: shared.VariationType | undefined; - url?: string | null | undefined; + id?: string | null | undefined; + /** + * The status of the current task. + */ + status?: shared.JobStatus | undefined; + /** + * The type of variation. + */ + transformType?: shared.VariationType | undefined; + url?: string | null | undefined; }; /** * columns and relationships of "generated_images" */ export type GeneratedImages = { - /** - * If fantasyAvatar feature was used. - */ - fantasyAvatar?: boolean | null | undefined; - generatedImageVariationGenerics?: - | Array - | undefined; - id?: string | null | undefined; - /** - * If it is an image to video generation. - */ - imageToVideo?: boolean | null | undefined; - likeCount?: number | undefined; - /** - * If generation is of motion type. - */ - motion?: boolean | null | undefined; - /** - * The URL of the motion MP4. - */ - motionMp4URL?: string | null | undefined; - /** - * The name of the motion model. - */ - motionModel?: string | null | undefined; - /** - * The motion strength. - */ - motionStrength?: number | null | undefined; - nsfw?: boolean | undefined; - url?: string | undefined; + /** + * If fantasyAvatar feature was used. + */ + fantasyAvatar?: boolean | null | undefined; + generatedImageVariationGenerics?: + | Array + | undefined; + id?: string | null | undefined; + /** + * If it is an image to video generation. + */ + imageToVideo?: boolean | null | undefined; + likeCount?: number | undefined; + /** + * If generation is of motion type. + */ + motion?: boolean | null | undefined; + /** + * The URL of the motion MP4. + */ + motionMp4URL?: string | null | undefined; + /** + * The name of the motion model. + */ + motionModel?: string | null | undefined; + /** + * The motion strength. + */ + motionStrength?: number | null | undefined; + nsfw?: boolean | undefined; + url?: string | undefined; }; /** * Element used for the generation. */ export type GetGenerationByIdLoras = { - /** - * Unique identifier for the element. Elements can be found from the List Elements endpoint. - */ - akUUID?: string | null | undefined; - /** - * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models - */ - baseModel?: shared.SdVersions | undefined; - /** - * Description for the element - */ - description?: string | null | undefined; - /** - * Name of the element - */ - name?: string | null | undefined; - /** - * URL of the element image - */ - urlImage?: string | null | undefined; - /** - * Default weight for the element - */ - weightDefault?: number | null | undefined; - /** - * Maximum weight for the element - */ - weightMax?: number | null | undefined; - /** - * Minimum weight for the element - */ - weightMin?: number | null | undefined; + /** + * Unique identifier for the element. Elements can be found from the List Elements endpoint. + */ + akUUID?: string | null | undefined; + /** + * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models + */ + baseModel?: shared.SdVersions | undefined; + /** + * Description for the element + */ + description?: string | null | undefined; + /** + * Name of the element + */ + name?: string | null | undefined; + /** + * URL of the element image + */ + urlImage?: string | null | undefined; + /** + * Default weight for the element + */ + weightDefault?: number | null | undefined; + /** + * Maximum weight for the element + */ + weightMax?: number | null | undefined; + /** + * Minimum weight for the element + */ + weightMin?: number | null | undefined; }; /** * This table captures the elements that are applied to Generations. */ export type GenerationElements = { - id?: number | null | undefined; - /** - * Element used for the generation. - */ - lora?: GetGenerationByIdLoras | null | undefined; - weightApplied?: number | null | undefined; + id?: number | null | undefined; + /** + * Element used for the generation. + */ + lora?: GetGenerationByIdLoras | null | undefined; + weightApplied?: number | null | undefined; }; /** * columns and relationships of "generations" */ export type GetGenerationByIdGenerations = { - createdAt?: string | undefined; - generatedImages?: Array | undefined; - generationElements?: Array | undefined; - guidanceScale?: number | null | undefined; - id?: string | null | undefined; - imageHeight?: number | undefined; - imageWidth?: number | undefined; - inferenceSteps?: number | null | undefined; - initStrength?: number | null | undefined; - modelId?: string | null | undefined; - negativePrompt?: string | null | undefined; - /** - * If photoReal feature was used. - */ - photoReal?: boolean | null | undefined; - /** - * Depth of field of photoReal used. 0.55 is low, 0.5 is medium, and 0.45 is high. Default is 0.55. - */ - photoRealStrength?: number | null | undefined; - /** - * The style to generate images with. When photoReal is enabled, refer to the Guide section for a full list. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE. - */ - presetStyle?: shared.SdGenerationStyle | null | undefined; - prompt?: string | undefined; - /** - * If prompt magic was used. - */ - promptMagic?: boolean | null | undefined; - /** - * Strength of prompt magic used. - */ - promptMagicStrength?: number | null | undefined; - /** - * Version of prompt magic used. - */ - promptMagicVersion?: string | null | undefined; - public?: boolean | undefined; - /** - * The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. - */ - scheduler?: shared.SdGenerationSchedulers | undefined; - /** - * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models - */ - sdVersion?: shared.SdVersions | undefined; - seed?: number | null | undefined; - /** - * The status of the current task. - */ - status?: shared.JobStatus | undefined; + createdAt?: string | undefined; + generatedImages?: Array | undefined; + generationElements?: Array | undefined; + guidanceScale?: number | null | undefined; + id?: string | null | undefined; + imageHeight?: number | undefined; + imageWidth?: number | undefined; + inferenceSteps?: number | null | undefined; + initStrength?: number | null | undefined; + modelId?: string | null | undefined; + negativePrompt?: string | null | undefined; + /** + * If photoReal feature was used. + */ + photoReal?: boolean | null | undefined; + /** + * Depth of field of photoReal used. 0.55 is low, 0.5 is medium, and 0.45 is high. Default is 0.55. + */ + photoRealStrength?: number | null | undefined; + /** + * The style to generate images with. When photoReal is enabled, refer to the Guide section for a full list. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE. + */ + presetStyle?: shared.SdGenerationStyle | null | undefined; + prompt?: string | undefined; + /** + * If prompt magic was used. + */ + promptMagic?: boolean | null | undefined; + /** + * Strength of prompt magic used. + */ + promptMagicStrength?: number | null | undefined; + /** + * Version of prompt magic used. + */ + promptMagicVersion?: string | null | undefined; + public?: boolean | undefined; + /** + * The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. + */ + scheduler?: shared.SdGenerationSchedulers | undefined; + /** + * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models + */ + sdVersion?: shared.SdVersions | undefined; + seed?: number | null | undefined; + /** + * The status of the current task. + */ + status?: shared.JobStatus | undefined; + /** + * If ultra generation mode was used. + */ + ultra?: boolean | null | undefined; }; /** * Responses for GET /generations/{id} */ export type GetGenerationByIdResponseBody = { - /** - * columns and relationships of "generations" - */ - generationsByPk?: GetGenerationByIdGenerations | null | undefined; + /** + * columns and relationships of "generations" + */ + generationsByPk?: GetGenerationByIdGenerations | null | undefined; }; export type GetGenerationByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /generations/{id} - */ - object?: GetGenerationByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /generations/{id} + */ + object?: GetGenerationByIdResponseBody | undefined; }; /** @internal */ export const GetGenerationByIdRequest$inboundSchema: z.ZodType< - GetGenerationByIdRequest, - z.ZodTypeDef, - unknown + GetGenerationByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type GetGenerationByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetGenerationByIdRequest$outboundSchema: z.ZodType< - GetGenerationByIdRequest$Outbound, - z.ZodTypeDef, - GetGenerationByIdRequest + GetGenerationByIdRequest$Outbound, + z.ZodTypeDef, + GetGenerationByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -229,183 +233,190 @@ export const GetGenerationByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationByIdRequest$ { - /** @deprecated use `GetGenerationByIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetGenerationByIdRequest$inboundSchema; - /** @deprecated use `GetGenerationByIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetGenerationByIdRequest$outboundSchema; - /** @deprecated use `GetGenerationByIdRequest$Outbound` instead. */ - export type Outbound = GetGenerationByIdRequest$Outbound; + /** @deprecated use `GetGenerationByIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetGenerationByIdRequest$inboundSchema; + /** @deprecated use `GetGenerationByIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetGenerationByIdRequest$outboundSchema; + /** @deprecated use `GetGenerationByIdRequest$Outbound` instead. */ + export type Outbound = GetGenerationByIdRequest$Outbound; } /** @internal */ -export const GetGenerationByIdGeneratedImageVariationGeneric$inboundSchema: z.ZodType< +export const GetGenerationByIdGeneratedImageVariationGeneric$inboundSchema: + z.ZodType< GetGenerationByIdGeneratedImageVariationGeneric, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ id: z.nullable(z.string()).optional(), status: shared.JobStatus$inboundSchema.optional(), transformType: shared.VariationType$inboundSchema.optional(), url: z.nullable(z.string()).optional(), -}); + }); /** @internal */ export type GetGenerationByIdGeneratedImageVariationGeneric$Outbound = { - id?: string | null | undefined; - status?: string | undefined; - transformType?: string | undefined; - url?: string | null | undefined; + id?: string | null | undefined; + status?: string | undefined; + transformType?: string | undefined; + url?: string | null | undefined; }; /** @internal */ -export const GetGenerationByIdGeneratedImageVariationGeneric$outboundSchema: z.ZodType< +export const GetGenerationByIdGeneratedImageVariationGeneric$outboundSchema: + z.ZodType< GetGenerationByIdGeneratedImageVariationGeneric$Outbound, z.ZodTypeDef, GetGenerationByIdGeneratedImageVariationGeneric -> = z.object({ + > = z.object({ id: z.nullable(z.string()).optional(), status: shared.JobStatus$outboundSchema.optional(), transformType: shared.VariationType$outboundSchema.optional(), url: z.nullable(z.string()).optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationByIdGeneratedImageVariationGeneric$ { - /** @deprecated use `GetGenerationByIdGeneratedImageVariationGeneric$inboundSchema` instead. */ - export const inboundSchema = GetGenerationByIdGeneratedImageVariationGeneric$inboundSchema; - /** @deprecated use `GetGenerationByIdGeneratedImageVariationGeneric$outboundSchema` instead. */ - export const outboundSchema = GetGenerationByIdGeneratedImageVariationGeneric$outboundSchema; - /** @deprecated use `GetGenerationByIdGeneratedImageVariationGeneric$Outbound` instead. */ - export type Outbound = GetGenerationByIdGeneratedImageVariationGeneric$Outbound; + /** @deprecated use `GetGenerationByIdGeneratedImageVariationGeneric$inboundSchema` instead. */ + export const inboundSchema = + GetGenerationByIdGeneratedImageVariationGeneric$inboundSchema; + /** @deprecated use `GetGenerationByIdGeneratedImageVariationGeneric$outboundSchema` instead. */ + export const outboundSchema = + GetGenerationByIdGeneratedImageVariationGeneric$outboundSchema; + /** @deprecated use `GetGenerationByIdGeneratedImageVariationGeneric$Outbound` instead. */ + export type Outbound = + GetGenerationByIdGeneratedImageVariationGeneric$Outbound; } /** @internal */ -export const GeneratedImages$inboundSchema: z.ZodType = z - .object({ - fantasyAvatar: z.nullable(z.boolean()).optional(), - generated_image_variation_generics: z - .array(z.lazy(() => GetGenerationByIdGeneratedImageVariationGeneric$inboundSchema)) - .optional(), - id: z.nullable(z.string()).optional(), - imageToVideo: z.nullable(z.boolean()).optional(), - likeCount: z.number().int().optional(), - motion: z.nullable(z.boolean()).optional(), - motionMP4URL: z.nullable(z.string()).optional(), - motionModel: z.nullable(z.string()).optional(), - motionStrength: z.nullable(z.number().int()).optional(), - nsfw: z.boolean().optional(), - url: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - generated_image_variation_generics: "generatedImageVariationGenerics", - motionMP4URL: "motionMp4URL", - }); - }); +export const GeneratedImages$inboundSchema: z.ZodType< + GeneratedImages, + z.ZodTypeDef, + unknown +> = z.object({ + fantasyAvatar: z.nullable(z.boolean()).optional(), + generated_image_variation_generics: z.array( + z.lazy(() => GetGenerationByIdGeneratedImageVariationGeneric$inboundSchema), + ).optional(), + id: z.nullable(z.string()).optional(), + imageToVideo: z.nullable(z.boolean()).optional(), + likeCount: z.number().int().optional(), + motion: z.nullable(z.boolean()).optional(), + motionMP4URL: z.nullable(z.string()).optional(), + motionModel: z.nullable(z.string()).optional(), + motionStrength: z.nullable(z.number().int()).optional(), + nsfw: z.boolean().optional(), + url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "generated_image_variation_generics": "generatedImageVariationGenerics", + "motionMP4URL": "motionMp4URL", + }); +}); /** @internal */ export type GeneratedImages$Outbound = { - fantasyAvatar?: boolean | null | undefined; - generated_image_variation_generics?: - | Array - | undefined; - id?: string | null | undefined; - imageToVideo?: boolean | null | undefined; - likeCount?: number | undefined; - motion?: boolean | null | undefined; - motionMP4URL?: string | null | undefined; - motionModel?: string | null | undefined; - motionStrength?: number | null | undefined; - nsfw?: boolean | undefined; - url?: string | undefined; + fantasyAvatar?: boolean | null | undefined; + generated_image_variation_generics?: + | Array + | undefined; + id?: string | null | undefined; + imageToVideo?: boolean | null | undefined; + likeCount?: number | undefined; + motion?: boolean | null | undefined; + motionMP4URL?: string | null | undefined; + motionModel?: string | null | undefined; + motionStrength?: number | null | undefined; + nsfw?: boolean | undefined; + url?: string | undefined; }; /** @internal */ export const GeneratedImages$outboundSchema: z.ZodType< - GeneratedImages$Outbound, - z.ZodTypeDef, - GeneratedImages -> = z - .object({ - fantasyAvatar: z.nullable(z.boolean()).optional(), - generatedImageVariationGenerics: z - .array(z.lazy(() => GetGenerationByIdGeneratedImageVariationGeneric$outboundSchema)) - .optional(), - id: z.nullable(z.string()).optional(), - imageToVideo: z.nullable(z.boolean()).optional(), - likeCount: z.number().int().optional(), - motion: z.nullable(z.boolean()).optional(), - motionMp4URL: z.nullable(z.string()).optional(), - motionModel: z.nullable(z.string()).optional(), - motionStrength: z.nullable(z.number().int()).optional(), - nsfw: z.boolean().optional(), - url: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - generatedImageVariationGenerics: "generated_image_variation_generics", - motionMp4URL: "motionMP4URL", - }); - }); + GeneratedImages$Outbound, + z.ZodTypeDef, + GeneratedImages +> = z.object({ + fantasyAvatar: z.nullable(z.boolean()).optional(), + generatedImageVariationGenerics: z.array( + z.lazy(() => + GetGenerationByIdGeneratedImageVariationGeneric$outboundSchema + ), + ).optional(), + id: z.nullable(z.string()).optional(), + imageToVideo: z.nullable(z.boolean()).optional(), + likeCount: z.number().int().optional(), + motion: z.nullable(z.boolean()).optional(), + motionMp4URL: z.nullable(z.string()).optional(), + motionModel: z.nullable(z.string()).optional(), + motionStrength: z.nullable(z.number().int()).optional(), + nsfw: z.boolean().optional(), + url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + generatedImageVariationGenerics: "generated_image_variation_generics", + motionMp4URL: "motionMP4URL", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GeneratedImages$ { - /** @deprecated use `GeneratedImages$inboundSchema` instead. */ - export const inboundSchema = GeneratedImages$inboundSchema; - /** @deprecated use `GeneratedImages$outboundSchema` instead. */ - export const outboundSchema = GeneratedImages$outboundSchema; - /** @deprecated use `GeneratedImages$Outbound` instead. */ - export type Outbound = GeneratedImages$Outbound; + /** @deprecated use `GeneratedImages$inboundSchema` instead. */ + export const inboundSchema = GeneratedImages$inboundSchema; + /** @deprecated use `GeneratedImages$outboundSchema` instead. */ + export const outboundSchema = GeneratedImages$outboundSchema; + /** @deprecated use `GeneratedImages$Outbound` instead. */ + export type Outbound = GeneratedImages$Outbound; } /** @internal */ export const GetGenerationByIdLoras$inboundSchema: z.ZodType< - GetGenerationByIdLoras, - z.ZodTypeDef, - unknown + GetGenerationByIdLoras, + z.ZodTypeDef, + unknown > = z.object({ - akUUID: z.nullable(z.string()).optional(), - baseModel: shared.SdVersions$inboundSchema.optional(), - description: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - urlImage: z.nullable(z.string()).optional(), - weightDefault: z.nullable(z.number().int()).optional(), - weightMax: z.nullable(z.number().int()).optional(), - weightMin: z.nullable(z.number().int()).optional(), + akUUID: z.nullable(z.string()).optional(), + baseModel: shared.SdVersions$inboundSchema.optional(), + description: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + urlImage: z.nullable(z.string()).optional(), + weightDefault: z.nullable(z.number().int()).optional(), + weightMax: z.nullable(z.number().int()).optional(), + weightMin: z.nullable(z.number().int()).optional(), }); /** @internal */ export type GetGenerationByIdLoras$Outbound = { - akUUID?: string | null | undefined; - baseModel?: string | undefined; - description?: string | null | undefined; - name?: string | null | undefined; - urlImage?: string | null | undefined; - weightDefault?: number | null | undefined; - weightMax?: number | null | undefined; - weightMin?: number | null | undefined; + akUUID?: string | null | undefined; + baseModel?: string | undefined; + description?: string | null | undefined; + name?: string | null | undefined; + urlImage?: string | null | undefined; + weightDefault?: number | null | undefined; + weightMax?: number | null | undefined; + weightMin?: number | null | undefined; }; /** @internal */ export const GetGenerationByIdLoras$outboundSchema: z.ZodType< - GetGenerationByIdLoras$Outbound, - z.ZodTypeDef, - GetGenerationByIdLoras + GetGenerationByIdLoras$Outbound, + z.ZodTypeDef, + GetGenerationByIdLoras > = z.object({ - akUUID: z.nullable(z.string()).optional(), - baseModel: shared.SdVersions$outboundSchema.optional(), - description: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - urlImage: z.nullable(z.string()).optional(), - weightDefault: z.nullable(z.number().int()).optional(), - weightMax: z.nullable(z.number().int()).optional(), - weightMin: z.nullable(z.number().int()).optional(), + akUUID: z.nullable(z.string()).optional(), + baseModel: shared.SdVersions$outboundSchema.optional(), + description: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + urlImage: z.nullable(z.string()).optional(), + weightDefault: z.nullable(z.number().int()).optional(), + weightMax: z.nullable(z.number().int()).optional(), + weightMin: z.nullable(z.number().int()).optional(), }); /** @@ -413,41 +424,43 @@ export const GetGenerationByIdLoras$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationByIdLoras$ { - /** @deprecated use `GetGenerationByIdLoras$inboundSchema` instead. */ - export const inboundSchema = GetGenerationByIdLoras$inboundSchema; - /** @deprecated use `GetGenerationByIdLoras$outboundSchema` instead. */ - export const outboundSchema = GetGenerationByIdLoras$outboundSchema; - /** @deprecated use `GetGenerationByIdLoras$Outbound` instead. */ - export type Outbound = GetGenerationByIdLoras$Outbound; + /** @deprecated use `GetGenerationByIdLoras$inboundSchema` instead. */ + export const inboundSchema = GetGenerationByIdLoras$inboundSchema; + /** @deprecated use `GetGenerationByIdLoras$outboundSchema` instead. */ + export const outboundSchema = GetGenerationByIdLoras$outboundSchema; + /** @deprecated use `GetGenerationByIdLoras$Outbound` instead. */ + export type Outbound = GetGenerationByIdLoras$Outbound; } /** @internal */ export const GenerationElements$inboundSchema: z.ZodType< - GenerationElements, - z.ZodTypeDef, - unknown + GenerationElements, + z.ZodTypeDef, + unknown > = z.object({ - id: z.nullable(z.number().int()).optional(), - lora: z.nullable(z.lazy(() => GetGenerationByIdLoras$inboundSchema)).optional(), - weightApplied: z.nullable(z.number()).optional(), + id: z.nullable(z.number().int()).optional(), + lora: z.nullable(z.lazy(() => GetGenerationByIdLoras$inboundSchema)) + .optional(), + weightApplied: z.nullable(z.number()).optional(), }); /** @internal */ export type GenerationElements$Outbound = { - id?: number | null | undefined; - lora?: GetGenerationByIdLoras$Outbound | null | undefined; - weightApplied?: number | null | undefined; + id?: number | null | undefined; + lora?: GetGenerationByIdLoras$Outbound | null | undefined; + weightApplied?: number | null | undefined; }; /** @internal */ export const GenerationElements$outboundSchema: z.ZodType< - GenerationElements$Outbound, - z.ZodTypeDef, - GenerationElements + GenerationElements$Outbound, + z.ZodTypeDef, + GenerationElements > = z.object({ - id: z.nullable(z.number().int()).optional(), - lora: z.nullable(z.lazy(() => GetGenerationByIdLoras$outboundSchema)).optional(), - weightApplied: z.nullable(z.number()).optional(), + id: z.nullable(z.number().int()).optional(), + lora: z.nullable(z.lazy(() => GetGenerationByIdLoras$outboundSchema)) + .optional(), + weightApplied: z.nullable(z.number()).optional(), }); /** @@ -455,245 +468,244 @@ export const GenerationElements$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GenerationElements$ { - /** @deprecated use `GenerationElements$inboundSchema` instead. */ - export const inboundSchema = GenerationElements$inboundSchema; - /** @deprecated use `GenerationElements$outboundSchema` instead. */ - export const outboundSchema = GenerationElements$outboundSchema; - /** @deprecated use `GenerationElements$Outbound` instead. */ - export type Outbound = GenerationElements$Outbound; + /** @deprecated use `GenerationElements$inboundSchema` instead. */ + export const inboundSchema = GenerationElements$inboundSchema; + /** @deprecated use `GenerationElements$outboundSchema` instead. */ + export const outboundSchema = GenerationElements$outboundSchema; + /** @deprecated use `GenerationElements$Outbound` instead. */ + export type Outbound = GenerationElements$Outbound; } /** @internal */ export const GetGenerationByIdGenerations$inboundSchema: z.ZodType< - GetGenerationByIdGenerations, - z.ZodTypeDef, - unknown -> = z - .object({ - createdAt: z.string().optional(), - generated_images: z.array(z.lazy(() => GeneratedImages$inboundSchema)).optional(), - generation_elements: z.array(z.lazy(() => GenerationElements$inboundSchema)).optional(), - guidanceScale: z.nullable(z.number()).optional(), - id: z.nullable(z.string()).optional(), - imageHeight: z.number().int().optional(), - imageWidth: z.number().int().optional(), - inferenceSteps: z.nullable(z.number().int()).optional(), - initStrength: z.nullable(z.number()).optional(), - modelId: z.nullable(z.string()).optional(), - negativePrompt: z.nullable(z.string()).optional(), - photoReal: z.nullable(z.boolean()).optional(), - photoRealStrength: z.nullable(z.number()).optional(), - presetStyle: z.nullable( - shared.SdGenerationStyle$inboundSchema.default(shared.SdGenerationStyle.Dynamic) - ), - prompt: z.string().optional(), - promptMagic: z.nullable(z.boolean()).optional(), - promptMagicStrength: z.nullable(z.number()).optional(), - promptMagicVersion: z.nullable(z.string()).optional(), - public: z.boolean().optional(), - scheduler: shared.SdGenerationSchedulers$inboundSchema.optional(), - sdVersion: shared.SdVersions$inboundSchema.optional(), - seed: z.nullable(z.number().int()).optional(), - status: shared.JobStatus$inboundSchema.optional(), - }) - .transform((v) => { - return remap$(v, { - generated_images: "generatedImages", - generation_elements: "generationElements", - }); - }); + GetGenerationByIdGenerations, + z.ZodTypeDef, + unknown +> = z.object({ + createdAt: z.string().optional(), + generated_images: z.array(z.lazy(() => GeneratedImages$inboundSchema)) + .optional(), + generation_elements: z.array(z.lazy(() => GenerationElements$inboundSchema)) + .optional(), + guidanceScale: z.nullable(z.number()).optional(), + id: z.nullable(z.string()).optional(), + imageHeight: z.number().int().optional(), + imageWidth: z.number().int().optional(), + inferenceSteps: z.nullable(z.number().int()).optional(), + initStrength: z.nullable(z.number()).optional(), + modelId: z.nullable(z.string()).optional(), + negativePrompt: z.nullable(z.string()).optional(), + photoReal: z.nullable(z.boolean()).optional(), + photoRealStrength: z.nullable(z.number()).optional(), + presetStyle: z.nullable( + shared.SdGenerationStyle$inboundSchema.default( + shared.SdGenerationStyle.Dynamic, + ), + ), + prompt: z.string().optional(), + promptMagic: z.nullable(z.boolean()).optional(), + promptMagicStrength: z.nullable(z.number()).optional(), + promptMagicVersion: z.nullable(z.string()).optional(), + public: z.boolean().optional(), + scheduler: shared.SdGenerationSchedulers$inboundSchema.optional(), + sdVersion: shared.SdVersions$inboundSchema.optional(), + seed: z.nullable(z.number().int()).optional(), + status: shared.JobStatus$inboundSchema.optional(), + ultra: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "generated_images": "generatedImages", + "generation_elements": "generationElements", + }); +}); /** @internal */ export type GetGenerationByIdGenerations$Outbound = { - createdAt?: string | undefined; - generated_images?: Array | undefined; - generation_elements?: Array | undefined; - guidanceScale?: number | null | undefined; - id?: string | null | undefined; - imageHeight?: number | undefined; - imageWidth?: number | undefined; - inferenceSteps?: number | null | undefined; - initStrength?: number | null | undefined; - modelId?: string | null | undefined; - negativePrompt?: string | null | undefined; - photoReal?: boolean | null | undefined; - photoRealStrength?: number | null | undefined; - presetStyle: string | null; - prompt?: string | undefined; - promptMagic?: boolean | null | undefined; - promptMagicStrength?: number | null | undefined; - promptMagicVersion?: string | null | undefined; - public?: boolean | undefined; - scheduler?: string | undefined; - sdVersion?: string | undefined; - seed?: number | null | undefined; - status?: string | undefined; + createdAt?: string | undefined; + generated_images?: Array | undefined; + generation_elements?: Array | undefined; + guidanceScale?: number | null | undefined; + id?: string | null | undefined; + imageHeight?: number | undefined; + imageWidth?: number | undefined; + inferenceSteps?: number | null | undefined; + initStrength?: number | null | undefined; + modelId?: string | null | undefined; + negativePrompt?: string | null | undefined; + photoReal?: boolean | null | undefined; + photoRealStrength?: number | null | undefined; + presetStyle: string | null; + prompt?: string | undefined; + promptMagic?: boolean | null | undefined; + promptMagicStrength?: number | null | undefined; + promptMagicVersion?: string | null | undefined; + public?: boolean | undefined; + scheduler?: string | undefined; + sdVersion?: string | undefined; + seed?: number | null | undefined; + status?: string | undefined; + ultra?: boolean | null | undefined; }; /** @internal */ export const GetGenerationByIdGenerations$outboundSchema: z.ZodType< - GetGenerationByIdGenerations$Outbound, - z.ZodTypeDef, - GetGenerationByIdGenerations -> = z - .object({ - createdAt: z.string().optional(), - generatedImages: z.array(z.lazy(() => GeneratedImages$outboundSchema)).optional(), - generationElements: z.array(z.lazy(() => GenerationElements$outboundSchema)).optional(), - guidanceScale: z.nullable(z.number()).optional(), - id: z.nullable(z.string()).optional(), - imageHeight: z.number().int().optional(), - imageWidth: z.number().int().optional(), - inferenceSteps: z.nullable(z.number().int()).optional(), - initStrength: z.nullable(z.number()).optional(), - modelId: z.nullable(z.string()).optional(), - negativePrompt: z.nullable(z.string()).optional(), - photoReal: z.nullable(z.boolean()).optional(), - photoRealStrength: z.nullable(z.number()).optional(), - presetStyle: z.nullable( - shared.SdGenerationStyle$outboundSchema.default(shared.SdGenerationStyle.Dynamic) - ), - prompt: z.string().optional(), - promptMagic: z.nullable(z.boolean()).optional(), - promptMagicStrength: z.nullable(z.number()).optional(), - promptMagicVersion: z.nullable(z.string()).optional(), - public: z.boolean().optional(), - scheduler: shared.SdGenerationSchedulers$outboundSchema.optional(), - sdVersion: shared.SdVersions$outboundSchema.optional(), - seed: z.nullable(z.number().int()).optional(), - status: shared.JobStatus$outboundSchema.optional(), - }) - .transform((v) => { - return remap$(v, { - generatedImages: "generated_images", - generationElements: "generation_elements", - }); - }); + GetGenerationByIdGenerations$Outbound, + z.ZodTypeDef, + GetGenerationByIdGenerations +> = z.object({ + createdAt: z.string().optional(), + generatedImages: z.array(z.lazy(() => GeneratedImages$outboundSchema)) + .optional(), + generationElements: z.array(z.lazy(() => GenerationElements$outboundSchema)) + .optional(), + guidanceScale: z.nullable(z.number()).optional(), + id: z.nullable(z.string()).optional(), + imageHeight: z.number().int().optional(), + imageWidth: z.number().int().optional(), + inferenceSteps: z.nullable(z.number().int()).optional(), + initStrength: z.nullable(z.number()).optional(), + modelId: z.nullable(z.string()).optional(), + negativePrompt: z.nullable(z.string()).optional(), + photoReal: z.nullable(z.boolean()).optional(), + photoRealStrength: z.nullable(z.number()).optional(), + presetStyle: z.nullable( + shared.SdGenerationStyle$outboundSchema.default( + shared.SdGenerationStyle.Dynamic, + ), + ), + prompt: z.string().optional(), + promptMagic: z.nullable(z.boolean()).optional(), + promptMagicStrength: z.nullable(z.number()).optional(), + promptMagicVersion: z.nullable(z.string()).optional(), + public: z.boolean().optional(), + scheduler: shared.SdGenerationSchedulers$outboundSchema.optional(), + sdVersion: shared.SdVersions$outboundSchema.optional(), + seed: z.nullable(z.number().int()).optional(), + status: shared.JobStatus$outboundSchema.optional(), + ultra: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + generatedImages: "generated_images", + generationElements: "generation_elements", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationByIdGenerations$ { - /** @deprecated use `GetGenerationByIdGenerations$inboundSchema` instead. */ - export const inboundSchema = GetGenerationByIdGenerations$inboundSchema; - /** @deprecated use `GetGenerationByIdGenerations$outboundSchema` instead. */ - export const outboundSchema = GetGenerationByIdGenerations$outboundSchema; - /** @deprecated use `GetGenerationByIdGenerations$Outbound` instead. */ - export type Outbound = GetGenerationByIdGenerations$Outbound; + /** @deprecated use `GetGenerationByIdGenerations$inboundSchema` instead. */ + export const inboundSchema = GetGenerationByIdGenerations$inboundSchema; + /** @deprecated use `GetGenerationByIdGenerations$outboundSchema` instead. */ + export const outboundSchema = GetGenerationByIdGenerations$outboundSchema; + /** @deprecated use `GetGenerationByIdGenerations$Outbound` instead. */ + export type Outbound = GetGenerationByIdGenerations$Outbound; } /** @internal */ export const GetGenerationByIdResponseBody$inboundSchema: z.ZodType< - GetGenerationByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - generations_by_pk: z - .nullable(z.lazy(() => GetGenerationByIdGenerations$inboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - generations_by_pk: "generationsByPk", - }); - }); + GetGenerationByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + generations_by_pk: z.nullable( + z.lazy(() => GetGenerationByIdGenerations$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "generations_by_pk": "generationsByPk", + }); +}); /** @internal */ export type GetGenerationByIdResponseBody$Outbound = { - generations_by_pk?: GetGenerationByIdGenerations$Outbound | null | undefined; + generations_by_pk?: GetGenerationByIdGenerations$Outbound | null | undefined; }; /** @internal */ export const GetGenerationByIdResponseBody$outboundSchema: z.ZodType< - GetGenerationByIdResponseBody$Outbound, - z.ZodTypeDef, - GetGenerationByIdResponseBody -> = z - .object({ - generationsByPk: z - .nullable(z.lazy(() => GetGenerationByIdGenerations$outboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - generationsByPk: "generations_by_pk", - }); - }); + GetGenerationByIdResponseBody$Outbound, + z.ZodTypeDef, + GetGenerationByIdResponseBody +> = z.object({ + generationsByPk: z.nullable( + z.lazy(() => GetGenerationByIdGenerations$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + generationsByPk: "generations_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationByIdResponseBody$ { - /** @deprecated use `GetGenerationByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetGenerationByIdResponseBody$inboundSchema; - /** @deprecated use `GetGenerationByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetGenerationByIdResponseBody$outboundSchema; - /** @deprecated use `GetGenerationByIdResponseBody$Outbound` instead. */ - export type Outbound = GetGenerationByIdResponseBody$Outbound; + /** @deprecated use `GetGenerationByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetGenerationByIdResponseBody$inboundSchema; + /** @deprecated use `GetGenerationByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetGenerationByIdResponseBody$outboundSchema; + /** @deprecated use `GetGenerationByIdResponseBody$Outbound` instead. */ + export type Outbound = GetGenerationByIdResponseBody$Outbound; } /** @internal */ export const GetGenerationByIdResponse$inboundSchema: z.ZodType< - GetGenerationByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetGenerationByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetGenerationByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetGenerationByIdResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetGenerationByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetGenerationByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetGenerationByIdResponseBody$Outbound | undefined; }; /** @internal */ export const GetGenerationByIdResponse$outboundSchema: z.ZodType< - GetGenerationByIdResponse$Outbound, - z.ZodTypeDef, - GetGenerationByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetGenerationByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetGenerationByIdResponse$Outbound, + z.ZodTypeDef, + GetGenerationByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetGenerationByIdResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationByIdResponse$ { - /** @deprecated use `GetGenerationByIdResponse$inboundSchema` instead. */ - export const inboundSchema = GetGenerationByIdResponse$inboundSchema; - /** @deprecated use `GetGenerationByIdResponse$outboundSchema` instead. */ - export const outboundSchema = GetGenerationByIdResponse$outboundSchema; - /** @deprecated use `GetGenerationByIdResponse$Outbound` instead. */ - export type Outbound = GetGenerationByIdResponse$Outbound; + /** @deprecated use `GetGenerationByIdResponse$inboundSchema` instead. */ + export const inboundSchema = GetGenerationByIdResponse$inboundSchema; + /** @deprecated use `GetGenerationByIdResponse$outboundSchema` instead. */ + export const outboundSchema = GetGenerationByIdResponse$outboundSchema; + /** @deprecated use `GetGenerationByIdResponse$Outbound` instead. */ + export type Outbound = GetGenerationByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/getgenerationsbyuserid.ts b/src/sdk/models/operations/getgenerationsbyuserid.ts index 31f9f3a..fbb17a3 100644 --- a/src/sdk/models/operations/getgenerationsbyuserid.ts +++ b/src/sdk/models/operations/getgenerationsbyuserid.ts @@ -2,224 +2,230 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; export type GetGenerationsByUserIdRequest = { - limit?: number | undefined; - offset?: number | undefined; - userId: string; + limit?: number | undefined; + offset?: number | undefined; + userId: string; }; /** * columns and relationships of "generated_image_variation_generic" */ export type GetGenerationsByUserIdGeneratedImageVariationGeneric = { - id?: string | null | undefined; - /** - * The status of the current task. - */ - status?: shared.JobStatus | undefined; - /** - * The type of variation. - */ - transformType?: shared.VariationType | undefined; - url?: string | null | undefined; + id?: string | null | undefined; + /** + * The status of the current task. + */ + status?: shared.JobStatus | undefined; + /** + * The type of variation. + */ + transformType?: shared.VariationType | undefined; + url?: string | null | undefined; }; /** * columns and relationships of "generated_images" */ export type GetGenerationsByUserIdGeneratedImages = { - generatedImageVariationGenerics?: - | Array - | undefined; - id?: string | null | undefined; - /** - * If it is an image to video generation. - */ - imageToVideo?: boolean | null | undefined; - likeCount?: number | undefined; - /** - * If generation is of motion type. - */ - motion?: boolean | null | undefined; - /** - * The URL of the motion MP4. - */ - motionMp4URL?: string | null | undefined; - /** - * The name of the motion model. - */ - motionModel?: string | null | undefined; - /** - * The motion strength. - */ - motionStrength?: number | null | undefined; - nsfw?: boolean | undefined; - url?: string | undefined; + generatedImageVariationGenerics?: + | Array + | undefined; + id?: string | null | undefined; + /** + * If it is an image to video generation. + */ + imageToVideo?: boolean | null | undefined; + likeCount?: number | undefined; + /** + * If generation is of motion type. + */ + motion?: boolean | null | undefined; + /** + * The URL of the motion MP4. + */ + motionMp4URL?: string | null | undefined; + /** + * The name of the motion model. + */ + motionModel?: string | null | undefined; + /** + * The motion strength. + */ + motionStrength?: number | null | undefined; + nsfw?: boolean | undefined; + url?: string | undefined; }; /** * Element used for the generation. */ export type Elements = { - /** - * Unique identifier for the element. Elements can be found from the List Elements endpoint. - */ - akUUID?: string | null | undefined; - /** - * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models - */ - baseModel?: shared.SdVersions | undefined; - /** - * Description for the element - */ - description?: string | null | undefined; - /** - * Name of the element - */ - name?: string | null | undefined; - /** - * URL of the element image - */ - urlImage?: string | null | undefined; - /** - * Default weight for the element - */ - weightDefault?: number | null | undefined; - /** - * Maximum weight for the element - */ - weightMax?: number | null | undefined; - /** - * Minimum weight for the element - */ - weightMin?: number | null | undefined; + /** + * Unique identifier for the element. Elements can be found from the List Elements endpoint. + */ + akUUID?: string | null | undefined; + /** + * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models + */ + baseModel?: shared.SdVersions | undefined; + /** + * Description for the element + */ + description?: string | null | undefined; + /** + * Name of the element + */ + name?: string | null | undefined; + /** + * URL of the element image + */ + urlImage?: string | null | undefined; + /** + * Default weight for the element + */ + weightDefault?: number | null | undefined; + /** + * Maximum weight for the element + */ + weightMax?: number | null | undefined; + /** + * Minimum weight for the element + */ + weightMin?: number | null | undefined; }; /** * This table captures the elements that are applied to a Generations, also the order and weightings used when applied. */ export type GetGenerationsByUserIdGenerationElements = { - id?: number | null | undefined; - /** - * Element used for the generation. - */ - lora?: Elements | null | undefined; - weightApplied?: number | null | undefined; + id?: number | null | undefined; + /** + * Element used for the generation. + */ + lora?: Elements | null | undefined; + weightApplied?: number | null | undefined; }; /** * columns and relationships of "generations" */ export type GetGenerationsByUserIdGenerations = { - createdAt?: string | undefined; - generatedImages?: Array | undefined; - generationElements?: Array | undefined; - guidanceScale?: number | null | undefined; - id?: string | null | undefined; - imageHeight?: number | undefined; - imageWidth?: number | undefined; - inferenceSteps?: number | null | undefined; - initStrength?: number | null | undefined; - modelId?: string | null | undefined; - negativePrompt?: string | null | undefined; - /** - * If photoReal feature was used. - */ - photoReal?: boolean | null | undefined; - /** - * Depth of field of photoReal used. 0.55 is low, 0.5 is medium, and 0.45 is high. Default is 0.55. - */ - photoRealStrength?: number | null | undefined; - /** - * The style to generate images with. When photoReal is enabled, refer to the Guide section for a full list. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE. - */ - presetStyle?: shared.SdGenerationStyle | null | undefined; - prompt?: string | undefined; - /** - * If prompt magic was used. - */ - promptMagic?: boolean | null | undefined; - /** - * Strength of prompt magic used. - */ - promptMagicStrength?: number | null | undefined; - /** - * Version of prompt magic used. - */ - promptMagicVersion?: string | null | undefined; - public?: boolean | undefined; - /** - * The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. - */ - scheduler?: shared.SdGenerationSchedulers | undefined; - /** - * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models - */ - sdVersion?: shared.SdVersions | undefined; - seed?: number | null | undefined; - /** - * The status of the current task. - */ - status?: shared.JobStatus | undefined; + createdAt?: string | undefined; + generatedImages?: Array | undefined; + generationElements?: + | Array + | undefined; + guidanceScale?: number | null | undefined; + id?: string | null | undefined; + imageHeight?: number | undefined; + imageWidth?: number | undefined; + inferenceSteps?: number | null | undefined; + initStrength?: number | null | undefined; + modelId?: string | null | undefined; + negativePrompt?: string | null | undefined; + /** + * If photoReal feature was used. + */ + photoReal?: boolean | null | undefined; + /** + * Depth of field of photoReal used. 0.55 is low, 0.5 is medium, and 0.45 is high. Default is 0.55. + */ + photoRealStrength?: number | null | undefined; + /** + * The style to generate images with. When photoReal is enabled, refer to the Guide section for a full list. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE. + */ + presetStyle?: shared.SdGenerationStyle | null | undefined; + prompt?: string | undefined; + /** + * If prompt magic was used. + */ + promptMagic?: boolean | null | undefined; + /** + * Strength of prompt magic used. + */ + promptMagicStrength?: number | null | undefined; + /** + * Version of prompt magic used. + */ + promptMagicVersion?: string | null | undefined; + public?: boolean | undefined; + /** + * The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. + */ + scheduler?: shared.SdGenerationSchedulers | undefined; + /** + * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models + */ + sdVersion?: shared.SdVersions | undefined; + seed?: number | null | undefined; + /** + * The status of the current task. + */ + status?: shared.JobStatus | undefined; + /** + * If ultra generation mode was used. + */ + ultra?: boolean | null | undefined; }; /** * Responses for GET /generations/user/{userId} */ export type GetGenerationsByUserIdResponseBody = { - generations?: Array | undefined; + generations?: Array | undefined; }; export type GetGenerationsByUserIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /generations/user/{userId} - */ - object?: GetGenerationsByUserIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /generations/user/{userId} + */ + object?: GetGenerationsByUserIdResponseBody | undefined; }; /** @internal */ export const GetGenerationsByUserIdRequest$inboundSchema: z.ZodType< - GetGenerationsByUserIdRequest, - z.ZodTypeDef, - unknown + GetGenerationsByUserIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - limit: z.number().int().default(10), - offset: z.number().int().default(0), - userId: z.string(), + limit: z.number().int().default(10), + offset: z.number().int().default(0), + userId: z.string(), }); /** @internal */ export type GetGenerationsByUserIdRequest$Outbound = { - limit: number; - offset: number; - userId: string; + limit: number; + offset: number; + userId: string; }; /** @internal */ export const GetGenerationsByUserIdRequest$outboundSchema: z.ZodType< - GetGenerationsByUserIdRequest$Outbound, - z.ZodTypeDef, - GetGenerationsByUserIdRequest + GetGenerationsByUserIdRequest$Outbound, + z.ZodTypeDef, + GetGenerationsByUserIdRequest > = z.object({ - limit: z.number().int().default(10), - offset: z.number().int().default(0), - userId: z.string(), + limit: z.number().int().default(10), + offset: z.number().int().default(0), + userId: z.string(), }); /** @@ -227,222 +233,233 @@ export const GetGenerationsByUserIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationsByUserIdRequest$ { - /** @deprecated use `GetGenerationsByUserIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetGenerationsByUserIdRequest$inboundSchema; - /** @deprecated use `GetGenerationsByUserIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetGenerationsByUserIdRequest$outboundSchema; - /** @deprecated use `GetGenerationsByUserIdRequest$Outbound` instead. */ - export type Outbound = GetGenerationsByUserIdRequest$Outbound; + /** @deprecated use `GetGenerationsByUserIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetGenerationsByUserIdRequest$inboundSchema; + /** @deprecated use `GetGenerationsByUserIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetGenerationsByUserIdRequest$outboundSchema; + /** @deprecated use `GetGenerationsByUserIdRequest$Outbound` instead. */ + export type Outbound = GetGenerationsByUserIdRequest$Outbound; } /** @internal */ -export const GetGenerationsByUserIdGeneratedImageVariationGeneric$inboundSchema: z.ZodType< +export const GetGenerationsByUserIdGeneratedImageVariationGeneric$inboundSchema: + z.ZodType< GetGenerationsByUserIdGeneratedImageVariationGeneric, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ id: z.nullable(z.string()).optional(), status: shared.JobStatus$inboundSchema.optional(), transformType: shared.VariationType$inboundSchema.optional(), url: z.nullable(z.string()).optional(), -}); + }); /** @internal */ export type GetGenerationsByUserIdGeneratedImageVariationGeneric$Outbound = { - id?: string | null | undefined; - status?: string | undefined; - transformType?: string | undefined; - url?: string | null | undefined; + id?: string | null | undefined; + status?: string | undefined; + transformType?: string | undefined; + url?: string | null | undefined; }; /** @internal */ -export const GetGenerationsByUserIdGeneratedImageVariationGeneric$outboundSchema: z.ZodType< +export const GetGenerationsByUserIdGeneratedImageVariationGeneric$outboundSchema: + z.ZodType< GetGenerationsByUserIdGeneratedImageVariationGeneric$Outbound, z.ZodTypeDef, GetGenerationsByUserIdGeneratedImageVariationGeneric -> = z.object({ + > = z.object({ id: z.nullable(z.string()).optional(), status: shared.JobStatus$outboundSchema.optional(), transformType: shared.VariationType$outboundSchema.optional(), url: z.nullable(z.string()).optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationsByUserIdGeneratedImageVariationGeneric$ { - /** @deprecated use `GetGenerationsByUserIdGeneratedImageVariationGeneric$inboundSchema` instead. */ - export const inboundSchema = GetGenerationsByUserIdGeneratedImageVariationGeneric$inboundSchema; - /** @deprecated use `GetGenerationsByUserIdGeneratedImageVariationGeneric$outboundSchema` instead. */ - export const outboundSchema = - GetGenerationsByUserIdGeneratedImageVariationGeneric$outboundSchema; - /** @deprecated use `GetGenerationsByUserIdGeneratedImageVariationGeneric$Outbound` instead. */ - export type Outbound = GetGenerationsByUserIdGeneratedImageVariationGeneric$Outbound; + /** @deprecated use `GetGenerationsByUserIdGeneratedImageVariationGeneric$inboundSchema` instead. */ + export const inboundSchema = + GetGenerationsByUserIdGeneratedImageVariationGeneric$inboundSchema; + /** @deprecated use `GetGenerationsByUserIdGeneratedImageVariationGeneric$outboundSchema` instead. */ + export const outboundSchema = + GetGenerationsByUserIdGeneratedImageVariationGeneric$outboundSchema; + /** @deprecated use `GetGenerationsByUserIdGeneratedImageVariationGeneric$Outbound` instead. */ + export type Outbound = + GetGenerationsByUserIdGeneratedImageVariationGeneric$Outbound; } /** @internal */ export const GetGenerationsByUserIdGeneratedImages$inboundSchema: z.ZodType< - GetGenerationsByUserIdGeneratedImages, - z.ZodTypeDef, - unknown -> = z - .object({ - generated_image_variation_generics: z - .array(z.lazy(() => GetGenerationsByUserIdGeneratedImageVariationGeneric$inboundSchema)) - .optional(), - id: z.nullable(z.string()).optional(), - imageToVideo: z.nullable(z.boolean()).optional(), - likeCount: z.number().int().optional(), - motion: z.nullable(z.boolean()).optional(), - motionMP4URL: z.nullable(z.string()).optional(), - motionModel: z.nullable(z.string()).optional(), - motionStrength: z.nullable(z.number().int()).optional(), - nsfw: z.boolean().optional(), - url: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - generated_image_variation_generics: "generatedImageVariationGenerics", - motionMP4URL: "motionMp4URL", - }); - }); + GetGenerationsByUserIdGeneratedImages, + z.ZodTypeDef, + unknown +> = z.object({ + generated_image_variation_generics: z.array( + z.lazy(() => + GetGenerationsByUserIdGeneratedImageVariationGeneric$inboundSchema + ), + ).optional(), + id: z.nullable(z.string()).optional(), + imageToVideo: z.nullable(z.boolean()).optional(), + likeCount: z.number().int().optional(), + motion: z.nullable(z.boolean()).optional(), + motionMP4URL: z.nullable(z.string()).optional(), + motionModel: z.nullable(z.string()).optional(), + motionStrength: z.nullable(z.number().int()).optional(), + nsfw: z.boolean().optional(), + url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "generated_image_variation_generics": "generatedImageVariationGenerics", + "motionMP4URL": "motionMp4URL", + }); +}); /** @internal */ export type GetGenerationsByUserIdGeneratedImages$Outbound = { - generated_image_variation_generics?: - | Array - | undefined; - id?: string | null | undefined; - imageToVideo?: boolean | null | undefined; - likeCount?: number | undefined; - motion?: boolean | null | undefined; - motionMP4URL?: string | null | undefined; - motionModel?: string | null | undefined; - motionStrength?: number | null | undefined; - nsfw?: boolean | undefined; - url?: string | undefined; + generated_image_variation_generics?: + | Array + | undefined; + id?: string | null | undefined; + imageToVideo?: boolean | null | undefined; + likeCount?: number | undefined; + motion?: boolean | null | undefined; + motionMP4URL?: string | null | undefined; + motionModel?: string | null | undefined; + motionStrength?: number | null | undefined; + nsfw?: boolean | undefined; + url?: string | undefined; }; /** @internal */ export const GetGenerationsByUserIdGeneratedImages$outboundSchema: z.ZodType< - GetGenerationsByUserIdGeneratedImages$Outbound, - z.ZodTypeDef, - GetGenerationsByUserIdGeneratedImages -> = z - .object({ - generatedImageVariationGenerics: z - .array( - z.lazy(() => GetGenerationsByUserIdGeneratedImageVariationGeneric$outboundSchema) - ) - .optional(), - id: z.nullable(z.string()).optional(), - imageToVideo: z.nullable(z.boolean()).optional(), - likeCount: z.number().int().optional(), - motion: z.nullable(z.boolean()).optional(), - motionMp4URL: z.nullable(z.string()).optional(), - motionModel: z.nullable(z.string()).optional(), - motionStrength: z.nullable(z.number().int()).optional(), - nsfw: z.boolean().optional(), - url: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - generatedImageVariationGenerics: "generated_image_variation_generics", - motionMp4URL: "motionMP4URL", - }); - }); + GetGenerationsByUserIdGeneratedImages$Outbound, + z.ZodTypeDef, + GetGenerationsByUserIdGeneratedImages +> = z.object({ + generatedImageVariationGenerics: z.array( + z.lazy(() => + GetGenerationsByUserIdGeneratedImageVariationGeneric$outboundSchema + ), + ).optional(), + id: z.nullable(z.string()).optional(), + imageToVideo: z.nullable(z.boolean()).optional(), + likeCount: z.number().int().optional(), + motion: z.nullable(z.boolean()).optional(), + motionMp4URL: z.nullable(z.string()).optional(), + motionModel: z.nullable(z.string()).optional(), + motionStrength: z.nullable(z.number().int()).optional(), + nsfw: z.boolean().optional(), + url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + generatedImageVariationGenerics: "generated_image_variation_generics", + motionMp4URL: "motionMP4URL", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationsByUserIdGeneratedImages$ { - /** @deprecated use `GetGenerationsByUserIdGeneratedImages$inboundSchema` instead. */ - export const inboundSchema = GetGenerationsByUserIdGeneratedImages$inboundSchema; - /** @deprecated use `GetGenerationsByUserIdGeneratedImages$outboundSchema` instead. */ - export const outboundSchema = GetGenerationsByUserIdGeneratedImages$outboundSchema; - /** @deprecated use `GetGenerationsByUserIdGeneratedImages$Outbound` instead. */ - export type Outbound = GetGenerationsByUserIdGeneratedImages$Outbound; + /** @deprecated use `GetGenerationsByUserIdGeneratedImages$inboundSchema` instead. */ + export const inboundSchema = + GetGenerationsByUserIdGeneratedImages$inboundSchema; + /** @deprecated use `GetGenerationsByUserIdGeneratedImages$outboundSchema` instead. */ + export const outboundSchema = + GetGenerationsByUserIdGeneratedImages$outboundSchema; + /** @deprecated use `GetGenerationsByUserIdGeneratedImages$Outbound` instead. */ + export type Outbound = GetGenerationsByUserIdGeneratedImages$Outbound; } /** @internal */ -export const Elements$inboundSchema: z.ZodType = z.object({ - akUUID: z.nullable(z.string()).optional(), - baseModel: shared.SdVersions$inboundSchema.optional(), - description: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - urlImage: z.nullable(z.string()).optional(), - weightDefault: z.nullable(z.number().int()).optional(), - weightMax: z.nullable(z.number().int()).optional(), - weightMin: z.nullable(z.number().int()).optional(), +export const Elements$inboundSchema: z.ZodType< + Elements, + z.ZodTypeDef, + unknown +> = z.object({ + akUUID: z.nullable(z.string()).optional(), + baseModel: shared.SdVersions$inboundSchema.optional(), + description: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + urlImage: z.nullable(z.string()).optional(), + weightDefault: z.nullable(z.number().int()).optional(), + weightMax: z.nullable(z.number().int()).optional(), + weightMin: z.nullable(z.number().int()).optional(), }); /** @internal */ export type Elements$Outbound = { - akUUID?: string | null | undefined; - baseModel?: string | undefined; - description?: string | null | undefined; - name?: string | null | undefined; - urlImage?: string | null | undefined; - weightDefault?: number | null | undefined; - weightMax?: number | null | undefined; - weightMin?: number | null | undefined; + akUUID?: string | null | undefined; + baseModel?: string | undefined; + description?: string | null | undefined; + name?: string | null | undefined; + urlImage?: string | null | undefined; + weightDefault?: number | null | undefined; + weightMax?: number | null | undefined; + weightMin?: number | null | undefined; }; /** @internal */ -export const Elements$outboundSchema: z.ZodType = - z.object({ - akUUID: z.nullable(z.string()).optional(), - baseModel: shared.SdVersions$outboundSchema.optional(), - description: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - urlImage: z.nullable(z.string()).optional(), - weightDefault: z.nullable(z.number().int()).optional(), - weightMax: z.nullable(z.number().int()).optional(), - weightMin: z.nullable(z.number().int()).optional(), - }); +export const Elements$outboundSchema: z.ZodType< + Elements$Outbound, + z.ZodTypeDef, + Elements +> = z.object({ + akUUID: z.nullable(z.string()).optional(), + baseModel: shared.SdVersions$outboundSchema.optional(), + description: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + urlImage: z.nullable(z.string()).optional(), + weightDefault: z.nullable(z.number().int()).optional(), + weightMax: z.nullable(z.number().int()).optional(), + weightMin: z.nullable(z.number().int()).optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Elements$ { - /** @deprecated use `Elements$inboundSchema` instead. */ - export const inboundSchema = Elements$inboundSchema; - /** @deprecated use `Elements$outboundSchema` instead. */ - export const outboundSchema = Elements$outboundSchema; - /** @deprecated use `Elements$Outbound` instead. */ - export type Outbound = Elements$Outbound; + /** @deprecated use `Elements$inboundSchema` instead. */ + export const inboundSchema = Elements$inboundSchema; + /** @deprecated use `Elements$outboundSchema` instead. */ + export const outboundSchema = Elements$outboundSchema; + /** @deprecated use `Elements$Outbound` instead. */ + export type Outbound = Elements$Outbound; } /** @internal */ export const GetGenerationsByUserIdGenerationElements$inboundSchema: z.ZodType< - GetGenerationsByUserIdGenerationElements, - z.ZodTypeDef, - unknown + GetGenerationsByUserIdGenerationElements, + z.ZodTypeDef, + unknown > = z.object({ - id: z.nullable(z.number().int()).optional(), - lora: z.nullable(z.lazy(() => Elements$inboundSchema)).optional(), - weightApplied: z.nullable(z.number()).optional(), + id: z.nullable(z.number().int()).optional(), + lora: z.nullable(z.lazy(() => Elements$inboundSchema)).optional(), + weightApplied: z.nullable(z.number()).optional(), }); /** @internal */ export type GetGenerationsByUserIdGenerationElements$Outbound = { - id?: number | null | undefined; - lora?: Elements$Outbound | null | undefined; - weightApplied?: number | null | undefined; + id?: number | null | undefined; + lora?: Elements$Outbound | null | undefined; + weightApplied?: number | null | undefined; }; /** @internal */ export const GetGenerationsByUserIdGenerationElements$outboundSchema: z.ZodType< - GetGenerationsByUserIdGenerationElements$Outbound, - z.ZodTypeDef, - GetGenerationsByUserIdGenerationElements + GetGenerationsByUserIdGenerationElements$Outbound, + z.ZodTypeDef, + GetGenerationsByUserIdGenerationElements > = z.object({ - id: z.nullable(z.number().int()).optional(), - lora: z.nullable(z.lazy(() => Elements$outboundSchema)).optional(), - weightApplied: z.nullable(z.number()).optional(), + id: z.nullable(z.number().int()).optional(), + lora: z.nullable(z.lazy(() => Elements$outboundSchema)).optional(), + weightApplied: z.nullable(z.number()).optional(), }); /** @@ -450,163 +467,177 @@ export const GetGenerationsByUserIdGenerationElements$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationsByUserIdGenerationElements$ { - /** @deprecated use `GetGenerationsByUserIdGenerationElements$inboundSchema` instead. */ - export const inboundSchema = GetGenerationsByUserIdGenerationElements$inboundSchema; - /** @deprecated use `GetGenerationsByUserIdGenerationElements$outboundSchema` instead. */ - export const outboundSchema = GetGenerationsByUserIdGenerationElements$outboundSchema; - /** @deprecated use `GetGenerationsByUserIdGenerationElements$Outbound` instead. */ - export type Outbound = GetGenerationsByUserIdGenerationElements$Outbound; + /** @deprecated use `GetGenerationsByUserIdGenerationElements$inboundSchema` instead. */ + export const inboundSchema = + GetGenerationsByUserIdGenerationElements$inboundSchema; + /** @deprecated use `GetGenerationsByUserIdGenerationElements$outboundSchema` instead. */ + export const outboundSchema = + GetGenerationsByUserIdGenerationElements$outboundSchema; + /** @deprecated use `GetGenerationsByUserIdGenerationElements$Outbound` instead. */ + export type Outbound = GetGenerationsByUserIdGenerationElements$Outbound; } /** @internal */ export const GetGenerationsByUserIdGenerations$inboundSchema: z.ZodType< - GetGenerationsByUserIdGenerations, - z.ZodTypeDef, - unknown -> = z - .object({ - createdAt: z.string().optional(), - generated_images: z - .array(z.lazy(() => GetGenerationsByUserIdGeneratedImages$inboundSchema)) - .optional(), - generation_elements: z - .array(z.lazy(() => GetGenerationsByUserIdGenerationElements$inboundSchema)) - .optional(), - guidanceScale: z.nullable(z.number()).optional(), - id: z.nullable(z.string()).optional(), - imageHeight: z.number().int().optional(), - imageWidth: z.number().int().optional(), - inferenceSteps: z.nullable(z.number().int()).optional(), - initStrength: z.nullable(z.number()).optional(), - modelId: z.nullable(z.string()).optional(), - negativePrompt: z.nullable(z.string()).optional(), - photoReal: z.nullable(z.boolean()).optional(), - photoRealStrength: z.nullable(z.number()).optional(), - presetStyle: z.nullable( - shared.SdGenerationStyle$inboundSchema.default(shared.SdGenerationStyle.Dynamic) - ), - prompt: z.string().optional(), - promptMagic: z.nullable(z.boolean()).optional(), - promptMagicStrength: z.nullable(z.number()).optional(), - promptMagicVersion: z.nullable(z.string()).optional(), - public: z.boolean().optional(), - scheduler: shared.SdGenerationSchedulers$inboundSchema.optional(), - sdVersion: shared.SdVersions$inboundSchema.optional(), - seed: z.nullable(z.number().int()).optional(), - status: shared.JobStatus$inboundSchema.optional(), - }) - .transform((v) => { - return remap$(v, { - generated_images: "generatedImages", - generation_elements: "generationElements", - }); - }); + GetGenerationsByUserIdGenerations, + z.ZodTypeDef, + unknown +> = z.object({ + createdAt: z.string().optional(), + generated_images: z.array( + z.lazy(() => GetGenerationsByUserIdGeneratedImages$inboundSchema), + ).optional(), + generation_elements: z.array( + z.lazy(() => GetGenerationsByUserIdGenerationElements$inboundSchema), + ).optional(), + guidanceScale: z.nullable(z.number()).optional(), + id: z.nullable(z.string()).optional(), + imageHeight: z.number().int().optional(), + imageWidth: z.number().int().optional(), + inferenceSteps: z.nullable(z.number().int()).optional(), + initStrength: z.nullable(z.number()).optional(), + modelId: z.nullable(z.string()).optional(), + negativePrompt: z.nullable(z.string()).optional(), + photoReal: z.nullable(z.boolean()).optional(), + photoRealStrength: z.nullable(z.number()).optional(), + presetStyle: z.nullable( + shared.SdGenerationStyle$inboundSchema.default( + shared.SdGenerationStyle.Dynamic, + ), + ), + prompt: z.string().optional(), + promptMagic: z.nullable(z.boolean()).optional(), + promptMagicStrength: z.nullable(z.number()).optional(), + promptMagicVersion: z.nullable(z.string()).optional(), + public: z.boolean().optional(), + scheduler: shared.SdGenerationSchedulers$inboundSchema.optional(), + sdVersion: shared.SdVersions$inboundSchema.optional(), + seed: z.nullable(z.number().int()).optional(), + status: shared.JobStatus$inboundSchema.optional(), + ultra: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "generated_images": "generatedImages", + "generation_elements": "generationElements", + }); +}); /** @internal */ export type GetGenerationsByUserIdGenerations$Outbound = { - createdAt?: string | undefined; - generated_images?: Array | undefined; - generation_elements?: Array | undefined; - guidanceScale?: number | null | undefined; - id?: string | null | undefined; - imageHeight?: number | undefined; - imageWidth?: number | undefined; - inferenceSteps?: number | null | undefined; - initStrength?: number | null | undefined; - modelId?: string | null | undefined; - negativePrompt?: string | null | undefined; - photoReal?: boolean | null | undefined; - photoRealStrength?: number | null | undefined; - presetStyle: string | null; - prompt?: string | undefined; - promptMagic?: boolean | null | undefined; - promptMagicStrength?: number | null | undefined; - promptMagicVersion?: string | null | undefined; - public?: boolean | undefined; - scheduler?: string | undefined; - sdVersion?: string | undefined; - seed?: number | null | undefined; - status?: string | undefined; + createdAt?: string | undefined; + generated_images?: + | Array + | undefined; + generation_elements?: + | Array + | undefined; + guidanceScale?: number | null | undefined; + id?: string | null | undefined; + imageHeight?: number | undefined; + imageWidth?: number | undefined; + inferenceSteps?: number | null | undefined; + initStrength?: number | null | undefined; + modelId?: string | null | undefined; + negativePrompt?: string | null | undefined; + photoReal?: boolean | null | undefined; + photoRealStrength?: number | null | undefined; + presetStyle: string | null; + prompt?: string | undefined; + promptMagic?: boolean | null | undefined; + promptMagicStrength?: number | null | undefined; + promptMagicVersion?: string | null | undefined; + public?: boolean | undefined; + scheduler?: string | undefined; + sdVersion?: string | undefined; + seed?: number | null | undefined; + status?: string | undefined; + ultra?: boolean | null | undefined; }; /** @internal */ export const GetGenerationsByUserIdGenerations$outboundSchema: z.ZodType< - GetGenerationsByUserIdGenerations$Outbound, - z.ZodTypeDef, - GetGenerationsByUserIdGenerations -> = z - .object({ - createdAt: z.string().optional(), - generatedImages: z - .array(z.lazy(() => GetGenerationsByUserIdGeneratedImages$outboundSchema)) - .optional(), - generationElements: z - .array(z.lazy(() => GetGenerationsByUserIdGenerationElements$outboundSchema)) - .optional(), - guidanceScale: z.nullable(z.number()).optional(), - id: z.nullable(z.string()).optional(), - imageHeight: z.number().int().optional(), - imageWidth: z.number().int().optional(), - inferenceSteps: z.nullable(z.number().int()).optional(), - initStrength: z.nullable(z.number()).optional(), - modelId: z.nullable(z.string()).optional(), - negativePrompt: z.nullable(z.string()).optional(), - photoReal: z.nullable(z.boolean()).optional(), - photoRealStrength: z.nullable(z.number()).optional(), - presetStyle: z.nullable( - shared.SdGenerationStyle$outboundSchema.default(shared.SdGenerationStyle.Dynamic) - ), - prompt: z.string().optional(), - promptMagic: z.nullable(z.boolean()).optional(), - promptMagicStrength: z.nullable(z.number()).optional(), - promptMagicVersion: z.nullable(z.string()).optional(), - public: z.boolean().optional(), - scheduler: shared.SdGenerationSchedulers$outboundSchema.optional(), - sdVersion: shared.SdVersions$outboundSchema.optional(), - seed: z.nullable(z.number().int()).optional(), - status: shared.JobStatus$outboundSchema.optional(), - }) - .transform((v) => { - return remap$(v, { - generatedImages: "generated_images", - generationElements: "generation_elements", - }); - }); + GetGenerationsByUserIdGenerations$Outbound, + z.ZodTypeDef, + GetGenerationsByUserIdGenerations +> = z.object({ + createdAt: z.string().optional(), + generatedImages: z.array( + z.lazy(() => GetGenerationsByUserIdGeneratedImages$outboundSchema), + ).optional(), + generationElements: z.array( + z.lazy(() => GetGenerationsByUserIdGenerationElements$outboundSchema), + ).optional(), + guidanceScale: z.nullable(z.number()).optional(), + id: z.nullable(z.string()).optional(), + imageHeight: z.number().int().optional(), + imageWidth: z.number().int().optional(), + inferenceSteps: z.nullable(z.number().int()).optional(), + initStrength: z.nullable(z.number()).optional(), + modelId: z.nullable(z.string()).optional(), + negativePrompt: z.nullable(z.string()).optional(), + photoReal: z.nullable(z.boolean()).optional(), + photoRealStrength: z.nullable(z.number()).optional(), + presetStyle: z.nullable( + shared.SdGenerationStyle$outboundSchema.default( + shared.SdGenerationStyle.Dynamic, + ), + ), + prompt: z.string().optional(), + promptMagic: z.nullable(z.boolean()).optional(), + promptMagicStrength: z.nullable(z.number()).optional(), + promptMagicVersion: z.nullable(z.string()).optional(), + public: z.boolean().optional(), + scheduler: shared.SdGenerationSchedulers$outboundSchema.optional(), + sdVersion: shared.SdVersions$outboundSchema.optional(), + seed: z.nullable(z.number().int()).optional(), + status: shared.JobStatus$outboundSchema.optional(), + ultra: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + generatedImages: "generated_images", + generationElements: "generation_elements", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationsByUserIdGenerations$ { - /** @deprecated use `GetGenerationsByUserIdGenerations$inboundSchema` instead. */ - export const inboundSchema = GetGenerationsByUserIdGenerations$inboundSchema; - /** @deprecated use `GetGenerationsByUserIdGenerations$outboundSchema` instead. */ - export const outboundSchema = GetGenerationsByUserIdGenerations$outboundSchema; - /** @deprecated use `GetGenerationsByUserIdGenerations$Outbound` instead. */ - export type Outbound = GetGenerationsByUserIdGenerations$Outbound; + /** @deprecated use `GetGenerationsByUserIdGenerations$inboundSchema` instead. */ + export const inboundSchema = GetGenerationsByUserIdGenerations$inboundSchema; + /** @deprecated use `GetGenerationsByUserIdGenerations$outboundSchema` instead. */ + export const outboundSchema = + GetGenerationsByUserIdGenerations$outboundSchema; + /** @deprecated use `GetGenerationsByUserIdGenerations$Outbound` instead. */ + export type Outbound = GetGenerationsByUserIdGenerations$Outbound; } /** @internal */ export const GetGenerationsByUserIdResponseBody$inboundSchema: z.ZodType< - GetGenerationsByUserIdResponseBody, - z.ZodTypeDef, - unknown + GetGenerationsByUserIdResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - generations: z.array(z.lazy(() => GetGenerationsByUserIdGenerations$inboundSchema)).optional(), + generations: z.array( + z.lazy(() => GetGenerationsByUserIdGenerations$inboundSchema), + ).optional(), }); /** @internal */ export type GetGenerationsByUserIdResponseBody$Outbound = { - generations?: Array | undefined; + generations?: Array | undefined; }; /** @internal */ export const GetGenerationsByUserIdResponseBody$outboundSchema: z.ZodType< - GetGenerationsByUserIdResponseBody$Outbound, - z.ZodTypeDef, - GetGenerationsByUserIdResponseBody + GetGenerationsByUserIdResponseBody$Outbound, + z.ZodTypeDef, + GetGenerationsByUserIdResponseBody > = z.object({ - generations: z.array(z.lazy(() => GetGenerationsByUserIdGenerations$outboundSchema)).optional(), + generations: z.array( + z.lazy(() => GetGenerationsByUserIdGenerations$outboundSchema), + ).optional(), }); /** @@ -614,73 +645,72 @@ export const GetGenerationsByUserIdResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationsByUserIdResponseBody$ { - /** @deprecated use `GetGenerationsByUserIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetGenerationsByUserIdResponseBody$inboundSchema; - /** @deprecated use `GetGenerationsByUserIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetGenerationsByUserIdResponseBody$outboundSchema; - /** @deprecated use `GetGenerationsByUserIdResponseBody$Outbound` instead. */ - export type Outbound = GetGenerationsByUserIdResponseBody$Outbound; + /** @deprecated use `GetGenerationsByUserIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetGenerationsByUserIdResponseBody$inboundSchema; + /** @deprecated use `GetGenerationsByUserIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetGenerationsByUserIdResponseBody$outboundSchema; + /** @deprecated use `GetGenerationsByUserIdResponseBody$Outbound` instead. */ + export type Outbound = GetGenerationsByUserIdResponseBody$Outbound; } /** @internal */ export const GetGenerationsByUserIdResponse$inboundSchema: z.ZodType< - GetGenerationsByUserIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetGenerationsByUserIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetGenerationsByUserIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetGenerationsByUserIdResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetGenerationsByUserIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetGenerationsByUserIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetGenerationsByUserIdResponseBody$Outbound | undefined; }; /** @internal */ export const GetGenerationsByUserIdResponse$outboundSchema: z.ZodType< - GetGenerationsByUserIdResponse$Outbound, - z.ZodTypeDef, - GetGenerationsByUserIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetGenerationsByUserIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetGenerationsByUserIdResponse$Outbound, + z.ZodTypeDef, + GetGenerationsByUserIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetGenerationsByUserIdResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGenerationsByUserIdResponse$ { - /** @deprecated use `GetGenerationsByUserIdResponse$inboundSchema` instead. */ - export const inboundSchema = GetGenerationsByUserIdResponse$inboundSchema; - /** @deprecated use `GetGenerationsByUserIdResponse$outboundSchema` instead. */ - export const outboundSchema = GetGenerationsByUserIdResponse$outboundSchema; - /** @deprecated use `GetGenerationsByUserIdResponse$Outbound` instead. */ - export type Outbound = GetGenerationsByUserIdResponse$Outbound; + /** @deprecated use `GetGenerationsByUserIdResponse$inboundSchema` instead. */ + export const inboundSchema = GetGenerationsByUserIdResponse$inboundSchema; + /** @deprecated use `GetGenerationsByUserIdResponse$outboundSchema` instead. */ + export const outboundSchema = GetGenerationsByUserIdResponse$outboundSchema; + /** @deprecated use `GetGenerationsByUserIdResponse$Outbound` instead. */ + export type Outbound = GetGenerationsByUserIdResponse$Outbound; } diff --git a/src/sdk/models/operations/getinitimagebyid.ts b/src/sdk/models/operations/getinitimagebyid.ts index 5ea25fb..f872a6e 100644 --- a/src/sdk/models/operations/getinitimagebyid.ts +++ b/src/sdk/models/operations/getinitimagebyid.ts @@ -2,75 +2,75 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetInitImageByIdRequest = { - /** - * _"id" is required_ - */ - id: string; + /** + * _"id" is required_ + */ + id: string; }; /** * columns and relationships of "init_images" */ export type GetInitImageByIdInitImages = { - createdAt?: string | undefined; - id?: string | null | undefined; - url?: string | undefined; + createdAt?: string | undefined; + id?: string | null | undefined; + url?: string | undefined; }; /** * Responses for GET /init-image/{id} */ export type GetInitImageByIdResponseBody = { - /** - * columns and relationships of "init_images" - */ - initImagesByPk?: GetInitImageByIdInitImages | null | undefined; + /** + * columns and relationships of "init_images" + */ + initImagesByPk?: GetInitImageByIdInitImages | null | undefined; }; export type GetInitImageByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /init-image/{id} - */ - object?: GetInitImageByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /init-image/{id} + */ + object?: GetInitImageByIdResponseBody | undefined; }; /** @internal */ export const GetInitImageByIdRequest$inboundSchema: z.ZodType< - GetInitImageByIdRequest, - z.ZodTypeDef, - unknown + GetInitImageByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type GetInitImageByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetInitImageByIdRequest$outboundSchema: z.ZodType< - GetInitImageByIdRequest$Outbound, - z.ZodTypeDef, - GetInitImageByIdRequest + GetInitImageByIdRequest$Outbound, + z.ZodTypeDef, + GetInitImageByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -78,41 +78,41 @@ export const GetInitImageByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetInitImageByIdRequest$ { - /** @deprecated use `GetInitImageByIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetInitImageByIdRequest$inboundSchema; - /** @deprecated use `GetInitImageByIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetInitImageByIdRequest$outboundSchema; - /** @deprecated use `GetInitImageByIdRequest$Outbound` instead. */ - export type Outbound = GetInitImageByIdRequest$Outbound; + /** @deprecated use `GetInitImageByIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetInitImageByIdRequest$inboundSchema; + /** @deprecated use `GetInitImageByIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetInitImageByIdRequest$outboundSchema; + /** @deprecated use `GetInitImageByIdRequest$Outbound` instead. */ + export type Outbound = GetInitImageByIdRequest$Outbound; } /** @internal */ export const GetInitImageByIdInitImages$inboundSchema: z.ZodType< - GetInitImageByIdInitImages, - z.ZodTypeDef, - unknown + GetInitImageByIdInitImages, + z.ZodTypeDef, + unknown > = z.object({ - createdAt: z.string().optional(), - id: z.nullable(z.string()).optional(), - url: z.string().optional(), + createdAt: z.string().optional(), + id: z.nullable(z.string()).optional(), + url: z.string().optional(), }); /** @internal */ export type GetInitImageByIdInitImages$Outbound = { - createdAt?: string | undefined; - id?: string | null | undefined; - url?: string | undefined; + createdAt?: string | undefined; + id?: string | null | undefined; + url?: string | undefined; }; /** @internal */ export const GetInitImageByIdInitImages$outboundSchema: z.ZodType< - GetInitImageByIdInitImages$Outbound, - z.ZodTypeDef, - GetInitImageByIdInitImages + GetInitImageByIdInitImages$Outbound, + z.ZodTypeDef, + GetInitImageByIdInitImages > = z.object({ - createdAt: z.string().optional(), - id: z.nullable(z.string()).optional(), - url: z.string().optional(), + createdAt: z.string().optional(), + id: z.nullable(z.string()).optional(), + url: z.string().optional(), }); /** @@ -120,125 +120,117 @@ export const GetInitImageByIdInitImages$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetInitImageByIdInitImages$ { - /** @deprecated use `GetInitImageByIdInitImages$inboundSchema` instead. */ - export const inboundSchema = GetInitImageByIdInitImages$inboundSchema; - /** @deprecated use `GetInitImageByIdInitImages$outboundSchema` instead. */ - export const outboundSchema = GetInitImageByIdInitImages$outboundSchema; - /** @deprecated use `GetInitImageByIdInitImages$Outbound` instead. */ - export type Outbound = GetInitImageByIdInitImages$Outbound; + /** @deprecated use `GetInitImageByIdInitImages$inboundSchema` instead. */ + export const inboundSchema = GetInitImageByIdInitImages$inboundSchema; + /** @deprecated use `GetInitImageByIdInitImages$outboundSchema` instead. */ + export const outboundSchema = GetInitImageByIdInitImages$outboundSchema; + /** @deprecated use `GetInitImageByIdInitImages$Outbound` instead. */ + export type Outbound = GetInitImageByIdInitImages$Outbound; } /** @internal */ export const GetInitImageByIdResponseBody$inboundSchema: z.ZodType< - GetInitImageByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - init_images_by_pk: z - .nullable(z.lazy(() => GetInitImageByIdInitImages$inboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - init_images_by_pk: "initImagesByPk", - }); - }); + GetInitImageByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + init_images_by_pk: z.nullable( + z.lazy(() => GetInitImageByIdInitImages$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "init_images_by_pk": "initImagesByPk", + }); +}); /** @internal */ export type GetInitImageByIdResponseBody$Outbound = { - init_images_by_pk?: GetInitImageByIdInitImages$Outbound | null | undefined; + init_images_by_pk?: GetInitImageByIdInitImages$Outbound | null | undefined; }; /** @internal */ export const GetInitImageByIdResponseBody$outboundSchema: z.ZodType< - GetInitImageByIdResponseBody$Outbound, - z.ZodTypeDef, - GetInitImageByIdResponseBody -> = z - .object({ - initImagesByPk: z - .nullable(z.lazy(() => GetInitImageByIdInitImages$outboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - initImagesByPk: "init_images_by_pk", - }); - }); + GetInitImageByIdResponseBody$Outbound, + z.ZodTypeDef, + GetInitImageByIdResponseBody +> = z.object({ + initImagesByPk: z.nullable( + z.lazy(() => GetInitImageByIdInitImages$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + initImagesByPk: "init_images_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetInitImageByIdResponseBody$ { - /** @deprecated use `GetInitImageByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetInitImageByIdResponseBody$inboundSchema; - /** @deprecated use `GetInitImageByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetInitImageByIdResponseBody$outboundSchema; - /** @deprecated use `GetInitImageByIdResponseBody$Outbound` instead. */ - export type Outbound = GetInitImageByIdResponseBody$Outbound; + /** @deprecated use `GetInitImageByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetInitImageByIdResponseBody$inboundSchema; + /** @deprecated use `GetInitImageByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetInitImageByIdResponseBody$outboundSchema; + /** @deprecated use `GetInitImageByIdResponseBody$Outbound` instead. */ + export type Outbound = GetInitImageByIdResponseBody$Outbound; } /** @internal */ export const GetInitImageByIdResponse$inboundSchema: z.ZodType< - GetInitImageByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetInitImageByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetInitImageByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetInitImageByIdResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetInitImageByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetInitImageByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetInitImageByIdResponseBody$Outbound | undefined; }; /** @internal */ export const GetInitImageByIdResponse$outboundSchema: z.ZodType< - GetInitImageByIdResponse$Outbound, - z.ZodTypeDef, - GetInitImageByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetInitImageByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetInitImageByIdResponse$Outbound, + z.ZodTypeDef, + GetInitImageByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetInitImageByIdResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetInitImageByIdResponse$ { - /** @deprecated use `GetInitImageByIdResponse$inboundSchema` instead. */ - export const inboundSchema = GetInitImageByIdResponse$inboundSchema; - /** @deprecated use `GetInitImageByIdResponse$outboundSchema` instead. */ - export const outboundSchema = GetInitImageByIdResponse$outboundSchema; - /** @deprecated use `GetInitImageByIdResponse$Outbound` instead. */ - export type Outbound = GetInitImageByIdResponse$Outbound; + /** @deprecated use `GetInitImageByIdResponse$inboundSchema` instead. */ + export const inboundSchema = GetInitImageByIdResponse$inboundSchema; + /** @deprecated use `GetInitImageByIdResponse$outboundSchema` instead. */ + export const outboundSchema = GetInitImageByIdResponse$outboundSchema; + /** @deprecated use `GetInitImageByIdResponse$Outbound` instead. */ + export type Outbound = GetInitImageByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/getmodelbyid.ts b/src/sdk/models/operations/getmodelbyid.ts index 7941e65..fc0b070 100644 --- a/src/sdk/models/operations/getmodelbyid.ts +++ b/src/sdk/models/operations/getmodelbyid.ts @@ -2,94 +2,94 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; export type GetModelByIdRequest = { - /** - * The ID of the custom model to return. - */ - id: string; + /** + * The ID of the custom model to return. + */ + id: string; }; /** * columns and relationships of "custom_models" */ export type GetModelByIdCustomModels = { - createdAt?: string | undefined; - description?: string | undefined; - id?: string | null | undefined; - instancePrompt?: string | null | undefined; - modelHeight?: number | undefined; - modelWidth?: number | undefined; - name?: string | undefined; - public?: boolean | undefined; - /** - * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models - */ - sdVersion?: shared.SdVersions | undefined; - /** - * The status of the current task. - */ - status?: shared.JobStatus | undefined; - /** - * The category the most accurately reflects the model. - */ - type?: shared.CustomModelType | undefined; - updatedAt?: string | undefined; + createdAt?: string | undefined; + description?: string | undefined; + id?: string | null | undefined; + instancePrompt?: string | null | undefined; + modelHeight?: number | undefined; + modelWidth?: number | undefined; + name?: string | undefined; + public?: boolean | undefined; + /** + * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models + */ + sdVersion?: shared.SdVersions | undefined; + /** + * The status of the current task. + */ + status?: shared.JobStatus | undefined; + /** + * The category the most accurately reflects the model. + */ + type?: shared.CustomModelType | undefined; + updatedAt?: string | undefined; }; /** * Responses for GET /models/{id} */ export type GetModelByIdResponseBody = { - /** - * columns and relationships of "custom_models" - */ - customModelsByPk?: GetModelByIdCustomModels | null | undefined; + /** + * columns and relationships of "custom_models" + */ + customModelsByPk?: GetModelByIdCustomModels | null | undefined; }; export type GetModelByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /models/{id} - */ - object?: GetModelByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /models/{id} + */ + object?: GetModelByIdResponseBody | undefined; }; /** @internal */ export const GetModelByIdRequest$inboundSchema: z.ZodType< - GetModelByIdRequest, - z.ZodTypeDef, - unknown + GetModelByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type GetModelByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetModelByIdRequest$outboundSchema: z.ZodType< - GetModelByIdRequest$Outbound, - z.ZodTypeDef, - GetModelByIdRequest + GetModelByIdRequest$Outbound, + z.ZodTypeDef, + GetModelByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -97,68 +97,72 @@ export const GetModelByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetModelByIdRequest$ { - /** @deprecated use `GetModelByIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetModelByIdRequest$inboundSchema; - /** @deprecated use `GetModelByIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetModelByIdRequest$outboundSchema; - /** @deprecated use `GetModelByIdRequest$Outbound` instead. */ - export type Outbound = GetModelByIdRequest$Outbound; + /** @deprecated use `GetModelByIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetModelByIdRequest$inboundSchema; + /** @deprecated use `GetModelByIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetModelByIdRequest$outboundSchema; + /** @deprecated use `GetModelByIdRequest$Outbound` instead. */ + export type Outbound = GetModelByIdRequest$Outbound; } /** @internal */ export const GetModelByIdCustomModels$inboundSchema: z.ZodType< - GetModelByIdCustomModels, - z.ZodTypeDef, - unknown + GetModelByIdCustomModels, + z.ZodTypeDef, + unknown > = z.object({ - createdAt: z.string().optional(), - description: z.string().optional(), - id: z.nullable(z.string()).optional(), - instancePrompt: z.nullable(z.string()).optional(), - modelHeight: z.number().int().optional(), - modelWidth: z.number().int().optional(), - name: z.string().optional(), - public: z.boolean().optional(), - sdVersion: shared.SdVersions$inboundSchema.optional(), - status: shared.JobStatus$inboundSchema.optional(), - type: shared.CustomModelType$inboundSchema.default(shared.CustomModelType.General), - updatedAt: z.string().optional(), + createdAt: z.string().optional(), + description: z.string().optional(), + id: z.nullable(z.string()).optional(), + instancePrompt: z.nullable(z.string()).optional(), + modelHeight: z.number().int().optional(), + modelWidth: z.number().int().optional(), + name: z.string().optional(), + public: z.boolean().optional(), + sdVersion: shared.SdVersions$inboundSchema.optional(), + status: shared.JobStatus$inboundSchema.optional(), + type: shared.CustomModelType$inboundSchema.default( + shared.CustomModelType.General, + ), + updatedAt: z.string().optional(), }); /** @internal */ export type GetModelByIdCustomModels$Outbound = { - createdAt?: string | undefined; - description?: string | undefined; - id?: string | null | undefined; - instancePrompt?: string | null | undefined; - modelHeight?: number | undefined; - modelWidth?: number | undefined; - name?: string | undefined; - public?: boolean | undefined; - sdVersion?: string | undefined; - status?: string | undefined; - type: string; - updatedAt?: string | undefined; + createdAt?: string | undefined; + description?: string | undefined; + id?: string | null | undefined; + instancePrompt?: string | null | undefined; + modelHeight?: number | undefined; + modelWidth?: number | undefined; + name?: string | undefined; + public?: boolean | undefined; + sdVersion?: string | undefined; + status?: string | undefined; + type: string; + updatedAt?: string | undefined; }; /** @internal */ export const GetModelByIdCustomModels$outboundSchema: z.ZodType< - GetModelByIdCustomModels$Outbound, - z.ZodTypeDef, - GetModelByIdCustomModels + GetModelByIdCustomModels$Outbound, + z.ZodTypeDef, + GetModelByIdCustomModels > = z.object({ - createdAt: z.string().optional(), - description: z.string().optional(), - id: z.nullable(z.string()).optional(), - instancePrompt: z.nullable(z.string()).optional(), - modelHeight: z.number().int().optional(), - modelWidth: z.number().int().optional(), - name: z.string().optional(), - public: z.boolean().optional(), - sdVersion: shared.SdVersions$outboundSchema.optional(), - status: shared.JobStatus$outboundSchema.optional(), - type: shared.CustomModelType$outboundSchema.default(shared.CustomModelType.General), - updatedAt: z.string().optional(), + createdAt: z.string().optional(), + description: z.string().optional(), + id: z.nullable(z.string()).optional(), + instancePrompt: z.nullable(z.string()).optional(), + modelHeight: z.number().int().optional(), + modelWidth: z.number().int().optional(), + name: z.string().optional(), + public: z.boolean().optional(), + sdVersion: shared.SdVersions$outboundSchema.optional(), + status: shared.JobStatus$outboundSchema.optional(), + type: shared.CustomModelType$outboundSchema.default( + shared.CustomModelType.General, + ), + updatedAt: z.string().optional(), }); /** @@ -166,125 +170,117 @@ export const GetModelByIdCustomModels$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetModelByIdCustomModels$ { - /** @deprecated use `GetModelByIdCustomModels$inboundSchema` instead. */ - export const inboundSchema = GetModelByIdCustomModels$inboundSchema; - /** @deprecated use `GetModelByIdCustomModels$outboundSchema` instead. */ - export const outboundSchema = GetModelByIdCustomModels$outboundSchema; - /** @deprecated use `GetModelByIdCustomModels$Outbound` instead. */ - export type Outbound = GetModelByIdCustomModels$Outbound; + /** @deprecated use `GetModelByIdCustomModels$inboundSchema` instead. */ + export const inboundSchema = GetModelByIdCustomModels$inboundSchema; + /** @deprecated use `GetModelByIdCustomModels$outboundSchema` instead. */ + export const outboundSchema = GetModelByIdCustomModels$outboundSchema; + /** @deprecated use `GetModelByIdCustomModels$Outbound` instead. */ + export type Outbound = GetModelByIdCustomModels$Outbound; } /** @internal */ export const GetModelByIdResponseBody$inboundSchema: z.ZodType< - GetModelByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - custom_models_by_pk: z - .nullable(z.lazy(() => GetModelByIdCustomModels$inboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - custom_models_by_pk: "customModelsByPk", - }); - }); + GetModelByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + custom_models_by_pk: z.nullable( + z.lazy(() => GetModelByIdCustomModels$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "custom_models_by_pk": "customModelsByPk", + }); +}); /** @internal */ export type GetModelByIdResponseBody$Outbound = { - custom_models_by_pk?: GetModelByIdCustomModels$Outbound | null | undefined; + custom_models_by_pk?: GetModelByIdCustomModels$Outbound | null | undefined; }; /** @internal */ export const GetModelByIdResponseBody$outboundSchema: z.ZodType< - GetModelByIdResponseBody$Outbound, - z.ZodTypeDef, - GetModelByIdResponseBody -> = z - .object({ - customModelsByPk: z - .nullable(z.lazy(() => GetModelByIdCustomModels$outboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - customModelsByPk: "custom_models_by_pk", - }); - }); + GetModelByIdResponseBody$Outbound, + z.ZodTypeDef, + GetModelByIdResponseBody +> = z.object({ + customModelsByPk: z.nullable( + z.lazy(() => GetModelByIdCustomModels$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + customModelsByPk: "custom_models_by_pk", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetModelByIdResponseBody$ { - /** @deprecated use `GetModelByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetModelByIdResponseBody$inboundSchema; - /** @deprecated use `GetModelByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetModelByIdResponseBody$outboundSchema; - /** @deprecated use `GetModelByIdResponseBody$Outbound` instead. */ - export type Outbound = GetModelByIdResponseBody$Outbound; + /** @deprecated use `GetModelByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetModelByIdResponseBody$inboundSchema; + /** @deprecated use `GetModelByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetModelByIdResponseBody$outboundSchema; + /** @deprecated use `GetModelByIdResponseBody$Outbound` instead. */ + export type Outbound = GetModelByIdResponseBody$Outbound; } /** @internal */ export const GetModelByIdResponse$inboundSchema: z.ZodType< - GetModelByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetModelByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetModelByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetModelByIdResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetModelByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetModelByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetModelByIdResponseBody$Outbound | undefined; }; /** @internal */ export const GetModelByIdResponse$outboundSchema: z.ZodType< - GetModelByIdResponse$Outbound, - z.ZodTypeDef, - GetModelByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetModelByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetModelByIdResponse$Outbound, + z.ZodTypeDef, + GetModelByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetModelByIdResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetModelByIdResponse$ { - /** @deprecated use `GetModelByIdResponse$inboundSchema` instead. */ - export const inboundSchema = GetModelByIdResponse$inboundSchema; - /** @deprecated use `GetModelByIdResponse$outboundSchema` instead. */ - export const outboundSchema = GetModelByIdResponse$outboundSchema; - /** @deprecated use `GetModelByIdResponse$Outbound` instead. */ - export type Outbound = GetModelByIdResponse$Outbound; + /** @deprecated use `GetModelByIdResponse$inboundSchema` instead. */ + export const inboundSchema = GetModelByIdResponse$inboundSchema; + /** @deprecated use `GetModelByIdResponse$outboundSchema` instead. */ + export const outboundSchema = GetModelByIdResponse$outboundSchema; + /** @deprecated use `GetModelByIdResponse$Outbound` instead. */ + export type Outbound = GetModelByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/getuserself.ts b/src/sdk/models/operations/getuserself.ts index c31dc92..9159d28 100644 --- a/src/sdk/models/operations/getuserself.ts +++ b/src/sdk/models/operations/getuserself.ts @@ -2,108 +2,113 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * columns and relationships of "users" */ export type Users = { - id?: string | null | undefined; - /** - * Username of the user. - */ - username?: string | null | undefined; + id?: string | null | undefined; + /** + * Username of the user. + */ + username?: string | null | undefined; }; /** * columns and relationships of "user_details" */ export type UserDetails = { - /** - * API Concurrency Slots. - */ - apiConcurrencySlots?: number | undefined; - /** - * Current balance of API paid tokens the user has. - */ - apiPaidTokens?: number | null | undefined; - /** - * API Plan Token Renewal Date. - */ - apiPlanTokenRenewalDate?: string | null | undefined; - /** - * Current balance of Enterprise API subscriptions tokens the user has. - */ - apiSubscriptionTokens?: number | undefined; - /** - * Current balance of paid tokens the user has. - */ - paidTokens?: number | null | undefined; - /** - * Current balance of user plan GPT tokens the user has. - */ - subscriptionGptTokens?: number | undefined; - /** - * Current balance of model training tokens the user has. - */ - subscriptionModelTokens?: number | undefined; - /** - * Current balance of user plan subscription tokens the user has. - */ - subscriptionTokens?: number | undefined; - /** - * User Plan Token Renewal Date. - */ - tokenRenewalDate?: string | null | undefined; - /** - * columns and relationships of "users" - */ - user?: Users | null | undefined; + /** + * API Concurrency Slots. + */ + apiConcurrencySlots?: number | undefined; + /** + * Current balance of API paid tokens the user has. + */ + apiPaidTokens?: number | null | undefined; + /** + * API Plan Token Renewal Date. + */ + apiPlanTokenRenewalDate?: string | null | undefined; + /** + * Current balance of Enterprise API subscriptions tokens the user has. + */ + apiSubscriptionTokens?: number | undefined; + /** + * Current balance of paid tokens the user has. + */ + paidTokens?: number | null | undefined; + /** + * Current balance of user plan GPT tokens the user has. + */ + subscriptionGptTokens?: number | undefined; + /** + * Current balance of model training tokens the user has. + */ + subscriptionModelTokens?: number | undefined; + /** + * Current balance of user plan subscription tokens the user has. + */ + subscriptionTokens?: number | undefined; + /** + * User Plan Token Renewal Date. + */ + tokenRenewalDate?: string | null | undefined; + /** + * columns and relationships of "users" + */ + user?: Users | null | undefined; }; /** * Responses for GET /me */ export type GetUserSelfResponseBody = { - userDetails?: Array | undefined; + userDetails?: Array | undefined; }; export type GetUserSelfResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /me - */ - object?: GetUserSelfResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /me + */ + object?: GetUserSelfResponseBody | undefined; }; /** @internal */ -export const Users$inboundSchema: z.ZodType = z.object({ +export const Users$inboundSchema: z.ZodType = z + .object({ id: z.nullable(z.string()).optional(), username: z.nullable(z.string()).optional(), -}); + }); /** @internal */ export type Users$Outbound = { - id?: string | null | undefined; - username?: string | null | undefined; + id?: string | null | undefined; + username?: string | null | undefined; }; /** @internal */ -export const Users$outboundSchema: z.ZodType = z.object({ - id: z.nullable(z.string()).optional(), - username: z.nullable(z.string()).optional(), +export const Users$outboundSchema: z.ZodType< + Users$Outbound, + z.ZodTypeDef, + Users +> = z.object({ + id: z.nullable(z.string()).optional(), + username: z.nullable(z.string()).optional(), }); /** @@ -111,58 +116,62 @@ export const Users$outboundSchema: z.ZodType = z.object({ - apiConcurrencySlots: z.number().int().optional(), - apiPaidTokens: z.nullable(z.number().int()).optional(), - apiPlanTokenRenewalDate: z.nullable(z.string()).optional(), - apiSubscriptionTokens: z.number().int().optional(), - paidTokens: z.nullable(z.number().int()).optional(), - subscriptionGptTokens: z.number().int().optional(), - subscriptionModelTokens: z.number().int().optional(), - subscriptionTokens: z.number().int().optional(), - tokenRenewalDate: z.nullable(z.string()).optional(), - user: z.nullable(z.lazy(() => Users$inboundSchema)).optional(), +export const UserDetails$inboundSchema: z.ZodType< + UserDetails, + z.ZodTypeDef, + unknown +> = z.object({ + apiConcurrencySlots: z.number().int().optional(), + apiPaidTokens: z.nullable(z.number().int()).optional(), + apiPlanTokenRenewalDate: z.nullable(z.string()).optional(), + apiSubscriptionTokens: z.number().int().optional(), + paidTokens: z.nullable(z.number().int()).optional(), + subscriptionGptTokens: z.number().int().optional(), + subscriptionModelTokens: z.number().int().optional(), + subscriptionTokens: z.number().int().optional(), + tokenRenewalDate: z.nullable(z.string()).optional(), + user: z.nullable(z.lazy(() => Users$inboundSchema)).optional(), }); /** @internal */ export type UserDetails$Outbound = { - apiConcurrencySlots?: number | undefined; - apiPaidTokens?: number | null | undefined; - apiPlanTokenRenewalDate?: string | null | undefined; - apiSubscriptionTokens?: number | undefined; - paidTokens?: number | null | undefined; - subscriptionGptTokens?: number | undefined; - subscriptionModelTokens?: number | undefined; - subscriptionTokens?: number | undefined; - tokenRenewalDate?: string | null | undefined; - user?: Users$Outbound | null | undefined; + apiConcurrencySlots?: number | undefined; + apiPaidTokens?: number | null | undefined; + apiPlanTokenRenewalDate?: string | null | undefined; + apiSubscriptionTokens?: number | undefined; + paidTokens?: number | null | undefined; + subscriptionGptTokens?: number | undefined; + subscriptionModelTokens?: number | undefined; + subscriptionTokens?: number | undefined; + tokenRenewalDate?: string | null | undefined; + user?: Users$Outbound | null | undefined; }; /** @internal */ export const UserDetails$outboundSchema: z.ZodType< - UserDetails$Outbound, - z.ZodTypeDef, - UserDetails + UserDetails$Outbound, + z.ZodTypeDef, + UserDetails > = z.object({ - apiConcurrencySlots: z.number().int().optional(), - apiPaidTokens: z.nullable(z.number().int()).optional(), - apiPlanTokenRenewalDate: z.nullable(z.string()).optional(), - apiSubscriptionTokens: z.number().int().optional(), - paidTokens: z.nullable(z.number().int()).optional(), - subscriptionGptTokens: z.number().int().optional(), - subscriptionModelTokens: z.number().int().optional(), - subscriptionTokens: z.number().int().optional(), - tokenRenewalDate: z.nullable(z.string()).optional(), - user: z.nullable(z.lazy(() => Users$outboundSchema)).optional(), + apiConcurrencySlots: z.number().int().optional(), + apiPaidTokens: z.nullable(z.number().int()).optional(), + apiPlanTokenRenewalDate: z.nullable(z.string()).optional(), + apiSubscriptionTokens: z.number().int().optional(), + paidTokens: z.nullable(z.number().int()).optional(), + subscriptionGptTokens: z.number().int().optional(), + subscriptionModelTokens: z.number().int().optional(), + subscriptionTokens: z.number().int().optional(), + tokenRenewalDate: z.nullable(z.string()).optional(), + user: z.nullable(z.lazy(() => Users$outboundSchema)).optional(), }); /** @@ -170,121 +179,113 @@ export const UserDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserDetails$ { - /** @deprecated use `UserDetails$inboundSchema` instead. */ - export const inboundSchema = UserDetails$inboundSchema; - /** @deprecated use `UserDetails$outboundSchema` instead. */ - export const outboundSchema = UserDetails$outboundSchema; - /** @deprecated use `UserDetails$Outbound` instead. */ - export type Outbound = UserDetails$Outbound; + /** @deprecated use `UserDetails$inboundSchema` instead. */ + export const inboundSchema = UserDetails$inboundSchema; + /** @deprecated use `UserDetails$outboundSchema` instead. */ + export const outboundSchema = UserDetails$outboundSchema; + /** @deprecated use `UserDetails$Outbound` instead. */ + export type Outbound = UserDetails$Outbound; } /** @internal */ export const GetUserSelfResponseBody$inboundSchema: z.ZodType< - GetUserSelfResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - user_details: z.array(z.lazy(() => UserDetails$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - user_details: "userDetails", - }); - }); + GetUserSelfResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + user_details: z.array(z.lazy(() => UserDetails$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "user_details": "userDetails", + }); +}); /** @internal */ export type GetUserSelfResponseBody$Outbound = { - user_details?: Array | undefined; + user_details?: Array | undefined; }; /** @internal */ export const GetUserSelfResponseBody$outboundSchema: z.ZodType< - GetUserSelfResponseBody$Outbound, - z.ZodTypeDef, - GetUserSelfResponseBody -> = z - .object({ - userDetails: z.array(z.lazy(() => UserDetails$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - userDetails: "user_details", - }); - }); + GetUserSelfResponseBody$Outbound, + z.ZodTypeDef, + GetUserSelfResponseBody +> = z.object({ + userDetails: z.array(z.lazy(() => UserDetails$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + userDetails: "user_details", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSelfResponseBody$ { - /** @deprecated use `GetUserSelfResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserSelfResponseBody$inboundSchema; - /** @deprecated use `GetUserSelfResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserSelfResponseBody$outboundSchema; - /** @deprecated use `GetUserSelfResponseBody$Outbound` instead. */ - export type Outbound = GetUserSelfResponseBody$Outbound; + /** @deprecated use `GetUserSelfResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetUserSelfResponseBody$inboundSchema; + /** @deprecated use `GetUserSelfResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetUserSelfResponseBody$outboundSchema; + /** @deprecated use `GetUserSelfResponseBody$Outbound` instead. */ + export type Outbound = GetUserSelfResponseBody$Outbound; } /** @internal */ export const GetUserSelfResponse$inboundSchema: z.ZodType< - GetUserSelfResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetUserSelfResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetUserSelfResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetUserSelfResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetUserSelfResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetUserSelfResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetUserSelfResponseBody$Outbound | undefined; }; /** @internal */ export const GetUserSelfResponse$outboundSchema: z.ZodType< - GetUserSelfResponse$Outbound, - z.ZodTypeDef, - GetUserSelfResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetUserSelfResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetUserSelfResponse$Outbound, + z.ZodTypeDef, + GetUserSelfResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetUserSelfResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSelfResponse$ { - /** @deprecated use `GetUserSelfResponse$inboundSchema` instead. */ - export const inboundSchema = GetUserSelfResponse$inboundSchema; - /** @deprecated use `GetUserSelfResponse$outboundSchema` instead. */ - export const outboundSchema = GetUserSelfResponse$outboundSchema; - /** @deprecated use `GetUserSelfResponse$Outbound` instead. */ - export type Outbound = GetUserSelfResponse$Outbound; + /** @deprecated use `GetUserSelfResponse$inboundSchema` instead. */ + export const inboundSchema = GetUserSelfResponse$inboundSchema; + /** @deprecated use `GetUserSelfResponse$outboundSchema` instead. */ + export const outboundSchema = GetUserSelfResponse$outboundSchema; + /** @deprecated use `GetUserSelfResponse$Outbound` instead. */ + export type Outbound = GetUserSelfResponse$Outbound; } diff --git a/src/sdk/models/operations/getvariationbyid.ts b/src/sdk/models/operations/getvariationbyid.ts index 25bd62a..84088f9 100644 --- a/src/sdk/models/operations/getvariationbyid.ts +++ b/src/sdk/models/operations/getvariationbyid.ts @@ -2,81 +2,83 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; export type GetVariationByIdRequest = { - /** - * "id" is required - */ - id: string; + /** + * "id" is required + */ + id: string; }; /** * columns and relationships of "generated_image_variation_generic" */ export type GeneratedImageVariationGeneric = { - createdAt?: string | undefined; - id?: string | null | undefined; - /** - * The status of the current task. - */ - status?: shared.JobStatus | undefined; - /** - * The type of variation. - */ - transformType?: shared.VariationType | undefined; - url?: string | null | undefined; + createdAt?: string | undefined; + id?: string | null | undefined; + /** + * The status of the current task. + */ + status?: shared.JobStatus | undefined; + /** + * The type of variation. + */ + transformType?: shared.VariationType | undefined; + url?: string | null | undefined; }; /** * Responses for GET /variations/{id} */ export type GetVariationByIdResponseBody = { - generatedImageVariationGeneric?: Array | undefined; + generatedImageVariationGeneric?: + | Array + | undefined; }; export type GetVariationByIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /variations/{id} - */ - object?: GetVariationByIdResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /variations/{id} + */ + object?: GetVariationByIdResponseBody | undefined; }; /** @internal */ export const GetVariationByIdRequest$inboundSchema: z.ZodType< - GetVariationByIdRequest, - z.ZodTypeDef, - unknown + GetVariationByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type GetVariationByIdRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetVariationByIdRequest$outboundSchema: z.ZodType< - GetVariationByIdRequest$Outbound, - z.ZodTypeDef, - GetVariationByIdRequest + GetVariationByIdRequest$Outbound, + z.ZodTypeDef, + GetVariationByIdRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -84,47 +86,47 @@ export const GetVariationByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetVariationByIdRequest$ { - /** @deprecated use `GetVariationByIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetVariationByIdRequest$inboundSchema; - /** @deprecated use `GetVariationByIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetVariationByIdRequest$outboundSchema; - /** @deprecated use `GetVariationByIdRequest$Outbound` instead. */ - export type Outbound = GetVariationByIdRequest$Outbound; + /** @deprecated use `GetVariationByIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetVariationByIdRequest$inboundSchema; + /** @deprecated use `GetVariationByIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetVariationByIdRequest$outboundSchema; + /** @deprecated use `GetVariationByIdRequest$Outbound` instead. */ + export type Outbound = GetVariationByIdRequest$Outbound; } /** @internal */ export const GeneratedImageVariationGeneric$inboundSchema: z.ZodType< - GeneratedImageVariationGeneric, - z.ZodTypeDef, - unknown + GeneratedImageVariationGeneric, + z.ZodTypeDef, + unknown > = z.object({ - createdAt: z.string().optional(), - id: z.nullable(z.string()).optional(), - status: shared.JobStatus$inboundSchema.optional(), - transformType: shared.VariationType$inboundSchema.optional(), - url: z.nullable(z.string()).optional(), + createdAt: z.string().optional(), + id: z.nullable(z.string()).optional(), + status: shared.JobStatus$inboundSchema.optional(), + transformType: shared.VariationType$inboundSchema.optional(), + url: z.nullable(z.string()).optional(), }); /** @internal */ export type GeneratedImageVariationGeneric$Outbound = { - createdAt?: string | undefined; - id?: string | null | undefined; - status?: string | undefined; - transformType?: string | undefined; - url?: string | null | undefined; + createdAt?: string | undefined; + id?: string | null | undefined; + status?: string | undefined; + transformType?: string | undefined; + url?: string | null | undefined; }; /** @internal */ export const GeneratedImageVariationGeneric$outboundSchema: z.ZodType< - GeneratedImageVariationGeneric$Outbound, - z.ZodTypeDef, - GeneratedImageVariationGeneric + GeneratedImageVariationGeneric$Outbound, + z.ZodTypeDef, + GeneratedImageVariationGeneric > = z.object({ - createdAt: z.string().optional(), - id: z.nullable(z.string()).optional(), - status: shared.JobStatus$outboundSchema.optional(), - transformType: shared.VariationType$outboundSchema.optional(), - url: z.nullable(z.string()).optional(), + createdAt: z.string().optional(), + id: z.nullable(z.string()).optional(), + status: shared.JobStatus$outboundSchema.optional(), + transformType: shared.VariationType$outboundSchema.optional(), + url: z.nullable(z.string()).optional(), }); /** @@ -132,125 +134,119 @@ export const GeneratedImageVariationGeneric$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GeneratedImageVariationGeneric$ { - /** @deprecated use `GeneratedImageVariationGeneric$inboundSchema` instead. */ - export const inboundSchema = GeneratedImageVariationGeneric$inboundSchema; - /** @deprecated use `GeneratedImageVariationGeneric$outboundSchema` instead. */ - export const outboundSchema = GeneratedImageVariationGeneric$outboundSchema; - /** @deprecated use `GeneratedImageVariationGeneric$Outbound` instead. */ - export type Outbound = GeneratedImageVariationGeneric$Outbound; + /** @deprecated use `GeneratedImageVariationGeneric$inboundSchema` instead. */ + export const inboundSchema = GeneratedImageVariationGeneric$inboundSchema; + /** @deprecated use `GeneratedImageVariationGeneric$outboundSchema` instead. */ + export const outboundSchema = GeneratedImageVariationGeneric$outboundSchema; + /** @deprecated use `GeneratedImageVariationGeneric$Outbound` instead. */ + export type Outbound = GeneratedImageVariationGeneric$Outbound; } /** @internal */ export const GetVariationByIdResponseBody$inboundSchema: z.ZodType< - GetVariationByIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - generated_image_variation_generic: z - .array(z.lazy(() => GeneratedImageVariationGeneric$inboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - generated_image_variation_generic: "generatedImageVariationGeneric", - }); - }); + GetVariationByIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + generated_image_variation_generic: z.array( + z.lazy(() => GeneratedImageVariationGeneric$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "generated_image_variation_generic": "generatedImageVariationGeneric", + }); +}); /** @internal */ export type GetVariationByIdResponseBody$Outbound = { - generated_image_variation_generic?: Array | undefined; + generated_image_variation_generic?: + | Array + | undefined; }; /** @internal */ export const GetVariationByIdResponseBody$outboundSchema: z.ZodType< - GetVariationByIdResponseBody$Outbound, - z.ZodTypeDef, - GetVariationByIdResponseBody -> = z - .object({ - generatedImageVariationGeneric: z - .array(z.lazy(() => GeneratedImageVariationGeneric$outboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - generatedImageVariationGeneric: "generated_image_variation_generic", - }); - }); + GetVariationByIdResponseBody$Outbound, + z.ZodTypeDef, + GetVariationByIdResponseBody +> = z.object({ + generatedImageVariationGeneric: z.array( + z.lazy(() => GeneratedImageVariationGeneric$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + generatedImageVariationGeneric: "generated_image_variation_generic", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetVariationByIdResponseBody$ { - /** @deprecated use `GetVariationByIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetVariationByIdResponseBody$inboundSchema; - /** @deprecated use `GetVariationByIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetVariationByIdResponseBody$outboundSchema; - /** @deprecated use `GetVariationByIdResponseBody$Outbound` instead. */ - export type Outbound = GetVariationByIdResponseBody$Outbound; + /** @deprecated use `GetVariationByIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetVariationByIdResponseBody$inboundSchema; + /** @deprecated use `GetVariationByIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetVariationByIdResponseBody$outboundSchema; + /** @deprecated use `GetVariationByIdResponseBody$Outbound` instead. */ + export type Outbound = GetVariationByIdResponseBody$Outbound; } /** @internal */ export const GetVariationByIdResponse$inboundSchema: z.ZodType< - GetVariationByIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetVariationByIdResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetVariationByIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetVariationByIdResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetVariationByIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetVariationByIdResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetVariationByIdResponseBody$Outbound | undefined; }; /** @internal */ export const GetVariationByIdResponse$outboundSchema: z.ZodType< - GetVariationByIdResponse$Outbound, - z.ZodTypeDef, - GetVariationByIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetVariationByIdResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetVariationByIdResponse$Outbound, + z.ZodTypeDef, + GetVariationByIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetVariationByIdResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetVariationByIdResponse$ { - /** @deprecated use `GetVariationByIdResponse$inboundSchema` instead. */ - export const inboundSchema = GetVariationByIdResponse$inboundSchema; - /** @deprecated use `GetVariationByIdResponse$outboundSchema` instead. */ - export const outboundSchema = GetVariationByIdResponse$outboundSchema; - /** @deprecated use `GetVariationByIdResponse$Outbound` instead. */ - export type Outbound = GetVariationByIdResponse$Outbound; + /** @deprecated use `GetVariationByIdResponse$inboundSchema` instead. */ + export const inboundSchema = GetVariationByIdResponse$inboundSchema; + /** @deprecated use `GetVariationByIdResponse$outboundSchema` instead. */ + export const outboundSchema = GetVariationByIdResponse$outboundSchema; + /** @deprecated use `GetVariationByIdResponse$Outbound` instead. */ + export type Outbound = GetVariationByIdResponse$Outbound; } diff --git a/src/sdk/models/operations/listelements.ts b/src/sdk/models/operations/listelements.ts index 5483841..f634fb6 100644 --- a/src/sdk/models/operations/listelements.ts +++ b/src/sdk/models/operations/listelements.ts @@ -2,80 +2,81 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * columns and relationships of "elements" */ export type Loras = { - /** - * Unique identifier for the element. Elements can be found from the List Elements endpoint. - */ - akUUID?: string | null | undefined; - /** - * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models - */ - baseModel?: shared.SdVersions | undefined; - /** - * Name of the creator of the element - */ - creatorName?: string | null | undefined; - /** - * Description for the element - */ - description?: string | null | undefined; - /** - * Name of the element - */ - name?: string | null | undefined; - /** - * URL of the element image - */ - urlImage?: string | null | undefined; - /** - * Default weight for the element - */ - weightDefault?: number | null | undefined; - /** - * Maximum weight for the element - */ - weightMax?: number | null | undefined; - /** - * Minimum weight for the element - */ - weightMin?: number | null | undefined; + /** + * Unique identifier for the element. Elements can be found from the List Elements endpoint. + */ + akUUID?: string | null | undefined; + /** + * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models + */ + baseModel?: shared.SdVersions | undefined; + /** + * Name of the creator of the element + */ + creatorName?: string | null | undefined; + /** + * Description for the element + */ + description?: string | null | undefined; + /** + * Name of the element + */ + name?: string | null | undefined; + /** + * URL of the element image + */ + urlImage?: string | null | undefined; + /** + * Default weight for the element + */ + weightDefault?: number | null | undefined; + /** + * Maximum weight for the element + */ + weightMax?: number | null | undefined; + /** + * Minimum weight for the element + */ + weightMin?: number | null | undefined; }; /** * Responses for GET /api/rest/v1/elements */ export type ListElementsResponseBody = { - loras?: Array | undefined; + loras?: Array | undefined; }; export type ListElementsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /api/rest/v1/elements - */ - object?: ListElementsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /api/rest/v1/elements + */ + object?: ListElementsResponseBody | undefined; }; /** @internal */ -export const Loras$inboundSchema: z.ZodType = z.object({ +export const Loras$inboundSchema: z.ZodType = z + .object({ akUUID: z.nullable(z.string()).optional(), baseModel: shared.SdVersions$inboundSchema.optional(), creatorName: z.nullable(z.string()).optional(), @@ -85,32 +86,36 @@ export const Loras$inboundSchema: z.ZodType = z.ob weightDefault: z.nullable(z.number().int()).optional(), weightMax: z.nullable(z.number().int()).optional(), weightMin: z.nullable(z.number().int()).optional(), -}); + }); /** @internal */ export type Loras$Outbound = { - akUUID?: string | null | undefined; - baseModel?: string | undefined; - creatorName?: string | null | undefined; - description?: string | null | undefined; - name?: string | null | undefined; - urlImage?: string | null | undefined; - weightDefault?: number | null | undefined; - weightMax?: number | null | undefined; - weightMin?: number | null | undefined; + akUUID?: string | null | undefined; + baseModel?: string | undefined; + creatorName?: string | null | undefined; + description?: string | null | undefined; + name?: string | null | undefined; + urlImage?: string | null | undefined; + weightDefault?: number | null | undefined; + weightMax?: number | null | undefined; + weightMin?: number | null | undefined; }; /** @internal */ -export const Loras$outboundSchema: z.ZodType = z.object({ - akUUID: z.nullable(z.string()).optional(), - baseModel: shared.SdVersions$outboundSchema.optional(), - creatorName: z.nullable(z.string()).optional(), - description: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - urlImage: z.nullable(z.string()).optional(), - weightDefault: z.nullable(z.number().int()).optional(), - weightMax: z.nullable(z.number().int()).optional(), - weightMin: z.nullable(z.number().int()).optional(), +export const Loras$outboundSchema: z.ZodType< + Loras$Outbound, + z.ZodTypeDef, + Loras +> = z.object({ + akUUID: z.nullable(z.string()).optional(), + baseModel: shared.SdVersions$outboundSchema.optional(), + creatorName: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + urlImage: z.nullable(z.string()).optional(), + weightDefault: z.nullable(z.number().int()).optional(), + weightMax: z.nullable(z.number().int()).optional(), + weightMin: z.nullable(z.number().int()).optional(), }); /** @@ -118,35 +123,35 @@ export const Loras$outboundSchema: z.ZodType = z.object({ - loras: z.array(z.lazy(() => Loras$inboundSchema)).optional(), + loras: z.array(z.lazy(() => Loras$inboundSchema)).optional(), }); /** @internal */ export type ListElementsResponseBody$Outbound = { - loras?: Array | undefined; + loras?: Array | undefined; }; /** @internal */ export const ListElementsResponseBody$outboundSchema: z.ZodType< - ListElementsResponseBody$Outbound, - z.ZodTypeDef, - ListElementsResponseBody + ListElementsResponseBody$Outbound, + z.ZodTypeDef, + ListElementsResponseBody > = z.object({ - loras: z.array(z.lazy(() => Loras$outboundSchema)).optional(), + loras: z.array(z.lazy(() => Loras$outboundSchema)).optional(), }); /** @@ -154,73 +159,69 @@ export const ListElementsResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListElementsResponseBody$ { - /** @deprecated use `ListElementsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListElementsResponseBody$inboundSchema; - /** @deprecated use `ListElementsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListElementsResponseBody$outboundSchema; - /** @deprecated use `ListElementsResponseBody$Outbound` instead. */ - export type Outbound = ListElementsResponseBody$Outbound; + /** @deprecated use `ListElementsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListElementsResponseBody$inboundSchema; + /** @deprecated use `ListElementsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListElementsResponseBody$outboundSchema; + /** @deprecated use `ListElementsResponseBody$Outbound` instead. */ + export type Outbound = ListElementsResponseBody$Outbound; } /** @internal */ export const ListElementsResponse$inboundSchema: z.ZodType< - ListElementsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => ListElementsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + ListElementsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => ListElementsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type ListElementsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: ListElementsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: ListElementsResponseBody$Outbound | undefined; }; /** @internal */ export const ListElementsResponse$outboundSchema: z.ZodType< - ListElementsResponse$Outbound, - z.ZodTypeDef, - ListElementsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => ListElementsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + ListElementsResponse$Outbound, + z.ZodTypeDef, + ListElementsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => ListElementsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListElementsResponse$ { - /** @deprecated use `ListElementsResponse$inboundSchema` instead. */ - export const inboundSchema = ListElementsResponse$inboundSchema; - /** @deprecated use `ListElementsResponse$outboundSchema` instead. */ - export const outboundSchema = ListElementsResponse$outboundSchema; - /** @deprecated use `ListElementsResponse$Outbound` instead. */ - export type Outbound = ListElementsResponse$Outbound; + /** @deprecated use `ListElementsResponse$inboundSchema` instead. */ + export const inboundSchema = ListElementsResponse$inboundSchema; + /** @deprecated use `ListElementsResponse$outboundSchema` instead. */ + export const outboundSchema = ListElementsResponse$outboundSchema; + /** @deprecated use `ListElementsResponse$Outbound` instead. */ + export type Outbound = ListElementsResponse$Outbound; } diff --git a/src/sdk/models/operations/listplatformmodels.ts b/src/sdk/models/operations/listplatformmodels.ts index 00850bd..6e826c6 100644 --- a/src/sdk/models/operations/listplatformmodels.ts +++ b/src/sdk/models/operations/listplatformmodels.ts @@ -2,82 +2,82 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * columns and relationships of "generated_images" */ export type ListPlatformModelsGeneratedImages = { - id?: string | null | undefined; - url?: string | undefined; + id?: string | null | undefined; + url?: string | undefined; }; /** * columns and relationships of "custom_models" */ export type ListPlatformModelsCustomModels = { - description?: string | undefined; - featured?: boolean | undefined; - /** - * columns and relationships of "generated_images" - */ - generatedImage?: ListPlatformModelsGeneratedImages | null | undefined; - id?: string | null | undefined; - name?: string | undefined; - nsfw?: boolean | undefined; + description?: string | undefined; + featured?: boolean | undefined; + /** + * columns and relationships of "generated_images" + */ + generatedImage?: ListPlatformModelsGeneratedImages | null | undefined; + id?: string | null | undefined; + name?: string | undefined; + nsfw?: boolean | undefined; }; /** * Responses for GET /api/rest/v1/platformModels */ export type ListPlatformModelsResponseBody = { - customModels?: Array | undefined; + customModels?: Array | undefined; }; export type ListPlatformModelsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for GET /api/rest/v1/platformModels - */ - object?: ListPlatformModelsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for GET /api/rest/v1/platformModels + */ + object?: ListPlatformModelsResponseBody | undefined; }; /** @internal */ export const ListPlatformModelsGeneratedImages$inboundSchema: z.ZodType< - ListPlatformModelsGeneratedImages, - z.ZodTypeDef, - unknown + ListPlatformModelsGeneratedImages, + z.ZodTypeDef, + unknown > = z.object({ - id: z.nullable(z.string()).optional(), - url: z.string().optional(), + id: z.nullable(z.string()).optional(), + url: z.string().optional(), }); /** @internal */ export type ListPlatformModelsGeneratedImages$Outbound = { - id?: string | null | undefined; - url?: string | undefined; + id?: string | null | undefined; + url?: string | undefined; }; /** @internal */ export const ListPlatformModelsGeneratedImages$outboundSchema: z.ZodType< - ListPlatformModelsGeneratedImages$Outbound, - z.ZodTypeDef, - ListPlatformModelsGeneratedImages + ListPlatformModelsGeneratedImages$Outbound, + z.ZodTypeDef, + ListPlatformModelsGeneratedImages > = z.object({ - id: z.nullable(z.string()).optional(), - url: z.string().optional(), + id: z.nullable(z.string()).optional(), + url: z.string().optional(), }); /** @@ -85,192 +85,185 @@ export const ListPlatformModelsGeneratedImages$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPlatformModelsGeneratedImages$ { - /** @deprecated use `ListPlatformModelsGeneratedImages$inboundSchema` instead. */ - export const inboundSchema = ListPlatformModelsGeneratedImages$inboundSchema; - /** @deprecated use `ListPlatformModelsGeneratedImages$outboundSchema` instead. */ - export const outboundSchema = ListPlatformModelsGeneratedImages$outboundSchema; - /** @deprecated use `ListPlatformModelsGeneratedImages$Outbound` instead. */ - export type Outbound = ListPlatformModelsGeneratedImages$Outbound; + /** @deprecated use `ListPlatformModelsGeneratedImages$inboundSchema` instead. */ + export const inboundSchema = ListPlatformModelsGeneratedImages$inboundSchema; + /** @deprecated use `ListPlatformModelsGeneratedImages$outboundSchema` instead. */ + export const outboundSchema = + ListPlatformModelsGeneratedImages$outboundSchema; + /** @deprecated use `ListPlatformModelsGeneratedImages$Outbound` instead. */ + export type Outbound = ListPlatformModelsGeneratedImages$Outbound; } /** @internal */ export const ListPlatformModelsCustomModels$inboundSchema: z.ZodType< - ListPlatformModelsCustomModels, - z.ZodTypeDef, - unknown -> = z - .object({ - description: z.string().optional(), - featured: z.boolean().optional(), - generated_image: z - .nullable(z.lazy(() => ListPlatformModelsGeneratedImages$inboundSchema)) - .optional(), - id: z.nullable(z.string()).optional(), - name: z.string().optional(), - nsfw: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - generated_image: "generatedImage", - }); - }); + ListPlatformModelsCustomModels, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().optional(), + featured: z.boolean().optional(), + generated_image: z.nullable( + z.lazy(() => ListPlatformModelsGeneratedImages$inboundSchema), + ).optional(), + id: z.nullable(z.string()).optional(), + name: z.string().optional(), + nsfw: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "generated_image": "generatedImage", + }); +}); /** @internal */ export type ListPlatformModelsCustomModels$Outbound = { - description?: string | undefined; - featured?: boolean | undefined; - generated_image?: ListPlatformModelsGeneratedImages$Outbound | null | undefined; - id?: string | null | undefined; - name?: string | undefined; - nsfw?: boolean | undefined; + description?: string | undefined; + featured?: boolean | undefined; + generated_image?: + | ListPlatformModelsGeneratedImages$Outbound + | null + | undefined; + id?: string | null | undefined; + name?: string | undefined; + nsfw?: boolean | undefined; }; /** @internal */ export const ListPlatformModelsCustomModels$outboundSchema: z.ZodType< - ListPlatformModelsCustomModels$Outbound, - z.ZodTypeDef, - ListPlatformModelsCustomModels -> = z - .object({ - description: z.string().optional(), - featured: z.boolean().optional(), - generatedImage: z - .nullable(z.lazy(() => ListPlatformModelsGeneratedImages$outboundSchema)) - .optional(), - id: z.nullable(z.string()).optional(), - name: z.string().optional(), - nsfw: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - generatedImage: "generated_image", - }); - }); + ListPlatformModelsCustomModels$Outbound, + z.ZodTypeDef, + ListPlatformModelsCustomModels +> = z.object({ + description: z.string().optional(), + featured: z.boolean().optional(), + generatedImage: z.nullable( + z.lazy(() => ListPlatformModelsGeneratedImages$outboundSchema), + ).optional(), + id: z.nullable(z.string()).optional(), + name: z.string().optional(), + nsfw: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + generatedImage: "generated_image", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPlatformModelsCustomModels$ { - /** @deprecated use `ListPlatformModelsCustomModels$inboundSchema` instead. */ - export const inboundSchema = ListPlatformModelsCustomModels$inboundSchema; - /** @deprecated use `ListPlatformModelsCustomModels$outboundSchema` instead. */ - export const outboundSchema = ListPlatformModelsCustomModels$outboundSchema; - /** @deprecated use `ListPlatformModelsCustomModels$Outbound` instead. */ - export type Outbound = ListPlatformModelsCustomModels$Outbound; + /** @deprecated use `ListPlatformModelsCustomModels$inboundSchema` instead. */ + export const inboundSchema = ListPlatformModelsCustomModels$inboundSchema; + /** @deprecated use `ListPlatformModelsCustomModels$outboundSchema` instead. */ + export const outboundSchema = ListPlatformModelsCustomModels$outboundSchema; + /** @deprecated use `ListPlatformModelsCustomModels$Outbound` instead. */ + export type Outbound = ListPlatformModelsCustomModels$Outbound; } /** @internal */ export const ListPlatformModelsResponseBody$inboundSchema: z.ZodType< - ListPlatformModelsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - custom_models: z - .array(z.lazy(() => ListPlatformModelsCustomModels$inboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - custom_models: "customModels", - }); - }); + ListPlatformModelsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + custom_models: z.array( + z.lazy(() => ListPlatformModelsCustomModels$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "custom_models": "customModels", + }); +}); /** @internal */ export type ListPlatformModelsResponseBody$Outbound = { - custom_models?: Array | undefined; + custom_models?: Array | undefined; }; /** @internal */ export const ListPlatformModelsResponseBody$outboundSchema: z.ZodType< - ListPlatformModelsResponseBody$Outbound, - z.ZodTypeDef, - ListPlatformModelsResponseBody -> = z - .object({ - customModels: z - .array(z.lazy(() => ListPlatformModelsCustomModels$outboundSchema)) - .optional(), - }) - .transform((v) => { - return remap$(v, { - customModels: "custom_models", - }); - }); + ListPlatformModelsResponseBody$Outbound, + z.ZodTypeDef, + ListPlatformModelsResponseBody +> = z.object({ + customModels: z.array( + z.lazy(() => ListPlatformModelsCustomModels$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + customModels: "custom_models", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPlatformModelsResponseBody$ { - /** @deprecated use `ListPlatformModelsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListPlatformModelsResponseBody$inboundSchema; - /** @deprecated use `ListPlatformModelsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListPlatformModelsResponseBody$outboundSchema; - /** @deprecated use `ListPlatformModelsResponseBody$Outbound` instead. */ - export type Outbound = ListPlatformModelsResponseBody$Outbound; + /** @deprecated use `ListPlatformModelsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListPlatformModelsResponseBody$inboundSchema; + /** @deprecated use `ListPlatformModelsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListPlatformModelsResponseBody$outboundSchema; + /** @deprecated use `ListPlatformModelsResponseBody$Outbound` instead. */ + export type Outbound = ListPlatformModelsResponseBody$Outbound; } /** @internal */ export const ListPlatformModelsResponse$inboundSchema: z.ZodType< - ListPlatformModelsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => ListPlatformModelsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + ListPlatformModelsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => ListPlatformModelsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type ListPlatformModelsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: ListPlatformModelsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: ListPlatformModelsResponseBody$Outbound | undefined; }; /** @internal */ export const ListPlatformModelsResponse$outboundSchema: z.ZodType< - ListPlatformModelsResponse$Outbound, - z.ZodTypeDef, - ListPlatformModelsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => ListPlatformModelsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + ListPlatformModelsResponse$Outbound, + z.ZodTypeDef, + ListPlatformModelsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => ListPlatformModelsResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPlatformModelsResponse$ { - /** @deprecated use `ListPlatformModelsResponse$inboundSchema` instead. */ - export const inboundSchema = ListPlatformModelsResponse$inboundSchema; - /** @deprecated use `ListPlatformModelsResponse$outboundSchema` instead. */ - export const outboundSchema = ListPlatformModelsResponse$outboundSchema; - /** @deprecated use `ListPlatformModelsResponse$Outbound` instead. */ - export type Outbound = ListPlatformModelsResponse$Outbound; + /** @deprecated use `ListPlatformModelsResponse$inboundSchema` instead. */ + export const inboundSchema = ListPlatformModelsResponse$inboundSchema; + /** @deprecated use `ListPlatformModelsResponse$outboundSchema` instead. */ + export const outboundSchema = ListPlatformModelsResponse$outboundSchema; + /** @deprecated use `ListPlatformModelsResponse$Outbound` instead. */ + export type Outbound = ListPlatformModelsResponse$Outbound; } diff --git a/src/sdk/models/operations/performalchemyupscalelcm.ts b/src/sdk/models/operations/performalchemyupscalelcm.ts index 3441b2b..4255e8f 100644 --- a/src/sdk/models/operations/performalchemyupscalelcm.ts +++ b/src/sdk/models/operations/performalchemyupscalelcm.ts @@ -2,150 +2,153 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * Query parameters can also be provided in the request body as a JSON object */ export type PerformAlchemyUpscaleLCMRequestBody = { - /** - * How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20. - */ - guidance?: number | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - height?: number | null | undefined; - /** - * Image data used to generate image. In base64 format. Prefix: `data:image/jpeg;base64,` - */ - imageDataUrl: string; - /** - * The prompt used to generate images - */ - prompt: string; - /** - * Refine creative - */ - refineCreative?: boolean | null | undefined; - /** - * Must be a float between 0.5 and 0.9. - */ - refineStrength?: number | null | undefined; - requestTimestamp?: string | undefined; - seed?: number | null | undefined; - /** - * The number of steps to use for the generation. Must be between 4 and 16. - */ - steps?: number | null | undefined; - /** - * Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1. - */ - strength?: number | null | undefined; - /** - * The style to generate LCM images with. - */ - style?: shared.LcmGenerationStyle | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - width?: number | null | undefined; + /** + * How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20. + */ + guidance?: number | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + height?: number | null | undefined; + /** + * Image data used to generate image. In base64 format. Prefix: `data:image/jpeg;base64,` + */ + imageDataUrl: string; + /** + * The prompt used to generate images + */ + prompt: string; + /** + * Refine creative + */ + refineCreative?: boolean | null | undefined; + /** + * Must be a float between 0.5 and 0.9. + */ + refineStrength?: number | null | undefined; + requestTimestamp?: string | undefined; + seed?: number | null | undefined; + /** + * The number of steps to use for the generation. Must be between 4 and 16. + */ + steps?: number | null | undefined; + /** + * Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1. + */ + strength?: number | null | undefined; + /** + * The style to generate LCM images with. + */ + style?: shared.LcmGenerationStyle | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + width?: number | null | undefined; }; export type PerformAlchemyUpscaleLCMLCMGenerationOutput = { - /** - * API credits cost, available for Production API users. - */ - apiCreditCost?: number | null | undefined; - generatedImageId?: string | undefined; - generationId?: Array | undefined; - imageDataUrl?: Array | undefined; - requestTimestamp?: string | undefined; - variationId?: Array | undefined; + /** + * API credits cost, available for Production API users. + */ + apiCreditCost?: number | null | undefined; + generatedImageId?: string | undefined; + generationId?: Array | undefined; + imageDataUrl?: Array | undefined; + requestTimestamp?: string | undefined; + variationId?: Array | undefined; }; /** * Responses for POST /lcm-upscale */ export type PerformAlchemyUpscaleLCMResponseBody = { - lcmGenerationJob?: PerformAlchemyUpscaleLCMLCMGenerationOutput | null | undefined; + lcmGenerationJob?: + | PerformAlchemyUpscaleLCMLCMGenerationOutput + | null + | undefined; }; export type PerformAlchemyUpscaleLCMResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /lcm-upscale - */ - object?: PerformAlchemyUpscaleLCMResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /lcm-upscale + */ + object?: PerformAlchemyUpscaleLCMResponseBody | undefined; }; /** @internal */ export const PerformAlchemyUpscaleLCMRequestBody$inboundSchema: z.ZodType< - PerformAlchemyUpscaleLCMRequestBody, - z.ZodTypeDef, - unknown + PerformAlchemyUpscaleLCMRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - guidance: z.nullable(z.number()).optional(), - height: z.nullable(z.number().int().default(512)), - imageDataUrl: z.string(), - prompt: z.string(), - refineCreative: z.nullable(z.boolean()).optional(), - refineStrength: z.nullable(z.number()).optional(), - requestTimestamp: z.string().optional(), - seed: z.nullable(z.number().int()).optional(), - steps: z.nullable(z.number().int()).optional(), - strength: z.nullable(z.number()).optional(), - style: z.nullable(shared.LcmGenerationStyle$inboundSchema).optional(), - width: z.nullable(z.number().int().default(512)), + guidance: z.nullable(z.number()).optional(), + height: z.nullable(z.number().int().default(512)), + imageDataUrl: z.string(), + prompt: z.string(), + refineCreative: z.nullable(z.boolean()).optional(), + refineStrength: z.nullable(z.number()).optional(), + requestTimestamp: z.string().optional(), + seed: z.nullable(z.number().int()).optional(), + steps: z.nullable(z.number().int()).optional(), + strength: z.nullable(z.number()).optional(), + style: z.nullable(shared.LcmGenerationStyle$inboundSchema).optional(), + width: z.nullable(z.number().int().default(512)), }); /** @internal */ export type PerformAlchemyUpscaleLCMRequestBody$Outbound = { - guidance?: number | null | undefined; - height: number | null; - imageDataUrl: string; - prompt: string; - refineCreative?: boolean | null | undefined; - refineStrength?: number | null | undefined; - requestTimestamp?: string | undefined; - seed?: number | null | undefined; - steps?: number | null | undefined; - strength?: number | null | undefined; - style?: string | null | undefined; - width: number | null; + guidance?: number | null | undefined; + height: number | null; + imageDataUrl: string; + prompt: string; + refineCreative?: boolean | null | undefined; + refineStrength?: number | null | undefined; + requestTimestamp?: string | undefined; + seed?: number | null | undefined; + steps?: number | null | undefined; + strength?: number | null | undefined; + style?: string | null | undefined; + width: number | null; }; /** @internal */ export const PerformAlchemyUpscaleLCMRequestBody$outboundSchema: z.ZodType< - PerformAlchemyUpscaleLCMRequestBody$Outbound, - z.ZodTypeDef, - PerformAlchemyUpscaleLCMRequestBody + PerformAlchemyUpscaleLCMRequestBody$Outbound, + z.ZodTypeDef, + PerformAlchemyUpscaleLCMRequestBody > = z.object({ - guidance: z.nullable(z.number()).optional(), - height: z.nullable(z.number().int().default(512)), - imageDataUrl: z.string(), - prompt: z.string(), - refineCreative: z.nullable(z.boolean()).optional(), - refineStrength: z.nullable(z.number()).optional(), - requestTimestamp: z.string().optional(), - seed: z.nullable(z.number().int()).optional(), - steps: z.nullable(z.number().int()).optional(), - strength: z.nullable(z.number()).optional(), - style: z.nullable(shared.LcmGenerationStyle$outboundSchema).optional(), - width: z.nullable(z.number().int().default(512)), + guidance: z.nullable(z.number()).optional(), + height: z.nullable(z.number().int().default(512)), + imageDataUrl: z.string(), + prompt: z.string(), + refineCreative: z.nullable(z.boolean()).optional(), + refineStrength: z.nullable(z.number()).optional(), + requestTimestamp: z.string().optional(), + seed: z.nullable(z.number().int()).optional(), + steps: z.nullable(z.number().int()).optional(), + strength: z.nullable(z.number()).optional(), + style: z.nullable(shared.LcmGenerationStyle$outboundSchema).optional(), + width: z.nullable(z.number().int().default(512)), }); /** @@ -153,90 +156,99 @@ export const PerformAlchemyUpscaleLCMRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformAlchemyUpscaleLCMRequestBody$ { - /** @deprecated use `PerformAlchemyUpscaleLCMRequestBody$inboundSchema` instead. */ - export const inboundSchema = PerformAlchemyUpscaleLCMRequestBody$inboundSchema; - /** @deprecated use `PerformAlchemyUpscaleLCMRequestBody$outboundSchema` instead. */ - export const outboundSchema = PerformAlchemyUpscaleLCMRequestBody$outboundSchema; - /** @deprecated use `PerformAlchemyUpscaleLCMRequestBody$Outbound` instead. */ - export type Outbound = PerformAlchemyUpscaleLCMRequestBody$Outbound; + /** @deprecated use `PerformAlchemyUpscaleLCMRequestBody$inboundSchema` instead. */ + export const inboundSchema = + PerformAlchemyUpscaleLCMRequestBody$inboundSchema; + /** @deprecated use `PerformAlchemyUpscaleLCMRequestBody$outboundSchema` instead. */ + export const outboundSchema = + PerformAlchemyUpscaleLCMRequestBody$outboundSchema; + /** @deprecated use `PerformAlchemyUpscaleLCMRequestBody$Outbound` instead. */ + export type Outbound = PerformAlchemyUpscaleLCMRequestBody$Outbound; } /** @internal */ -export const PerformAlchemyUpscaleLCMLCMGenerationOutput$inboundSchema: z.ZodType< +export const PerformAlchemyUpscaleLCMLCMGenerationOutput$inboundSchema: + z.ZodType< PerformAlchemyUpscaleLCMLCMGenerationOutput, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ apiCreditCost: z.nullable(z.number().int()).optional(), generatedImageId: z.string().optional(), generationId: z.array(z.string()).optional(), imageDataUrl: z.array(z.string()).optional(), requestTimestamp: z.string().optional(), variationId: z.array(z.string()).optional(), -}); + }); /** @internal */ export type PerformAlchemyUpscaleLCMLCMGenerationOutput$Outbound = { - apiCreditCost?: number | null | undefined; - generatedImageId?: string | undefined; - generationId?: Array | undefined; - imageDataUrl?: Array | undefined; - requestTimestamp?: string | undefined; - variationId?: Array | undefined; + apiCreditCost?: number | null | undefined; + generatedImageId?: string | undefined; + generationId?: Array | undefined; + imageDataUrl?: Array | undefined; + requestTimestamp?: string | undefined; + variationId?: Array | undefined; }; /** @internal */ -export const PerformAlchemyUpscaleLCMLCMGenerationOutput$outboundSchema: z.ZodType< +export const PerformAlchemyUpscaleLCMLCMGenerationOutput$outboundSchema: + z.ZodType< PerformAlchemyUpscaleLCMLCMGenerationOutput$Outbound, z.ZodTypeDef, PerformAlchemyUpscaleLCMLCMGenerationOutput -> = z.object({ + > = z.object({ apiCreditCost: z.nullable(z.number().int()).optional(), generatedImageId: z.string().optional(), generationId: z.array(z.string()).optional(), imageDataUrl: z.array(z.string()).optional(), requestTimestamp: z.string().optional(), variationId: z.array(z.string()).optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformAlchemyUpscaleLCMLCMGenerationOutput$ { - /** @deprecated use `PerformAlchemyUpscaleLCMLCMGenerationOutput$inboundSchema` instead. */ - export const inboundSchema = PerformAlchemyUpscaleLCMLCMGenerationOutput$inboundSchema; - /** @deprecated use `PerformAlchemyUpscaleLCMLCMGenerationOutput$outboundSchema` instead. */ - export const outboundSchema = PerformAlchemyUpscaleLCMLCMGenerationOutput$outboundSchema; - /** @deprecated use `PerformAlchemyUpscaleLCMLCMGenerationOutput$Outbound` instead. */ - export type Outbound = PerformAlchemyUpscaleLCMLCMGenerationOutput$Outbound; + /** @deprecated use `PerformAlchemyUpscaleLCMLCMGenerationOutput$inboundSchema` instead. */ + export const inboundSchema = + PerformAlchemyUpscaleLCMLCMGenerationOutput$inboundSchema; + /** @deprecated use `PerformAlchemyUpscaleLCMLCMGenerationOutput$outboundSchema` instead. */ + export const outboundSchema = + PerformAlchemyUpscaleLCMLCMGenerationOutput$outboundSchema; + /** @deprecated use `PerformAlchemyUpscaleLCMLCMGenerationOutput$Outbound` instead. */ + export type Outbound = PerformAlchemyUpscaleLCMLCMGenerationOutput$Outbound; } /** @internal */ export const PerformAlchemyUpscaleLCMResponseBody$inboundSchema: z.ZodType< - PerformAlchemyUpscaleLCMResponseBody, - z.ZodTypeDef, - unknown + PerformAlchemyUpscaleLCMResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - lcmGenerationJob: z - .nullable(z.lazy(() => PerformAlchemyUpscaleLCMLCMGenerationOutput$inboundSchema)) - .optional(), + lcmGenerationJob: z.nullable( + z.lazy(() => PerformAlchemyUpscaleLCMLCMGenerationOutput$inboundSchema), + ).optional(), }); /** @internal */ export type PerformAlchemyUpscaleLCMResponseBody$Outbound = { - lcmGenerationJob?: PerformAlchemyUpscaleLCMLCMGenerationOutput$Outbound | null | undefined; + lcmGenerationJob?: + | PerformAlchemyUpscaleLCMLCMGenerationOutput$Outbound + | null + | undefined; }; /** @internal */ export const PerformAlchemyUpscaleLCMResponseBody$outboundSchema: z.ZodType< - PerformAlchemyUpscaleLCMResponseBody$Outbound, - z.ZodTypeDef, - PerformAlchemyUpscaleLCMResponseBody + PerformAlchemyUpscaleLCMResponseBody$Outbound, + z.ZodTypeDef, + PerformAlchemyUpscaleLCMResponseBody > = z.object({ - lcmGenerationJob: z - .nullable(z.lazy(() => PerformAlchemyUpscaleLCMLCMGenerationOutput$outboundSchema)) - .optional(), + lcmGenerationJob: z.nullable( + z.lazy(() => PerformAlchemyUpscaleLCMLCMGenerationOutput$outboundSchema), + ).optional(), }); /** @@ -244,73 +256,73 @@ export const PerformAlchemyUpscaleLCMResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformAlchemyUpscaleLCMResponseBody$ { - /** @deprecated use `PerformAlchemyUpscaleLCMResponseBody$inboundSchema` instead. */ - export const inboundSchema = PerformAlchemyUpscaleLCMResponseBody$inboundSchema; - /** @deprecated use `PerformAlchemyUpscaleLCMResponseBody$outboundSchema` instead. */ - export const outboundSchema = PerformAlchemyUpscaleLCMResponseBody$outboundSchema; - /** @deprecated use `PerformAlchemyUpscaleLCMResponseBody$Outbound` instead. */ - export type Outbound = PerformAlchemyUpscaleLCMResponseBody$Outbound; + /** @deprecated use `PerformAlchemyUpscaleLCMResponseBody$inboundSchema` instead. */ + export const inboundSchema = + PerformAlchemyUpscaleLCMResponseBody$inboundSchema; + /** @deprecated use `PerformAlchemyUpscaleLCMResponseBody$outboundSchema` instead. */ + export const outboundSchema = + PerformAlchemyUpscaleLCMResponseBody$outboundSchema; + /** @deprecated use `PerformAlchemyUpscaleLCMResponseBody$Outbound` instead. */ + export type Outbound = PerformAlchemyUpscaleLCMResponseBody$Outbound; } /** @internal */ export const PerformAlchemyUpscaleLCMResponse$inboundSchema: z.ZodType< - PerformAlchemyUpscaleLCMResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => PerformAlchemyUpscaleLCMResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + PerformAlchemyUpscaleLCMResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => PerformAlchemyUpscaleLCMResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type PerformAlchemyUpscaleLCMResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: PerformAlchemyUpscaleLCMResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: PerformAlchemyUpscaleLCMResponseBody$Outbound | undefined; }; /** @internal */ export const PerformAlchemyUpscaleLCMResponse$outboundSchema: z.ZodType< - PerformAlchemyUpscaleLCMResponse$Outbound, - z.ZodTypeDef, - PerformAlchemyUpscaleLCMResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => PerformAlchemyUpscaleLCMResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + PerformAlchemyUpscaleLCMResponse$Outbound, + z.ZodTypeDef, + PerformAlchemyUpscaleLCMResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => PerformAlchemyUpscaleLCMResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformAlchemyUpscaleLCMResponse$ { - /** @deprecated use `PerformAlchemyUpscaleLCMResponse$inboundSchema` instead. */ - export const inboundSchema = PerformAlchemyUpscaleLCMResponse$inboundSchema; - /** @deprecated use `PerformAlchemyUpscaleLCMResponse$outboundSchema` instead. */ - export const outboundSchema = PerformAlchemyUpscaleLCMResponse$outboundSchema; - /** @deprecated use `PerformAlchemyUpscaleLCMResponse$Outbound` instead. */ - export type Outbound = PerformAlchemyUpscaleLCMResponse$Outbound; + /** @deprecated use `PerformAlchemyUpscaleLCMResponse$inboundSchema` instead. */ + export const inboundSchema = PerformAlchemyUpscaleLCMResponse$inboundSchema; + /** @deprecated use `PerformAlchemyUpscaleLCMResponse$outboundSchema` instead. */ + export const outboundSchema = PerformAlchemyUpscaleLCMResponse$outboundSchema; + /** @deprecated use `PerformAlchemyUpscaleLCMResponse$Outbound` instead. */ + export type Outbound = PerformAlchemyUpscaleLCMResponse$Outbound; } diff --git a/src/sdk/models/operations/performinpaintinglcm.ts b/src/sdk/models/operations/performinpaintinglcm.ts index 226be44..6729efd 100644 --- a/src/sdk/models/operations/performinpaintinglcm.ts +++ b/src/sdk/models/operations/performinpaintinglcm.ts @@ -2,140 +2,140 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * Query parameters can also be provided in the request body as a JSON object */ export type PerformInpaintingLCMRequestBody = { - /** - * How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20. - */ - guidance?: number | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - height?: number | null | undefined; - /** - * Image data used to generate image. In base64 format. Prefix: `data:image/jpeg;base64,` - */ - imageDataUrl: string; - /** - * Image data of the mask layer used for inpainting. In base64 format. Prefix: `data:image/jpeg;base64,`. Mask should be white on black where generation is applied to the white area. - */ - maskDataUrl: string; - /** - * The prompt used to generate images - */ - prompt: string; - requestTimestamp?: string | undefined; - seed?: number | null | undefined; - /** - * The number of steps to use for the generation. Must be between 4 and 16. - */ - steps?: number | null | undefined; - /** - * Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1. - */ - strength?: number | null | undefined; - /** - * The style to generate LCM images with. - */ - style?: shared.LcmGenerationStyle | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - width?: number | null | undefined; + /** + * How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20. + */ + guidance?: number | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + height?: number | null | undefined; + /** + * Image data used to generate image. In base64 format. Prefix: `data:image/jpeg;base64,` + */ + imageDataUrl: string; + /** + * Image data of the mask layer used for inpainting. In base64 format. Prefix: `data:image/jpeg;base64,`. Mask should be white on black where generation is applied to the white area. + */ + maskDataUrl: string; + /** + * The prompt used to generate images + */ + prompt: string; + requestTimestamp?: string | undefined; + seed?: number | null | undefined; + /** + * The number of steps to use for the generation. Must be between 4 and 16. + */ + steps?: number | null | undefined; + /** + * Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1. + */ + strength?: number | null | undefined; + /** + * The style to generate LCM images with. + */ + style?: shared.LcmGenerationStyle | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + width?: number | null | undefined; }; export type PerformInpaintingLCMLCMGenerationOutput = { - /** - * API credits cost, available for Production API users. - */ - apiCreditCost?: number | null | undefined; - imageDataUrl?: Array | undefined; - requestTimestamp?: string | undefined; + /** + * API credits cost, available for Production API users. + */ + apiCreditCost?: number | null | undefined; + imageDataUrl?: Array | undefined; + requestTimestamp?: string | undefined; }; /** * Responses for POST /lcm-inpainting */ export type PerformInpaintingLCMResponseBody = { - lcmGenerationJob?: PerformInpaintingLCMLCMGenerationOutput | null | undefined; + lcmGenerationJob?: PerformInpaintingLCMLCMGenerationOutput | null | undefined; }; export type PerformInpaintingLCMResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /lcm-inpainting - */ - object?: PerformInpaintingLCMResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /lcm-inpainting + */ + object?: PerformInpaintingLCMResponseBody | undefined; }; /** @internal */ export const PerformInpaintingLCMRequestBody$inboundSchema: z.ZodType< - PerformInpaintingLCMRequestBody, - z.ZodTypeDef, - unknown + PerformInpaintingLCMRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - guidance: z.nullable(z.number()).optional(), - height: z.nullable(z.number().int().default(512)), - imageDataUrl: z.string(), - maskDataUrl: z.string(), - prompt: z.string(), - requestTimestamp: z.string().optional(), - seed: z.nullable(z.number().int()).optional(), - steps: z.nullable(z.number().int()).optional(), - strength: z.nullable(z.number()).optional(), - style: z.nullable(shared.LcmGenerationStyle$inboundSchema).optional(), - width: z.nullable(z.number().int().default(512)), + guidance: z.nullable(z.number()).optional(), + height: z.nullable(z.number().int().default(512)), + imageDataUrl: z.string(), + maskDataUrl: z.string(), + prompt: z.string(), + requestTimestamp: z.string().optional(), + seed: z.nullable(z.number().int()).optional(), + steps: z.nullable(z.number().int()).optional(), + strength: z.nullable(z.number()).optional(), + style: z.nullable(shared.LcmGenerationStyle$inboundSchema).optional(), + width: z.nullable(z.number().int().default(512)), }); /** @internal */ export type PerformInpaintingLCMRequestBody$Outbound = { - guidance?: number | null | undefined; - height: number | null; - imageDataUrl: string; - maskDataUrl: string; - prompt: string; - requestTimestamp?: string | undefined; - seed?: number | null | undefined; - steps?: number | null | undefined; - strength?: number | null | undefined; - style?: string | null | undefined; - width: number | null; + guidance?: number | null | undefined; + height: number | null; + imageDataUrl: string; + maskDataUrl: string; + prompt: string; + requestTimestamp?: string | undefined; + seed?: number | null | undefined; + steps?: number | null | undefined; + strength?: number | null | undefined; + style?: string | null | undefined; + width: number | null; }; /** @internal */ export const PerformInpaintingLCMRequestBody$outboundSchema: z.ZodType< - PerformInpaintingLCMRequestBody$Outbound, - z.ZodTypeDef, - PerformInpaintingLCMRequestBody + PerformInpaintingLCMRequestBody$Outbound, + z.ZodTypeDef, + PerformInpaintingLCMRequestBody > = z.object({ - guidance: z.nullable(z.number()).optional(), - height: z.nullable(z.number().int().default(512)), - imageDataUrl: z.string(), - maskDataUrl: z.string(), - prompt: z.string(), - requestTimestamp: z.string().optional(), - seed: z.nullable(z.number().int()).optional(), - steps: z.nullable(z.number().int()).optional(), - strength: z.nullable(z.number()).optional(), - style: z.nullable(shared.LcmGenerationStyle$outboundSchema).optional(), - width: z.nullable(z.number().int().default(512)), + guidance: z.nullable(z.number()).optional(), + height: z.nullable(z.number().int().default(512)), + imageDataUrl: z.string(), + maskDataUrl: z.string(), + prompt: z.string(), + requestTimestamp: z.string().optional(), + seed: z.nullable(z.number().int()).optional(), + steps: z.nullable(z.number().int()).optional(), + strength: z.nullable(z.number()).optional(), + style: z.nullable(shared.LcmGenerationStyle$outboundSchema).optional(), + width: z.nullable(z.number().int().default(512)), }); /** @@ -143,41 +143,41 @@ export const PerformInpaintingLCMRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformInpaintingLCMRequestBody$ { - /** @deprecated use `PerformInpaintingLCMRequestBody$inboundSchema` instead. */ - export const inboundSchema = PerformInpaintingLCMRequestBody$inboundSchema; - /** @deprecated use `PerformInpaintingLCMRequestBody$outboundSchema` instead. */ - export const outboundSchema = PerformInpaintingLCMRequestBody$outboundSchema; - /** @deprecated use `PerformInpaintingLCMRequestBody$Outbound` instead. */ - export type Outbound = PerformInpaintingLCMRequestBody$Outbound; + /** @deprecated use `PerformInpaintingLCMRequestBody$inboundSchema` instead. */ + export const inboundSchema = PerformInpaintingLCMRequestBody$inboundSchema; + /** @deprecated use `PerformInpaintingLCMRequestBody$outboundSchema` instead. */ + export const outboundSchema = PerformInpaintingLCMRequestBody$outboundSchema; + /** @deprecated use `PerformInpaintingLCMRequestBody$Outbound` instead. */ + export type Outbound = PerformInpaintingLCMRequestBody$Outbound; } /** @internal */ export const PerformInpaintingLCMLCMGenerationOutput$inboundSchema: z.ZodType< - PerformInpaintingLCMLCMGenerationOutput, - z.ZodTypeDef, - unknown + PerformInpaintingLCMLCMGenerationOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - imageDataUrl: z.array(z.string()).optional(), - requestTimestamp: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + imageDataUrl: z.array(z.string()).optional(), + requestTimestamp: z.string().optional(), }); /** @internal */ export type PerformInpaintingLCMLCMGenerationOutput$Outbound = { - apiCreditCost?: number | null | undefined; - imageDataUrl?: Array | undefined; - requestTimestamp?: string | undefined; + apiCreditCost?: number | null | undefined; + imageDataUrl?: Array | undefined; + requestTimestamp?: string | undefined; }; /** @internal */ export const PerformInpaintingLCMLCMGenerationOutput$outboundSchema: z.ZodType< - PerformInpaintingLCMLCMGenerationOutput$Outbound, - z.ZodTypeDef, - PerformInpaintingLCMLCMGenerationOutput + PerformInpaintingLCMLCMGenerationOutput$Outbound, + z.ZodTypeDef, + PerformInpaintingLCMLCMGenerationOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - imageDataUrl: z.array(z.string()).optional(), - requestTimestamp: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + imageDataUrl: z.array(z.string()).optional(), + requestTimestamp: z.string().optional(), }); /** @@ -185,39 +185,44 @@ export const PerformInpaintingLCMLCMGenerationOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformInpaintingLCMLCMGenerationOutput$ { - /** @deprecated use `PerformInpaintingLCMLCMGenerationOutput$inboundSchema` instead. */ - export const inboundSchema = PerformInpaintingLCMLCMGenerationOutput$inboundSchema; - /** @deprecated use `PerformInpaintingLCMLCMGenerationOutput$outboundSchema` instead. */ - export const outboundSchema = PerformInpaintingLCMLCMGenerationOutput$outboundSchema; - /** @deprecated use `PerformInpaintingLCMLCMGenerationOutput$Outbound` instead. */ - export type Outbound = PerformInpaintingLCMLCMGenerationOutput$Outbound; + /** @deprecated use `PerformInpaintingLCMLCMGenerationOutput$inboundSchema` instead. */ + export const inboundSchema = + PerformInpaintingLCMLCMGenerationOutput$inboundSchema; + /** @deprecated use `PerformInpaintingLCMLCMGenerationOutput$outboundSchema` instead. */ + export const outboundSchema = + PerformInpaintingLCMLCMGenerationOutput$outboundSchema; + /** @deprecated use `PerformInpaintingLCMLCMGenerationOutput$Outbound` instead. */ + export type Outbound = PerformInpaintingLCMLCMGenerationOutput$Outbound; } /** @internal */ export const PerformInpaintingLCMResponseBody$inboundSchema: z.ZodType< - PerformInpaintingLCMResponseBody, - z.ZodTypeDef, - unknown + PerformInpaintingLCMResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - lcmGenerationJob: z - .nullable(z.lazy(() => PerformInpaintingLCMLCMGenerationOutput$inboundSchema)) - .optional(), + lcmGenerationJob: z.nullable( + z.lazy(() => PerformInpaintingLCMLCMGenerationOutput$inboundSchema), + ).optional(), }); /** @internal */ export type PerformInpaintingLCMResponseBody$Outbound = { - lcmGenerationJob?: PerformInpaintingLCMLCMGenerationOutput$Outbound | null | undefined; + lcmGenerationJob?: + | PerformInpaintingLCMLCMGenerationOutput$Outbound + | null + | undefined; }; /** @internal */ export const PerformInpaintingLCMResponseBody$outboundSchema: z.ZodType< - PerformInpaintingLCMResponseBody$Outbound, - z.ZodTypeDef, - PerformInpaintingLCMResponseBody + PerformInpaintingLCMResponseBody$Outbound, + z.ZodTypeDef, + PerformInpaintingLCMResponseBody > = z.object({ - lcmGenerationJob: z - .nullable(z.lazy(() => PerformInpaintingLCMLCMGenerationOutput$outboundSchema)) - .optional(), + lcmGenerationJob: z.nullable( + z.lazy(() => PerformInpaintingLCMLCMGenerationOutput$outboundSchema), + ).optional(), }); /** @@ -225,73 +230,71 @@ export const PerformInpaintingLCMResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformInpaintingLCMResponseBody$ { - /** @deprecated use `PerformInpaintingLCMResponseBody$inboundSchema` instead. */ - export const inboundSchema = PerformInpaintingLCMResponseBody$inboundSchema; - /** @deprecated use `PerformInpaintingLCMResponseBody$outboundSchema` instead. */ - export const outboundSchema = PerformInpaintingLCMResponseBody$outboundSchema; - /** @deprecated use `PerformInpaintingLCMResponseBody$Outbound` instead. */ - export type Outbound = PerformInpaintingLCMResponseBody$Outbound; + /** @deprecated use `PerformInpaintingLCMResponseBody$inboundSchema` instead. */ + export const inboundSchema = PerformInpaintingLCMResponseBody$inboundSchema; + /** @deprecated use `PerformInpaintingLCMResponseBody$outboundSchema` instead. */ + export const outboundSchema = PerformInpaintingLCMResponseBody$outboundSchema; + /** @deprecated use `PerformInpaintingLCMResponseBody$Outbound` instead. */ + export type Outbound = PerformInpaintingLCMResponseBody$Outbound; } /** @internal */ export const PerformInpaintingLCMResponse$inboundSchema: z.ZodType< - PerformInpaintingLCMResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => PerformInpaintingLCMResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + PerformInpaintingLCMResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => PerformInpaintingLCMResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type PerformInpaintingLCMResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: PerformInpaintingLCMResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: PerformInpaintingLCMResponseBody$Outbound | undefined; }; /** @internal */ export const PerformInpaintingLCMResponse$outboundSchema: z.ZodType< - PerformInpaintingLCMResponse$Outbound, - z.ZodTypeDef, - PerformInpaintingLCMResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => PerformInpaintingLCMResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + PerformInpaintingLCMResponse$Outbound, + z.ZodTypeDef, + PerformInpaintingLCMResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => PerformInpaintingLCMResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformInpaintingLCMResponse$ { - /** @deprecated use `PerformInpaintingLCMResponse$inboundSchema` instead. */ - export const inboundSchema = PerformInpaintingLCMResponse$inboundSchema; - /** @deprecated use `PerformInpaintingLCMResponse$outboundSchema` instead. */ - export const outboundSchema = PerformInpaintingLCMResponse$outboundSchema; - /** @deprecated use `PerformInpaintingLCMResponse$Outbound` instead. */ - export type Outbound = PerformInpaintingLCMResponse$Outbound; + /** @deprecated use `PerformInpaintingLCMResponse$inboundSchema` instead. */ + export const inboundSchema = PerformInpaintingLCMResponse$inboundSchema; + /** @deprecated use `PerformInpaintingLCMResponse$outboundSchema` instead. */ + export const outboundSchema = PerformInpaintingLCMResponse$outboundSchema; + /** @deprecated use `PerformInpaintingLCMResponse$Outbound` instead. */ + export type Outbound = PerformInpaintingLCMResponse$Outbound; } diff --git a/src/sdk/models/operations/performinstantrefine.ts b/src/sdk/models/operations/performinstantrefine.ts index 697ffbb..4efd807 100644 --- a/src/sdk/models/operations/performinstantrefine.ts +++ b/src/sdk/models/operations/performinstantrefine.ts @@ -2,133 +2,133 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * Query parameters can also be provided in the request body as a JSON object */ export type PerformInstantRefineRequestBody = { - /** - * How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20. - */ - guidance?: number | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - height?: number | null | undefined; - /** - * Image data used to generate image. In base64 format. Prefix: `data:image/jpeg;base64,` - */ - imageDataUrl: string; - /** - * The prompt used to generate images - */ - prompt: string; - requestTimestamp?: string | undefined; - seed?: number | null | undefined; - /** - * The number of steps to use for the generation. Must be between 4 and 16. - */ - steps?: number | null | undefined; - /** - * Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1. - */ - strength?: number | null | undefined; - /** - * The style to generate LCM images with. - */ - style?: shared.LcmGenerationStyle | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - width?: number | null | undefined; + /** + * How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20. + */ + guidance?: number | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + height?: number | null | undefined; + /** + * Image data used to generate image. In base64 format. Prefix: `data:image/jpeg;base64,` + */ + imageDataUrl: string; + /** + * The prompt used to generate images + */ + prompt: string; + requestTimestamp?: string | undefined; + seed?: number | null | undefined; + /** + * The number of steps to use for the generation. Must be between 4 and 16. + */ + steps?: number | null | undefined; + /** + * Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1. + */ + strength?: number | null | undefined; + /** + * The style to generate LCM images with. + */ + style?: shared.LcmGenerationStyle | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + width?: number | null | undefined; }; export type PerformInstantRefineLcmGenerationOutput = { - /** - * API credits cost, available for Production API users. - */ - apiCreditCost?: number | null | undefined; - imageDataUrl?: Array | undefined; - requestTimestamp?: string | undefined; + /** + * API credits cost, available for Production API users. + */ + apiCreditCost?: number | null | undefined; + imageDataUrl?: Array | undefined; + requestTimestamp?: string | undefined; }; /** * Responses for POST /lcm-instant-refine */ export type PerformInstantRefineResponseBody = { - lcmGenerationJob?: PerformInstantRefineLcmGenerationOutput | null | undefined; + lcmGenerationJob?: PerformInstantRefineLcmGenerationOutput | null | undefined; }; export type PerformInstantRefineResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /lcm-instant-refine - */ - object?: PerformInstantRefineResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /lcm-instant-refine + */ + object?: PerformInstantRefineResponseBody | undefined; }; /** @internal */ export const PerformInstantRefineRequestBody$inboundSchema: z.ZodType< - PerformInstantRefineRequestBody, - z.ZodTypeDef, - unknown + PerformInstantRefineRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - guidance: z.nullable(z.number()).optional(), - height: z.nullable(z.number().int().default(512)), - imageDataUrl: z.string(), - prompt: z.string(), - requestTimestamp: z.string().optional(), - seed: z.nullable(z.number().int()).optional(), - steps: z.nullable(z.number().int()).optional(), - strength: z.nullable(z.number()).optional(), - style: z.nullable(shared.LcmGenerationStyle$inboundSchema).optional(), - width: z.nullable(z.number().int().default(512)), + guidance: z.nullable(z.number()).optional(), + height: z.nullable(z.number().int().default(512)), + imageDataUrl: z.string(), + prompt: z.string(), + requestTimestamp: z.string().optional(), + seed: z.nullable(z.number().int()).optional(), + steps: z.nullable(z.number().int()).optional(), + strength: z.nullable(z.number()).optional(), + style: z.nullable(shared.LcmGenerationStyle$inboundSchema).optional(), + width: z.nullable(z.number().int().default(512)), }); /** @internal */ export type PerformInstantRefineRequestBody$Outbound = { - guidance?: number | null | undefined; - height: number | null; - imageDataUrl: string; - prompt: string; - requestTimestamp?: string | undefined; - seed?: number | null | undefined; - steps?: number | null | undefined; - strength?: number | null | undefined; - style?: string | null | undefined; - width: number | null; + guidance?: number | null | undefined; + height: number | null; + imageDataUrl: string; + prompt: string; + requestTimestamp?: string | undefined; + seed?: number | null | undefined; + steps?: number | null | undefined; + strength?: number | null | undefined; + style?: string | null | undefined; + width: number | null; }; /** @internal */ export const PerformInstantRefineRequestBody$outboundSchema: z.ZodType< - PerformInstantRefineRequestBody$Outbound, - z.ZodTypeDef, - PerformInstantRefineRequestBody + PerformInstantRefineRequestBody$Outbound, + z.ZodTypeDef, + PerformInstantRefineRequestBody > = z.object({ - guidance: z.nullable(z.number()).optional(), - height: z.nullable(z.number().int().default(512)), - imageDataUrl: z.string(), - prompt: z.string(), - requestTimestamp: z.string().optional(), - seed: z.nullable(z.number().int()).optional(), - steps: z.nullable(z.number().int()).optional(), - strength: z.nullable(z.number()).optional(), - style: z.nullable(shared.LcmGenerationStyle$outboundSchema).optional(), - width: z.nullable(z.number().int().default(512)), + guidance: z.nullable(z.number()).optional(), + height: z.nullable(z.number().int().default(512)), + imageDataUrl: z.string(), + prompt: z.string(), + requestTimestamp: z.string().optional(), + seed: z.nullable(z.number().int()).optional(), + steps: z.nullable(z.number().int()).optional(), + strength: z.nullable(z.number()).optional(), + style: z.nullable(shared.LcmGenerationStyle$outboundSchema).optional(), + width: z.nullable(z.number().int().default(512)), }); /** @@ -136,41 +136,41 @@ export const PerformInstantRefineRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformInstantRefineRequestBody$ { - /** @deprecated use `PerformInstantRefineRequestBody$inboundSchema` instead. */ - export const inboundSchema = PerformInstantRefineRequestBody$inboundSchema; - /** @deprecated use `PerformInstantRefineRequestBody$outboundSchema` instead. */ - export const outboundSchema = PerformInstantRefineRequestBody$outboundSchema; - /** @deprecated use `PerformInstantRefineRequestBody$Outbound` instead. */ - export type Outbound = PerformInstantRefineRequestBody$Outbound; + /** @deprecated use `PerformInstantRefineRequestBody$inboundSchema` instead. */ + export const inboundSchema = PerformInstantRefineRequestBody$inboundSchema; + /** @deprecated use `PerformInstantRefineRequestBody$outboundSchema` instead. */ + export const outboundSchema = PerformInstantRefineRequestBody$outboundSchema; + /** @deprecated use `PerformInstantRefineRequestBody$Outbound` instead. */ + export type Outbound = PerformInstantRefineRequestBody$Outbound; } /** @internal */ export const PerformInstantRefineLcmGenerationOutput$inboundSchema: z.ZodType< - PerformInstantRefineLcmGenerationOutput, - z.ZodTypeDef, - unknown + PerformInstantRefineLcmGenerationOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - imageDataUrl: z.array(z.string()).optional(), - requestTimestamp: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + imageDataUrl: z.array(z.string()).optional(), + requestTimestamp: z.string().optional(), }); /** @internal */ export type PerformInstantRefineLcmGenerationOutput$Outbound = { - apiCreditCost?: number | null | undefined; - imageDataUrl?: Array | undefined; - requestTimestamp?: string | undefined; + apiCreditCost?: number | null | undefined; + imageDataUrl?: Array | undefined; + requestTimestamp?: string | undefined; }; /** @internal */ export const PerformInstantRefineLcmGenerationOutput$outboundSchema: z.ZodType< - PerformInstantRefineLcmGenerationOutput$Outbound, - z.ZodTypeDef, - PerformInstantRefineLcmGenerationOutput + PerformInstantRefineLcmGenerationOutput$Outbound, + z.ZodTypeDef, + PerformInstantRefineLcmGenerationOutput > = z.object({ - apiCreditCost: z.nullable(z.number().int()).optional(), - imageDataUrl: z.array(z.string()).optional(), - requestTimestamp: z.string().optional(), + apiCreditCost: z.nullable(z.number().int()).optional(), + imageDataUrl: z.array(z.string()).optional(), + requestTimestamp: z.string().optional(), }); /** @@ -178,39 +178,44 @@ export const PerformInstantRefineLcmGenerationOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformInstantRefineLcmGenerationOutput$ { - /** @deprecated use `PerformInstantRefineLcmGenerationOutput$inboundSchema` instead. */ - export const inboundSchema = PerformInstantRefineLcmGenerationOutput$inboundSchema; - /** @deprecated use `PerformInstantRefineLcmGenerationOutput$outboundSchema` instead. */ - export const outboundSchema = PerformInstantRefineLcmGenerationOutput$outboundSchema; - /** @deprecated use `PerformInstantRefineLcmGenerationOutput$Outbound` instead. */ - export type Outbound = PerformInstantRefineLcmGenerationOutput$Outbound; + /** @deprecated use `PerformInstantRefineLcmGenerationOutput$inboundSchema` instead. */ + export const inboundSchema = + PerformInstantRefineLcmGenerationOutput$inboundSchema; + /** @deprecated use `PerformInstantRefineLcmGenerationOutput$outboundSchema` instead. */ + export const outboundSchema = + PerformInstantRefineLcmGenerationOutput$outboundSchema; + /** @deprecated use `PerformInstantRefineLcmGenerationOutput$Outbound` instead. */ + export type Outbound = PerformInstantRefineLcmGenerationOutput$Outbound; } /** @internal */ export const PerformInstantRefineResponseBody$inboundSchema: z.ZodType< - PerformInstantRefineResponseBody, - z.ZodTypeDef, - unknown + PerformInstantRefineResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - lcmGenerationJob: z - .nullable(z.lazy(() => PerformInstantRefineLcmGenerationOutput$inboundSchema)) - .optional(), + lcmGenerationJob: z.nullable( + z.lazy(() => PerformInstantRefineLcmGenerationOutput$inboundSchema), + ).optional(), }); /** @internal */ export type PerformInstantRefineResponseBody$Outbound = { - lcmGenerationJob?: PerformInstantRefineLcmGenerationOutput$Outbound | null | undefined; + lcmGenerationJob?: + | PerformInstantRefineLcmGenerationOutput$Outbound + | null + | undefined; }; /** @internal */ export const PerformInstantRefineResponseBody$outboundSchema: z.ZodType< - PerformInstantRefineResponseBody$Outbound, - z.ZodTypeDef, - PerformInstantRefineResponseBody + PerformInstantRefineResponseBody$Outbound, + z.ZodTypeDef, + PerformInstantRefineResponseBody > = z.object({ - lcmGenerationJob: z - .nullable(z.lazy(() => PerformInstantRefineLcmGenerationOutput$outboundSchema)) - .optional(), + lcmGenerationJob: z.nullable( + z.lazy(() => PerformInstantRefineLcmGenerationOutput$outboundSchema), + ).optional(), }); /** @@ -218,73 +223,71 @@ export const PerformInstantRefineResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformInstantRefineResponseBody$ { - /** @deprecated use `PerformInstantRefineResponseBody$inboundSchema` instead. */ - export const inboundSchema = PerformInstantRefineResponseBody$inboundSchema; - /** @deprecated use `PerformInstantRefineResponseBody$outboundSchema` instead. */ - export const outboundSchema = PerformInstantRefineResponseBody$outboundSchema; - /** @deprecated use `PerformInstantRefineResponseBody$Outbound` instead. */ - export type Outbound = PerformInstantRefineResponseBody$Outbound; + /** @deprecated use `PerformInstantRefineResponseBody$inboundSchema` instead. */ + export const inboundSchema = PerformInstantRefineResponseBody$inboundSchema; + /** @deprecated use `PerformInstantRefineResponseBody$outboundSchema` instead. */ + export const outboundSchema = PerformInstantRefineResponseBody$outboundSchema; + /** @deprecated use `PerformInstantRefineResponseBody$Outbound` instead. */ + export type Outbound = PerformInstantRefineResponseBody$Outbound; } /** @internal */ export const PerformInstantRefineResponse$inboundSchema: z.ZodType< - PerformInstantRefineResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => PerformInstantRefineResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + PerformInstantRefineResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => PerformInstantRefineResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type PerformInstantRefineResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: PerformInstantRefineResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: PerformInstantRefineResponseBody$Outbound | undefined; }; /** @internal */ export const PerformInstantRefineResponse$outboundSchema: z.ZodType< - PerformInstantRefineResponse$Outbound, - z.ZodTypeDef, - PerformInstantRefineResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => PerformInstantRefineResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + PerformInstantRefineResponse$Outbound, + z.ZodTypeDef, + PerformInstantRefineResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => PerformInstantRefineResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformInstantRefineResponse$ { - /** @deprecated use `PerformInstantRefineResponse$inboundSchema` instead. */ - export const inboundSchema = PerformInstantRefineResponse$inboundSchema; - /** @deprecated use `PerformInstantRefineResponse$outboundSchema` instead. */ - export const outboundSchema = PerformInstantRefineResponse$outboundSchema; - /** @deprecated use `PerformInstantRefineResponse$Outbound` instead. */ - export type Outbound = PerformInstantRefineResponse$Outbound; + /** @deprecated use `PerformInstantRefineResponse$inboundSchema` instead. */ + export const inboundSchema = PerformInstantRefineResponse$inboundSchema; + /** @deprecated use `PerformInstantRefineResponse$outboundSchema` instead. */ + export const outboundSchema = PerformInstantRefineResponse$outboundSchema; + /** @deprecated use `PerformInstantRefineResponse$Outbound` instead. */ + export type Outbound = PerformInstantRefineResponse$Outbound; } diff --git a/src/sdk/models/operations/pricingcalculator.ts b/src/sdk/models/operations/pricingcalculator.ts index d2a41c6..9642220 100644 --- a/src/sdk/models/operations/pricingcalculator.ts +++ b/src/sdk/models/operations/pricingcalculator.ts @@ -2,269 +2,309 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import * as shared from "../shared/index.js"; -import * as z from "zod"; /** * Parameters for FANTASY_AVATAR_GENERATION service */ export type PricingCalculatorObject = { - /** - * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features - */ - imageHeight?: number | undefined; - /** - * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features - */ - imageWidth?: number | undefined; - /** - * The number of images to generate. Must be between 1 and 8. If either width or height is over 768, must be between 1 and 4. - */ - numImages?: number | undefined; + /** + * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features + */ + imageHeight?: number | undefined; + /** + * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features + */ + imageWidth?: number | undefined; + /** + * The number of images to generate. Must be between 1 and 8. If either width or height is over 768, must be between 1 and 4. + */ + numImages?: number | undefined; }; /** * Parameters for IMAGE_GENERATION service */ export type PricingCalculatorPricingCalculatorObject = { - /** - * Enable to use Alchemy. - */ - alchemyMode?: boolean | undefined; - /** - * The total cost of controlnets input. - */ - controlnetsCost?: number | null | undefined; - /** - * Enable to use high resolution. - */ - highResolution?: boolean | undefined; - /** - * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features - */ - imageHeight?: number | undefined; - /** - * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features - */ - imageWidth?: number | undefined; - /** - * The Step Count to use for the generation. Must be between 10 and 60. - */ - inferenceSteps?: number | undefined; - /** - * Enable to use custom model. - */ - isModelCustom?: boolean | null | undefined; - /** - * Enable to use Phoenix model. - */ - isPhoenix?: boolean | null | undefined; - /** - * Enable to use SDXL model. - */ - isSDXL?: boolean | null | undefined; - /** - * Enable to use SDXL Lightning model. - */ - isSDXLLightning?: boolean | null | undefined; - /** - * The number of elements used for the generation. - */ - loraCount?: number | null | undefined; - /** - * The number of images to generate. Must be between 1 and 8. If either width or height is over 768, must be between 1 and 4. - */ - numImages?: number | undefined; - /** - * Enable to use Prompt Magic. - */ - promptMagic?: boolean | null | undefined; - /** - * Strength of prompt magic. Must be a float between 0.1 and 1.0 - */ - promptMagicStrength?: number | null | undefined; - /** - * Prompt magic version v2 or v3, for use when promptMagic: true - */ - promptMagicVersion?: string | null | undefined; + /** + * Enable to use Alchemy. + */ + alchemyMode?: boolean | undefined; + /** + * The total cost of controlnets input. + */ + controlnetsCost?: number | null | undefined; + /** + * Enable to use high resolution. + */ + highResolution?: boolean | undefined; + /** + * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features + */ + imageHeight?: number | undefined; + /** + * The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features + */ + imageWidth?: number | undefined; + /** + * The Step Count to use for the generation. Must be between 10 and 60. + */ + inferenceSteps?: number | undefined; + /** + * Enable to use custom model. + */ + isModelCustom?: boolean | null | undefined; + /** + * Enable to use Phoenix model. + */ + isPhoenix?: boolean | null | undefined; + /** + * Enable to use SDXL model. + */ + isSDXL?: boolean | null | undefined; + /** + * Enable to use SDXL Lightning model. + */ + isSDXLLightning?: boolean | null | undefined; + /** + * The number of elements used for the generation. + */ + loraCount?: number | null | undefined; + /** + * The number of images to generate. Must be between 1 and 8. If either width or height is over 768, must be between 1 and 4. + */ + numImages?: number | undefined; + /** + * Enable to use Prompt Magic. + */ + promptMagic?: boolean | null | undefined; + /** + * Strength of prompt magic. Must be a float between 0.1 and 1.0 + */ + promptMagicStrength?: number | null | undefined; + /** + * Prompt magic version v2 or v3, for use when promptMagic: true + */ + promptMagicVersion?: string | null | undefined; + /** + * Enable to use Ultra mode. + */ + ultra?: boolean | null | undefined; }; /** * Parameters for LCM_GENERATION service */ export type PricingCalculatorPricingCalculatorRequestObject = { - /** - * The output height of the image. Must be 512, 640 or 1024. - */ - height?: number | null | undefined; - /** - * Enable for instant upscale - */ - instantRefine?: boolean | null | undefined; - /** - * Enable for normal alchemy upscale - */ - refine?: boolean | null | undefined; - /** - * The output width of the image. Must be 512, 640 or 1024. - */ - width?: number | null | undefined; + /** + * The output height of the image. Must be 512, 640 or 1024. + */ + height?: number | null | undefined; + /** + * Enable for instant upscale + */ + instantRefine?: boolean | null | undefined; + /** + * Enable for normal alchemy upscale + */ + refine?: boolean | null | undefined; + /** + * The output width of the image. Must be 512, 640 or 1024. + */ + width?: number | null | undefined; }; /** * Parameters for MODEL_TRAINING service */ export type PricingCalculatorPricingCalculatorRequestRequestBodyObject = { - /** - * The resolution for training. Must be 512 or 768. - */ - resolution?: number | undefined; + /** + * The resolution for training. Must be 512 or 768. + */ + resolution?: number | undefined; }; /** * Parameters for MOTION_GENERATION service */ -export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject = { +export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject = + { /** * The total duration of the motion generation in seconds. */ durationSeconds?: number | undefined; -}; + }; /** * Parameters for TEXTURE_GENERATION service */ export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject = - { - preview?: boolean | undefined; - }; + { + preview?: boolean | undefined; + }; /** * Parameters for UNIVERSAL_UPSCALER service */ export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject = - { - /** - * The maximum upscaled image size is 20 megapixels. - */ - megapixel?: number | undefined; - }; + { + /** + * The maximum upscaled image size is 20 megapixels. + */ + megapixel?: number | undefined; + }; /** - * Parameters for the service + * Parameters for UNIVERSAL_UPSCALER_ULTRA service */ -export type ObjectT = { - /** - * Parameters for FANTASY_AVATAR_GENERATION service - */ - fantasyAvatarGeneration?: PricingCalculatorObject | null | undefined; - /** - * Parameters for IMAGE_GENERATION service - */ - imageGeneration?: PricingCalculatorPricingCalculatorObject | null | undefined; - /** - * Parameters for LCM_GENERATION service - */ - lcmGeneration?: PricingCalculatorPricingCalculatorRequestObject | null | undefined; +export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject = + { /** - * Parameters for MODEL_TRAINING service + * The input height of the image. */ - modelTraining?: PricingCalculatorPricingCalculatorRequestRequestBodyObject | null | undefined; + inputHeight?: number | undefined; /** - * Parameters for MOTION_GENERATION service + * The input width of the image. */ - motionGeneration?: - | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject - | null - | undefined; + inputWidth?: number | undefined; /** - * Parameters for TEXTURE_GENERATION service + * The upscale multiplier of the universal upscaler. Must be between 1.00 and 2.00. */ - textureGeneration?: - | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject - | null - | undefined; - /** - * Parameters for UNIVERSAL_UPSCALER service - */ - universalUpscaler?: - | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject - | null - | undefined; + upscaleMultiplier?: number | undefined; + }; + +/** + * Parameters for the service + */ +export type ObjectT = { + /** + * Parameters for FANTASY_AVATAR_GENERATION service + */ + fantasyAvatarGeneration?: PricingCalculatorObject | null | undefined; + /** + * Parameters for IMAGE_GENERATION service + */ + imageGeneration?: PricingCalculatorPricingCalculatorObject | null | undefined; + /** + * Parameters for LCM_GENERATION service + */ + lcmGeneration?: + | PricingCalculatorPricingCalculatorRequestObject + | null + | undefined; + /** + * Parameters for MODEL_TRAINING service + */ + modelTraining?: + | PricingCalculatorPricingCalculatorRequestRequestBodyObject + | null + | undefined; + /** + * Parameters for MOTION_GENERATION service + */ + motionGeneration?: + | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject + | null + | undefined; + /** + * Parameters for TEXTURE_GENERATION service + */ + textureGeneration?: + | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject + | null + | undefined; + /** + * Parameters for UNIVERSAL_UPSCALER service + */ + universalUpscaler?: + | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject + | null + | undefined; + /** + * Parameters for UNIVERSAL_UPSCALER_ULTRA service + */ + universalUpscalerUltra?: + | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject + | null + | undefined; }; export type PricingCalculatorRequestBody = { - /** - * The services to be chosen for calculating the API credit cost. - */ - service?: shared.PricingCalculatorServices | undefined; - /** - * Parameters for the service - */ - serviceParams?: ObjectT | undefined; + /** + * The services to be chosen for calculating the API credit cost. + */ + service?: shared.PricingCalculatorServices | undefined; + /** + * Parameters for the service + */ + serviceParams?: ObjectT | undefined; }; export type CalculateProductionApiServiceCost = { - /** - * API service cost to generate the image. - */ - cost?: number | undefined; + /** + * API service cost to generate the image. + */ + cost?: number | undefined; }; /** * Responses for POST /pricing-calculator */ export type PricingCalculatorResponseBody = { - calculateProductionApiServiceCost?: CalculateProductionApiServiceCost | null | undefined; + calculateProductionApiServiceCost?: + | CalculateProductionApiServiceCost + | null + | undefined; }; export type PricingCalculatorResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /pricing-calculator - */ - object?: PricingCalculatorResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /pricing-calculator + */ + object?: PricingCalculatorResponseBody | undefined; }; /** @internal */ export const PricingCalculatorObject$inboundSchema: z.ZodType< - PricingCalculatorObject, - z.ZodTypeDef, - unknown + PricingCalculatorObject, + z.ZodTypeDef, + unknown > = z.object({ - imageHeight: z.number().int().optional(), - imageWidth: z.number().int().optional(), - numImages: z.number().int().optional(), + imageHeight: z.number().int().optional(), + imageWidth: z.number().int().optional(), + numImages: z.number().int().optional(), }); /** @internal */ export type PricingCalculatorObject$Outbound = { - imageHeight?: number | undefined; - imageWidth?: number | undefined; - numImages?: number | undefined; + imageHeight?: number | undefined; + imageWidth?: number | undefined; + numImages?: number | undefined; }; /** @internal */ export const PricingCalculatorObject$outboundSchema: z.ZodType< - PricingCalculatorObject$Outbound, - z.ZodTypeDef, - PricingCalculatorObject + PricingCalculatorObject$Outbound, + z.ZodTypeDef, + PricingCalculatorObject > = z.object({ - imageHeight: z.number().int().optional(), - imageWidth: z.number().int().optional(), - numImages: z.number().int().optional(), + imageHeight: z.number().int().optional(), + imageWidth: z.number().int().optional(), + numImages: z.number().int().optional(), }); /** @@ -272,77 +312,80 @@ export const PricingCalculatorObject$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorObject$ { - /** @deprecated use `PricingCalculatorObject$inboundSchema` instead. */ - export const inboundSchema = PricingCalculatorObject$inboundSchema; - /** @deprecated use `PricingCalculatorObject$outboundSchema` instead. */ - export const outboundSchema = PricingCalculatorObject$outboundSchema; - /** @deprecated use `PricingCalculatorObject$Outbound` instead. */ - export type Outbound = PricingCalculatorObject$Outbound; + /** @deprecated use `PricingCalculatorObject$inboundSchema` instead. */ + export const inboundSchema = PricingCalculatorObject$inboundSchema; + /** @deprecated use `PricingCalculatorObject$outboundSchema` instead. */ + export const outboundSchema = PricingCalculatorObject$outboundSchema; + /** @deprecated use `PricingCalculatorObject$Outbound` instead. */ + export type Outbound = PricingCalculatorObject$Outbound; } /** @internal */ export const PricingCalculatorPricingCalculatorObject$inboundSchema: z.ZodType< - PricingCalculatorPricingCalculatorObject, - z.ZodTypeDef, - unknown + PricingCalculatorPricingCalculatorObject, + z.ZodTypeDef, + unknown > = z.object({ - alchemyMode: z.boolean().optional(), - controlnetsCost: z.nullable(z.number().int()).optional(), - highResolution: z.boolean().optional(), - imageHeight: z.number().int().optional(), - imageWidth: z.number().int().optional(), - inferenceSteps: z.number().int().optional(), - isModelCustom: z.nullable(z.boolean()).optional(), - isPhoenix: z.nullable(z.boolean()).optional(), - isSDXL: z.nullable(z.boolean()).optional(), - isSDXLLightning: z.nullable(z.boolean()).optional(), - loraCount: z.nullable(z.number().int()).optional(), - numImages: z.number().int().optional(), - promptMagic: z.nullable(z.boolean()).optional(), - promptMagicStrength: z.nullable(z.number()).optional(), - promptMagicVersion: z.nullable(z.string()).optional(), + alchemyMode: z.boolean().optional(), + controlnetsCost: z.nullable(z.number().int()).optional(), + highResolution: z.boolean().optional(), + imageHeight: z.number().int().optional(), + imageWidth: z.number().int().optional(), + inferenceSteps: z.number().int().optional(), + isModelCustom: z.nullable(z.boolean()).optional(), + isPhoenix: z.nullable(z.boolean()).optional(), + isSDXL: z.nullable(z.boolean()).optional(), + isSDXLLightning: z.nullable(z.boolean()).optional(), + loraCount: z.nullable(z.number().int()).optional(), + numImages: z.number().int().optional(), + promptMagic: z.nullable(z.boolean()).optional(), + promptMagicStrength: z.nullable(z.number()).optional(), + promptMagicVersion: z.nullable(z.string()).optional(), + ultra: z.nullable(z.boolean()).optional(), }); /** @internal */ export type PricingCalculatorPricingCalculatorObject$Outbound = { - alchemyMode?: boolean | undefined; - controlnetsCost?: number | null | undefined; - highResolution?: boolean | undefined; - imageHeight?: number | undefined; - imageWidth?: number | undefined; - inferenceSteps?: number | undefined; - isModelCustom?: boolean | null | undefined; - isPhoenix?: boolean | null | undefined; - isSDXL?: boolean | null | undefined; - isSDXLLightning?: boolean | null | undefined; - loraCount?: number | null | undefined; - numImages?: number | undefined; - promptMagic?: boolean | null | undefined; - promptMagicStrength?: number | null | undefined; - promptMagicVersion?: string | null | undefined; + alchemyMode?: boolean | undefined; + controlnetsCost?: number | null | undefined; + highResolution?: boolean | undefined; + imageHeight?: number | undefined; + imageWidth?: number | undefined; + inferenceSteps?: number | undefined; + isModelCustom?: boolean | null | undefined; + isPhoenix?: boolean | null | undefined; + isSDXL?: boolean | null | undefined; + isSDXLLightning?: boolean | null | undefined; + loraCount?: number | null | undefined; + numImages?: number | undefined; + promptMagic?: boolean | null | undefined; + promptMagicStrength?: number | null | undefined; + promptMagicVersion?: string | null | undefined; + ultra?: boolean | null | undefined; }; /** @internal */ export const PricingCalculatorPricingCalculatorObject$outboundSchema: z.ZodType< - PricingCalculatorPricingCalculatorObject$Outbound, - z.ZodTypeDef, - PricingCalculatorPricingCalculatorObject + PricingCalculatorPricingCalculatorObject$Outbound, + z.ZodTypeDef, + PricingCalculatorPricingCalculatorObject > = z.object({ - alchemyMode: z.boolean().optional(), - controlnetsCost: z.nullable(z.number().int()).optional(), - highResolution: z.boolean().optional(), - imageHeight: z.number().int().optional(), - imageWidth: z.number().int().optional(), - inferenceSteps: z.number().int().optional(), - isModelCustom: z.nullable(z.boolean()).optional(), - isPhoenix: z.nullable(z.boolean()).optional(), - isSDXL: z.nullable(z.boolean()).optional(), - isSDXLLightning: z.nullable(z.boolean()).optional(), - loraCount: z.nullable(z.number().int()).optional(), - numImages: z.number().int().optional(), - promptMagic: z.nullable(z.boolean()).optional(), - promptMagicStrength: z.nullable(z.number()).optional(), - promptMagicVersion: z.nullable(z.string()).optional(), + alchemyMode: z.boolean().optional(), + controlnetsCost: z.nullable(z.number().int()).optional(), + highResolution: z.boolean().optional(), + imageHeight: z.number().int().optional(), + imageWidth: z.number().int().optional(), + inferenceSteps: z.number().int().optional(), + isModelCustom: z.nullable(z.boolean()).optional(), + isPhoenix: z.nullable(z.boolean()).optional(), + isSDXL: z.nullable(z.boolean()).optional(), + isSDXLLightning: z.nullable(z.boolean()).optional(), + loraCount: z.nullable(z.number().int()).optional(), + numImages: z.number().int().optional(), + promptMagic: z.nullable(z.boolean()).optional(), + promptMagicStrength: z.nullable(z.number()).optional(), + promptMagicVersion: z.nullable(z.string()).optional(), + ultra: z.nullable(z.boolean()).optional(), }); /** @@ -350,388 +393,462 @@ export const PricingCalculatorPricingCalculatorObject$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorPricingCalculatorObject$ { - /** @deprecated use `PricingCalculatorPricingCalculatorObject$inboundSchema` instead. */ - export const inboundSchema = PricingCalculatorPricingCalculatorObject$inboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorObject$outboundSchema` instead. */ - export const outboundSchema = PricingCalculatorPricingCalculatorObject$outboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorObject$Outbound` instead. */ - export type Outbound = PricingCalculatorPricingCalculatorObject$Outbound; + /** @deprecated use `PricingCalculatorPricingCalculatorObject$inboundSchema` instead. */ + export const inboundSchema = + PricingCalculatorPricingCalculatorObject$inboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorObject$outboundSchema` instead. */ + export const outboundSchema = + PricingCalculatorPricingCalculatorObject$outboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorObject$Outbound` instead. */ + export type Outbound = PricingCalculatorPricingCalculatorObject$Outbound; } /** @internal */ -export const PricingCalculatorPricingCalculatorRequestObject$inboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestObject$inboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestObject, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ height: z.nullable(z.number().int()).optional(), instantRefine: z.nullable(z.boolean()).optional(), refine: z.nullable(z.boolean()).optional(), width: z.nullable(z.number().int()).optional(), -}); + }); /** @internal */ export type PricingCalculatorPricingCalculatorRequestObject$Outbound = { - height?: number | null | undefined; - instantRefine?: boolean | null | undefined; - refine?: boolean | null | undefined; - width?: number | null | undefined; + height?: number | null | undefined; + instantRefine?: boolean | null | undefined; + refine?: boolean | null | undefined; + width?: number | null | undefined; }; /** @internal */ -export const PricingCalculatorPricingCalculatorRequestObject$outboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestObject$outboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestObject$Outbound, z.ZodTypeDef, PricingCalculatorPricingCalculatorRequestObject -> = z.object({ + > = z.object({ height: z.nullable(z.number().int()).optional(), instantRefine: z.nullable(z.boolean()).optional(), refine: z.nullable(z.boolean()).optional(), width: z.nullable(z.number().int()).optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorPricingCalculatorRequestObject$ { - /** @deprecated use `PricingCalculatorPricingCalculatorRequestObject$inboundSchema` instead. */ - export const inboundSchema = PricingCalculatorPricingCalculatorRequestObject$inboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestObject$outboundSchema` instead. */ - export const outboundSchema = PricingCalculatorPricingCalculatorRequestObject$outboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestObject$Outbound` instead. */ - export type Outbound = PricingCalculatorPricingCalculatorRequestObject$Outbound; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestObject$inboundSchema` instead. */ + export const inboundSchema = + PricingCalculatorPricingCalculatorRequestObject$inboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestObject$outboundSchema` instead. */ + export const outboundSchema = + PricingCalculatorPricingCalculatorRequestObject$outboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestObject$Outbound` instead. */ + export type Outbound = + PricingCalculatorPricingCalculatorRequestObject$Outbound; } /** @internal */ -export const PricingCalculatorPricingCalculatorRequestRequestBodyObject$inboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestRequestBodyObject$inboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestRequestBodyObject, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ resolution: z.number().int().optional(), -}); + }); /** @internal */ -export type PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound = { +export type PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound = + { resolution?: number | undefined; -}; + }; /** @internal */ -export const PricingCalculatorPricingCalculatorRequestRequestBodyObject$outboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestRequestBodyObject$outboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound, z.ZodTypeDef, PricingCalculatorPricingCalculatorRequestRequestBodyObject -> = z.object({ + > = z.object({ resolution: z.number().int().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorPricingCalculatorRequestRequestBodyObject$ { - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyObject$inboundSchema` instead. */ - export const inboundSchema = - PricingCalculatorPricingCalculatorRequestRequestBodyObject$inboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyObject$outboundSchema` instead. */ - export const outboundSchema = - PricingCalculatorPricingCalculatorRequestRequestBodyObject$outboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound` instead. */ - export type Outbound = PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyObject$inboundSchema` instead. */ + export const inboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyObject$inboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyObject$outboundSchema` instead. */ + export const outboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyObject$outboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound` instead. */ + export type Outbound = + PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound; } /** @internal */ -export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$inboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$inboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ durationSeconds: z.number().int().optional(), -}); + }); /** @internal */ -export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound = { +export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound = + { durationSeconds?: number | undefined; -}; + }; /** @internal */ -export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$outboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$outboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound, z.ZodTypeDef, PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject -> = z.object({ + > = z.object({ durationSeconds: z.number().int().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$ { - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$inboundSchema` instead. */ - export const inboundSchema = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$inboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$outboundSchema` instead. */ - export const outboundSchema = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$outboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound` instead. */ - export type Outbound = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$inboundSchema` instead. */ + export const inboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$inboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$outboundSchema` instead. */ + export const outboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$outboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound` instead. */ + export type Outbound = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound; } /** @internal */ -export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$inboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$inboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ preview: z.boolean().optional(), -}); + }); /** @internal */ export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$Outbound = - { - preview?: boolean | undefined; - }; + { + preview?: boolean | undefined; + }; /** @internal */ -export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$outboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$outboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$Outbound, z.ZodTypeDef, PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject -> = z.object({ + > = z.object({ preview: z.boolean().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$ { - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$inboundSchema` instead. */ - export const inboundSchema = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$inboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$outboundSchema` instead. */ - export const outboundSchema = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$outboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$Outbound` instead. */ - export type Outbound = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$Outbound; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$inboundSchema` instead. */ + export const inboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$inboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$outboundSchema` instead. */ + export const outboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$outboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$Outbound` instead. */ + export type Outbound = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$Outbound; } /** @internal */ -export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$inboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$inboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ megapixel: z.number().int().optional(), -}); + }); /** @internal */ export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$Outbound = - { - megapixel?: number | undefined; - }; + { + megapixel?: number | undefined; + }; /** @internal */ -export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$outboundSchema: z.ZodType< +export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$outboundSchema: + z.ZodType< PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$Outbound, z.ZodTypeDef, PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject -> = z.object({ + > = z.object({ megapixel: z.number().int().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$ { - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$inboundSchema` instead. */ - export const inboundSchema = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$inboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$outboundSchema` instead. */ - export const outboundSchema = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$outboundSchema; - /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$Outbound` instead. */ - export type Outbound = - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$Outbound; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$inboundSchema` instead. */ + export const inboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$inboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$outboundSchema` instead. */ + export const outboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$outboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$Outbound` instead. */ + export type Outbound = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$Outbound; } /** @internal */ -export const ObjectT$inboundSchema: z.ZodType = z - .object({ - FANTASY_AVATAR_GENERATION: z - .nullable(z.lazy(() => PricingCalculatorObject$inboundSchema)) - .optional(), - IMAGE_GENERATION: z - .nullable(z.lazy(() => PricingCalculatorPricingCalculatorObject$inboundSchema)) - .optional(), - LCM_GENERATION: z - .nullable(z.lazy(() => PricingCalculatorPricingCalculatorRequestObject$inboundSchema)) - .optional(), - MODEL_TRAINING: z - .nullable( - z.lazy( - () => PricingCalculatorPricingCalculatorRequestRequestBodyObject$inboundSchema - ) - ) - .optional(), - MOTION_GENERATION: z - .nullable( - z.lazy( - () => - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$inboundSchema - ) - ) - .optional(), - TEXTURE_GENERATION: z - .nullable( - z.lazy( - () => - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$inboundSchema - ) - ) - .optional(), - UNIVERSAL_UPSCALER: z - .nullable( - z.lazy( - () => - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$inboundSchema - ) - ) - .optional(), - }) - .transform((v) => { - return remap$(v, { - FANTASY_AVATAR_GENERATION: "fantasyAvatarGeneration", - IMAGE_GENERATION: "imageGeneration", - LCM_GENERATION: "lcmGeneration", - MODEL_TRAINING: "modelTraining", - MOTION_GENERATION: "motionGeneration", - TEXTURE_GENERATION: "textureGeneration", - UNIVERSAL_UPSCALER: "universalUpscaler", - }); +export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$inboundSchema: + z.ZodType< + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject, + z.ZodTypeDef, + unknown + > = z.object({ + inputHeight: z.number().int().optional(), + inputWidth: z.number().int().optional(), + upscaleMultiplier: z.number().default(1.5), + }); + +/** @internal */ +export type PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$Outbound = + { + inputHeight?: number | undefined; + inputWidth?: number | undefined; + upscaleMultiplier: number; + }; + +/** @internal */ +export const PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$outboundSchema: + z.ZodType< + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$Outbound, + z.ZodTypeDef, + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject + > = z.object({ + inputHeight: z.number().int().optional(), + inputWidth: z.number().int().optional(), + upscaleMultiplier: z.number().default(1.5), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$ { + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$inboundSchema` instead. */ + export const inboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$inboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$outboundSchema` instead. */ + export const outboundSchema = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$outboundSchema; + /** @deprecated use `PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$Outbound` instead. */ + export type Outbound = + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$Outbound; +} + +/** @internal */ +export const ObjectT$inboundSchema: z.ZodType = + z.object({ + FANTASY_AVATAR_GENERATION: z.nullable( + z.lazy(() => PricingCalculatorObject$inboundSchema), + ).optional(), + IMAGE_GENERATION: z.nullable( + z.lazy(() => PricingCalculatorPricingCalculatorObject$inboundSchema), + ).optional(), + LCM_GENERATION: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestObject$inboundSchema + ), + ).optional(), + MODEL_TRAINING: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyObject$inboundSchema + ), + ).optional(), + MOTION_GENERATION: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$inboundSchema + ), + ).optional(), + TEXTURE_GENERATION: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$inboundSchema + ), + ).optional(), + UNIVERSAL_UPSCALER: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$inboundSchema + ), + ).optional(), + UNIVERSAL_UPSCALER_ULTRA: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$inboundSchema + ), + ).optional(), + }).transform((v) => { + return remap$(v, { + "FANTASY_AVATAR_GENERATION": "fantasyAvatarGeneration", + "IMAGE_GENERATION": "imageGeneration", + "LCM_GENERATION": "lcmGeneration", + "MODEL_TRAINING": "modelTraining", + "MOTION_GENERATION": "motionGeneration", + "TEXTURE_GENERATION": "textureGeneration", + "UNIVERSAL_UPSCALER": "universalUpscaler", + "UNIVERSAL_UPSCALER_ULTRA": "universalUpscalerUltra", }); + }); /** @internal */ export type ObjectT$Outbound = { - FANTASY_AVATAR_GENERATION?: PricingCalculatorObject$Outbound | null | undefined; - IMAGE_GENERATION?: PricingCalculatorPricingCalculatorObject$Outbound | null | undefined; - LCM_GENERATION?: PricingCalculatorPricingCalculatorRequestObject$Outbound | null | undefined; - MODEL_TRAINING?: - | PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound - | null - | undefined; - MOTION_GENERATION?: - | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound - | null - | undefined; - TEXTURE_GENERATION?: - | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$Outbound - | null - | undefined; - UNIVERSAL_UPSCALER?: - | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$Outbound - | null - | undefined; + FANTASY_AVATAR_GENERATION?: + | PricingCalculatorObject$Outbound + | null + | undefined; + IMAGE_GENERATION?: + | PricingCalculatorPricingCalculatorObject$Outbound + | null + | undefined; + LCM_GENERATION?: + | PricingCalculatorPricingCalculatorRequestObject$Outbound + | null + | undefined; + MODEL_TRAINING?: + | PricingCalculatorPricingCalculatorRequestRequestBodyObject$Outbound + | null + | undefined; + MOTION_GENERATION?: + | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$Outbound + | null + | undefined; + TEXTURE_GENERATION?: + | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$Outbound + | null + | undefined; + UNIVERSAL_UPSCALER?: + | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$Outbound + | null + | undefined; + UNIVERSAL_UPSCALER_ULTRA?: + | PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$Outbound + | null + | undefined; }; /** @internal */ -export const ObjectT$outboundSchema: z.ZodType = z - .object({ - fantasyAvatarGeneration: z - .nullable(z.lazy(() => PricingCalculatorObject$outboundSchema)) - .optional(), - imageGeneration: z - .nullable(z.lazy(() => PricingCalculatorPricingCalculatorObject$outboundSchema)) - .optional(), - lcmGeneration: z - .nullable(z.lazy(() => PricingCalculatorPricingCalculatorRequestObject$outboundSchema)) - .optional(), - modelTraining: z - .nullable( - z.lazy( - () => PricingCalculatorPricingCalculatorRequestRequestBodyObject$outboundSchema - ) - ) - .optional(), - motionGeneration: z - .nullable( - z.lazy( - () => - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$outboundSchema - ) - ) - .optional(), - textureGeneration: z - .nullable( - z.lazy( - () => - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$outboundSchema - ) - ) - .optional(), - universalUpscaler: z - .nullable( - z.lazy( - () => - PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$outboundSchema - ) - ) - .optional(), - }) - .transform((v) => { - return remap$(v, { - fantasyAvatarGeneration: "FANTASY_AVATAR_GENERATION", - imageGeneration: "IMAGE_GENERATION", - lcmGeneration: "LCM_GENERATION", - modelTraining: "MODEL_TRAINING", - motionGeneration: "MOTION_GENERATION", - textureGeneration: "TEXTURE_GENERATION", - universalUpscaler: "UNIVERSAL_UPSCALER", - }); - }); +export const ObjectT$outboundSchema: z.ZodType< + ObjectT$Outbound, + z.ZodTypeDef, + ObjectT +> = z.object({ + fantasyAvatarGeneration: z.nullable( + z.lazy(() => PricingCalculatorObject$outboundSchema), + ).optional(), + imageGeneration: z.nullable( + z.lazy(() => PricingCalculatorPricingCalculatorObject$outboundSchema), + ).optional(), + lcmGeneration: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestObject$outboundSchema + ), + ).optional(), + modelTraining: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyObject$outboundSchema + ), + ).optional(), + motionGeneration: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsObject$outboundSchema + ), + ).optional(), + textureGeneration: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsTEXTUREGENERATIONObject$outboundSchema + ), + ).optional(), + universalUpscaler: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERObject$outboundSchema + ), + ).optional(), + universalUpscalerUltra: z.nullable( + z.lazy(() => + PricingCalculatorPricingCalculatorRequestRequestBodyServiceParamsUNIVERSALUPSCALERULTRAObject$outboundSchema + ), + ).optional(), +}).transform((v) => { + return remap$(v, { + fantasyAvatarGeneration: "FANTASY_AVATAR_GENERATION", + imageGeneration: "IMAGE_GENERATION", + lcmGeneration: "LCM_GENERATION", + modelTraining: "MODEL_TRAINING", + motionGeneration: "MOTION_GENERATION", + textureGeneration: "TEXTURE_GENERATION", + universalUpscaler: "UNIVERSAL_UPSCALER", + universalUpscalerUltra: "UNIVERSAL_UPSCALER_ULTRA", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ObjectT$ { - /** @deprecated use `ObjectT$inboundSchema` instead. */ - export const inboundSchema = ObjectT$inboundSchema; - /** @deprecated use `ObjectT$outboundSchema` instead. */ - export const outboundSchema = ObjectT$outboundSchema; - /** @deprecated use `ObjectT$Outbound` instead. */ - export type Outbound = ObjectT$Outbound; + /** @deprecated use `ObjectT$inboundSchema` instead. */ + export const inboundSchema = ObjectT$inboundSchema; + /** @deprecated use `ObjectT$outboundSchema` instead. */ + export const outboundSchema = ObjectT$outboundSchema; + /** @deprecated use `ObjectT$Outbound` instead. */ + export type Outbound = ObjectT$Outbound; } /** @internal */ export const PricingCalculatorRequestBody$inboundSchema: z.ZodType< - PricingCalculatorRequestBody, - z.ZodTypeDef, - unknown + PricingCalculatorRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - service: shared.PricingCalculatorServices$inboundSchema.optional(), - serviceParams: z.lazy(() => ObjectT$inboundSchema).optional(), + service: shared.PricingCalculatorServices$inboundSchema.optional(), + serviceParams: z.lazy(() => ObjectT$inboundSchema).optional(), }); /** @internal */ export type PricingCalculatorRequestBody$Outbound = { - service?: string | undefined; - serviceParams?: ObjectT$Outbound | undefined; + service?: string | undefined; + serviceParams?: ObjectT$Outbound | undefined; }; /** @internal */ export const PricingCalculatorRequestBody$outboundSchema: z.ZodType< - PricingCalculatorRequestBody$Outbound, - z.ZodTypeDef, - PricingCalculatorRequestBody + PricingCalculatorRequestBody$Outbound, + z.ZodTypeDef, + PricingCalculatorRequestBody > = z.object({ - service: shared.PricingCalculatorServices$outboundSchema.optional(), - serviceParams: z.lazy(() => ObjectT$outboundSchema).optional(), + service: shared.PricingCalculatorServices$outboundSchema.optional(), + serviceParams: z.lazy(() => ObjectT$outboundSchema).optional(), }); /** @@ -739,35 +856,35 @@ export const PricingCalculatorRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorRequestBody$ { - /** @deprecated use `PricingCalculatorRequestBody$inboundSchema` instead. */ - export const inboundSchema = PricingCalculatorRequestBody$inboundSchema; - /** @deprecated use `PricingCalculatorRequestBody$outboundSchema` instead. */ - export const outboundSchema = PricingCalculatorRequestBody$outboundSchema; - /** @deprecated use `PricingCalculatorRequestBody$Outbound` instead. */ - export type Outbound = PricingCalculatorRequestBody$Outbound; + /** @deprecated use `PricingCalculatorRequestBody$inboundSchema` instead. */ + export const inboundSchema = PricingCalculatorRequestBody$inboundSchema; + /** @deprecated use `PricingCalculatorRequestBody$outboundSchema` instead. */ + export const outboundSchema = PricingCalculatorRequestBody$outboundSchema; + /** @deprecated use `PricingCalculatorRequestBody$Outbound` instead. */ + export type Outbound = PricingCalculatorRequestBody$Outbound; } /** @internal */ export const CalculateProductionApiServiceCost$inboundSchema: z.ZodType< - CalculateProductionApiServiceCost, - z.ZodTypeDef, - unknown + CalculateProductionApiServiceCost, + z.ZodTypeDef, + unknown > = z.object({ - cost: z.number().int().optional(), + cost: z.number().int().optional(), }); /** @internal */ export type CalculateProductionApiServiceCost$Outbound = { - cost?: number | undefined; + cost?: number | undefined; }; /** @internal */ export const CalculateProductionApiServiceCost$outboundSchema: z.ZodType< - CalculateProductionApiServiceCost$Outbound, - z.ZodTypeDef, - CalculateProductionApiServiceCost + CalculateProductionApiServiceCost$Outbound, + z.ZodTypeDef, + CalculateProductionApiServiceCost > = z.object({ - cost: z.number().int().optional(), + cost: z.number().int().optional(), }); /** @@ -775,42 +892,43 @@ export const CalculateProductionApiServiceCost$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CalculateProductionApiServiceCost$ { - /** @deprecated use `CalculateProductionApiServiceCost$inboundSchema` instead. */ - export const inboundSchema = CalculateProductionApiServiceCost$inboundSchema; - /** @deprecated use `CalculateProductionApiServiceCost$outboundSchema` instead. */ - export const outboundSchema = CalculateProductionApiServiceCost$outboundSchema; - /** @deprecated use `CalculateProductionApiServiceCost$Outbound` instead. */ - export type Outbound = CalculateProductionApiServiceCost$Outbound; + /** @deprecated use `CalculateProductionApiServiceCost$inboundSchema` instead. */ + export const inboundSchema = CalculateProductionApiServiceCost$inboundSchema; + /** @deprecated use `CalculateProductionApiServiceCost$outboundSchema` instead. */ + export const outboundSchema = + CalculateProductionApiServiceCost$outboundSchema; + /** @deprecated use `CalculateProductionApiServiceCost$Outbound` instead. */ + export type Outbound = CalculateProductionApiServiceCost$Outbound; } /** @internal */ export const PricingCalculatorResponseBody$inboundSchema: z.ZodType< - PricingCalculatorResponseBody, - z.ZodTypeDef, - unknown + PricingCalculatorResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - calculateProductionApiServiceCost: z - .nullable(z.lazy(() => CalculateProductionApiServiceCost$inboundSchema)) - .optional(), + calculateProductionApiServiceCost: z.nullable( + z.lazy(() => CalculateProductionApiServiceCost$inboundSchema), + ).optional(), }); /** @internal */ export type PricingCalculatorResponseBody$Outbound = { - calculateProductionApiServiceCost?: - | CalculateProductionApiServiceCost$Outbound - | null - | undefined; + calculateProductionApiServiceCost?: + | CalculateProductionApiServiceCost$Outbound + | null + | undefined; }; /** @internal */ export const PricingCalculatorResponseBody$outboundSchema: z.ZodType< - PricingCalculatorResponseBody$Outbound, - z.ZodTypeDef, - PricingCalculatorResponseBody + PricingCalculatorResponseBody$Outbound, + z.ZodTypeDef, + PricingCalculatorResponseBody > = z.object({ - calculateProductionApiServiceCost: z - .nullable(z.lazy(() => CalculateProductionApiServiceCost$outboundSchema)) - .optional(), + calculateProductionApiServiceCost: z.nullable( + z.lazy(() => CalculateProductionApiServiceCost$outboundSchema), + ).optional(), }); /** @@ -818,73 +936,69 @@ export const PricingCalculatorResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorResponseBody$ { - /** @deprecated use `PricingCalculatorResponseBody$inboundSchema` instead. */ - export const inboundSchema = PricingCalculatorResponseBody$inboundSchema; - /** @deprecated use `PricingCalculatorResponseBody$outboundSchema` instead. */ - export const outboundSchema = PricingCalculatorResponseBody$outboundSchema; - /** @deprecated use `PricingCalculatorResponseBody$Outbound` instead. */ - export type Outbound = PricingCalculatorResponseBody$Outbound; + /** @deprecated use `PricingCalculatorResponseBody$inboundSchema` instead. */ + export const inboundSchema = PricingCalculatorResponseBody$inboundSchema; + /** @deprecated use `PricingCalculatorResponseBody$outboundSchema` instead. */ + export const outboundSchema = PricingCalculatorResponseBody$outboundSchema; + /** @deprecated use `PricingCalculatorResponseBody$Outbound` instead. */ + export type Outbound = PricingCalculatorResponseBody$Outbound; } /** @internal */ export const PricingCalculatorResponse$inboundSchema: z.ZodType< - PricingCalculatorResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => PricingCalculatorResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + PricingCalculatorResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => PricingCalculatorResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type PricingCalculatorResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: PricingCalculatorResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: PricingCalculatorResponseBody$Outbound | undefined; }; /** @internal */ export const PricingCalculatorResponse$outboundSchema: z.ZodType< - PricingCalculatorResponse$Outbound, - z.ZodTypeDef, - PricingCalculatorResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => PricingCalculatorResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + PricingCalculatorResponse$Outbound, + z.ZodTypeDef, + PricingCalculatorResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => PricingCalculatorResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorResponse$ { - /** @deprecated use `PricingCalculatorResponse$inboundSchema` instead. */ - export const inboundSchema = PricingCalculatorResponse$inboundSchema; - /** @deprecated use `PricingCalculatorResponse$outboundSchema` instead. */ - export const outboundSchema = PricingCalculatorResponse$outboundSchema; - /** @deprecated use `PricingCalculatorResponse$Outbound` instead. */ - export type Outbound = PricingCalculatorResponse$Outbound; + /** @deprecated use `PricingCalculatorResponse$inboundSchema` instead. */ + export const inboundSchema = PricingCalculatorResponse$inboundSchema; + /** @deprecated use `PricingCalculatorResponse$outboundSchema` instead. */ + export const outboundSchema = PricingCalculatorResponse$outboundSchema; + /** @deprecated use `PricingCalculatorResponse$Outbound` instead. */ + export type Outbound = PricingCalculatorResponse$Outbound; } diff --git a/src/sdk/models/operations/promptimprove.ts b/src/sdk/models/operations/promptimprove.ts index 417293b..9191591 100644 --- a/src/sdk/models/operations/promptimprove.ts +++ b/src/sdk/models/operations/promptimprove.ts @@ -2,77 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters to be provided in the request body as a JSON object */ export type PromptImproveRequestBody = { - /** - * The prompt to improve. - */ - prompt: string; + /** + * The prompt to improve. + */ + prompt: string; }; export type PromptGenerationOutput = { - /** - * API Credits Cost for Random Prompt Generation. Available for Production API Users. - */ - apiCreditCost?: number | undefined; - /** - * The improved prompt. - */ - prompt?: string | undefined; + /** + * API Credits Cost for Random Prompt Generation. Available for Production API Users. + */ + apiCreditCost?: number | undefined; + /** + * The improved prompt. + */ + prompt?: string | undefined; }; /** * Responses for POST /prompt/improve */ export type PromptImproveResponseBody = { - promptGeneration?: PromptGenerationOutput | undefined; + promptGeneration?: PromptGenerationOutput | undefined; }; export type PromptImproveResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /prompt/improve - */ - object?: PromptImproveResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /prompt/improve + */ + object?: PromptImproveResponseBody | undefined; }; /** @internal */ export const PromptImproveRequestBody$inboundSchema: z.ZodType< - PromptImproveRequestBody, - z.ZodTypeDef, - unknown + PromptImproveRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - prompt: z.string(), + prompt: z.string(), }); /** @internal */ export type PromptImproveRequestBody$Outbound = { - prompt: string; + prompt: string; }; /** @internal */ export const PromptImproveRequestBody$outboundSchema: z.ZodType< - PromptImproveRequestBody$Outbound, - z.ZodTypeDef, - PromptImproveRequestBody + PromptImproveRequestBody$Outbound, + z.ZodTypeDef, + PromptImproveRequestBody > = z.object({ - prompt: z.string(), + prompt: z.string(), }); /** @@ -80,38 +80,38 @@ export const PromptImproveRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PromptImproveRequestBody$ { - /** @deprecated use `PromptImproveRequestBody$inboundSchema` instead. */ - export const inboundSchema = PromptImproveRequestBody$inboundSchema; - /** @deprecated use `PromptImproveRequestBody$outboundSchema` instead. */ - export const outboundSchema = PromptImproveRequestBody$outboundSchema; - /** @deprecated use `PromptImproveRequestBody$Outbound` instead. */ - export type Outbound = PromptImproveRequestBody$Outbound; + /** @deprecated use `PromptImproveRequestBody$inboundSchema` instead. */ + export const inboundSchema = PromptImproveRequestBody$inboundSchema; + /** @deprecated use `PromptImproveRequestBody$outboundSchema` instead. */ + export const outboundSchema = PromptImproveRequestBody$outboundSchema; + /** @deprecated use `PromptImproveRequestBody$Outbound` instead. */ + export type Outbound = PromptImproveRequestBody$Outbound; } /** @internal */ export const PromptGenerationOutput$inboundSchema: z.ZodType< - PromptGenerationOutput, - z.ZodTypeDef, - unknown + PromptGenerationOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.number().int().default(4), - prompt: z.string().default("The improved prompt."), + apiCreditCost: z.number().int().default(4), + prompt: z.string().default("The improved prompt."), }); /** @internal */ export type PromptGenerationOutput$Outbound = { - apiCreditCost: number; - prompt: string; + apiCreditCost: number; + prompt: string; }; /** @internal */ export const PromptGenerationOutput$outboundSchema: z.ZodType< - PromptGenerationOutput$Outbound, - z.ZodTypeDef, - PromptGenerationOutput + PromptGenerationOutput$Outbound, + z.ZodTypeDef, + PromptGenerationOutput > = z.object({ - apiCreditCost: z.number().int().default(4), - prompt: z.string().default("The improved prompt."), + apiCreditCost: z.number().int().default(4), + prompt: z.string().default("The improved prompt."), }); /** @@ -119,35 +119,37 @@ export const PromptGenerationOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PromptGenerationOutput$ { - /** @deprecated use `PromptGenerationOutput$inboundSchema` instead. */ - export const inboundSchema = PromptGenerationOutput$inboundSchema; - /** @deprecated use `PromptGenerationOutput$outboundSchema` instead. */ - export const outboundSchema = PromptGenerationOutput$outboundSchema; - /** @deprecated use `PromptGenerationOutput$Outbound` instead. */ - export type Outbound = PromptGenerationOutput$Outbound; + /** @deprecated use `PromptGenerationOutput$inboundSchema` instead. */ + export const inboundSchema = PromptGenerationOutput$inboundSchema; + /** @deprecated use `PromptGenerationOutput$outboundSchema` instead. */ + export const outboundSchema = PromptGenerationOutput$outboundSchema; + /** @deprecated use `PromptGenerationOutput$Outbound` instead. */ + export type Outbound = PromptGenerationOutput$Outbound; } /** @internal */ export const PromptImproveResponseBody$inboundSchema: z.ZodType< - PromptImproveResponseBody, - z.ZodTypeDef, - unknown + PromptImproveResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - promptGeneration: z.lazy(() => PromptGenerationOutput$inboundSchema).optional(), + promptGeneration: z.lazy(() => PromptGenerationOutput$inboundSchema) + .optional(), }); /** @internal */ export type PromptImproveResponseBody$Outbound = { - promptGeneration?: PromptGenerationOutput$Outbound | undefined; + promptGeneration?: PromptGenerationOutput$Outbound | undefined; }; /** @internal */ export const PromptImproveResponseBody$outboundSchema: z.ZodType< - PromptImproveResponseBody$Outbound, - z.ZodTypeDef, - PromptImproveResponseBody + PromptImproveResponseBody$Outbound, + z.ZodTypeDef, + PromptImproveResponseBody > = z.object({ - promptGeneration: z.lazy(() => PromptGenerationOutput$outboundSchema).optional(), + promptGeneration: z.lazy(() => PromptGenerationOutput$outboundSchema) + .optional(), }); /** @@ -155,73 +157,69 @@ export const PromptImproveResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PromptImproveResponseBody$ { - /** @deprecated use `PromptImproveResponseBody$inboundSchema` instead. */ - export const inboundSchema = PromptImproveResponseBody$inboundSchema; - /** @deprecated use `PromptImproveResponseBody$outboundSchema` instead. */ - export const outboundSchema = PromptImproveResponseBody$outboundSchema; - /** @deprecated use `PromptImproveResponseBody$Outbound` instead. */ - export type Outbound = PromptImproveResponseBody$Outbound; + /** @deprecated use `PromptImproveResponseBody$inboundSchema` instead. */ + export const inboundSchema = PromptImproveResponseBody$inboundSchema; + /** @deprecated use `PromptImproveResponseBody$outboundSchema` instead. */ + export const outboundSchema = PromptImproveResponseBody$outboundSchema; + /** @deprecated use `PromptImproveResponseBody$Outbound` instead. */ + export type Outbound = PromptImproveResponseBody$Outbound; } /** @internal */ export const PromptImproveResponse$inboundSchema: z.ZodType< - PromptImproveResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => PromptImproveResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + PromptImproveResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => PromptImproveResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type PromptImproveResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: PromptImproveResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: PromptImproveResponseBody$Outbound | undefined; }; /** @internal */ export const PromptImproveResponse$outboundSchema: z.ZodType< - PromptImproveResponse$Outbound, - z.ZodTypeDef, - PromptImproveResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => PromptImproveResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + PromptImproveResponse$Outbound, + z.ZodTypeDef, + PromptImproveResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => PromptImproveResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PromptImproveResponse$ { - /** @deprecated use `PromptImproveResponse$inboundSchema` instead. */ - export const inboundSchema = PromptImproveResponse$inboundSchema; - /** @deprecated use `PromptImproveResponse$outboundSchema` instead. */ - export const outboundSchema = PromptImproveResponse$outboundSchema; - /** @deprecated use `PromptImproveResponse$Outbound` instead. */ - export type Outbound = PromptImproveResponse$Outbound; + /** @deprecated use `PromptImproveResponse$inboundSchema` instead. */ + export const inboundSchema = PromptImproveResponse$inboundSchema; + /** @deprecated use `PromptImproveResponse$outboundSchema` instead. */ + export const outboundSchema = PromptImproveResponse$outboundSchema; + /** @deprecated use `PromptImproveResponse$Outbound` instead. */ + export type Outbound = PromptImproveResponse$Outbound; } diff --git a/src/sdk/models/operations/promptrandom.ts b/src/sdk/models/operations/promptrandom.ts index 3af442b..95df82c 100644 --- a/src/sdk/models/operations/promptrandom.ts +++ b/src/sdk/models/operations/promptrandom.ts @@ -2,70 +2,70 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type PromptRandomPromptGenerationOutput = { - /** - * API Credits Cost for Random Prompt Generation. Available for Production API Users. - */ - apiCreditCost?: number | undefined; - /** - * The random prompt generated. - */ - prompt?: string | undefined; + /** + * API Credits Cost for Random Prompt Generation. Available for Production API Users. + */ + apiCreditCost?: number | undefined; + /** + * The random prompt generated. + */ + prompt?: string | undefined; }; /** * Responses for POST /prompt/random */ export type PromptRandomResponseBody = { - promptGeneration?: PromptRandomPromptGenerationOutput | undefined; + promptGeneration?: PromptRandomPromptGenerationOutput | undefined; }; export type PromptRandomResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /prompt/random - */ - object?: PromptRandomResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /prompt/random + */ + object?: PromptRandomResponseBody | undefined; }; /** @internal */ export const PromptRandomPromptGenerationOutput$inboundSchema: z.ZodType< - PromptRandomPromptGenerationOutput, - z.ZodTypeDef, - unknown + PromptRandomPromptGenerationOutput, + z.ZodTypeDef, + unknown > = z.object({ - apiCreditCost: z.number().int().default(4), - prompt: z.string().default("The random prompt generated."), + apiCreditCost: z.number().int().default(4), + prompt: z.string().default("The random prompt generated."), }); /** @internal */ export type PromptRandomPromptGenerationOutput$Outbound = { - apiCreditCost: number; - prompt: string; + apiCreditCost: number; + prompt: string; }; /** @internal */ export const PromptRandomPromptGenerationOutput$outboundSchema: z.ZodType< - PromptRandomPromptGenerationOutput$Outbound, - z.ZodTypeDef, - PromptRandomPromptGenerationOutput + PromptRandomPromptGenerationOutput$Outbound, + z.ZodTypeDef, + PromptRandomPromptGenerationOutput > = z.object({ - apiCreditCost: z.number().int().default(4), - prompt: z.string().default("The random prompt generated."), + apiCreditCost: z.number().int().default(4), + prompt: z.string().default("The random prompt generated."), }); /** @@ -73,35 +73,40 @@ export const PromptRandomPromptGenerationOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PromptRandomPromptGenerationOutput$ { - /** @deprecated use `PromptRandomPromptGenerationOutput$inboundSchema` instead. */ - export const inboundSchema = PromptRandomPromptGenerationOutput$inboundSchema; - /** @deprecated use `PromptRandomPromptGenerationOutput$outboundSchema` instead. */ - export const outboundSchema = PromptRandomPromptGenerationOutput$outboundSchema; - /** @deprecated use `PromptRandomPromptGenerationOutput$Outbound` instead. */ - export type Outbound = PromptRandomPromptGenerationOutput$Outbound; + /** @deprecated use `PromptRandomPromptGenerationOutput$inboundSchema` instead. */ + export const inboundSchema = PromptRandomPromptGenerationOutput$inboundSchema; + /** @deprecated use `PromptRandomPromptGenerationOutput$outboundSchema` instead. */ + export const outboundSchema = + PromptRandomPromptGenerationOutput$outboundSchema; + /** @deprecated use `PromptRandomPromptGenerationOutput$Outbound` instead. */ + export type Outbound = PromptRandomPromptGenerationOutput$Outbound; } /** @internal */ export const PromptRandomResponseBody$inboundSchema: z.ZodType< - PromptRandomResponseBody, - z.ZodTypeDef, - unknown + PromptRandomResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - promptGeneration: z.lazy(() => PromptRandomPromptGenerationOutput$inboundSchema).optional(), + promptGeneration: z.lazy(() => + PromptRandomPromptGenerationOutput$inboundSchema + ).optional(), }); /** @internal */ export type PromptRandomResponseBody$Outbound = { - promptGeneration?: PromptRandomPromptGenerationOutput$Outbound | undefined; + promptGeneration?: PromptRandomPromptGenerationOutput$Outbound | undefined; }; /** @internal */ export const PromptRandomResponseBody$outboundSchema: z.ZodType< - PromptRandomResponseBody$Outbound, - z.ZodTypeDef, - PromptRandomResponseBody + PromptRandomResponseBody$Outbound, + z.ZodTypeDef, + PromptRandomResponseBody > = z.object({ - promptGeneration: z.lazy(() => PromptRandomPromptGenerationOutput$outboundSchema).optional(), + promptGeneration: z.lazy(() => + PromptRandomPromptGenerationOutput$outboundSchema + ).optional(), }); /** @@ -109,73 +114,69 @@ export const PromptRandomResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PromptRandomResponseBody$ { - /** @deprecated use `PromptRandomResponseBody$inboundSchema` instead. */ - export const inboundSchema = PromptRandomResponseBody$inboundSchema; - /** @deprecated use `PromptRandomResponseBody$outboundSchema` instead. */ - export const outboundSchema = PromptRandomResponseBody$outboundSchema; - /** @deprecated use `PromptRandomResponseBody$Outbound` instead. */ - export type Outbound = PromptRandomResponseBody$Outbound; + /** @deprecated use `PromptRandomResponseBody$inboundSchema` instead. */ + export const inboundSchema = PromptRandomResponseBody$inboundSchema; + /** @deprecated use `PromptRandomResponseBody$outboundSchema` instead. */ + export const outboundSchema = PromptRandomResponseBody$outboundSchema; + /** @deprecated use `PromptRandomResponseBody$Outbound` instead. */ + export type Outbound = PromptRandomResponseBody$Outbound; } /** @internal */ export const PromptRandomResponse$inboundSchema: z.ZodType< - PromptRandomResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => PromptRandomResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + PromptRandomResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => PromptRandomResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type PromptRandomResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: PromptRandomResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: PromptRandomResponseBody$Outbound | undefined; }; /** @internal */ export const PromptRandomResponse$outboundSchema: z.ZodType< - PromptRandomResponse$Outbound, - z.ZodTypeDef, - PromptRandomResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => PromptRandomResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + PromptRandomResponse$Outbound, + z.ZodTypeDef, + PromptRandomResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => PromptRandomResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PromptRandomResponse$ { - /** @deprecated use `PromptRandomResponse$inboundSchema` instead. */ - export const inboundSchema = PromptRandomResponse$inboundSchema; - /** @deprecated use `PromptRandomResponse$outboundSchema` instead. */ - export const outboundSchema = PromptRandomResponse$outboundSchema; - /** @deprecated use `PromptRandomResponse$Outbound` instead. */ - export type Outbound = PromptRandomResponse$Outbound; + /** @deprecated use `PromptRandomResponse$inboundSchema` instead. */ + export const inboundSchema = PromptRandomResponse$inboundSchema; + /** @deprecated use `PromptRandomResponse$outboundSchema` instead. */ + export const outboundSchema = PromptRandomResponse$outboundSchema; + /** @deprecated use `PromptRandomResponse$Outbound` instead. */ + export type Outbound = PromptRandomResponse$Outbound; } diff --git a/src/sdk/models/operations/uploadcanvasinitimage.ts b/src/sdk/models/operations/uploadcanvasinitimage.ts index 89bfa45..fdf4210 100644 --- a/src/sdk/models/operations/uploadcanvasinitimage.ts +++ b/src/sdk/models/operations/uploadcanvasinitimage.ts @@ -2,84 +2,84 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters provided in the request body as a JSON object */ export type UploadCanvasInitImageRequestBody = { - /** - * Has to be png, jpg, jpeg, or webp. - */ - initExtension: string; - /** - * Has to be png, jpg, jpeg, or webp. - */ - maskExtension: string; + /** + * Has to be png, jpg, jpeg, or webp. + */ + initExtension: string; + /** + * Has to be png, jpg, jpeg, or webp. + */ + maskExtension: string; }; export type CanvasInitImageUploadOutput = { - initFields?: string | null | undefined; - initImageId?: string | null | undefined; - initKey?: string | null | undefined; - initUrl?: string | null | undefined; - maskFields?: string | null | undefined; - maskImageId?: string | null | undefined; - maskKey?: string | null | undefined; - maskUrl?: string | null | undefined; + initFields?: string | null | undefined; + initImageId?: string | null | undefined; + initKey?: string | null | undefined; + initUrl?: string | null | undefined; + maskFields?: string | null | undefined; + maskImageId?: string | null | undefined; + maskKey?: string | null | undefined; + maskUrl?: string | null | undefined; }; /** * Responses for POST /canvas-init-image */ export type UploadCanvasInitImageResponseBody = { - uploadCanvasInitImage?: CanvasInitImageUploadOutput | null | undefined; + uploadCanvasInitImage?: CanvasInitImageUploadOutput | null | undefined; }; export type UploadCanvasInitImageResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /canvas-init-image - */ - object?: UploadCanvasInitImageResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /canvas-init-image + */ + object?: UploadCanvasInitImageResponseBody | undefined; }; /** @internal */ export const UploadCanvasInitImageRequestBody$inboundSchema: z.ZodType< - UploadCanvasInitImageRequestBody, - z.ZodTypeDef, - unknown + UploadCanvasInitImageRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - initExtension: z.string(), - maskExtension: z.string(), + initExtension: z.string(), + maskExtension: z.string(), }); /** @internal */ export type UploadCanvasInitImageRequestBody$Outbound = { - initExtension: string; - maskExtension: string; + initExtension: string; + maskExtension: string; }; /** @internal */ export const UploadCanvasInitImageRequestBody$outboundSchema: z.ZodType< - UploadCanvasInitImageRequestBody$Outbound, - z.ZodTypeDef, - UploadCanvasInitImageRequestBody + UploadCanvasInitImageRequestBody$Outbound, + z.ZodTypeDef, + UploadCanvasInitImageRequestBody > = z.object({ - initExtension: z.string(), - maskExtension: z.string(), + initExtension: z.string(), + maskExtension: z.string(), }); /** @@ -87,56 +87,56 @@ export const UploadCanvasInitImageRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadCanvasInitImageRequestBody$ { - /** @deprecated use `UploadCanvasInitImageRequestBody$inboundSchema` instead. */ - export const inboundSchema = UploadCanvasInitImageRequestBody$inboundSchema; - /** @deprecated use `UploadCanvasInitImageRequestBody$outboundSchema` instead. */ - export const outboundSchema = UploadCanvasInitImageRequestBody$outboundSchema; - /** @deprecated use `UploadCanvasInitImageRequestBody$Outbound` instead. */ - export type Outbound = UploadCanvasInitImageRequestBody$Outbound; + /** @deprecated use `UploadCanvasInitImageRequestBody$inboundSchema` instead. */ + export const inboundSchema = UploadCanvasInitImageRequestBody$inboundSchema; + /** @deprecated use `UploadCanvasInitImageRequestBody$outboundSchema` instead. */ + export const outboundSchema = UploadCanvasInitImageRequestBody$outboundSchema; + /** @deprecated use `UploadCanvasInitImageRequestBody$Outbound` instead. */ + export type Outbound = UploadCanvasInitImageRequestBody$Outbound; } /** @internal */ export const CanvasInitImageUploadOutput$inboundSchema: z.ZodType< - CanvasInitImageUploadOutput, - z.ZodTypeDef, - unknown + CanvasInitImageUploadOutput, + z.ZodTypeDef, + unknown > = z.object({ - initFields: z.nullable(z.string()).optional(), - initImageId: z.nullable(z.string()).optional(), - initKey: z.nullable(z.string()).optional(), - initUrl: z.nullable(z.string()).optional(), - maskFields: z.nullable(z.string()).optional(), - maskImageId: z.nullable(z.string()).optional(), - maskKey: z.nullable(z.string()).optional(), - maskUrl: z.nullable(z.string()).optional(), + initFields: z.nullable(z.string()).optional(), + initImageId: z.nullable(z.string()).optional(), + initKey: z.nullable(z.string()).optional(), + initUrl: z.nullable(z.string()).optional(), + maskFields: z.nullable(z.string()).optional(), + maskImageId: z.nullable(z.string()).optional(), + maskKey: z.nullable(z.string()).optional(), + maskUrl: z.nullable(z.string()).optional(), }); /** @internal */ export type CanvasInitImageUploadOutput$Outbound = { - initFields?: string | null | undefined; - initImageId?: string | null | undefined; - initKey?: string | null | undefined; - initUrl?: string | null | undefined; - maskFields?: string | null | undefined; - maskImageId?: string | null | undefined; - maskKey?: string | null | undefined; - maskUrl?: string | null | undefined; + initFields?: string | null | undefined; + initImageId?: string | null | undefined; + initKey?: string | null | undefined; + initUrl?: string | null | undefined; + maskFields?: string | null | undefined; + maskImageId?: string | null | undefined; + maskKey?: string | null | undefined; + maskUrl?: string | null | undefined; }; /** @internal */ export const CanvasInitImageUploadOutput$outboundSchema: z.ZodType< - CanvasInitImageUploadOutput$Outbound, - z.ZodTypeDef, - CanvasInitImageUploadOutput + CanvasInitImageUploadOutput$Outbound, + z.ZodTypeDef, + CanvasInitImageUploadOutput > = z.object({ - initFields: z.nullable(z.string()).optional(), - initImageId: z.nullable(z.string()).optional(), - initKey: z.nullable(z.string()).optional(), - initUrl: z.nullable(z.string()).optional(), - maskFields: z.nullable(z.string()).optional(), - maskImageId: z.nullable(z.string()).optional(), - maskKey: z.nullable(z.string()).optional(), - maskUrl: z.nullable(z.string()).optional(), + initFields: z.nullable(z.string()).optional(), + initImageId: z.nullable(z.string()).optional(), + initKey: z.nullable(z.string()).optional(), + initUrl: z.nullable(z.string()).optional(), + maskFields: z.nullable(z.string()).optional(), + maskImageId: z.nullable(z.string()).optional(), + maskKey: z.nullable(z.string()).optional(), + maskUrl: z.nullable(z.string()).optional(), }); /** @@ -144,39 +144,42 @@ export const CanvasInitImageUploadOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CanvasInitImageUploadOutput$ { - /** @deprecated use `CanvasInitImageUploadOutput$inboundSchema` instead. */ - export const inboundSchema = CanvasInitImageUploadOutput$inboundSchema; - /** @deprecated use `CanvasInitImageUploadOutput$outboundSchema` instead. */ - export const outboundSchema = CanvasInitImageUploadOutput$outboundSchema; - /** @deprecated use `CanvasInitImageUploadOutput$Outbound` instead. */ - export type Outbound = CanvasInitImageUploadOutput$Outbound; + /** @deprecated use `CanvasInitImageUploadOutput$inboundSchema` instead. */ + export const inboundSchema = CanvasInitImageUploadOutput$inboundSchema; + /** @deprecated use `CanvasInitImageUploadOutput$outboundSchema` instead. */ + export const outboundSchema = CanvasInitImageUploadOutput$outboundSchema; + /** @deprecated use `CanvasInitImageUploadOutput$Outbound` instead. */ + export type Outbound = CanvasInitImageUploadOutput$Outbound; } /** @internal */ export const UploadCanvasInitImageResponseBody$inboundSchema: z.ZodType< - UploadCanvasInitImageResponseBody, - z.ZodTypeDef, - unknown + UploadCanvasInitImageResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - uploadCanvasInitImage: z - .nullable(z.lazy(() => CanvasInitImageUploadOutput$inboundSchema)) - .optional(), + uploadCanvasInitImage: z.nullable( + z.lazy(() => CanvasInitImageUploadOutput$inboundSchema), + ).optional(), }); /** @internal */ export type UploadCanvasInitImageResponseBody$Outbound = { - uploadCanvasInitImage?: CanvasInitImageUploadOutput$Outbound | null | undefined; + uploadCanvasInitImage?: + | CanvasInitImageUploadOutput$Outbound + | null + | undefined; }; /** @internal */ export const UploadCanvasInitImageResponseBody$outboundSchema: z.ZodType< - UploadCanvasInitImageResponseBody$Outbound, - z.ZodTypeDef, - UploadCanvasInitImageResponseBody + UploadCanvasInitImageResponseBody$Outbound, + z.ZodTypeDef, + UploadCanvasInitImageResponseBody > = z.object({ - uploadCanvasInitImage: z - .nullable(z.lazy(() => CanvasInitImageUploadOutput$outboundSchema)) - .optional(), + uploadCanvasInitImage: z.nullable( + z.lazy(() => CanvasInitImageUploadOutput$outboundSchema), + ).optional(), }); /** @@ -184,73 +187,72 @@ export const UploadCanvasInitImageResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadCanvasInitImageResponseBody$ { - /** @deprecated use `UploadCanvasInitImageResponseBody$inboundSchema` instead. */ - export const inboundSchema = UploadCanvasInitImageResponseBody$inboundSchema; - /** @deprecated use `UploadCanvasInitImageResponseBody$outboundSchema` instead. */ - export const outboundSchema = UploadCanvasInitImageResponseBody$outboundSchema; - /** @deprecated use `UploadCanvasInitImageResponseBody$Outbound` instead. */ - export type Outbound = UploadCanvasInitImageResponseBody$Outbound; + /** @deprecated use `UploadCanvasInitImageResponseBody$inboundSchema` instead. */ + export const inboundSchema = UploadCanvasInitImageResponseBody$inboundSchema; + /** @deprecated use `UploadCanvasInitImageResponseBody$outboundSchema` instead. */ + export const outboundSchema = + UploadCanvasInitImageResponseBody$outboundSchema; + /** @deprecated use `UploadCanvasInitImageResponseBody$Outbound` instead. */ + export type Outbound = UploadCanvasInitImageResponseBody$Outbound; } /** @internal */ export const UploadCanvasInitImageResponse$inboundSchema: z.ZodType< - UploadCanvasInitImageResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => UploadCanvasInitImageResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + UploadCanvasInitImageResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => UploadCanvasInitImageResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type UploadCanvasInitImageResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: UploadCanvasInitImageResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: UploadCanvasInitImageResponseBody$Outbound | undefined; }; /** @internal */ export const UploadCanvasInitImageResponse$outboundSchema: z.ZodType< - UploadCanvasInitImageResponse$Outbound, - z.ZodTypeDef, - UploadCanvasInitImageResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => UploadCanvasInitImageResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + UploadCanvasInitImageResponse$Outbound, + z.ZodTypeDef, + UploadCanvasInitImageResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => UploadCanvasInitImageResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadCanvasInitImageResponse$ { - /** @deprecated use `UploadCanvasInitImageResponse$inboundSchema` instead. */ - export const inboundSchema = UploadCanvasInitImageResponse$inboundSchema; - /** @deprecated use `UploadCanvasInitImageResponse$outboundSchema` instead. */ - export const outboundSchema = UploadCanvasInitImageResponse$outboundSchema; - /** @deprecated use `UploadCanvasInitImageResponse$Outbound` instead. */ - export type Outbound = UploadCanvasInitImageResponse$Outbound; + /** @deprecated use `UploadCanvasInitImageResponse$inboundSchema` instead. */ + export const inboundSchema = UploadCanvasInitImageResponse$inboundSchema; + /** @deprecated use `UploadCanvasInitImageResponse$outboundSchema` instead. */ + export const outboundSchema = UploadCanvasInitImageResponse$outboundSchema; + /** @deprecated use `UploadCanvasInitImageResponse$Outbound` instead. */ + export type Outbound = UploadCanvasInitImageResponse$Outbound; } diff --git a/src/sdk/models/operations/uploaddatasetimage.ts b/src/sdk/models/operations/uploaddatasetimage.ts index fdebddb..05551bf 100644 --- a/src/sdk/models/operations/uploaddatasetimage.ts +++ b/src/sdk/models/operations/uploaddatasetimage.ts @@ -2,84 +2,84 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters provided in the request body as a JSON object */ export type UploadDatasetImageRequestBody = { - /** - * Has to be png, jpg, jpeg, or webp. - */ - extension: string; + /** + * Has to be png, jpg, jpeg, or webp. + */ + extension: string; }; export type UploadDatasetImageRequest = { - /** - * Query parameters provided in the request body as a JSON object - */ - requestBody: UploadDatasetImageRequestBody; - /** - * _"datasetId" is required - */ - datasetId: string; + /** + * Query parameters provided in the request body as a JSON object + */ + requestBody: UploadDatasetImageRequestBody; + /** + * _"datasetId" is required + */ + datasetId: string; }; export type DatasetUploadOutput = { - fields?: string | null | undefined; - id?: string | null | undefined; - key?: string | null | undefined; - url?: string | null | undefined; + fields?: string | null | undefined; + id?: string | null | undefined; + key?: string | null | undefined; + url?: string | null | undefined; }; /** * Responses for POST /datasets/{datasetId}/upload */ export type UploadDatasetImageResponseBody = { - uploadDatasetImage?: DatasetUploadOutput | null | undefined; + uploadDatasetImage?: DatasetUploadOutput | null | undefined; }; export type UploadDatasetImageResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /datasets/{datasetId}/upload - */ - object?: UploadDatasetImageResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /datasets/{datasetId}/upload + */ + object?: UploadDatasetImageResponseBody | undefined; }; /** @internal */ export const UploadDatasetImageRequestBody$inboundSchema: z.ZodType< - UploadDatasetImageRequestBody, - z.ZodTypeDef, - unknown + UploadDatasetImageRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - extension: z.string(), + extension: z.string(), }); /** @internal */ export type UploadDatasetImageRequestBody$Outbound = { - extension: string; + extension: string; }; /** @internal */ export const UploadDatasetImageRequestBody$outboundSchema: z.ZodType< - UploadDatasetImageRequestBody$Outbound, - z.ZodTypeDef, - UploadDatasetImageRequestBody + UploadDatasetImageRequestBody$Outbound, + z.ZodTypeDef, + UploadDatasetImageRequestBody > = z.object({ - extension: z.string(), + extension: z.string(), }); /** @@ -87,95 +87,91 @@ export const UploadDatasetImageRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadDatasetImageRequestBody$ { - /** @deprecated use `UploadDatasetImageRequestBody$inboundSchema` instead. */ - export const inboundSchema = UploadDatasetImageRequestBody$inboundSchema; - /** @deprecated use `UploadDatasetImageRequestBody$outboundSchema` instead. */ - export const outboundSchema = UploadDatasetImageRequestBody$outboundSchema; - /** @deprecated use `UploadDatasetImageRequestBody$Outbound` instead. */ - export type Outbound = UploadDatasetImageRequestBody$Outbound; + /** @deprecated use `UploadDatasetImageRequestBody$inboundSchema` instead. */ + export const inboundSchema = UploadDatasetImageRequestBody$inboundSchema; + /** @deprecated use `UploadDatasetImageRequestBody$outboundSchema` instead. */ + export const outboundSchema = UploadDatasetImageRequestBody$outboundSchema; + /** @deprecated use `UploadDatasetImageRequestBody$Outbound` instead. */ + export type Outbound = UploadDatasetImageRequestBody$Outbound; } /** @internal */ export const UploadDatasetImageRequest$inboundSchema: z.ZodType< - UploadDatasetImageRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UploadDatasetImageRequestBody$inboundSchema), - datasetId: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UploadDatasetImageRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UploadDatasetImageRequestBody$inboundSchema), + datasetId: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UploadDatasetImageRequest$Outbound = { - RequestBody: UploadDatasetImageRequestBody$Outbound; - datasetId: string; + RequestBody: UploadDatasetImageRequestBody$Outbound; + datasetId: string; }; /** @internal */ export const UploadDatasetImageRequest$outboundSchema: z.ZodType< - UploadDatasetImageRequest$Outbound, - z.ZodTypeDef, - UploadDatasetImageRequest -> = z - .object({ - requestBody: z.lazy(() => UploadDatasetImageRequestBody$outboundSchema), - datasetId: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UploadDatasetImageRequest$Outbound, + z.ZodTypeDef, + UploadDatasetImageRequest +> = z.object({ + requestBody: z.lazy(() => UploadDatasetImageRequestBody$outboundSchema), + datasetId: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadDatasetImageRequest$ { - /** @deprecated use `UploadDatasetImageRequest$inboundSchema` instead. */ - export const inboundSchema = UploadDatasetImageRequest$inboundSchema; - /** @deprecated use `UploadDatasetImageRequest$outboundSchema` instead. */ - export const outboundSchema = UploadDatasetImageRequest$outboundSchema; - /** @deprecated use `UploadDatasetImageRequest$Outbound` instead. */ - export type Outbound = UploadDatasetImageRequest$Outbound; + /** @deprecated use `UploadDatasetImageRequest$inboundSchema` instead. */ + export const inboundSchema = UploadDatasetImageRequest$inboundSchema; + /** @deprecated use `UploadDatasetImageRequest$outboundSchema` instead. */ + export const outboundSchema = UploadDatasetImageRequest$outboundSchema; + /** @deprecated use `UploadDatasetImageRequest$Outbound` instead. */ + export type Outbound = UploadDatasetImageRequest$Outbound; } /** @internal */ export const DatasetUploadOutput$inboundSchema: z.ZodType< - DatasetUploadOutput, - z.ZodTypeDef, - unknown + DatasetUploadOutput, + z.ZodTypeDef, + unknown > = z.object({ - fields: z.nullable(z.string()).optional(), - id: z.nullable(z.string()).optional(), - key: z.nullable(z.string()).optional(), - url: z.nullable(z.string()).optional(), + fields: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), + key: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), }); /** @internal */ export type DatasetUploadOutput$Outbound = { - fields?: string | null | undefined; - id?: string | null | undefined; - key?: string | null | undefined; - url?: string | null | undefined; + fields?: string | null | undefined; + id?: string | null | undefined; + key?: string | null | undefined; + url?: string | null | undefined; }; /** @internal */ export const DatasetUploadOutput$outboundSchema: z.ZodType< - DatasetUploadOutput$Outbound, - z.ZodTypeDef, - DatasetUploadOutput + DatasetUploadOutput$Outbound, + z.ZodTypeDef, + DatasetUploadOutput > = z.object({ - fields: z.nullable(z.string()).optional(), - id: z.nullable(z.string()).optional(), - key: z.nullable(z.string()).optional(), - url: z.nullable(z.string()).optional(), + fields: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), + key: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), }); /** @@ -183,35 +179,39 @@ export const DatasetUploadOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DatasetUploadOutput$ { - /** @deprecated use `DatasetUploadOutput$inboundSchema` instead. */ - export const inboundSchema = DatasetUploadOutput$inboundSchema; - /** @deprecated use `DatasetUploadOutput$outboundSchema` instead. */ - export const outboundSchema = DatasetUploadOutput$outboundSchema; - /** @deprecated use `DatasetUploadOutput$Outbound` instead. */ - export type Outbound = DatasetUploadOutput$Outbound; + /** @deprecated use `DatasetUploadOutput$inboundSchema` instead. */ + export const inboundSchema = DatasetUploadOutput$inboundSchema; + /** @deprecated use `DatasetUploadOutput$outboundSchema` instead. */ + export const outboundSchema = DatasetUploadOutput$outboundSchema; + /** @deprecated use `DatasetUploadOutput$Outbound` instead. */ + export type Outbound = DatasetUploadOutput$Outbound; } /** @internal */ export const UploadDatasetImageResponseBody$inboundSchema: z.ZodType< - UploadDatasetImageResponseBody, - z.ZodTypeDef, - unknown + UploadDatasetImageResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - uploadDatasetImage: z.nullable(z.lazy(() => DatasetUploadOutput$inboundSchema)).optional(), + uploadDatasetImage: z.nullable( + z.lazy(() => DatasetUploadOutput$inboundSchema), + ).optional(), }); /** @internal */ export type UploadDatasetImageResponseBody$Outbound = { - uploadDatasetImage?: DatasetUploadOutput$Outbound | null | undefined; + uploadDatasetImage?: DatasetUploadOutput$Outbound | null | undefined; }; /** @internal */ export const UploadDatasetImageResponseBody$outboundSchema: z.ZodType< - UploadDatasetImageResponseBody$Outbound, - z.ZodTypeDef, - UploadDatasetImageResponseBody + UploadDatasetImageResponseBody$Outbound, + z.ZodTypeDef, + UploadDatasetImageResponseBody > = z.object({ - uploadDatasetImage: z.nullable(z.lazy(() => DatasetUploadOutput$outboundSchema)).optional(), + uploadDatasetImage: z.nullable( + z.lazy(() => DatasetUploadOutput$outboundSchema), + ).optional(), }); /** @@ -219,73 +219,70 @@ export const UploadDatasetImageResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadDatasetImageResponseBody$ { - /** @deprecated use `UploadDatasetImageResponseBody$inboundSchema` instead. */ - export const inboundSchema = UploadDatasetImageResponseBody$inboundSchema; - /** @deprecated use `UploadDatasetImageResponseBody$outboundSchema` instead. */ - export const outboundSchema = UploadDatasetImageResponseBody$outboundSchema; - /** @deprecated use `UploadDatasetImageResponseBody$Outbound` instead. */ - export type Outbound = UploadDatasetImageResponseBody$Outbound; + /** @deprecated use `UploadDatasetImageResponseBody$inboundSchema` instead. */ + export const inboundSchema = UploadDatasetImageResponseBody$inboundSchema; + /** @deprecated use `UploadDatasetImageResponseBody$outboundSchema` instead. */ + export const outboundSchema = UploadDatasetImageResponseBody$outboundSchema; + /** @deprecated use `UploadDatasetImageResponseBody$Outbound` instead. */ + export type Outbound = UploadDatasetImageResponseBody$Outbound; } /** @internal */ export const UploadDatasetImageResponse$inboundSchema: z.ZodType< - UploadDatasetImageResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => UploadDatasetImageResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + UploadDatasetImageResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => UploadDatasetImageResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type UploadDatasetImageResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: UploadDatasetImageResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: UploadDatasetImageResponseBody$Outbound | undefined; }; /** @internal */ export const UploadDatasetImageResponse$outboundSchema: z.ZodType< - UploadDatasetImageResponse$Outbound, - z.ZodTypeDef, - UploadDatasetImageResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => UploadDatasetImageResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + UploadDatasetImageResponse$Outbound, + z.ZodTypeDef, + UploadDatasetImageResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => UploadDatasetImageResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadDatasetImageResponse$ { - /** @deprecated use `UploadDatasetImageResponse$inboundSchema` instead. */ - export const inboundSchema = UploadDatasetImageResponse$inboundSchema; - /** @deprecated use `UploadDatasetImageResponse$outboundSchema` instead. */ - export const outboundSchema = UploadDatasetImageResponse$outboundSchema; - /** @deprecated use `UploadDatasetImageResponse$Outbound` instead. */ - export type Outbound = UploadDatasetImageResponse$Outbound; + /** @deprecated use `UploadDatasetImageResponse$inboundSchema` instead. */ + export const inboundSchema = UploadDatasetImageResponse$inboundSchema; + /** @deprecated use `UploadDatasetImageResponse$outboundSchema` instead. */ + export const outboundSchema = UploadDatasetImageResponse$outboundSchema; + /** @deprecated use `UploadDatasetImageResponse$Outbound` instead. */ + export type Outbound = UploadDatasetImageResponse$Outbound; } diff --git a/src/sdk/models/operations/uploaddatasetimagefromgen.ts b/src/sdk/models/operations/uploaddatasetimagefromgen.ts index afb4cde..5d3e9df 100644 --- a/src/sdk/models/operations/uploaddatasetimagefromgen.ts +++ b/src/sdk/models/operations/uploaddatasetimagefromgen.ts @@ -2,81 +2,81 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters to be provided in the request body as a JSON object */ export type UploadDatasetImageFromGenRequestBody = { - /** - * The ID of the image to upload to the dataset. - */ - generatedImageId: string; + /** + * The ID of the image to upload to the dataset. + */ + generatedImageId: string; }; export type UploadDatasetImageFromGenRequest = { - /** - * Query parameters to be provided in the request body as a JSON object - */ - requestBody: UploadDatasetImageFromGenRequestBody; - /** - * The ID of the dataset to upload the image to. - */ - datasetId: string; + /** + * Query parameters to be provided in the request body as a JSON object + */ + requestBody: UploadDatasetImageFromGenRequestBody; + /** + * The ID of the dataset to upload the image to. + */ + datasetId: string; }; export type DatasetGenUploadOutput = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** * Responses for POST /datasets/{datasetId}/upload/gen */ export type UploadDatasetImageFromGenResponseBody = { - uploadDatasetImageFromGen?: DatasetGenUploadOutput | null | undefined; + uploadDatasetImageFromGen?: DatasetGenUploadOutput | null | undefined; }; export type UploadDatasetImageFromGenResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /datasets/{datasetId}/upload/gen - */ - object?: UploadDatasetImageFromGenResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /datasets/{datasetId}/upload/gen + */ + object?: UploadDatasetImageFromGenResponseBody | undefined; }; /** @internal */ export const UploadDatasetImageFromGenRequestBody$inboundSchema: z.ZodType< - UploadDatasetImageFromGenRequestBody, - z.ZodTypeDef, - unknown + UploadDatasetImageFromGenRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - generatedImageId: z.string(), + generatedImageId: z.string(), }); /** @internal */ export type UploadDatasetImageFromGenRequestBody$Outbound = { - generatedImageId: string; + generatedImageId: string; }; /** @internal */ export const UploadDatasetImageFromGenRequestBody$outboundSchema: z.ZodType< - UploadDatasetImageFromGenRequestBody$Outbound, - z.ZodTypeDef, - UploadDatasetImageFromGenRequestBody + UploadDatasetImageFromGenRequestBody$Outbound, + z.ZodTypeDef, + UploadDatasetImageFromGenRequestBody > = z.object({ - generatedImageId: z.string(), + generatedImageId: z.string(), }); /** @@ -84,86 +84,86 @@ export const UploadDatasetImageFromGenRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadDatasetImageFromGenRequestBody$ { - /** @deprecated use `UploadDatasetImageFromGenRequestBody$inboundSchema` instead. */ - export const inboundSchema = UploadDatasetImageFromGenRequestBody$inboundSchema; - /** @deprecated use `UploadDatasetImageFromGenRequestBody$outboundSchema` instead. */ - export const outboundSchema = UploadDatasetImageFromGenRequestBody$outboundSchema; - /** @deprecated use `UploadDatasetImageFromGenRequestBody$Outbound` instead. */ - export type Outbound = UploadDatasetImageFromGenRequestBody$Outbound; + /** @deprecated use `UploadDatasetImageFromGenRequestBody$inboundSchema` instead. */ + export const inboundSchema = + UploadDatasetImageFromGenRequestBody$inboundSchema; + /** @deprecated use `UploadDatasetImageFromGenRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UploadDatasetImageFromGenRequestBody$outboundSchema; + /** @deprecated use `UploadDatasetImageFromGenRequestBody$Outbound` instead. */ + export type Outbound = UploadDatasetImageFromGenRequestBody$Outbound; } /** @internal */ export const UploadDatasetImageFromGenRequest$inboundSchema: z.ZodType< - UploadDatasetImageFromGenRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UploadDatasetImageFromGenRequestBody$inboundSchema), - datasetId: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UploadDatasetImageFromGenRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UploadDatasetImageFromGenRequestBody$inboundSchema), + datasetId: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UploadDatasetImageFromGenRequest$Outbound = { - RequestBody: UploadDatasetImageFromGenRequestBody$Outbound; - datasetId: string; + RequestBody: UploadDatasetImageFromGenRequestBody$Outbound; + datasetId: string; }; /** @internal */ export const UploadDatasetImageFromGenRequest$outboundSchema: z.ZodType< - UploadDatasetImageFromGenRequest$Outbound, - z.ZodTypeDef, - UploadDatasetImageFromGenRequest -> = z - .object({ - requestBody: z.lazy(() => UploadDatasetImageFromGenRequestBody$outboundSchema), - datasetId: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UploadDatasetImageFromGenRequest$Outbound, + z.ZodTypeDef, + UploadDatasetImageFromGenRequest +> = z.object({ + requestBody: z.lazy(() => + UploadDatasetImageFromGenRequestBody$outboundSchema + ), + datasetId: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadDatasetImageFromGenRequest$ { - /** @deprecated use `UploadDatasetImageFromGenRequest$inboundSchema` instead. */ - export const inboundSchema = UploadDatasetImageFromGenRequest$inboundSchema; - /** @deprecated use `UploadDatasetImageFromGenRequest$outboundSchema` instead. */ - export const outboundSchema = UploadDatasetImageFromGenRequest$outboundSchema; - /** @deprecated use `UploadDatasetImageFromGenRequest$Outbound` instead. */ - export type Outbound = UploadDatasetImageFromGenRequest$Outbound; + /** @deprecated use `UploadDatasetImageFromGenRequest$inboundSchema` instead. */ + export const inboundSchema = UploadDatasetImageFromGenRequest$inboundSchema; + /** @deprecated use `UploadDatasetImageFromGenRequest$outboundSchema` instead. */ + export const outboundSchema = UploadDatasetImageFromGenRequest$outboundSchema; + /** @deprecated use `UploadDatasetImageFromGenRequest$Outbound` instead. */ + export type Outbound = UploadDatasetImageFromGenRequest$Outbound; } /** @internal */ export const DatasetGenUploadOutput$inboundSchema: z.ZodType< - DatasetGenUploadOutput, - z.ZodTypeDef, - unknown + DatasetGenUploadOutput, + z.ZodTypeDef, + unknown > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @internal */ export type DatasetGenUploadOutput$Outbound = { - id?: string | null | undefined; + id?: string | null | undefined; }; /** @internal */ export const DatasetGenUploadOutput$outboundSchema: z.ZodType< - DatasetGenUploadOutput$Outbound, - z.ZodTypeDef, - DatasetGenUploadOutput + DatasetGenUploadOutput$Outbound, + z.ZodTypeDef, + DatasetGenUploadOutput > = z.object({ - id: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), }); /** @@ -171,39 +171,42 @@ export const DatasetGenUploadOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DatasetGenUploadOutput$ { - /** @deprecated use `DatasetGenUploadOutput$inboundSchema` instead. */ - export const inboundSchema = DatasetGenUploadOutput$inboundSchema; - /** @deprecated use `DatasetGenUploadOutput$outboundSchema` instead. */ - export const outboundSchema = DatasetGenUploadOutput$outboundSchema; - /** @deprecated use `DatasetGenUploadOutput$Outbound` instead. */ - export type Outbound = DatasetGenUploadOutput$Outbound; + /** @deprecated use `DatasetGenUploadOutput$inboundSchema` instead. */ + export const inboundSchema = DatasetGenUploadOutput$inboundSchema; + /** @deprecated use `DatasetGenUploadOutput$outboundSchema` instead. */ + export const outboundSchema = DatasetGenUploadOutput$outboundSchema; + /** @deprecated use `DatasetGenUploadOutput$Outbound` instead. */ + export type Outbound = DatasetGenUploadOutput$Outbound; } /** @internal */ export const UploadDatasetImageFromGenResponseBody$inboundSchema: z.ZodType< - UploadDatasetImageFromGenResponseBody, - z.ZodTypeDef, - unknown + UploadDatasetImageFromGenResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - uploadDatasetImageFromGen: z - .nullable(z.lazy(() => DatasetGenUploadOutput$inboundSchema)) - .optional(), + uploadDatasetImageFromGen: z.nullable( + z.lazy(() => DatasetGenUploadOutput$inboundSchema), + ).optional(), }); /** @internal */ export type UploadDatasetImageFromGenResponseBody$Outbound = { - uploadDatasetImageFromGen?: DatasetGenUploadOutput$Outbound | null | undefined; + uploadDatasetImageFromGen?: + | DatasetGenUploadOutput$Outbound + | null + | undefined; }; /** @internal */ export const UploadDatasetImageFromGenResponseBody$outboundSchema: z.ZodType< - UploadDatasetImageFromGenResponseBody$Outbound, - z.ZodTypeDef, - UploadDatasetImageFromGenResponseBody + UploadDatasetImageFromGenResponseBody$Outbound, + z.ZodTypeDef, + UploadDatasetImageFromGenResponseBody > = z.object({ - uploadDatasetImageFromGen: z - .nullable(z.lazy(() => DatasetGenUploadOutput$outboundSchema)) - .optional(), + uploadDatasetImageFromGen: z.nullable( + z.lazy(() => DatasetGenUploadOutput$outboundSchema), + ).optional(), }); /** @@ -211,73 +214,74 @@ export const UploadDatasetImageFromGenResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadDatasetImageFromGenResponseBody$ { - /** @deprecated use `UploadDatasetImageFromGenResponseBody$inboundSchema` instead. */ - export const inboundSchema = UploadDatasetImageFromGenResponseBody$inboundSchema; - /** @deprecated use `UploadDatasetImageFromGenResponseBody$outboundSchema` instead. */ - export const outboundSchema = UploadDatasetImageFromGenResponseBody$outboundSchema; - /** @deprecated use `UploadDatasetImageFromGenResponseBody$Outbound` instead. */ - export type Outbound = UploadDatasetImageFromGenResponseBody$Outbound; + /** @deprecated use `UploadDatasetImageFromGenResponseBody$inboundSchema` instead. */ + export const inboundSchema = + UploadDatasetImageFromGenResponseBody$inboundSchema; + /** @deprecated use `UploadDatasetImageFromGenResponseBody$outboundSchema` instead. */ + export const outboundSchema = + UploadDatasetImageFromGenResponseBody$outboundSchema; + /** @deprecated use `UploadDatasetImageFromGenResponseBody$Outbound` instead. */ + export type Outbound = UploadDatasetImageFromGenResponseBody$Outbound; } /** @internal */ export const UploadDatasetImageFromGenResponse$inboundSchema: z.ZodType< - UploadDatasetImageFromGenResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => UploadDatasetImageFromGenResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + UploadDatasetImageFromGenResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => UploadDatasetImageFromGenResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type UploadDatasetImageFromGenResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: UploadDatasetImageFromGenResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: UploadDatasetImageFromGenResponseBody$Outbound | undefined; }; /** @internal */ export const UploadDatasetImageFromGenResponse$outboundSchema: z.ZodType< - UploadDatasetImageFromGenResponse$Outbound, - z.ZodTypeDef, - UploadDatasetImageFromGenResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => UploadDatasetImageFromGenResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + UploadDatasetImageFromGenResponse$Outbound, + z.ZodTypeDef, + UploadDatasetImageFromGenResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => UploadDatasetImageFromGenResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadDatasetImageFromGenResponse$ { - /** @deprecated use `UploadDatasetImageFromGenResponse$inboundSchema` instead. */ - export const inboundSchema = UploadDatasetImageFromGenResponse$inboundSchema; - /** @deprecated use `UploadDatasetImageFromGenResponse$outboundSchema` instead. */ - export const outboundSchema = UploadDatasetImageFromGenResponse$outboundSchema; - /** @deprecated use `UploadDatasetImageFromGenResponse$Outbound` instead. */ - export type Outbound = UploadDatasetImageFromGenResponse$Outbound; + /** @deprecated use `UploadDatasetImageFromGenResponse$inboundSchema` instead. */ + export const inboundSchema = UploadDatasetImageFromGenResponse$inboundSchema; + /** @deprecated use `UploadDatasetImageFromGenResponse$outboundSchema` instead. */ + export const outboundSchema = + UploadDatasetImageFromGenResponse$outboundSchema; + /** @deprecated use `UploadDatasetImageFromGenResponse$Outbound` instead. */ + export type Outbound = UploadDatasetImageFromGenResponse$Outbound; } diff --git a/src/sdk/models/operations/uploadinitimage.ts b/src/sdk/models/operations/uploadinitimage.ts index b76733e..ec54005 100644 --- a/src/sdk/models/operations/uploadinitimage.ts +++ b/src/sdk/models/operations/uploadinitimage.ts @@ -2,73 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters provided in the request body as a JSON object */ export type UploadInitImageRequestBody = { - /** - * Has to be png, jpg, jpeg, or webp. - */ - extension: string; + /** + * Has to be png, jpg, jpeg, or webp. + */ + extension: string; }; export type InitImageUploadOutput = { - fields?: string | null | undefined; - id?: string | null | undefined; - key?: string | null | undefined; - url?: string | null | undefined; + fields?: string | null | undefined; + id?: string | null | undefined; + key?: string | null | undefined; + url?: string | null | undefined; }; /** * Responses for POST /init-image */ export type UploadInitImageResponseBody = { - uploadInitImage?: InitImageUploadOutput | null | undefined; + uploadInitImage?: InitImageUploadOutput | null | undefined; }; export type UploadInitImageResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /init-image - */ - object?: UploadInitImageResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /init-image + */ + object?: UploadInitImageResponseBody | undefined; }; /** @internal */ export const UploadInitImageRequestBody$inboundSchema: z.ZodType< - UploadInitImageRequestBody, - z.ZodTypeDef, - unknown + UploadInitImageRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - extension: z.string(), + extension: z.string(), }); /** @internal */ export type UploadInitImageRequestBody$Outbound = { - extension: string; + extension: string; }; /** @internal */ export const UploadInitImageRequestBody$outboundSchema: z.ZodType< - UploadInitImageRequestBody$Outbound, - z.ZodTypeDef, - UploadInitImageRequestBody + UploadInitImageRequestBody$Outbound, + z.ZodTypeDef, + UploadInitImageRequestBody > = z.object({ - extension: z.string(), + extension: z.string(), }); /** @@ -76,44 +76,44 @@ export const UploadInitImageRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadInitImageRequestBody$ { - /** @deprecated use `UploadInitImageRequestBody$inboundSchema` instead. */ - export const inboundSchema = UploadInitImageRequestBody$inboundSchema; - /** @deprecated use `UploadInitImageRequestBody$outboundSchema` instead. */ - export const outboundSchema = UploadInitImageRequestBody$outboundSchema; - /** @deprecated use `UploadInitImageRequestBody$Outbound` instead. */ - export type Outbound = UploadInitImageRequestBody$Outbound; + /** @deprecated use `UploadInitImageRequestBody$inboundSchema` instead. */ + export const inboundSchema = UploadInitImageRequestBody$inboundSchema; + /** @deprecated use `UploadInitImageRequestBody$outboundSchema` instead. */ + export const outboundSchema = UploadInitImageRequestBody$outboundSchema; + /** @deprecated use `UploadInitImageRequestBody$Outbound` instead. */ + export type Outbound = UploadInitImageRequestBody$Outbound; } /** @internal */ export const InitImageUploadOutput$inboundSchema: z.ZodType< - InitImageUploadOutput, - z.ZodTypeDef, - unknown + InitImageUploadOutput, + z.ZodTypeDef, + unknown > = z.object({ - fields: z.nullable(z.string()).optional(), - id: z.nullable(z.string()).optional(), - key: z.nullable(z.string()).optional(), - url: z.nullable(z.string()).optional(), + fields: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), + key: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), }); /** @internal */ export type InitImageUploadOutput$Outbound = { - fields?: string | null | undefined; - id?: string | null | undefined; - key?: string | null | undefined; - url?: string | null | undefined; + fields?: string | null | undefined; + id?: string | null | undefined; + key?: string | null | undefined; + url?: string | null | undefined; }; /** @internal */ export const InitImageUploadOutput$outboundSchema: z.ZodType< - InitImageUploadOutput$Outbound, - z.ZodTypeDef, - InitImageUploadOutput + InitImageUploadOutput$Outbound, + z.ZodTypeDef, + InitImageUploadOutput > = z.object({ - fields: z.nullable(z.string()).optional(), - id: z.nullable(z.string()).optional(), - key: z.nullable(z.string()).optional(), - url: z.nullable(z.string()).optional(), + fields: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), + key: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), }); /** @@ -121,35 +121,38 @@ export const InitImageUploadOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InitImageUploadOutput$ { - /** @deprecated use `InitImageUploadOutput$inboundSchema` instead. */ - export const inboundSchema = InitImageUploadOutput$inboundSchema; - /** @deprecated use `InitImageUploadOutput$outboundSchema` instead. */ - export const outboundSchema = InitImageUploadOutput$outboundSchema; - /** @deprecated use `InitImageUploadOutput$Outbound` instead. */ - export type Outbound = InitImageUploadOutput$Outbound; + /** @deprecated use `InitImageUploadOutput$inboundSchema` instead. */ + export const inboundSchema = InitImageUploadOutput$inboundSchema; + /** @deprecated use `InitImageUploadOutput$outboundSchema` instead. */ + export const outboundSchema = InitImageUploadOutput$outboundSchema; + /** @deprecated use `InitImageUploadOutput$Outbound` instead. */ + export type Outbound = InitImageUploadOutput$Outbound; } /** @internal */ export const UploadInitImageResponseBody$inboundSchema: z.ZodType< - UploadInitImageResponseBody, - z.ZodTypeDef, - unknown + UploadInitImageResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - uploadInitImage: z.nullable(z.lazy(() => InitImageUploadOutput$inboundSchema)).optional(), + uploadInitImage: z.nullable(z.lazy(() => InitImageUploadOutput$inboundSchema)) + .optional(), }); /** @internal */ export type UploadInitImageResponseBody$Outbound = { - uploadInitImage?: InitImageUploadOutput$Outbound | null | undefined; + uploadInitImage?: InitImageUploadOutput$Outbound | null | undefined; }; /** @internal */ export const UploadInitImageResponseBody$outboundSchema: z.ZodType< - UploadInitImageResponseBody$Outbound, - z.ZodTypeDef, - UploadInitImageResponseBody + UploadInitImageResponseBody$Outbound, + z.ZodTypeDef, + UploadInitImageResponseBody > = z.object({ - uploadInitImage: z.nullable(z.lazy(() => InitImageUploadOutput$outboundSchema)).optional(), + uploadInitImage: z.nullable( + z.lazy(() => InitImageUploadOutput$outboundSchema), + ).optional(), }); /** @@ -157,73 +160,69 @@ export const UploadInitImageResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadInitImageResponseBody$ { - /** @deprecated use `UploadInitImageResponseBody$inboundSchema` instead. */ - export const inboundSchema = UploadInitImageResponseBody$inboundSchema; - /** @deprecated use `UploadInitImageResponseBody$outboundSchema` instead. */ - export const outboundSchema = UploadInitImageResponseBody$outboundSchema; - /** @deprecated use `UploadInitImageResponseBody$Outbound` instead. */ - export type Outbound = UploadInitImageResponseBody$Outbound; + /** @deprecated use `UploadInitImageResponseBody$inboundSchema` instead. */ + export const inboundSchema = UploadInitImageResponseBody$inboundSchema; + /** @deprecated use `UploadInitImageResponseBody$outboundSchema` instead. */ + export const outboundSchema = UploadInitImageResponseBody$outboundSchema; + /** @deprecated use `UploadInitImageResponseBody$Outbound` instead. */ + export type Outbound = UploadInitImageResponseBody$Outbound; } /** @internal */ export const UploadInitImageResponse$inboundSchema: z.ZodType< - UploadInitImageResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => UploadInitImageResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + UploadInitImageResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => UploadInitImageResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type UploadInitImageResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: UploadInitImageResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: UploadInitImageResponseBody$Outbound | undefined; }; /** @internal */ export const UploadInitImageResponse$outboundSchema: z.ZodType< - UploadInitImageResponse$Outbound, - z.ZodTypeDef, - UploadInitImageResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => UploadInitImageResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + UploadInitImageResponse$Outbound, + z.ZodTypeDef, + UploadInitImageResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => UploadInitImageResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadInitImageResponse$ { - /** @deprecated use `UploadInitImageResponse$inboundSchema` instead. */ - export const inboundSchema = UploadInitImageResponse$inboundSchema; - /** @deprecated use `UploadInitImageResponse$outboundSchema` instead. */ - export const outboundSchema = UploadInitImageResponse$outboundSchema; - /** @deprecated use `UploadInitImageResponse$Outbound` instead. */ - export type Outbound = UploadInitImageResponse$Outbound; + /** @deprecated use `UploadInitImageResponse$inboundSchema` instead. */ + export const inboundSchema = UploadInitImageResponse$inboundSchema; + /** @deprecated use `UploadInitImageResponse$outboundSchema` instead. */ + export const outboundSchema = UploadInitImageResponse$outboundSchema; + /** @deprecated use `UploadInitImageResponse$Outbound` instead. */ + export type Outbound = UploadInitImageResponse$Outbound; } diff --git a/src/sdk/models/operations/uploadmodelasset.ts b/src/sdk/models/operations/uploadmodelasset.ts index 7c308c8..726251b 100644 --- a/src/sdk/models/operations/uploadmodelasset.ts +++ b/src/sdk/models/operations/uploadmodelasset.ts @@ -2,74 +2,74 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Query parameters can also be provided in the request body as a JSON object */ export type UploadModelAssetRequestBody = { - modelExtension?: string | undefined; - name?: string | null | undefined; + modelExtension?: string | undefined; + name?: string | null | undefined; }; export type ModelAssetUploadOutput = { - modelFields?: string | null | undefined; - modelId?: string | null | undefined; - modelKey?: string | null | undefined; - modelUrl?: string | null | undefined; + modelFields?: string | null | undefined; + modelId?: string | null | undefined; + modelKey?: string | null | undefined; + modelUrl?: string | null | undefined; }; /** * Responses for POST /api/rest/v1/models-3d/upload */ export type UploadModelAssetResponseBody = { - uploadModelAsset?: ModelAssetUploadOutput | null | undefined; + uploadModelAsset?: ModelAssetUploadOutput | null | undefined; }; export type UploadModelAssetResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Responses for POST /api/rest/v1/models-3d/upload - */ - object?: UploadModelAssetResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Responses for POST /api/rest/v1/models-3d/upload + */ + object?: UploadModelAssetResponseBody | undefined; }; /** @internal */ export const UploadModelAssetRequestBody$inboundSchema: z.ZodType< - UploadModelAssetRequestBody, - z.ZodTypeDef, - unknown + UploadModelAssetRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - modelExtension: z.string().optional(), - name: z.nullable(z.string()).optional(), + modelExtension: z.string().optional(), + name: z.nullable(z.string()).optional(), }); /** @internal */ export type UploadModelAssetRequestBody$Outbound = { - modelExtension?: string | undefined; - name?: string | null | undefined; + modelExtension?: string | undefined; + name?: string | null | undefined; }; /** @internal */ export const UploadModelAssetRequestBody$outboundSchema: z.ZodType< - UploadModelAssetRequestBody$Outbound, - z.ZodTypeDef, - UploadModelAssetRequestBody + UploadModelAssetRequestBody$Outbound, + z.ZodTypeDef, + UploadModelAssetRequestBody > = z.object({ - modelExtension: z.string().optional(), - name: z.nullable(z.string()).optional(), + modelExtension: z.string().optional(), + name: z.nullable(z.string()).optional(), }); /** @@ -77,44 +77,44 @@ export const UploadModelAssetRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadModelAssetRequestBody$ { - /** @deprecated use `UploadModelAssetRequestBody$inboundSchema` instead. */ - export const inboundSchema = UploadModelAssetRequestBody$inboundSchema; - /** @deprecated use `UploadModelAssetRequestBody$outboundSchema` instead. */ - export const outboundSchema = UploadModelAssetRequestBody$outboundSchema; - /** @deprecated use `UploadModelAssetRequestBody$Outbound` instead. */ - export type Outbound = UploadModelAssetRequestBody$Outbound; + /** @deprecated use `UploadModelAssetRequestBody$inboundSchema` instead. */ + export const inboundSchema = UploadModelAssetRequestBody$inboundSchema; + /** @deprecated use `UploadModelAssetRequestBody$outboundSchema` instead. */ + export const outboundSchema = UploadModelAssetRequestBody$outboundSchema; + /** @deprecated use `UploadModelAssetRequestBody$Outbound` instead. */ + export type Outbound = UploadModelAssetRequestBody$Outbound; } /** @internal */ export const ModelAssetUploadOutput$inboundSchema: z.ZodType< - ModelAssetUploadOutput, - z.ZodTypeDef, - unknown + ModelAssetUploadOutput, + z.ZodTypeDef, + unknown > = z.object({ - modelFields: z.nullable(z.string()).optional(), - modelId: z.nullable(z.string()).optional(), - modelKey: z.nullable(z.string()).optional(), - modelUrl: z.nullable(z.string()).optional(), + modelFields: z.nullable(z.string()).optional(), + modelId: z.nullable(z.string()).optional(), + modelKey: z.nullable(z.string()).optional(), + modelUrl: z.nullable(z.string()).optional(), }); /** @internal */ export type ModelAssetUploadOutput$Outbound = { - modelFields?: string | null | undefined; - modelId?: string | null | undefined; - modelKey?: string | null | undefined; - modelUrl?: string | null | undefined; + modelFields?: string | null | undefined; + modelId?: string | null | undefined; + modelKey?: string | null | undefined; + modelUrl?: string | null | undefined; }; /** @internal */ export const ModelAssetUploadOutput$outboundSchema: z.ZodType< - ModelAssetUploadOutput$Outbound, - z.ZodTypeDef, - ModelAssetUploadOutput + ModelAssetUploadOutput$Outbound, + z.ZodTypeDef, + ModelAssetUploadOutput > = z.object({ - modelFields: z.nullable(z.string()).optional(), - modelId: z.nullable(z.string()).optional(), - modelKey: z.nullable(z.string()).optional(), - modelUrl: z.nullable(z.string()).optional(), + modelFields: z.nullable(z.string()).optional(), + modelId: z.nullable(z.string()).optional(), + modelKey: z.nullable(z.string()).optional(), + modelUrl: z.nullable(z.string()).optional(), }); /** @@ -122,35 +122,39 @@ export const ModelAssetUploadOutput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ModelAssetUploadOutput$ { - /** @deprecated use `ModelAssetUploadOutput$inboundSchema` instead. */ - export const inboundSchema = ModelAssetUploadOutput$inboundSchema; - /** @deprecated use `ModelAssetUploadOutput$outboundSchema` instead. */ - export const outboundSchema = ModelAssetUploadOutput$outboundSchema; - /** @deprecated use `ModelAssetUploadOutput$Outbound` instead. */ - export type Outbound = ModelAssetUploadOutput$Outbound; + /** @deprecated use `ModelAssetUploadOutput$inboundSchema` instead. */ + export const inboundSchema = ModelAssetUploadOutput$inboundSchema; + /** @deprecated use `ModelAssetUploadOutput$outboundSchema` instead. */ + export const outboundSchema = ModelAssetUploadOutput$outboundSchema; + /** @deprecated use `ModelAssetUploadOutput$Outbound` instead. */ + export type Outbound = ModelAssetUploadOutput$Outbound; } /** @internal */ export const UploadModelAssetResponseBody$inboundSchema: z.ZodType< - UploadModelAssetResponseBody, - z.ZodTypeDef, - unknown + UploadModelAssetResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - uploadModelAsset: z.nullable(z.lazy(() => ModelAssetUploadOutput$inboundSchema)).optional(), + uploadModelAsset: z.nullable( + z.lazy(() => ModelAssetUploadOutput$inboundSchema), + ).optional(), }); /** @internal */ export type UploadModelAssetResponseBody$Outbound = { - uploadModelAsset?: ModelAssetUploadOutput$Outbound | null | undefined; + uploadModelAsset?: ModelAssetUploadOutput$Outbound | null | undefined; }; /** @internal */ export const UploadModelAssetResponseBody$outboundSchema: z.ZodType< - UploadModelAssetResponseBody$Outbound, - z.ZodTypeDef, - UploadModelAssetResponseBody + UploadModelAssetResponseBody$Outbound, + z.ZodTypeDef, + UploadModelAssetResponseBody > = z.object({ - uploadModelAsset: z.nullable(z.lazy(() => ModelAssetUploadOutput$outboundSchema)).optional(), + uploadModelAsset: z.nullable( + z.lazy(() => ModelAssetUploadOutput$outboundSchema), + ).optional(), }); /** @@ -158,73 +162,69 @@ export const UploadModelAssetResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadModelAssetResponseBody$ { - /** @deprecated use `UploadModelAssetResponseBody$inboundSchema` instead. */ - export const inboundSchema = UploadModelAssetResponseBody$inboundSchema; - /** @deprecated use `UploadModelAssetResponseBody$outboundSchema` instead. */ - export const outboundSchema = UploadModelAssetResponseBody$outboundSchema; - /** @deprecated use `UploadModelAssetResponseBody$Outbound` instead. */ - export type Outbound = UploadModelAssetResponseBody$Outbound; + /** @deprecated use `UploadModelAssetResponseBody$inboundSchema` instead. */ + export const inboundSchema = UploadModelAssetResponseBody$inboundSchema; + /** @deprecated use `UploadModelAssetResponseBody$outboundSchema` instead. */ + export const outboundSchema = UploadModelAssetResponseBody$outboundSchema; + /** @deprecated use `UploadModelAssetResponseBody$Outbound` instead. */ + export type Outbound = UploadModelAssetResponseBody$Outbound; } /** @internal */ export const UploadModelAssetResponse$inboundSchema: z.ZodType< - UploadModelAssetResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => UploadModelAssetResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + UploadModelAssetResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => UploadModelAssetResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type UploadModelAssetResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: UploadModelAssetResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: UploadModelAssetResponseBody$Outbound | undefined; }; /** @internal */ export const UploadModelAssetResponse$outboundSchema: z.ZodType< - UploadModelAssetResponse$Outbound, - z.ZodTypeDef, - UploadModelAssetResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => UploadModelAssetResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + UploadModelAssetResponse$Outbound, + z.ZodTypeDef, + UploadModelAssetResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => UploadModelAssetResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadModelAssetResponse$ { - /** @deprecated use `UploadModelAssetResponse$inboundSchema` instead. */ - export const inboundSchema = UploadModelAssetResponse$inboundSchema; - /** @deprecated use `UploadModelAssetResponse$outboundSchema` instead. */ - export const outboundSchema = UploadModelAssetResponse$outboundSchema; - /** @deprecated use `UploadModelAssetResponse$Outbound` instead. */ - export type Outbound = UploadModelAssetResponse$Outbound; + /** @deprecated use `UploadModelAssetResponse$inboundSchema` instead. */ + export const inboundSchema = UploadModelAssetResponse$inboundSchema; + /** @deprecated use `UploadModelAssetResponse$outboundSchema` instead. */ + export const outboundSchema = UploadModelAssetResponse$outboundSchema; + /** @deprecated use `UploadModelAssetResponse$Outbound` instead. */ + export type Outbound = UploadModelAssetResponse$Outbound; } diff --git a/src/sdk/models/shared/canvasrequesttype.ts b/src/sdk/models/shared/canvasrequesttype.ts index ac6cf1a..1660c82 100644 --- a/src/sdk/models/shared/canvasrequesttype.ts +++ b/src/sdk/models/shared/canvasrequesttype.ts @@ -8,27 +8,29 @@ import * as z from "zod"; * The type of request for the Canvas Editor. */ export enum CanvasRequestType { - Inpaint = "INPAINT", - Outpaint = "OUTPAINT", - Sketch2Img = "SKETCH2IMG", - Img2Img = "IMG2IMG", + Inpaint = "INPAINT", + Outpaint = "OUTPAINT", + Sketch2Img = "SKETCH2IMG", + Img2Img = "IMG2IMG", } /** @internal */ -export const CanvasRequestType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(CanvasRequestType); +export const CanvasRequestType$inboundSchema: z.ZodNativeEnum< + typeof CanvasRequestType +> = z.nativeEnum(CanvasRequestType); /** @internal */ -export const CanvasRequestType$outboundSchema: z.ZodNativeEnum = - CanvasRequestType$inboundSchema; +export const CanvasRequestType$outboundSchema: z.ZodNativeEnum< + typeof CanvasRequestType +> = CanvasRequestType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CanvasRequestType$ { - /** @deprecated use `CanvasRequestType$inboundSchema` instead. */ - export const inboundSchema = CanvasRequestType$inboundSchema; - /** @deprecated use `CanvasRequestType$outboundSchema` instead. */ - export const outboundSchema = CanvasRequestType$outboundSchema; + /** @deprecated use `CanvasRequestType$inboundSchema` instead. */ + export const inboundSchema = CanvasRequestType$inboundSchema; + /** @deprecated use `CanvasRequestType$outboundSchema` instead. */ + export const outboundSchema = CanvasRequestType$outboundSchema; } diff --git a/src/sdk/models/shared/controlnetinput.ts b/src/sdk/models/shared/controlnetinput.ts index 2e61895..b01ba90 100644 --- a/src/sdk/models/shared/controlnetinput.ts +++ b/src/sdk/models/shared/controlnetinput.ts @@ -8,112 +8,117 @@ import * as z from "zod"; * Type indicating whether the init image is uploaded or generated. */ export enum InitImageType { - Generated = "GENERATED", - Uploaded = "UPLOADED", + Generated = "GENERATED", + Uploaded = "UPLOADED", } /** * Strength type for the controlnet. Can only be used for Style, Character and Content Reference controlnets. */ export enum StrengthType { - Low = "Low", - Mid = "Mid", - High = "High", - Ultra = "Ultra", - Max = "Max", + Low = "Low", + Mid = "Mid", + High = "High", + Ultra = "Ultra", + Max = "Max", } export type ControlnetInput = { - /** - * The ID of the init image - */ - initImageId?: string | undefined; - /** - * Type indicating whether the init image is uploaded or generated. - */ - initImageType?: InitImageType | undefined; - /** - * ID of the controlnet. A list of compatible IDs can be found in our guides. - */ - preprocessorId?: number | undefined; - /** - * Strength type for the controlnet. Can only be used for Style, Character and Content Reference controlnets. - */ - strengthType?: StrengthType | null | undefined; - /** - * Weight for the controlnet - */ - weight?: number | null | undefined; + /** + * The ID of the init image + */ + initImageId?: string | undefined; + /** + * Type indicating whether the init image is uploaded or generated. + */ + initImageType?: InitImageType | undefined; + /** + * ID of the controlnet. A list of compatible IDs can be found in our guides. + */ + preprocessorId?: number | undefined; + /** + * Strength type for the controlnet. Can only be used for Style, Character and Content Reference controlnets. + */ + strengthType?: StrengthType | null | undefined; + /** + * Weight for the controlnet + */ + weight?: number | null | undefined; }; /** @internal */ -export const InitImageType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(InitImageType); +export const InitImageType$inboundSchema: z.ZodNativeEnum< + typeof InitImageType +> = z.nativeEnum(InitImageType); /** @internal */ -export const InitImageType$outboundSchema: z.ZodNativeEnum = - InitImageType$inboundSchema; +export const InitImageType$outboundSchema: z.ZodNativeEnum< + typeof InitImageType +> = InitImageType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InitImageType$ { - /** @deprecated use `InitImageType$inboundSchema` instead. */ - export const inboundSchema = InitImageType$inboundSchema; - /** @deprecated use `InitImageType$outboundSchema` instead. */ - export const outboundSchema = InitImageType$outboundSchema; + /** @deprecated use `InitImageType$inboundSchema` instead. */ + export const inboundSchema = InitImageType$inboundSchema; + /** @deprecated use `InitImageType$outboundSchema` instead. */ + export const outboundSchema = InitImageType$outboundSchema; } /** @internal */ export const StrengthType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(StrengthType); + z.nativeEnum(StrengthType); /** @internal */ export const StrengthType$outboundSchema: z.ZodNativeEnum = - StrengthType$inboundSchema; + StrengthType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StrengthType$ { - /** @deprecated use `StrengthType$inboundSchema` instead. */ - export const inboundSchema = StrengthType$inboundSchema; - /** @deprecated use `StrengthType$outboundSchema` instead. */ - export const outboundSchema = StrengthType$outboundSchema; + /** @deprecated use `StrengthType$inboundSchema` instead. */ + export const inboundSchema = StrengthType$inboundSchema; + /** @deprecated use `StrengthType$outboundSchema` instead. */ + export const outboundSchema = StrengthType$outboundSchema; } /** @internal */ -export const ControlnetInput$inboundSchema: z.ZodType = - z.object({ - initImageId: z.string().optional(), - initImageType: InitImageType$inboundSchema.optional(), - preprocessorId: z.number().optional(), - strengthType: z.nullable(StrengthType$inboundSchema).optional(), - weight: z.nullable(z.number()).optional(), - }); +export const ControlnetInput$inboundSchema: z.ZodType< + ControlnetInput, + z.ZodTypeDef, + unknown +> = z.object({ + initImageId: z.string().optional(), + initImageType: InitImageType$inboundSchema.optional(), + preprocessorId: z.number().optional(), + strengthType: z.nullable(StrengthType$inboundSchema).optional(), + weight: z.nullable(z.number()).optional(), +}); /** @internal */ export type ControlnetInput$Outbound = { - initImageId?: string | undefined; - initImageType?: string | undefined; - preprocessorId?: number | undefined; - strengthType?: string | null | undefined; - weight?: number | null | undefined; + initImageId?: string | undefined; + initImageType?: string | undefined; + preprocessorId?: number | undefined; + strengthType?: string | null | undefined; + weight?: number | null | undefined; }; /** @internal */ export const ControlnetInput$outboundSchema: z.ZodType< - ControlnetInput$Outbound, - z.ZodTypeDef, - ControlnetInput + ControlnetInput$Outbound, + z.ZodTypeDef, + ControlnetInput > = z.object({ - initImageId: z.string().optional(), - initImageType: InitImageType$outboundSchema.optional(), - preprocessorId: z.number().optional(), - strengthType: z.nullable(StrengthType$outboundSchema).optional(), - weight: z.nullable(z.number()).optional(), + initImageId: z.string().optional(), + initImageType: InitImageType$outboundSchema.optional(), + preprocessorId: z.number().optional(), + strengthType: z.nullable(StrengthType$outboundSchema).optional(), + weight: z.nullable(z.number()).optional(), }); /** @@ -121,10 +126,10 @@ export const ControlnetInput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ControlnetInput$ { - /** @deprecated use `ControlnetInput$inboundSchema` instead. */ - export const inboundSchema = ControlnetInput$inboundSchema; - /** @deprecated use `ControlnetInput$outboundSchema` instead. */ - export const outboundSchema = ControlnetInput$outboundSchema; - /** @deprecated use `ControlnetInput$Outbound` instead. */ - export type Outbound = ControlnetInput$Outbound; + /** @deprecated use `ControlnetInput$inboundSchema` instead. */ + export const inboundSchema = ControlnetInput$inboundSchema; + /** @deprecated use `ControlnetInput$outboundSchema` instead. */ + export const outboundSchema = ControlnetInput$outboundSchema; + /** @deprecated use `ControlnetInput$Outbound` instead. */ + export type Outbound = ControlnetInput$Outbound; } diff --git a/src/sdk/models/shared/controlnettype.ts b/src/sdk/models/shared/controlnettype.ts index 890eb3e..a680925 100644 --- a/src/sdk/models/shared/controlnettype.ts +++ b/src/sdk/models/shared/controlnettype.ts @@ -10,26 +10,28 @@ import * as z from "zod"; * @deprecated enum: This will be removed in a future release, please migrate away from it as soon as possible. */ export enum ControlnetType { - Pose = "POSE", - Canny = "CANNY", - Depth = "DEPTH", + Pose = "POSE", + Canny = "CANNY", + Depth = "DEPTH", } /** @internal */ -export const ControlnetType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ControlnetType); +export const ControlnetType$inboundSchema: z.ZodNativeEnum< + typeof ControlnetType +> = z.nativeEnum(ControlnetType); /** @internal */ -export const ControlnetType$outboundSchema: z.ZodNativeEnum = - ControlnetType$inboundSchema; +export const ControlnetType$outboundSchema: z.ZodNativeEnum< + typeof ControlnetType +> = ControlnetType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ControlnetType$ { - /** @deprecated use `ControlnetType$inboundSchema` instead. */ - export const inboundSchema = ControlnetType$inboundSchema; - /** @deprecated use `ControlnetType$outboundSchema` instead. */ - export const outboundSchema = ControlnetType$outboundSchema; + /** @deprecated use `ControlnetType$inboundSchema` instead. */ + export const inboundSchema = ControlnetType$inboundSchema; + /** @deprecated use `ControlnetType$outboundSchema` instead. */ + export const outboundSchema = ControlnetType$outboundSchema; } diff --git a/src/sdk/models/shared/custommodeltype.ts b/src/sdk/models/shared/custommodeltype.ts index 444ab27..967be97 100644 --- a/src/sdk/models/shared/custommodeltype.ts +++ b/src/sdk/models/shared/custommodeltype.ts @@ -8,37 +8,39 @@ import * as z from "zod"; * The category the most accurately reflects the model. */ export enum CustomModelType { - General = "GENERAL", - Buildings = "BUILDINGS", - Characters = "CHARACTERS", - Environments = "ENVIRONMENTS", - Fashion = "FASHION", - Illustrations = "ILLUSTRATIONS", - GameItems = "GAME_ITEMS", - GraphicalElements = "GRAPHICAL_ELEMENTS", - Photography = "PHOTOGRAPHY", - PixelArt = "PIXEL_ART", - ProductDesign = "PRODUCT_DESIGN", - Textures = "TEXTURES", - UiElements = "UI_ELEMENTS", - Vector = "VECTOR", + General = "GENERAL", + Buildings = "BUILDINGS", + Characters = "CHARACTERS", + Environments = "ENVIRONMENTS", + Fashion = "FASHION", + Illustrations = "ILLUSTRATIONS", + GameItems = "GAME_ITEMS", + GraphicalElements = "GRAPHICAL_ELEMENTS", + Photography = "PHOTOGRAPHY", + PixelArt = "PIXEL_ART", + ProductDesign = "PRODUCT_DESIGN", + Textures = "TEXTURES", + UiElements = "UI_ELEMENTS", + Vector = "VECTOR", } /** @internal */ -export const CustomModelType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(CustomModelType); +export const CustomModelType$inboundSchema: z.ZodNativeEnum< + typeof CustomModelType +> = z.nativeEnum(CustomModelType); /** @internal */ -export const CustomModelType$outboundSchema: z.ZodNativeEnum = - CustomModelType$inboundSchema; +export const CustomModelType$outboundSchema: z.ZodNativeEnum< + typeof CustomModelType +> = CustomModelType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomModelType$ { - /** @deprecated use `CustomModelType$inboundSchema` instead. */ - export const inboundSchema = CustomModelType$inboundSchema; - /** @deprecated use `CustomModelType$outboundSchema` instead. */ - export const outboundSchema = CustomModelType$outboundSchema; + /** @deprecated use `CustomModelType$inboundSchema` instead. */ + export const inboundSchema = CustomModelType$inboundSchema; + /** @deprecated use `CustomModelType$outboundSchema` instead. */ + export const outboundSchema = CustomModelType$outboundSchema; } diff --git a/src/sdk/models/shared/elementinput.ts b/src/sdk/models/shared/elementinput.ts index b1b976d..107536f 100644 --- a/src/sdk/models/shared/elementinput.ts +++ b/src/sdk/models/shared/elementinput.ts @@ -5,36 +5,40 @@ import * as z from "zod"; export type ElementInput = { - /** - * Unique identifier for element. Elements can be found from the List Elements endpoint. - */ - akUUID?: string | null | undefined; - /** - * Weight for the element - */ - weight?: number | null | undefined; + /** + * Unique identifier for element. Elements can be found from the List Elements endpoint. + */ + akUUID?: string | null | undefined; + /** + * Weight for the element + */ + weight?: number | null | undefined; }; /** @internal */ -export const ElementInput$inboundSchema: z.ZodType = z.object({ - akUUID: z.nullable(z.string()).optional(), - weight: z.nullable(z.number()).optional(), +export const ElementInput$inboundSchema: z.ZodType< + ElementInput, + z.ZodTypeDef, + unknown +> = z.object({ + akUUID: z.nullable(z.string()).optional(), + weight: z.nullable(z.number()).optional(), }); /** @internal */ export type ElementInput$Outbound = { - akUUID?: string | null | undefined; - weight?: number | null | undefined; + akUUID?: string | null | undefined; + weight?: number | null | undefined; }; /** @internal */ export const ElementInput$outboundSchema: z.ZodType< - ElementInput$Outbound, - z.ZodTypeDef, - ElementInput + ElementInput$Outbound, + z.ZodTypeDef, + ElementInput > = z.object({ - akUUID: z.nullable(z.string()).optional(), - weight: z.nullable(z.number()).optional(), + akUUID: z.nullable(z.string()).optional(), + weight: z.nullable(z.number()).optional(), }); /** @@ -42,10 +46,10 @@ export const ElementInput$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ElementInput$ { - /** @deprecated use `ElementInput$inboundSchema` instead. */ - export const inboundSchema = ElementInput$inboundSchema; - /** @deprecated use `ElementInput$outboundSchema` instead. */ - export const outboundSchema = ElementInput$outboundSchema; - /** @deprecated use `ElementInput$Outbound` instead. */ - export type Outbound = ElementInput$Outbound; + /** @deprecated use `ElementInput$inboundSchema` instead. */ + export const inboundSchema = ElementInput$inboundSchema; + /** @deprecated use `ElementInput$outboundSchema` instead. */ + export const outboundSchema = ElementInput$outboundSchema; + /** @deprecated use `ElementInput$Outbound` instead. */ + export type Outbound = ElementInput$Outbound; } diff --git a/src/sdk/models/shared/index.ts b/src/sdk/models/shared/index.ts index 9cc1b1e..1793eed 100644 --- a/src/sdk/models/shared/index.ts +++ b/src/sdk/models/shared/index.ts @@ -16,4 +16,5 @@ export * from "./sdversions.js"; export * from "./security.js"; export * from "./strength.js"; export * from "./universalupscalerstyle.js"; +export * from "./universalupscalerultrastyle.js"; export * from "./variationtype.js"; diff --git a/src/sdk/models/shared/jobstatus.ts b/src/sdk/models/shared/jobstatus.ts index b5bf5b9..dd65975 100644 --- a/src/sdk/models/shared/jobstatus.ts +++ b/src/sdk/models/shared/jobstatus.ts @@ -8,24 +8,26 @@ import * as z from "zod"; * The status of the current task. */ export enum JobStatus { - Pending = "PENDING", - Complete = "COMPLETE", - Failed = "FAILED", + Pending = "PENDING", + Complete = "COMPLETE", + Failed = "FAILED", } /** @internal */ -export const JobStatus$inboundSchema: z.ZodNativeEnum = z.nativeEnum(JobStatus); +export const JobStatus$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(JobStatus); /** @internal */ -export const JobStatus$outboundSchema: z.ZodNativeEnum = JobStatus$inboundSchema; +export const JobStatus$outboundSchema: z.ZodNativeEnum = + JobStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace JobStatus$ { - /** @deprecated use `JobStatus$inboundSchema` instead. */ - export const inboundSchema = JobStatus$inboundSchema; - /** @deprecated use `JobStatus$outboundSchema` instead. */ - export const outboundSchema = JobStatus$outboundSchema; + /** @deprecated use `JobStatus$inboundSchema` instead. */ + export const inboundSchema = JobStatus$inboundSchema; + /** @deprecated use `JobStatus$outboundSchema` instead. */ + export const outboundSchema = JobStatus$outboundSchema; } diff --git a/src/sdk/models/shared/lcmgenerationstyle.ts b/src/sdk/models/shared/lcmgenerationstyle.ts index 2e603cf..1fc9d9d 100644 --- a/src/sdk/models/shared/lcmgenerationstyle.ts +++ b/src/sdk/models/shared/lcmgenerationstyle.ts @@ -8,37 +8,39 @@ import * as z from "zod"; * The style to generate LCM images with. */ export enum LcmGenerationStyle { - Anime = "ANIME", - Cinematic = "CINEMATIC", - DigitalArt = "DIGITAL_ART", - Dynamic = "DYNAMIC", - Environment = "ENVIRONMENT", - FantasyArt = "FANTASY_ART", - Illustration = "ILLUSTRATION", - Photography = "PHOTOGRAPHY", - Render3D = "RENDER_3D", - Raytraced = "RAYTRACED", - SketchBw = "SKETCH_BW", - SketchColor = "SKETCH_COLOR", - Vibrant = "VIBRANT", - None = "NONE", + Anime = "ANIME", + Cinematic = "CINEMATIC", + DigitalArt = "DIGITAL_ART", + Dynamic = "DYNAMIC", + Environment = "ENVIRONMENT", + FantasyArt = "FANTASY_ART", + Illustration = "ILLUSTRATION", + Photography = "PHOTOGRAPHY", + Render3D = "RENDER_3D", + Raytraced = "RAYTRACED", + SketchBw = "SKETCH_BW", + SketchColor = "SKETCH_COLOR", + Vibrant = "VIBRANT", + None = "NONE", } /** @internal */ -export const LcmGenerationStyle$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(LcmGenerationStyle); +export const LcmGenerationStyle$inboundSchema: z.ZodNativeEnum< + typeof LcmGenerationStyle +> = z.nativeEnum(LcmGenerationStyle); /** @internal */ -export const LcmGenerationStyle$outboundSchema: z.ZodNativeEnum = - LcmGenerationStyle$inboundSchema; +export const LcmGenerationStyle$outboundSchema: z.ZodNativeEnum< + typeof LcmGenerationStyle +> = LcmGenerationStyle$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LcmGenerationStyle$ { - /** @deprecated use `LcmGenerationStyle$inboundSchema` instead. */ - export const inboundSchema = LcmGenerationStyle$inboundSchema; - /** @deprecated use `LcmGenerationStyle$outboundSchema` instead. */ - export const outboundSchema = LcmGenerationStyle$outboundSchema; + /** @deprecated use `LcmGenerationStyle$inboundSchema` instead. */ + export const inboundSchema = LcmGenerationStyle$inboundSchema; + /** @deprecated use `LcmGenerationStyle$outboundSchema` instead. */ + export const outboundSchema = LcmGenerationStyle$outboundSchema; } diff --git a/src/sdk/models/shared/pricingcalculatorservices.ts b/src/sdk/models/shared/pricingcalculatorservices.ts index a33307a..495c515 100644 --- a/src/sdk/models/shared/pricingcalculatorservices.ts +++ b/src/sdk/models/shared/pricingcalculatorservices.ts @@ -8,23 +8,24 @@ import * as z from "zod"; * The services to be chosen for calculating the API credit cost. */ export enum PricingCalculatorServices { - ImageGeneration = "IMAGE_GENERATION", - FantasyAvatarGeneration = "FANTASY_AVATAR_GENERATION", - MotionGeneration = "MOTION_GENERATION", - LcmGeneration = "LCM_GENERATION", - ModelTraining = "MODEL_TRAINING", - TextureGeneration = "TEXTURE_GENERATION", - UniversalUpscaler = "UNIVERSAL_UPSCALER", + ImageGeneration = "IMAGE_GENERATION", + FantasyAvatarGeneration = "FANTASY_AVATAR_GENERATION", + MotionGeneration = "MOTION_GENERATION", + LcmGeneration = "LCM_GENERATION", + ModelTraining = "MODEL_TRAINING", + TextureGeneration = "TEXTURE_GENERATION", + UniversalUpscaler = "UNIVERSAL_UPSCALER", + UniversalUpscalerUltra = "UNIVERSAL_UPSCALER_ULTRA", } /** @internal */ export const PricingCalculatorServices$inboundSchema: z.ZodNativeEnum< - typeof PricingCalculatorServices + typeof PricingCalculatorServices > = z.nativeEnum(PricingCalculatorServices); /** @internal */ export const PricingCalculatorServices$outboundSchema: z.ZodNativeEnum< - typeof PricingCalculatorServices + typeof PricingCalculatorServices > = PricingCalculatorServices$inboundSchema; /** @@ -32,8 +33,8 @@ export const PricingCalculatorServices$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingCalculatorServices$ { - /** @deprecated use `PricingCalculatorServices$inboundSchema` instead. */ - export const inboundSchema = PricingCalculatorServices$inboundSchema; - /** @deprecated use `PricingCalculatorServices$outboundSchema` instead. */ - export const outboundSchema = PricingCalculatorServices$outboundSchema; + /** @deprecated use `PricingCalculatorServices$inboundSchema` instead. */ + export const inboundSchema = PricingCalculatorServices$inboundSchema; + /** @deprecated use `PricingCalculatorServices$outboundSchema` instead. */ + export const outboundSchema = PricingCalculatorServices$outboundSchema; } diff --git a/src/sdk/models/shared/sdgenerationschedulers.ts b/src/sdk/models/shared/sdgenerationschedulers.ts index a0f0b6d..1b89406 100644 --- a/src/sdk/models/shared/sdgenerationschedulers.ts +++ b/src/sdk/models/shared/sdgenerationschedulers.ts @@ -8,30 +8,32 @@ import * as z from "zod"; * The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified. */ export enum SdGenerationSchedulers { - Klms = "KLMS", - EulerAncestralDiscrete = "EULER_ANCESTRAL_DISCRETE", - EulerDiscrete = "EULER_DISCRETE", - Ddim = "DDIM", - DpmSolver = "DPM_SOLVER", - Pndm = "PNDM", - Leonardo = "LEONARDO", + Klms = "KLMS", + EulerAncestralDiscrete = "EULER_ANCESTRAL_DISCRETE", + EulerDiscrete = "EULER_DISCRETE", + Ddim = "DDIM", + DpmSolver = "DPM_SOLVER", + Pndm = "PNDM", + Leonardo = "LEONARDO", } /** @internal */ -export const SdGenerationSchedulers$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(SdGenerationSchedulers); +export const SdGenerationSchedulers$inboundSchema: z.ZodNativeEnum< + typeof SdGenerationSchedulers +> = z.nativeEnum(SdGenerationSchedulers); /** @internal */ -export const SdGenerationSchedulers$outboundSchema: z.ZodNativeEnum = - SdGenerationSchedulers$inboundSchema; +export const SdGenerationSchedulers$outboundSchema: z.ZodNativeEnum< + typeof SdGenerationSchedulers +> = SdGenerationSchedulers$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SdGenerationSchedulers$ { - /** @deprecated use `SdGenerationSchedulers$inboundSchema` instead. */ - export const inboundSchema = SdGenerationSchedulers$inboundSchema; - /** @deprecated use `SdGenerationSchedulers$outboundSchema` instead. */ - export const outboundSchema = SdGenerationSchedulers$outboundSchema; + /** @deprecated use `SdGenerationSchedulers$inboundSchema` instead. */ + export const inboundSchema = SdGenerationSchedulers$inboundSchema; + /** @deprecated use `SdGenerationSchedulers$outboundSchema` instead. */ + export const outboundSchema = SdGenerationSchedulers$outboundSchema; } diff --git a/src/sdk/models/shared/sdgenerationstyle.ts b/src/sdk/models/shared/sdgenerationstyle.ts index b8dacc0..57498d2 100644 --- a/src/sdk/models/shared/sdgenerationstyle.ts +++ b/src/sdk/models/shared/sdgenerationstyle.ts @@ -8,54 +8,56 @@ import * as z from "zod"; * The style to generate images with. When photoReal is enabled, refer to the Guide section for a full list. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE. */ export enum SdGenerationStyle { - Anime = "ANIME", - Bokeh = "BOKEH", - Cinematic = "CINEMATIC", - CinematicCloseup = "CINEMATIC_CLOSEUP", - Creative = "CREATIVE", - Dynamic = "DYNAMIC", - Environment = "ENVIRONMENT", - Fashion = "FASHION", - Film = "FILM", - Food = "FOOD", - General = "GENERAL", - Hdr = "HDR", - Illustration = "ILLUSTRATION", - Leonardo = "LEONARDO", - LongExposure = "LONG_EXPOSURE", - Macro = "MACRO", - Minimalistic = "MINIMALISTIC", - Monochrome = "MONOCHROME", - Moody = "MOODY", - None = "NONE", - Neutral = "NEUTRAL", - Photography = "PHOTOGRAPHY", - Portrait = "PORTRAIT", - Raytraced = "RAYTRACED", - Render3D = "RENDER_3D", - Retro = "RETRO", - SketchBw = "SKETCH_BW", - SketchColor = "SKETCH_COLOR", - StockPhoto = "STOCK_PHOTO", - Vibrant = "VIBRANT", - Unprocessed = "UNPROCESSED", + Anime = "ANIME", + Bokeh = "BOKEH", + Cinematic = "CINEMATIC", + CinematicCloseup = "CINEMATIC_CLOSEUP", + Creative = "CREATIVE", + Dynamic = "DYNAMIC", + Environment = "ENVIRONMENT", + Fashion = "FASHION", + Film = "FILM", + Food = "FOOD", + General = "GENERAL", + Hdr = "HDR", + Illustration = "ILLUSTRATION", + Leonardo = "LEONARDO", + LongExposure = "LONG_EXPOSURE", + Macro = "MACRO", + Minimalistic = "MINIMALISTIC", + Monochrome = "MONOCHROME", + Moody = "MOODY", + None = "NONE", + Neutral = "NEUTRAL", + Photography = "PHOTOGRAPHY", + Portrait = "PORTRAIT", + Raytraced = "RAYTRACED", + Render3D = "RENDER_3D", + Retro = "RETRO", + SketchBw = "SKETCH_BW", + SketchColor = "SKETCH_COLOR", + StockPhoto = "STOCK_PHOTO", + Vibrant = "VIBRANT", + Unprocessed = "UNPROCESSED", } /** @internal */ -export const SdGenerationStyle$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(SdGenerationStyle); +export const SdGenerationStyle$inboundSchema: z.ZodNativeEnum< + typeof SdGenerationStyle +> = z.nativeEnum(SdGenerationStyle); /** @internal */ -export const SdGenerationStyle$outboundSchema: z.ZodNativeEnum = - SdGenerationStyle$inboundSchema; +export const SdGenerationStyle$outboundSchema: z.ZodNativeEnum< + typeof SdGenerationStyle +> = SdGenerationStyle$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SdGenerationStyle$ { - /** @deprecated use `SdGenerationStyle$inboundSchema` instead. */ - export const inboundSchema = SdGenerationStyle$inboundSchema; - /** @deprecated use `SdGenerationStyle$outboundSchema` instead. */ - export const outboundSchema = SdGenerationStyle$outboundSchema; + /** @deprecated use `SdGenerationStyle$inboundSchema` instead. */ + export const inboundSchema = SdGenerationStyle$inboundSchema; + /** @deprecated use `SdGenerationStyle$outboundSchema` instead. */ + export const outboundSchema = SdGenerationStyle$outboundSchema; } diff --git a/src/sdk/models/shared/sdversions.ts b/src/sdk/models/shared/sdversions.ts index 127aae0..b5cec82 100644 --- a/src/sdk/models/shared/sdversions.ts +++ b/src/sdk/models/shared/sdversions.ts @@ -8,30 +8,30 @@ import * as z from "zod"; * The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models */ export enum SdVersions { - V15 = "v1_5", - V2 = "v2", - V3 = "v3", - Sdxl08 = "SDXL_0_8", - Sdxl09 = "SDXL_0_9", - Sdxl10 = "SDXL_1_0", - SdxlLightning = "SDXL_LIGHTNING", + V15 = "v1_5", + V2 = "v2", + V3 = "v3", + Sdxl08 = "SDXL_0_8", + Sdxl09 = "SDXL_0_9", + Sdxl10 = "SDXL_1_0", + SdxlLightning = "SDXL_LIGHTNING", } /** @internal */ -export const SdVersions$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(SdVersions); +export const SdVersions$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(SdVersions); /** @internal */ export const SdVersions$outboundSchema: z.ZodNativeEnum = - SdVersions$inboundSchema; + SdVersions$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SdVersions$ { - /** @deprecated use `SdVersions$inboundSchema` instead. */ - export const inboundSchema = SdVersions$inboundSchema; - /** @deprecated use `SdVersions$outboundSchema` instead. */ - export const outboundSchema = SdVersions$outboundSchema; + /** @deprecated use `SdVersions$inboundSchema` instead. */ + export const inboundSchema = SdVersions$inboundSchema; + /** @deprecated use `SdVersions$outboundSchema` instead. */ + export const outboundSchema = SdVersions$outboundSchema; } diff --git a/src/sdk/models/shared/security.ts b/src/sdk/models/shared/security.ts index c98f218..c065b66 100644 --- a/src/sdk/models/shared/security.ts +++ b/src/sdk/models/shared/security.ts @@ -5,34 +5,41 @@ import * as z from "zod"; export type Security = { - bearerAuth: string; + bearerAuth: string; }; /** @internal */ -export const Security$inboundSchema: z.ZodType = z.object({ - bearerAuth: z.string(), +export const Security$inboundSchema: z.ZodType< + Security, + z.ZodTypeDef, + unknown +> = z.object({ + bearerAuth: z.string(), }); /** @internal */ export type Security$Outbound = { - bearerAuth: string; + bearerAuth: string; }; /** @internal */ -export const Security$outboundSchema: z.ZodType = - z.object({ - bearerAuth: z.string(), - }); +export const Security$outboundSchema: z.ZodType< + Security$Outbound, + z.ZodTypeDef, + Security +> = z.object({ + bearerAuth: z.string(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Security$ { - /** @deprecated use `Security$inboundSchema` instead. */ - export const inboundSchema = Security$inboundSchema; - /** @deprecated use `Security$outboundSchema` instead. */ - export const outboundSchema = Security$outboundSchema; - /** @deprecated use `Security$Outbound` instead. */ - export type Outbound = Security$Outbound; + /** @deprecated use `Security$inboundSchema` instead. */ + export const inboundSchema = Security$inboundSchema; + /** @deprecated use `Security$outboundSchema` instead. */ + export const outboundSchema = Security$outboundSchema; + /** @deprecated use `Security$Outbound` instead. */ + export type Outbound = Security$Outbound; } diff --git a/src/sdk/models/shared/strength.ts b/src/sdk/models/shared/strength.ts index c36c78b..6cd0293 100644 --- a/src/sdk/models/shared/strength.ts +++ b/src/sdk/models/shared/strength.ts @@ -8,25 +8,27 @@ import * as z from "zod"; * When training using the PIXEL_ART model type, this influences the training strength. */ export enum Strength { - VeryLow = "VERY_LOW", - Low = "LOW", - Medium = "MEDIUM", - High = "HIGH", + VeryLow = "VERY_LOW", + Low = "LOW", + Medium = "MEDIUM", + High = "HIGH", } /** @internal */ -export const Strength$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Strength); +export const Strength$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Strength); /** @internal */ -export const Strength$outboundSchema: z.ZodNativeEnum = Strength$inboundSchema; +export const Strength$outboundSchema: z.ZodNativeEnum = + Strength$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Strength$ { - /** @deprecated use `Strength$inboundSchema` instead. */ - export const inboundSchema = Strength$inboundSchema; - /** @deprecated use `Strength$outboundSchema` instead. */ - export const outboundSchema = Strength$outboundSchema; + /** @deprecated use `Strength$inboundSchema` instead. */ + export const inboundSchema = Strength$inboundSchema; + /** @deprecated use `Strength$outboundSchema` instead. */ + export const outboundSchema = Strength$outboundSchema; } diff --git a/src/sdk/models/shared/universalupscalerstyle.ts b/src/sdk/models/shared/universalupscalerstyle.ts index fd55c02..320b0c0 100644 --- a/src/sdk/models/shared/universalupscalerstyle.ts +++ b/src/sdk/models/shared/universalupscalerstyle.ts @@ -5,30 +5,32 @@ import * as z from "zod"; /** - * The style to upscale images using universal upscaler with. + * The style to upscale images using universal upscaler with. Can not be used with ultraUpscaleStyle. */ export enum UniversalUpscalerStyle { - General = "GENERAL", - Cinematic = "CINEMATIC", - TwoDARTAndILLUSTRATION = "2D ART & ILLUSTRATION", - CGARTAndGAMEASSETS = "CG ART & GAME ASSETS", + General = "GENERAL", + Cinematic = "CINEMATIC", + TwoDARTAndILLUSTRATION = "2D ART & ILLUSTRATION", + CGARTAndGAMEASSETS = "CG ART & GAME ASSETS", } /** @internal */ -export const UniversalUpscalerStyle$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(UniversalUpscalerStyle); +export const UniversalUpscalerStyle$inboundSchema: z.ZodNativeEnum< + typeof UniversalUpscalerStyle +> = z.nativeEnum(UniversalUpscalerStyle); /** @internal */ -export const UniversalUpscalerStyle$outboundSchema: z.ZodNativeEnum = - UniversalUpscalerStyle$inboundSchema; +export const UniversalUpscalerStyle$outboundSchema: z.ZodNativeEnum< + typeof UniversalUpscalerStyle +> = UniversalUpscalerStyle$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UniversalUpscalerStyle$ { - /** @deprecated use `UniversalUpscalerStyle$inboundSchema` instead. */ - export const inboundSchema = UniversalUpscalerStyle$inboundSchema; - /** @deprecated use `UniversalUpscalerStyle$outboundSchema` instead. */ - export const outboundSchema = UniversalUpscalerStyle$outboundSchema; + /** @deprecated use `UniversalUpscalerStyle$inboundSchema` instead. */ + export const inboundSchema = UniversalUpscalerStyle$inboundSchema; + /** @deprecated use `UniversalUpscalerStyle$outboundSchema` instead. */ + export const outboundSchema = UniversalUpscalerStyle$outboundSchema; } diff --git a/src/sdk/models/shared/universalupscalerultrastyle.ts b/src/sdk/models/shared/universalupscalerultrastyle.ts new file mode 100644 index 0000000..91fbd6f --- /dev/null +++ b/src/sdk/models/shared/universalupscalerultrastyle.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The ultra style to upscale images using universal upscaler with. Can not be used with upscalerStyle. + */ +export enum UniversalUpscalerUltraStyle { + Artistic = "ARTISTIC", + Realistic = "REALISTIC", +} + +/** @internal */ +export const UniversalUpscalerUltraStyle$inboundSchema: z.ZodNativeEnum< + typeof UniversalUpscalerUltraStyle +> = z.nativeEnum(UniversalUpscalerUltraStyle); + +/** @internal */ +export const UniversalUpscalerUltraStyle$outboundSchema: z.ZodNativeEnum< + typeof UniversalUpscalerUltraStyle +> = UniversalUpscalerUltraStyle$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UniversalUpscalerUltraStyle$ { + /** @deprecated use `UniversalUpscalerUltraStyle$inboundSchema` instead. */ + export const inboundSchema = UniversalUpscalerUltraStyle$inboundSchema; + /** @deprecated use `UniversalUpscalerUltraStyle$outboundSchema` instead. */ + export const outboundSchema = UniversalUpscalerUltraStyle$outboundSchema; +} diff --git a/src/sdk/models/shared/variationtype.ts b/src/sdk/models/shared/variationtype.ts index 1e53190..efd9795 100644 --- a/src/sdk/models/shared/variationtype.ts +++ b/src/sdk/models/shared/variationtype.ts @@ -8,28 +8,30 @@ import * as z from "zod"; * The type of variation. */ export enum VariationType { - Outpaint = "OUTPAINT", - Inpaint = "INPAINT", - Upscale = "UPSCALE", - Unzoom = "UNZOOM", - Nobg = "NOBG", + Outpaint = "OUTPAINT", + Inpaint = "INPAINT", + Upscale = "UPSCALE", + Unzoom = "UNZOOM", + Nobg = "NOBG", } /** @internal */ -export const VariationType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(VariationType); +export const VariationType$inboundSchema: z.ZodNativeEnum< + typeof VariationType +> = z.nativeEnum(VariationType); /** @internal */ -export const VariationType$outboundSchema: z.ZodNativeEnum = - VariationType$inboundSchema; +export const VariationType$outboundSchema: z.ZodNativeEnum< + typeof VariationType +> = VariationType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace VariationType$ { - /** @deprecated use `VariationType$inboundSchema` instead. */ - export const inboundSchema = VariationType$inboundSchema; - /** @deprecated use `VariationType$outboundSchema` instead. */ - export const outboundSchema = VariationType$outboundSchema; + /** @deprecated use `VariationType$inboundSchema` instead. */ + export const inboundSchema = VariationType$inboundSchema; + /** @deprecated use `VariationType$outboundSchema` instead. */ + export const outboundSchema = VariationType$outboundSchema; } diff --git a/src/sdk/motion.ts b/src/sdk/motion.ts index 39735ae..0e71d58 100644 --- a/src/sdk/motion.ts +++ b/src/sdk/motion.ts @@ -8,16 +8,20 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Motion extends ClientSDK { - /** - * Create SVD Motion Generation - * - * @remarks - * This endpoint will generate a SVD motion generation. - */ - async createSVDMotionGeneration( - request?: operations.CreateSVDMotionGenerationRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(motionCreateSVDMotionGeneration(this, request, options)); - } + /** + * Create SVD Motion Generation + * + * @remarks + * This endpoint will generate a SVD motion generation. + */ + async createSVDMotionGeneration( + request?: operations.CreateSVDMotionGenerationRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(motionCreateSVDMotionGeneration( + this, + request, + options, + )); + } } diff --git a/src/sdk/pricingcalculator.ts b/src/sdk/pricingcalculator.ts index bc81965..dca4a59 100644 --- a/src/sdk/pricingcalculator.ts +++ b/src/sdk/pricingcalculator.ts @@ -8,16 +8,20 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class PricingCalculator extends ClientSDK { - /** - * Calculating API Cost - * - * @remarks - * This endpoint returns the cost used for generating images using a particular service type. - */ - async pricingCalculator( - request?: operations.PricingCalculatorRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(pricingCalculatorPricingCalculator(this, request, options)); - } + /** + * Calculating API Cost + * + * @remarks + * This endpoint returns the cost used for generating images using a particular service type. + */ + async pricingCalculator( + request?: operations.PricingCalculatorRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(pricingCalculatorPricingCalculator( + this, + request, + options, + )); + } } diff --git a/src/sdk/prompt.ts b/src/sdk/prompt.ts index 4fcfbad..e166104 100644 --- a/src/sdk/prompt.ts +++ b/src/sdk/prompt.ts @@ -9,26 +9,35 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Prompt extends ClientSDK { - /** - * Improve a Prompt - * - * @remarks - * This endpoint returns a improved prompt - */ - async promptImprove( - request: operations.PromptImproveRequestBody, - options?: RequestOptions - ): Promise { - return unwrapAsync(promptPromptImprove(this, request, options)); - } + /** + * Improve a Prompt + * + * @remarks + * This endpoint returns a improved prompt + */ + async promptImprove( + request: operations.PromptImproveRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(promptPromptImprove( + this, + request, + options, + )); + } - /** - * Generate a Random prompt - * - * @remarks - * This endpoint returns a random prompt - */ - async promptRandom(options?: RequestOptions): Promise { - return unwrapAsync(promptPromptRandom(this, options)); - } + /** + * Generate a Random prompt + * + * @remarks + * This endpoint returns a random prompt + */ + async promptRandom( + options?: RequestOptions, + ): Promise { + return unwrapAsync(promptPromptRandom( + this, + options, + )); + } } diff --git a/src/sdk/realtimecanvas.ts b/src/sdk/realtimecanvas.ts index 932a2bb..c1f73ae 100644 --- a/src/sdk/realtimecanvas.ts +++ b/src/sdk/realtimecanvas.ts @@ -11,55 +11,71 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class RealtimeCanvas extends ClientSDK { - /** - * Create LCM Generation - * - * @remarks - * This endpoint will generate a LCM image generation. - */ - async createLCMGeneration( - request?: operations.CreateLCMGenerationRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(realtimeCanvasCreateLCMGeneration(this, request, options)); - } + /** + * Create LCM Generation + * + * @remarks + * This endpoint will generate a LCM image generation. + */ + async createLCMGeneration( + request?: operations.CreateLCMGenerationRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(realtimeCanvasCreateLCMGeneration( + this, + request, + options, + )); + } - /** - * Perform Alchemy Upscale on a LCM image - * - * @remarks - * This endpoint will perform Alchemy Upscale on a LCM image - */ - async performAlchemyUpscaleLCM( - request?: operations.PerformAlchemyUpscaleLCMRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(realtimeCanvasPerformAlchemyUpscaleLCM(this, request, options)); - } + /** + * Perform Alchemy Upscale on a LCM image + * + * @remarks + * This endpoint will perform Alchemy Upscale on a LCM image + */ + async performAlchemyUpscaleLCM( + request?: operations.PerformAlchemyUpscaleLCMRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(realtimeCanvasPerformAlchemyUpscaleLCM( + this, + request, + options, + )); + } - /** - * Perform inpainting on a LCM image - * - * @remarks - * This endpoint will perform a inpainting on a LCM image - */ - async performInpaintingLCM( - request?: operations.PerformInpaintingLCMRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(realtimeCanvasPerformInpaintingLCM(this, request, options)); - } + /** + * Perform inpainting on a LCM image + * + * @remarks + * This endpoint will perform a inpainting on a LCM image + */ + async performInpaintingLCM( + request?: operations.PerformInpaintingLCMRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(realtimeCanvasPerformInpaintingLCM( + this, + request, + options, + )); + } - /** - * Perform instant refine on a LCM image - * - * @remarks - * This endpoint will perform instant refine on a LCM image - */ - async performInstantRefine( - request?: operations.PerformInstantRefineRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(realtimeCanvasPerformInstantRefine(this, request, options)); - } + /** + * Perform instant refine on a LCM image + * + * @remarks + * This endpoint will perform instant refine on a LCM image + */ + async performInstantRefine( + request?: operations.PerformInstantRefineRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(realtimeCanvasPerformInstantRefine( + this, + request, + options, + )); + } } diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 1632c34..5a5010a 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -18,68 +18,68 @@ import { User } from "./user.js"; import { Variation } from "./variation.js"; export class Leonardo extends ClientSDK { - private _initImages?: InitImages; - get initImages(): InitImages { - return (this._initImages ??= new InitImages(this.options$)); - } + private _initImages?: InitImages; + get initImages(): InitImages { + return (this._initImages ??= new InitImages(this.options$)); + } - private _dataset?: Dataset; - get dataset(): Dataset { - return (this._dataset ??= new Dataset(this.options$)); - } + private _dataset?: Dataset; + get dataset(): Dataset { + return (this._dataset ??= new Dataset(this.options$)); + } - private _elements?: Elements; - get elements(): Elements { - return (this._elements ??= new Elements(this.options$)); - } + private _elements?: Elements; + get elements(): Elements { + return (this._elements ??= new Elements(this.options$)); + } - private _image?: Image; - get image(): Image { - return (this._image ??= new Image(this.options$)); - } + private _image?: Image; + get image(): Image { + return (this._image ??= new Image(this.options$)); + } - private _realtimeCanvas?: RealtimeCanvas; - get realtimeCanvas(): RealtimeCanvas { - return (this._realtimeCanvas ??= new RealtimeCanvas(this.options$)); - } + private _realtimeCanvas?: RealtimeCanvas; + get realtimeCanvas(): RealtimeCanvas { + return (this._realtimeCanvas ??= new RealtimeCanvas(this.options$)); + } - private _motion?: Motion; - get motion(): Motion { - return (this._motion ??= new Motion(this.options$)); - } + private _motion?: Motion; + get motion(): Motion { + return (this._motion ??= new Motion(this.options$)); + } - private _texture?: Texture; - get texture(): Texture { - return (this._texture ??= new Texture(this.options$)); - } + private _texture?: Texture; + get texture(): Texture { + return (this._texture ??= new Texture(this.options$)); + } - private _user?: User; - get user(): User { - return (this._user ??= new User(this.options$)); - } + private _user?: User; + get user(): User { + return (this._user ??= new User(this.options$)); + } - private _models?: Models; - get models(): Models { - return (this._models ??= new Models(this.options$)); - } + private _models?: Models; + get models(): Models { + return (this._models ??= new Models(this.options$)); + } - private _threeDModelAssets?: ThreeDModelAssets; - get threeDModelAssets(): ThreeDModelAssets { - return (this._threeDModelAssets ??= new ThreeDModelAssets(this.options$)); - } + private _threeDModelAssets?: ThreeDModelAssets; + get threeDModelAssets(): ThreeDModelAssets { + return (this._threeDModelAssets ??= new ThreeDModelAssets(this.options$)); + } - private _pricingCalculator?: PricingCalculator; - get pricingCalculator(): PricingCalculator { - return (this._pricingCalculator ??= new PricingCalculator(this.options$)); - } + private _pricingCalculator?: PricingCalculator; + get pricingCalculator(): PricingCalculator { + return (this._pricingCalculator ??= new PricingCalculator(this.options$)); + } - private _prompt?: Prompt; - get prompt(): Prompt { - return (this._prompt ??= new Prompt(this.options$)); - } + private _prompt?: Prompt; + get prompt(): Prompt { + return (this._prompt ??= new Prompt(this.options$)); + } - private _variation?: Variation; - get variation(): Variation { - return (this._variation ??= new Variation(this.options$)); - } + private _variation?: Variation; + get variation(): Variation { + return (this._variation ??= new Variation(this.options$)); + } } diff --git a/src/sdk/texture.ts b/src/sdk/texture.ts index 691c2e8..2f36a74 100644 --- a/src/sdk/texture.ts +++ b/src/sdk/texture.ts @@ -9,30 +9,39 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Texture extends ClientSDK { - /** - * Create Texture Generation - * - * @remarks - * This endpoint will generate a texture generation. - */ - async createTextureGeneration( - request?: operations.CreateTextureGenerationRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(textureCreateTextureGeneration(this, request, options)); - } + /** + * Create Texture Generation + * + * @remarks + * This endpoint will generate a texture generation. + */ + async createTextureGeneration( + request?: operations.CreateTextureGenerationRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(textureCreateTextureGeneration( + this, + request, + options, + )); + } - /** - * Delete Texture Generation by ID - * - * @remarks - * This endpoint deletes the specific texture generation. - */ - async deleteTextureGenerationById( - id: string, - requestBody?: operations.DeleteTextureGenerationByIdRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(textureDeleteTextureGenerationById(this, id, requestBody, options)); - } + /** + * Delete Texture Generation by ID + * + * @remarks + * This endpoint deletes the specific texture generation. + */ + async deleteTextureGenerationById( + id: string, + requestBody?: operations.DeleteTextureGenerationByIdRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(textureDeleteTextureGenerationById( + this, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/threedmodelassets.ts b/src/sdk/threedmodelassets.ts index a6f29d5..4f0c56c 100644 --- a/src/sdk/threedmodelassets.ts +++ b/src/sdk/threedmodelassets.ts @@ -9,30 +9,39 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class ThreeDModelAssets extends ClientSDK { - /** - * Delete 3D Model by ID - * - * @remarks - * This endpoint deletes the specific 3D Model - */ - async delete3DModelById( - id: string, - requestBody?: operations.Delete3DModelByIdRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(threeDModelAssetsDelete3DModelById(this, id, requestBody, options)); - } + /** + * Delete 3D Model by ID + * + * @remarks + * This endpoint deletes the specific 3D Model + */ + async delete3DModelById( + id: string, + requestBody?: operations.Delete3DModelByIdRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(threeDModelAssetsDelete3DModelById( + this, + id, + requestBody, + options, + )); + } - /** - * Upload 3D Model - * - * @remarks - * This endpoint returns presigned details to upload a 3D model to S3 - */ - async uploadModelAsset( - request?: operations.UploadModelAssetRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(threeDModelAssetsUploadModelAsset(this, request, options)); - } + /** + * Upload 3D Model + * + * @remarks + * This endpoint returns presigned details to upload a 3D model to S3 + */ + async uploadModelAsset( + request?: operations.UploadModelAssetRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(threeDModelAssetsUploadModelAsset( + this, + request, + options, + )); + } } diff --git a/src/sdk/types/index.ts b/src/sdk/types/index.ts index dbaa5e6..e124e81 100644 --- a/src/sdk/types/index.ts +++ b/src/sdk/types/index.ts @@ -2,10 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export { RFCDate } from "./rfcdate.js"; export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export type { Paginator, PageIterator } from "./operations.js"; -export { createPageIterator } from "./operations.js"; export { catchUnrecognizedEnum } from "./enums.js"; -export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; export type { Result } from "./fp.js"; +export type { PageIterator, Paginator } from "./operations.js"; +export { createPageIterator } from "./operations.js"; +export { RFCDate } from "./rfcdate.js"; diff --git a/src/sdk/user.ts b/src/sdk/user.ts index b244aba..a4e0127 100644 --- a/src/sdk/user.ts +++ b/src/sdk/user.ts @@ -8,13 +8,18 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class User extends ClientSDK { - /** - * Get user information - * - * @remarks - * This endpoint will return your user information such as your user id, username, token renewal date and current amounts of the following: subscription tokens, gpt (prompt generation) tokens, and model training tokens - */ - async getUserSelf(options?: RequestOptions): Promise { - return unwrapAsync(userGetUserSelf(this, options)); - } + /** + * Get user information + * + * @remarks + * This endpoint will return your user information such as your user id, username, token renewal date and current amounts of the following: subscription tokens, gpt (prompt generation) tokens, and model training tokens + */ + async getUserSelf( + options?: RequestOptions, + ): Promise { + return unwrapAsync(userGetUserSelf( + this, + options, + )); + } } diff --git a/src/sdk/variation.ts b/src/sdk/variation.ts index 578e1e6..fad3062 100644 --- a/src/sdk/variation.ts +++ b/src/sdk/variation.ts @@ -12,68 +12,88 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Variation extends ClientSDK { - /** - * Create using Universal Upscaler - * - * @remarks - * This endpoint will create a high resolution image using Universal Upscaler - */ - async createUniversalUpscalerJob( - request: operations.CreateUniversalUpscalerJobRequestBody, - options?: RequestOptions - ): Promise { - return unwrapAsync(variationCreateUniversalUpscalerJob(this, request, options)); - } + /** + * Create using Universal Upscaler + * + * @remarks + * This endpoint will create a high resolution image using Universal Upscaler + */ + async createUniversalUpscalerJob( + request: operations.CreateUniversalUpscalerJobRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(variationCreateUniversalUpscalerJob( + this, + request, + options, + )); + } - /** - * Create no background - * - * @remarks - * This endpoint will create a no background variation of the provided image ID - */ - async createVariationNoBG( - request: operations.CreateVariationNoBGRequestBody, - options?: RequestOptions - ): Promise { - return unwrapAsync(variationCreateVariationNoBG(this, request, options)); - } + /** + * Create no background + * + * @remarks + * This endpoint will create a no background variation of the provided image ID + */ + async createVariationNoBG( + request: operations.CreateVariationNoBGRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(variationCreateVariationNoBG( + this, + request, + options, + )); + } - /** - * Create unzoom - * - * @remarks - * This endpoint will create an unzoom variation for the provided image ID - */ - async createVariationUnzoom( - request?: operations.CreateVariationUnzoomRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(variationCreateVariationUnzoom(this, request, options)); - } + /** + * Create unzoom + * + * @remarks + * This endpoint will create an unzoom variation for the provided image ID + */ + async createVariationUnzoom( + request?: operations.CreateVariationUnzoomRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(variationCreateVariationUnzoom( + this, + request, + options, + )); + } - /** - * Create upscale - * - * @remarks - * This endpoint will create an upscale for the provided image ID - */ - async createVariationUpscale( - request?: operations.CreateVariationUpscaleRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(variationCreateVariationUpscale(this, request, options)); - } + /** + * Create upscale + * + * @remarks + * This endpoint will create an upscale for the provided image ID + */ + async createVariationUpscale( + request?: operations.CreateVariationUpscaleRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(variationCreateVariationUpscale( + this, + request, + options, + )); + } - /** - * Get variation by ID - * - * @remarks - * This endpoint will get the variation by ID - */ - async getVariationById( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(variationGetVariationById(this, id, options)); - } + /** + * Get variation by ID + * + * @remarks + * This endpoint will get the variation by ID + */ + async getVariationById( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(variationGetVariationById( + this, + id, + options, + )); + } }