@leonardo-ai/sdk 4.10.1 → 4.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +130 -43
- package/docs/sdks/dataset/README.md +10 -5
- package/docs/sdks/{element → elements}/README.md +5 -4
- package/docs/sdks/{model → image}/README.md +32 -114
- package/docs/sdks/initimages/README.md +182 -0
- package/docs/sdks/models/README.md +180 -0
- package/docs/sdks/motion/README.md +50 -0
- package/docs/sdks/pricingcalculator/README.md +48 -0
- package/docs/sdks/prompt/README.md +4 -2
- package/docs/sdks/realtimecanvas/README.md +190 -0
- package/docs/sdks/texture/README.md +92 -0
- package/docs/sdks/{initimage → threedmodelassets}/README.md +17 -58
- package/docs/sdks/user/README.md +2 -1
- package/docs/sdks/variation/README.md +10 -5
- package/hooks/hooks.d.ts +2 -2
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +1 -1
- package/hooks/index.d.ts +2 -2
- package/hooks/index.d.ts.map +1 -1
- package/hooks/index.js +3 -3
- package/hooks/index.js.map +1 -1
- package/hooks/types.d.ts +1 -1
- package/hooks/types.d.ts.map +1 -1
- package/hooks/types.js +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/lib/base64.js +1 -1
- package/lib/config.d.ts +6 -5
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +6 -6
- package/lib/config.js.map +1 -1
- package/lib/encodings.d.ts +16 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +56 -24
- package/lib/encodings.js.map +1 -1
- package/lib/http.d.ts +56 -2
- package/lib/http.d.ts.map +1 -1
- package/lib/http.js +173 -4
- package/lib/http.js.map +1 -1
- package/lib/is-plain-object.d.ts +2 -0
- package/lib/is-plain-object.d.ts.map +1 -0
- package/lib/is-plain-object.js +42 -0
- package/lib/is-plain-object.js.map +1 -0
- package/lib/primitives.d.ts +16 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +30 -0
- package/lib/primitives.js.map +1 -0
- package/lib/retries.js +1 -1
- package/lib/schemas.d.ts +4 -0
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +23 -27
- package/lib/schemas.js.map +1 -1
- package/lib/sdks.d.ts +30 -8
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +59 -29
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +1 -1
- package/lib/url.js +1 -1
- package/package.json +2 -3
- package/sdk/dataset.d.ts +3 -3
- package/sdk/dataset.d.ts.map +1 -1
- package/sdk/dataset.js +100 -124
- package/sdk/dataset.js.map +1 -1
- package/sdk/{element.d.ts → elements.d.ts} +5 -5
- package/sdk/elements.d.ts.map +1 -0
- package/sdk/{element.js → elements.js} +28 -35
- package/sdk/elements.js.map +1 -0
- package/sdk/image.d.ts +36 -0
- package/sdk/image.d.ts.map +1 -0
- package/sdk/image.js +316 -0
- package/sdk/image.js.map +1 -0
- package/sdk/index.d.ts +1 -1
- package/sdk/index.d.ts.map +1 -1
- package/sdk/index.js +2 -2
- package/sdk/index.js.map +1 -1
- package/sdk/{initimage.d.ts → initimages.d.ts} +12 -5
- package/sdk/initimages.d.ts.map +1 -0
- package/sdk/initimages.js +304 -0
- package/sdk/initimages.js.map +1 -0
- package/sdk/models/errors/index.d.ts +2 -2
- package/sdk/models/errors/index.d.ts.map +1 -1
- package/sdk/models/errors/index.js +3 -3
- package/sdk/models/errors/index.js.map +1 -1
- package/sdk/models/errors/sdkerror.js +1 -1
- package/sdk/models/errors/sdkvalidationerror.js +1 -1
- package/sdk/models/operations/createdataset.d.ts +72 -40
- package/sdk/models/operations/createdataset.d.ts.map +1 -1
- package/sdk/models/operations/createdataset.js +101 -96
- package/sdk/models/operations/createdataset.js.map +1 -1
- package/sdk/models/operations/creategeneration.d.ts +155 -121
- package/sdk/models/operations/creategeneration.d.ts.map +1 -1
- package/sdk/models/operations/creategeneration.js +216 -280
- package/sdk/models/operations/creategeneration.js.map +1 -1
- package/sdk/models/operations/createlcmgeneration.d.ts +83 -61
- package/sdk/models/operations/createlcmgeneration.d.ts.map +1 -1
- package/sdk/models/operations/createlcmgeneration.js +110 -149
- package/sdk/models/operations/createlcmgeneration.js.map +1 -1
- package/sdk/models/operations/createmodel.d.ts +81 -57
- package/sdk/models/operations/createmodel.d.ts.map +1 -1
- package/sdk/models/operations/createmodel.js +120 -125
- package/sdk/models/operations/createmodel.js.map +1 -1
- package/sdk/models/operations/createsvdmotiongeneration.d.ts +76 -48
- package/sdk/models/operations/createsvdmotiongeneration.d.ts.map +1 -1
- package/sdk/models/operations/createsvdmotiongeneration.js +97 -116
- package/sdk/models/operations/createsvdmotiongeneration.js.map +1 -1
- package/sdk/models/operations/createtexturegeneration.d.ts +79 -54
- package/sdk/models/operations/createtexturegeneration.d.ts.map +1 -1
- package/sdk/models/operations/createtexturegeneration.js +125 -136
- package/sdk/models/operations/createtexturegeneration.js.map +1 -1
- package/sdk/models/operations/createuniversalupscalerjob.d.ts +79 -53
- package/sdk/models/operations/createuniversalupscalerjob.d.ts.map +1 -1
- package/sdk/models/operations/createuniversalupscalerjob.js +102 -125
- package/sdk/models/operations/createuniversalupscalerjob.js.map +1 -1
- package/sdk/models/operations/createvariationnobg.d.ts +73 -42
- package/sdk/models/operations/createvariationnobg.d.ts.map +1 -1
- package/sdk/models/operations/createvariationnobg.js +91 -96
- package/sdk/models/operations/createvariationnobg.js.map +1 -1
- package/sdk/models/operations/createvariationunzoom.d.ts +73 -42
- package/sdk/models/operations/createvariationunzoom.d.ts.map +1 -1
- package/sdk/models/operations/createvariationunzoom.js +91 -96
- package/sdk/models/operations/createvariationunzoom.js.map +1 -1
- package/sdk/models/operations/createvariationupscale.d.ts +72 -40
- package/sdk/models/operations/createvariationupscale.d.ts.map +1 -1
- package/sdk/models/operations/createvariationupscale.js +93 -96
- package/sdk/models/operations/createvariationupscale.js.map +1 -1
- package/sdk/models/operations/delete3dmodelbyid.d.ts +93 -52
- package/sdk/models/operations/delete3dmodelbyid.d.ts.map +1 -1
- package/sdk/models/operations/delete3dmodelbyid.js +128 -118
- package/sdk/models/operations/delete3dmodelbyid.js.map +1 -1
- package/sdk/models/operations/deletedatasetbyid.d.ts +71 -38
- package/sdk/models/operations/deletedatasetbyid.d.ts.map +1 -1
- package/sdk/models/operations/deletedatasetbyid.js +103 -96
- package/sdk/models/operations/deletedatasetbyid.js.map +1 -1
- package/sdk/models/operations/deletegenerationbyid.d.ts +71 -38
- package/sdk/models/operations/deletegenerationbyid.d.ts.map +1 -1
- package/sdk/models/operations/deletegenerationbyid.js +99 -94
- package/sdk/models/operations/deletegenerationbyid.js.map +1 -1
- package/sdk/models/operations/deleteinitimagebyid.d.ts +71 -38
- package/sdk/models/operations/deleteinitimagebyid.d.ts.map +1 -1
- package/sdk/models/operations/deleteinitimagebyid.js +99 -94
- package/sdk/models/operations/deleteinitimagebyid.js.map +1 -1
- package/sdk/models/operations/deletemodelbyid.d.ts +71 -38
- package/sdk/models/operations/deletemodelbyid.d.ts.map +1 -1
- package/sdk/models/operations/deletemodelbyid.js +99 -96
- package/sdk/models/operations/deletemodelbyid.js.map +1 -1
- package/sdk/models/operations/deletetexturegenerationbyid.d.ts +93 -52
- package/sdk/models/operations/deletetexturegenerationbyid.d.ts.map +1 -1
- package/sdk/models/operations/deletetexturegenerationbyid.js +132 -128
- package/sdk/models/operations/deletetexturegenerationbyid.js.map +1 -1
- package/sdk/models/operations/getdatasetbyid.d.ts +95 -60
- package/sdk/models/operations/getdatasetbyid.d.ts.map +1 -1
- package/sdk/models/operations/getdatasetbyid.js +140 -138
- package/sdk/models/operations/getdatasetbyid.js.map +1 -1
- package/sdk/models/operations/getgenerationbyid.d.ts +184 -159
- package/sdk/models/operations/getgenerationbyid.d.ts.map +1 -1
- package/sdk/models/operations/getgenerationbyid.js +284 -377
- package/sdk/models/operations/getgenerationbyid.js.map +1 -1
- package/sdk/models/operations/getgenerationsbyuserid.d.ts +186 -162
- package/sdk/models/operations/getgenerationsbyuserid.d.ts.map +1 -1
- package/sdk/models/operations/getgenerationsbyuserid.js +278 -381
- package/sdk/models/operations/getgenerationsbyuserid.js.map +1 -1
- package/sdk/models/operations/getinitimagebyid.d.ts +73 -42
- package/sdk/models/operations/getinitimagebyid.d.ts.map +1 -1
- package/sdk/models/operations/getinitimagebyid.js +107 -104
- package/sdk/models/operations/getinitimagebyid.js.map +1 -1
- package/sdk/models/operations/getmodelbyid.d.ts +83 -61
- package/sdk/models/operations/getmodelbyid.d.ts.map +1 -1
- package/sdk/models/operations/getmodelbyid.js +126 -141
- package/sdk/models/operations/getmodelbyid.js.map +1 -1
- package/sdk/models/operations/getuserself.d.ts +81 -58
- package/sdk/models/operations/getuserself.d.ts.map +1 -1
- package/sdk/models/operations/getuserself.js +119 -156
- package/sdk/models/operations/getuserself.js.map +1 -1
- package/sdk/models/operations/getvariationbyid.d.ts +76 -47
- package/sdk/models/operations/getvariationbyid.d.ts.map +1 -1
- package/sdk/models/operations/getvariationbyid.js +112 -113
- package/sdk/models/operations/getvariationbyid.js.map +1 -1
- package/sdk/models/operations/index.d.ts +36 -34
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +37 -35
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listelements.d.ts +63 -47
- package/sdk/models/operations/listelements.d.ts.map +1 -1
- package/sdk/models/operations/listelements.js +89 -103
- package/sdk/models/operations/listelements.js.map +1 -1
- package/sdk/models/operations/listplatformmodels.d.ts +77 -50
- package/sdk/models/operations/listplatformmodels.d.ts.map +1 -1
- package/sdk/models/operations/listplatformmodels.js +131 -122
- package/sdk/models/operations/listplatformmodels.js.map +1 -1
- package/sdk/models/operations/performalchemyupscalelcm.d.ts +88 -71
- package/sdk/models/operations/performalchemyupscalelcm.d.ts.map +1 -1
- package/sdk/models/operations/performalchemyupscalelcm.js +124 -175
- package/sdk/models/operations/performalchemyupscalelcm.js.map +1 -1
- package/sdk/models/operations/performinpaintinglcm.d.ts +84 -63
- package/sdk/models/operations/performinpaintinglcm.d.ts.map +1 -1
- package/sdk/models/operations/performinpaintinglcm.js +116 -153
- package/sdk/models/operations/performinpaintinglcm.js.map +1 -1
- package/sdk/models/operations/performinstantrefine.d.ts +83 -61
- package/sdk/models/operations/performinstantrefine.d.ts.map +1 -1
- package/sdk/models/operations/performinstantrefine.js +114 -149
- package/sdk/models/operations/performinstantrefine.js.map +1 -1
- package/sdk/models/operations/pricingcalculator.d.ts +476 -0
- package/sdk/models/operations/pricingcalculator.d.ts.map +1 -0
- package/sdk/models/operations/pricingcalculator.js +391 -0
- package/sdk/models/operations/pricingcalculator.js.map +1 -0
- package/sdk/models/operations/promptimprove.d.ts +72 -40
- package/sdk/models/operations/promptimprove.d.ts.map +1 -1
- package/sdk/models/operations/promptimprove.js +89 -96
- package/sdk/models/operations/promptimprove.js.map +1 -1
- package/sdk/models/operations/promptrandom.d.ts +55 -32
- package/sdk/models/operations/promptrandom.d.ts.map +1 -1
- package/sdk/models/operations/promptrandom.js +74 -82
- package/sdk/models/operations/promptrandom.js.map +1 -1
- package/sdk/models/operations/uploadcanvasinitimage.d.ts +140 -0
- package/sdk/models/operations/uploadcanvasinitimage.d.ts.map +1 -0
- package/sdk/models/operations/uploadcanvasinitimage.js +152 -0
- package/sdk/models/operations/uploadcanvasinitimage.js.map +1 -0
- package/sdk/models/operations/uploaddatasetimage.d.ts +92 -54
- package/sdk/models/operations/uploaddatasetimage.d.ts.map +1 -1
- package/sdk/models/operations/uploaddatasetimage.js +122 -130
- package/sdk/models/operations/uploaddatasetimage.js.map +1 -1
- package/sdk/models/operations/uploaddatasetimagefromgen.d.ts +89 -48
- package/sdk/models/operations/uploaddatasetimagefromgen.d.ts.map +1 -1
- package/sdk/models/operations/uploaddatasetimagefromgen.js +120 -118
- package/sdk/models/operations/uploaddatasetimagefromgen.js.map +1 -1
- package/sdk/models/operations/uploadinitimage.d.ts +74 -44
- package/sdk/models/operations/uploadinitimage.d.ts.map +1 -1
- package/sdk/models/operations/uploadinitimage.js +93 -108
- package/sdk/models/operations/uploadinitimage.js.map +1 -1
- package/sdk/models/operations/uploadmodelasset.d.ts +75 -46
- package/sdk/models/operations/uploadmodelasset.d.ts.map +1 -1
- package/sdk/models/operations/uploadmodelasset.js +95 -112
- package/sdk/models/operations/uploadmodelasset.js.map +1 -1
- package/sdk/models/shared/canvasrequesttype.d.ts +25 -0
- package/sdk/models/shared/canvasrequesttype.d.ts.map +1 -0
- package/sdk/models/shared/canvasrequesttype.js +56 -0
- package/sdk/models/shared/canvasrequesttype.js.map +1 -0
- package/sdk/models/shared/controlnetinput.d.ts +93 -0
- package/sdk/models/shared/controlnetinput.d.ts.map +1 -0
- package/sdk/models/shared/controlnetinput.js +107 -0
- package/sdk/models/shared/controlnetinput.js.map +1 -0
- package/sdk/models/shared/controlnettype.d.ts +16 -2
- package/sdk/models/shared/controlnettype.d.ts.map +1 -1
- package/sdk/models/shared/controlnettype.js +19 -4
- package/sdk/models/shared/controlnettype.js.map +1 -1
- package/sdk/models/shared/custommodeltype.d.ts +13 -1
- package/sdk/models/shared/custommodeltype.d.ts.map +1 -1
- package/sdk/models/shared/custommodeltype.js +16 -3
- package/sdk/models/shared/custommodeltype.js.map +1 -1
- package/sdk/models/shared/elementinput.d.ts +18 -10
- package/sdk/models/shared/elementinput.d.ts.map +1 -1
- package/sdk/models/shared/elementinput.js +19 -24
- package/sdk/models/shared/elementinput.js.map +1 -1
- package/sdk/models/shared/index.d.ts +15 -12
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +16 -13
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/jobstatus.d.ts +13 -1
- package/sdk/models/shared/jobstatus.d.ts.map +1 -1
- package/sdk/models/shared/jobstatus.js +16 -3
- package/sdk/models/shared/jobstatus.js.map +1 -1
- package/sdk/models/shared/lcmgenerationstyle.d.ts +13 -1
- package/sdk/models/shared/lcmgenerationstyle.d.ts.map +1 -1
- package/sdk/models/shared/lcmgenerationstyle.js +16 -3
- package/sdk/models/shared/lcmgenerationstyle.js.map +1 -1
- package/sdk/models/shared/pricingcalculatorservices.d.ts +28 -0
- package/sdk/models/shared/pricingcalculatorservices.d.ts.map +1 -0
- package/sdk/models/shared/pricingcalculatorservices.js +59 -0
- package/sdk/models/shared/pricingcalculatorservices.js.map +1 -0
- package/sdk/models/shared/sdgenerationschedulers.d.ts +13 -1
- package/sdk/models/shared/sdgenerationschedulers.d.ts.map +1 -1
- package/sdk/models/shared/sdgenerationschedulers.js +16 -3
- package/sdk/models/shared/sdgenerationschedulers.js.map +1 -1
- package/sdk/models/shared/sdgenerationstyle.d.ts +13 -1
- package/sdk/models/shared/sdgenerationstyle.d.ts.map +1 -1
- package/sdk/models/shared/sdgenerationstyle.js +16 -3
- package/sdk/models/shared/sdgenerationstyle.js.map +1 -1
- package/sdk/models/shared/sdversions.d.ts +13 -1
- package/sdk/models/shared/sdversions.d.ts.map +1 -1
- package/sdk/models/shared/sdversions.js +16 -3
- package/sdk/models/shared/sdversions.js.map +1 -1
- package/sdk/models/shared/security.d.ts +17 -8
- package/sdk/models/shared/security.d.ts.map +1 -1
- package/sdk/models/shared/security.js +17 -20
- package/sdk/models/shared/security.js.map +1 -1
- package/sdk/models/shared/strength.d.ts +13 -1
- package/sdk/models/shared/strength.d.ts.map +1 -1
- package/sdk/models/shared/strength.js +16 -3
- package/sdk/models/shared/strength.js.map +1 -1
- package/sdk/models/shared/universalupscalerstyle.d.ts +13 -1
- package/sdk/models/shared/universalupscalerstyle.d.ts.map +1 -1
- package/sdk/models/shared/universalupscalerstyle.js +16 -3
- package/sdk/models/shared/universalupscalerstyle.js.map +1 -1
- package/sdk/models/shared/variationtype.d.ts +13 -1
- package/sdk/models/shared/variationtype.d.ts.map +1 -1
- package/sdk/models/shared/variationtype.js +16 -3
- package/sdk/models/shared/variationtype.js.map +1 -1
- package/sdk/{model.d.ts → models.d.ts} +5 -19
- package/sdk/models.d.ts.map +1 -0
- package/sdk/models.js +299 -0
- package/sdk/models.js.map +1 -0
- package/sdk/motion.d.ts +15 -0
- package/sdk/motion.d.ts.map +1 -0
- package/sdk/motion.js +121 -0
- package/sdk/motion.js.map +1 -0
- package/sdk/pricingcalculator.d.ts +15 -0
- package/sdk/pricingcalculator.d.ts.map +1 -0
- package/sdk/pricingcalculator.js +119 -0
- package/sdk/pricingcalculator.js.map +1 -0
- package/sdk/prompt.d.ts +3 -3
- package/sdk/prompt.d.ts.map +1 -1
- package/sdk/prompt.js +44 -55
- package/sdk/prompt.js.map +1 -1
- package/sdk/realtimecanvas.d.ts +36 -0
- package/sdk/realtimecanvas.d.ts.map +1 -0
- package/sdk/realtimecanvas.js +296 -0
- package/sdk/realtimecanvas.js.map +1 -0
- package/sdk/sdk.d.ts +33 -18
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +55 -30
- package/sdk/sdk.js.map +1 -1
- package/sdk/texture.d.ts +22 -0
- package/sdk/texture.d.ts.map +1 -0
- package/sdk/texture.js +186 -0
- package/sdk/texture.js.map +1 -0
- package/sdk/threedmodelassets.d.ts +22 -0
- package/sdk/threedmodelassets.d.ts.map +1 -0
- package/sdk/threedmodelassets.js +184 -0
- package/sdk/threedmodelassets.js.map +1 -0
- package/sdk/types/blobs.js +1 -1
- package/sdk/types/enums.d.ts +12 -0
- package/sdk/types/enums.d.ts.map +1 -0
- package/sdk/types/enums.js +11 -0
- package/sdk/types/enums.js.map +1 -0
- package/sdk/types/index.d.ts +6 -4
- package/sdk/types/index.d.ts.map +1 -1
- package/sdk/types/index.js +11 -9
- package/sdk/types/index.js.map +1 -1
- package/sdk/types/operations.js +1 -1
- package/sdk/types/rfcdate.js +1 -1
- package/sdk/user.d.ts +3 -3
- package/sdk/user.d.ts.map +1 -1
- package/sdk/user.js +25 -32
- package/sdk/user.js.map +1 -1
- package/sdk/variation.d.ts +3 -3
- package/sdk/variation.d.ts.map +1 -1
- package/sdk/variation.js +99 -127
- package/sdk/variation.js.map +1 -1
- package/src/hooks/hooks.ts +3 -3
- package/src/hooks/index.ts +3 -3
- package/src/hooks/types.ts +2 -2
- package/src/index.ts +3 -3
- package/src/lib/base64.ts +1 -1
- package/src/lib/config.ts +8 -7
- package/src/lib/encodings.ts +73 -14
- package/src/lib/http.ts +446 -203
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/primitives.ts +40 -0
- package/src/lib/retries.ts +1 -1
- package/src/lib/schemas.ts +38 -4
- package/src/lib/sdks.ts +89 -27
- package/src/lib/security.ts +2 -2
- package/src/lib/url.ts +1 -1
- package/src/sdk/dataset.ts +105 -154
- package/src/sdk/{element.ts → elements.ts} +23 -36
- package/src/sdk/image.ts +377 -0
- package/src/sdk/index.ts +2 -2
- package/src/sdk/{initimage.ts → initimages.ts} +140 -93
- package/src/sdk/models/errors/index.ts +3 -3
- package/src/sdk/models/errors/sdkerror.ts +1 -1
- package/src/sdk/models/errors/sdkvalidationerror.ts +1 -1
- package/src/sdk/models/operations/createdataset.ts +161 -135
- package/src/sdk/models/operations/creategeneration.ts +351 -395
- package/src/sdk/models/operations/createlcmgeneration.ts +182 -209
- package/src/sdk/models/operations/createmodel.ts +186 -174
- package/src/sdk/models/operations/createsvdmotiongeneration.ts +163 -182
- package/src/sdk/models/operations/createtexturegeneration.ts +194 -205
- package/src/sdk/models/operations/createuniversalupscalerjob.ts +174 -199
- package/src/sdk/models/operations/createvariationnobg.ts +161 -145
- package/src/sdk/models/operations/createvariationunzoom.ts +158 -153
- package/src/sdk/models/operations/createvariationupscale.ts +162 -162
- package/src/sdk/models/operations/delete3dmodelbyid.ts +210 -169
- package/src/sdk/models/operations/deletedatasetbyid.ts +169 -134
- package/src/sdk/models/operations/deletegenerationbyid.ts +162 -137
- package/src/sdk/models/operations/deleteinitimagebyid.ts +159 -137
- package/src/sdk/models/operations/deletemodelbyid.ts +161 -133
- package/src/sdk/models/operations/deletetexturegenerationbyid.ts +214 -211
- package/src/sdk/models/operations/getdatasetbyid.ts +218 -189
- package/src/sdk/models/operations/getgenerationbyid.ts +460 -553
- package/src/sdk/models/operations/getgenerationsbyuserid.ts +458 -601
- package/src/sdk/models/operations/getinitimagebyid.ts +175 -145
- package/src/sdk/models/operations/getmodelbyid.ts +197 -194
- package/src/sdk/models/operations/getuserself.ts +177 -207
- package/src/sdk/models/operations/getvariationbyid.ts +182 -163
- package/src/sdk/models/operations/index.ts +37 -35
- package/src/sdk/models/operations/listelements.ts +140 -149
- package/src/sdk/models/operations/listplatformmodels.ts +201 -179
- package/src/sdk/models/operations/performalchemyupscalelcm.ts +202 -269
- package/src/sdk/models/operations/performinpaintinglcm.ts +189 -227
- package/src/sdk/models/operations/performinstantrefine.ts +186 -221
- package/src/sdk/models/operations/pricingcalculator.ts +883 -0
- package/src/sdk/models/operations/promptimprove.ts +158 -137
- package/src/sdk/models/operations/promptrandom.ts +126 -122
- package/src/sdk/models/operations/uploadcanvasinitimage.ts +256 -0
- package/src/sdk/models/operations/uploaddatasetimage.ts +201 -178
- package/src/sdk/models/operations/uploaddatasetimagefromgen.ts +197 -188
- package/src/sdk/models/operations/uploadinitimage.ts +164 -153
- package/src/sdk/models/operations/uploadmodelasset.ts +167 -159
- package/src/sdk/models/shared/canvasrequesttype.ts +34 -0
- package/src/sdk/models/shared/controlnetinput.ts +130 -0
- package/src/sdk/models/shared/controlnettype.ts +21 -3
- package/src/sdk/models/shared/custommodeltype.ts +17 -2
- package/src/sdk/models/shared/elementinput.ts +30 -32
- package/src/sdk/models/shared/index.ts +16 -13
- package/src/sdk/models/shared/jobstatus.ts +16 -2
- package/src/sdk/models/shared/lcmgenerationstyle.ts +17 -2
- package/src/sdk/models/shared/pricingcalculatorservices.ts +39 -0
- package/src/sdk/models/shared/sdgenerationschedulers.ts +17 -2
- package/src/sdk/models/shared/sdgenerationstyle.ts +17 -2
- package/src/sdk/models/shared/sdversions.ts +18 -2
- package/src/sdk/models/shared/security.ts +24 -26
- package/src/sdk/models/shared/strength.ts +16 -2
- package/src/sdk/models/shared/universalupscalerstyle.ts +17 -2
- package/src/sdk/models/shared/variationtype.ts +18 -2
- package/src/sdk/models.ts +347 -0
- package/src/sdk/motion.ts +123 -0
- package/src/sdk/pricingcalculator.ts +119 -0
- package/src/sdk/prompt.ts +43 -65
- package/src/sdk/realtimecanvas.ts +361 -0
- package/src/sdk/sdk.ts +55 -25
- package/src/sdk/texture.ts +208 -0
- package/src/sdk/threedmodelassets.ts +204 -0
- package/src/sdk/types/blobs.ts +1 -1
- package/src/sdk/types/enums.ts +16 -0
- package/src/sdk/types/index.ts +7 -5
- package/src/sdk/types/operations.ts +1 -1
- package/src/sdk/types/rfcdate.ts +1 -1
- package/src/sdk/user.ts +22 -35
- package/src/sdk/variation.ts +106 -157
- package/docs/sdks/generation/README.md +0 -485
- package/sdk/element.d.ts.map +0 -1
- package/sdk/element.js.map +0 -1
- package/sdk/generation.d.ts +0 -85
- package/sdk/generation.d.ts.map +0 -1
- package/sdk/generation.js +0 -799
- package/sdk/generation.js.map +0 -1
- package/sdk/initimage.d.ts.map +0 -1
- package/sdk/initimage.js +0 -261
- package/sdk/initimage.js.map +0 -1
- package/sdk/model.d.ts.map +0 -1
- package/sdk/model.js +0 -454
- package/sdk/model.js.map +0 -1
- package/src/sdk/generation.ts +0 -1057
- package/src/sdk/model.ts +0 -574
package/src/sdk/prompt.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Code generated by Speakeasy (https://
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { SDKHooks } from "../hooks";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { HTTPClient } from "../lib/http";
|
|
9
|
-
import * as schemas$ from "../lib/schemas";
|
|
10
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks";
|
|
11
|
-
import * as
|
|
12
|
-
import * as operations from "./models/operations";
|
|
5
|
+
import { SDKHooks } from "../hooks/hooks.js";
|
|
6
|
+
import { SDKOptions, serverURLFromOptions } from "../lib/config.js";
|
|
7
|
+
import { encodeJSON as encodeJSON$ } from "../lib/encodings.js";
|
|
8
|
+
import { HTTPClient } from "../lib/http.js";
|
|
9
|
+
import * as schemas$ from "../lib/schemas.js";
|
|
10
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import * as operations from "./models/operations/index.js";
|
|
13
12
|
|
|
14
13
|
export class Prompt extends ClientSDK {
|
|
15
14
|
private readonly options$: SDKOptions & { hooks?: SDKHooks };
|
|
@@ -49,22 +48,23 @@ export class Prompt extends ClientSDK {
|
|
|
49
48
|
options?: RequestOptions
|
|
50
49
|
): Promise<operations.PromptImproveResponse> {
|
|
51
50
|
const input$ = request;
|
|
52
|
-
const headers$ = new Headers();
|
|
53
|
-
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
54
|
-
headers$.set("Content-Type", "application/json");
|
|
55
|
-
headers$.set("Accept", "application/json");
|
|
56
51
|
|
|
57
52
|
const payload$ = schemas$.parse(
|
|
58
53
|
input$,
|
|
59
|
-
(value$) => operations.PromptImproveRequestBody
|
|
54
|
+
(value$) => operations.PromptImproveRequestBody$outboundSchema.parse(value$),
|
|
60
55
|
"Input validation failed"
|
|
61
56
|
);
|
|
62
|
-
const body$ =
|
|
57
|
+
const body$ = encodeJSON$("body", payload$, { explode: true });
|
|
63
58
|
|
|
64
59
|
const path$ = this.templateURLComponent("/prompt/improve")();
|
|
65
60
|
|
|
66
61
|
const query$ = "";
|
|
67
62
|
|
|
63
|
+
const headers$ = new Headers({
|
|
64
|
+
"Content-Type": "application/json",
|
|
65
|
+
Accept: "application/json",
|
|
66
|
+
});
|
|
67
|
+
|
|
68
68
|
let security$;
|
|
69
69
|
if (typeof this.options$.bearerAuth === "function") {
|
|
70
70
|
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
@@ -80,7 +80,6 @@ export class Prompt extends ClientSDK {
|
|
|
80
80
|
};
|
|
81
81
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
82
82
|
|
|
83
|
-
const doOptions = { context, errorCodes: [] };
|
|
84
83
|
const request$ = this.createRequest$(
|
|
85
84
|
context,
|
|
86
85
|
{
|
|
@@ -90,11 +89,17 @@ export class Prompt extends ClientSDK {
|
|
|
90
89
|
headers: headers$,
|
|
91
90
|
query: query$,
|
|
92
91
|
body: body$,
|
|
92
|
+
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
93
93
|
},
|
|
94
94
|
options
|
|
95
95
|
);
|
|
96
96
|
|
|
97
|
-
const response = await this.do$(request$,
|
|
97
|
+
const response = await this.do$(request$, {
|
|
98
|
+
context,
|
|
99
|
+
errorCodes: [],
|
|
100
|
+
retryConfig: options?.retries || this.options$.retryConfig,
|
|
101
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
102
|
+
});
|
|
98
103
|
|
|
99
104
|
const responseFields$ = {
|
|
100
105
|
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
@@ -103,27 +108,11 @@ export class Prompt extends ClientSDK {
|
|
|
103
108
|
Headers: {},
|
|
104
109
|
};
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
return operations.PromptImproveResponse$.inboundSchema.parse({
|
|
112
|
-
...responseFields$,
|
|
113
|
-
object: val$,
|
|
114
|
-
});
|
|
115
|
-
},
|
|
116
|
-
"Response validation failed"
|
|
117
|
-
);
|
|
118
|
-
return result;
|
|
119
|
-
} else {
|
|
120
|
-
const responseBody = await response.text();
|
|
121
|
-
throw new errors.SDKError(
|
|
122
|
-
"Unexpected API response status or content-type",
|
|
123
|
-
response,
|
|
124
|
-
responseBody
|
|
125
|
-
);
|
|
126
|
-
}
|
|
111
|
+
const [result$] = await this.matcher<operations.PromptImproveResponse>()
|
|
112
|
+
.json(200, operations.PromptImproveResponse$inboundSchema, { key: "object" })
|
|
113
|
+
.match(response, { extraFields: responseFields$ });
|
|
114
|
+
|
|
115
|
+
return result$;
|
|
127
116
|
}
|
|
128
117
|
|
|
129
118
|
/**
|
|
@@ -133,14 +122,14 @@ export class Prompt extends ClientSDK {
|
|
|
133
122
|
* This endpoint returns a random prompt
|
|
134
123
|
*/
|
|
135
124
|
async promptRandom(options?: RequestOptions): Promise<operations.PromptRandomResponse> {
|
|
136
|
-
const headers$ = new Headers();
|
|
137
|
-
headers$.set("user-agent", SDK_METADATA.userAgent);
|
|
138
|
-
headers$.set("Accept", "application/json");
|
|
139
|
-
|
|
140
125
|
const path$ = this.templateURLComponent("/prompt/random")();
|
|
141
126
|
|
|
142
127
|
const query$ = "";
|
|
143
128
|
|
|
129
|
+
const headers$ = new Headers({
|
|
130
|
+
Accept: "application/json",
|
|
131
|
+
});
|
|
132
|
+
|
|
144
133
|
let security$;
|
|
145
134
|
if (typeof this.options$.bearerAuth === "function") {
|
|
146
135
|
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
@@ -156,7 +145,6 @@ export class Prompt extends ClientSDK {
|
|
|
156
145
|
};
|
|
157
146
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
158
147
|
|
|
159
|
-
const doOptions = { context, errorCodes: [] };
|
|
160
148
|
const request$ = this.createRequest$(
|
|
161
149
|
context,
|
|
162
150
|
{
|
|
@@ -165,11 +153,17 @@ export class Prompt extends ClientSDK {
|
|
|
165
153
|
path: path$,
|
|
166
154
|
headers: headers$,
|
|
167
155
|
query: query$,
|
|
156
|
+
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
168
157
|
},
|
|
169
158
|
options
|
|
170
159
|
);
|
|
171
160
|
|
|
172
|
-
const response = await this.do$(request$,
|
|
161
|
+
const response = await this.do$(request$, {
|
|
162
|
+
context,
|
|
163
|
+
errorCodes: [],
|
|
164
|
+
retryConfig: options?.retries || this.options$.retryConfig,
|
|
165
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
166
|
+
});
|
|
173
167
|
|
|
174
168
|
const responseFields$ = {
|
|
175
169
|
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
@@ -178,26 +172,10 @@ export class Prompt extends ClientSDK {
|
|
|
178
172
|
Headers: {},
|
|
179
173
|
};
|
|
180
174
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
return operations.PromptRandomResponse$.inboundSchema.parse({
|
|
187
|
-
...responseFields$,
|
|
188
|
-
object: val$,
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
"Response validation failed"
|
|
192
|
-
);
|
|
193
|
-
return result;
|
|
194
|
-
} else {
|
|
195
|
-
const responseBody = await response.text();
|
|
196
|
-
throw new errors.SDKError(
|
|
197
|
-
"Unexpected API response status or content-type",
|
|
198
|
-
response,
|
|
199
|
-
responseBody
|
|
200
|
-
);
|
|
201
|
-
}
|
|
175
|
+
const [result$] = await this.matcher<operations.PromptRandomResponse>()
|
|
176
|
+
.json(200, operations.PromptRandomResponse$inboundSchema, { key: "object" })
|
|
177
|
+
.match(response, { extraFields: responseFields$ });
|
|
178
|
+
|
|
179
|
+
return result$;
|
|
202
180
|
}
|
|
203
181
|
}
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKHooks } from "../hooks/hooks.js";
|
|
6
|
+
import { SDKOptions, serverURLFromOptions } from "../lib/config.js";
|
|
7
|
+
import { encodeJSON as encodeJSON$ } from "../lib/encodings.js";
|
|
8
|
+
import { HTTPClient } from "../lib/http.js";
|
|
9
|
+
import * as schemas$ from "../lib/schemas.js";
|
|
10
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import * as operations from "./models/operations/index.js";
|
|
12
|
+
|
|
13
|
+
export class RealtimeCanvas extends ClientSDK {
|
|
14
|
+
private readonly options$: SDKOptions & { hooks?: SDKHooks };
|
|
15
|
+
|
|
16
|
+
constructor(options: SDKOptions = {}) {
|
|
17
|
+
const opt = options as unknown;
|
|
18
|
+
let hooks: SDKHooks;
|
|
19
|
+
if (
|
|
20
|
+
typeof opt === "object" &&
|
|
21
|
+
opt != null &&
|
|
22
|
+
"hooks" in opt &&
|
|
23
|
+
opt.hooks instanceof SDKHooks
|
|
24
|
+
) {
|
|
25
|
+
hooks = opt.hooks;
|
|
26
|
+
} else {
|
|
27
|
+
hooks = new SDKHooks();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
super({
|
|
31
|
+
client: options.httpClient || new HTTPClient(),
|
|
32
|
+
baseURL: serverURLFromOptions(options),
|
|
33
|
+
hooks,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
this.options$ = { ...options, hooks };
|
|
37
|
+
void this.options$;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Create LCM Generation
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* This endpoint will generate a LCM image generation.
|
|
45
|
+
*/
|
|
46
|
+
async createLCMGeneration(
|
|
47
|
+
request?: operations.CreateLCMGenerationRequestBody | undefined,
|
|
48
|
+
options?: RequestOptions
|
|
49
|
+
): Promise<operations.CreateLCMGenerationResponse> {
|
|
50
|
+
const input$ = request;
|
|
51
|
+
|
|
52
|
+
const payload$ = schemas$.parse(
|
|
53
|
+
input$,
|
|
54
|
+
(value$) =>
|
|
55
|
+
operations.CreateLCMGenerationRequestBody$outboundSchema.optional().parse(value$),
|
|
56
|
+
"Input validation failed"
|
|
57
|
+
);
|
|
58
|
+
const body$ =
|
|
59
|
+
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
|
60
|
+
|
|
61
|
+
const path$ = this.templateURLComponent("/generations-lcm")();
|
|
62
|
+
|
|
63
|
+
const query$ = "";
|
|
64
|
+
|
|
65
|
+
const headers$ = new Headers({
|
|
66
|
+
"Content-Type": "application/json",
|
|
67
|
+
Accept: "application/json",
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
let security$;
|
|
71
|
+
if (typeof this.options$.bearerAuth === "function") {
|
|
72
|
+
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
73
|
+
} else if (this.options$.bearerAuth) {
|
|
74
|
+
security$ = { bearerAuth: this.options$.bearerAuth };
|
|
75
|
+
} else {
|
|
76
|
+
security$ = {};
|
|
77
|
+
}
|
|
78
|
+
const context = {
|
|
79
|
+
operationID: "createLCMGeneration",
|
|
80
|
+
oAuth2Scopes: [],
|
|
81
|
+
securitySource: this.options$.bearerAuth,
|
|
82
|
+
};
|
|
83
|
+
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
84
|
+
|
|
85
|
+
const request$ = this.createRequest$(
|
|
86
|
+
context,
|
|
87
|
+
{
|
|
88
|
+
security: securitySettings$,
|
|
89
|
+
method: "POST",
|
|
90
|
+
path: path$,
|
|
91
|
+
headers: headers$,
|
|
92
|
+
query: query$,
|
|
93
|
+
body: body$,
|
|
94
|
+
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
95
|
+
},
|
|
96
|
+
options
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
const response = await this.do$(request$, {
|
|
100
|
+
context,
|
|
101
|
+
errorCodes: [],
|
|
102
|
+
retryConfig: options?.retries || this.options$.retryConfig,
|
|
103
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const responseFields$ = {
|
|
107
|
+
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
108
|
+
StatusCode: response.status,
|
|
109
|
+
RawResponse: response,
|
|
110
|
+
Headers: {},
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const [result$] = await this.matcher<operations.CreateLCMGenerationResponse>()
|
|
114
|
+
.json(200, operations.CreateLCMGenerationResponse$inboundSchema, { key: "object" })
|
|
115
|
+
.match(response, { extraFields: responseFields$ });
|
|
116
|
+
|
|
117
|
+
return result$;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Perform Alchemy Upscale on a LCM image
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* This endpoint will perform Alchemy Upscale on a LCM image
|
|
125
|
+
*/
|
|
126
|
+
async performAlchemyUpscaleLCM(
|
|
127
|
+
request?: operations.PerformAlchemyUpscaleLCMRequestBody | undefined,
|
|
128
|
+
options?: RequestOptions
|
|
129
|
+
): Promise<operations.PerformAlchemyUpscaleLCMResponse> {
|
|
130
|
+
const input$ = request;
|
|
131
|
+
|
|
132
|
+
const payload$ = schemas$.parse(
|
|
133
|
+
input$,
|
|
134
|
+
(value$) =>
|
|
135
|
+
operations.PerformAlchemyUpscaleLCMRequestBody$outboundSchema.optional().parse(
|
|
136
|
+
value$
|
|
137
|
+
),
|
|
138
|
+
"Input validation failed"
|
|
139
|
+
);
|
|
140
|
+
const body$ =
|
|
141
|
+
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
|
142
|
+
|
|
143
|
+
const path$ = this.templateURLComponent("/lcm-upscale")();
|
|
144
|
+
|
|
145
|
+
const query$ = "";
|
|
146
|
+
|
|
147
|
+
const headers$ = new Headers({
|
|
148
|
+
"Content-Type": "application/json",
|
|
149
|
+
Accept: "application/json",
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
let security$;
|
|
153
|
+
if (typeof this.options$.bearerAuth === "function") {
|
|
154
|
+
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
155
|
+
} else if (this.options$.bearerAuth) {
|
|
156
|
+
security$ = { bearerAuth: this.options$.bearerAuth };
|
|
157
|
+
} else {
|
|
158
|
+
security$ = {};
|
|
159
|
+
}
|
|
160
|
+
const context = {
|
|
161
|
+
operationID: "performAlchemyUpscaleLCM",
|
|
162
|
+
oAuth2Scopes: [],
|
|
163
|
+
securitySource: this.options$.bearerAuth,
|
|
164
|
+
};
|
|
165
|
+
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
166
|
+
|
|
167
|
+
const request$ = this.createRequest$(
|
|
168
|
+
context,
|
|
169
|
+
{
|
|
170
|
+
security: securitySettings$,
|
|
171
|
+
method: "POST",
|
|
172
|
+
path: path$,
|
|
173
|
+
headers: headers$,
|
|
174
|
+
query: query$,
|
|
175
|
+
body: body$,
|
|
176
|
+
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
177
|
+
},
|
|
178
|
+
options
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
const response = await this.do$(request$, {
|
|
182
|
+
context,
|
|
183
|
+
errorCodes: [],
|
|
184
|
+
retryConfig: options?.retries || this.options$.retryConfig,
|
|
185
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
const responseFields$ = {
|
|
189
|
+
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
190
|
+
StatusCode: response.status,
|
|
191
|
+
RawResponse: response,
|
|
192
|
+
Headers: {},
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const [result$] = await this.matcher<operations.PerformAlchemyUpscaleLCMResponse>()
|
|
196
|
+
.json(200, operations.PerformAlchemyUpscaleLCMResponse$inboundSchema, { key: "object" })
|
|
197
|
+
.match(response, { extraFields: responseFields$ });
|
|
198
|
+
|
|
199
|
+
return result$;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Perform inpainting on a LCM image
|
|
204
|
+
*
|
|
205
|
+
* @remarks
|
|
206
|
+
* This endpoint will perform a inpainting on a LCM image
|
|
207
|
+
*/
|
|
208
|
+
async performInpaintingLCM(
|
|
209
|
+
request?: operations.PerformInpaintingLCMRequestBody | undefined,
|
|
210
|
+
options?: RequestOptions
|
|
211
|
+
): Promise<operations.PerformInpaintingLCMResponse> {
|
|
212
|
+
const input$ = request;
|
|
213
|
+
|
|
214
|
+
const payload$ = schemas$.parse(
|
|
215
|
+
input$,
|
|
216
|
+
(value$) =>
|
|
217
|
+
operations.PerformInpaintingLCMRequestBody$outboundSchema.optional().parse(value$),
|
|
218
|
+
"Input validation failed"
|
|
219
|
+
);
|
|
220
|
+
const body$ =
|
|
221
|
+
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
|
222
|
+
|
|
223
|
+
const path$ = this.templateURLComponent("/lcm-inpainting")();
|
|
224
|
+
|
|
225
|
+
const query$ = "";
|
|
226
|
+
|
|
227
|
+
const headers$ = new Headers({
|
|
228
|
+
"Content-Type": "application/json",
|
|
229
|
+
Accept: "application/json",
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
let security$;
|
|
233
|
+
if (typeof this.options$.bearerAuth === "function") {
|
|
234
|
+
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
235
|
+
} else if (this.options$.bearerAuth) {
|
|
236
|
+
security$ = { bearerAuth: this.options$.bearerAuth };
|
|
237
|
+
} else {
|
|
238
|
+
security$ = {};
|
|
239
|
+
}
|
|
240
|
+
const context = {
|
|
241
|
+
operationID: "performInpaintingLCM",
|
|
242
|
+
oAuth2Scopes: [],
|
|
243
|
+
securitySource: this.options$.bearerAuth,
|
|
244
|
+
};
|
|
245
|
+
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
246
|
+
|
|
247
|
+
const request$ = this.createRequest$(
|
|
248
|
+
context,
|
|
249
|
+
{
|
|
250
|
+
security: securitySettings$,
|
|
251
|
+
method: "POST",
|
|
252
|
+
path: path$,
|
|
253
|
+
headers: headers$,
|
|
254
|
+
query: query$,
|
|
255
|
+
body: body$,
|
|
256
|
+
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
257
|
+
},
|
|
258
|
+
options
|
|
259
|
+
);
|
|
260
|
+
|
|
261
|
+
const response = await this.do$(request$, {
|
|
262
|
+
context,
|
|
263
|
+
errorCodes: [],
|
|
264
|
+
retryConfig: options?.retries || this.options$.retryConfig,
|
|
265
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
const responseFields$ = {
|
|
269
|
+
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
270
|
+
StatusCode: response.status,
|
|
271
|
+
RawResponse: response,
|
|
272
|
+
Headers: {},
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
const [result$] = await this.matcher<operations.PerformInpaintingLCMResponse>()
|
|
276
|
+
.json(200, operations.PerformInpaintingLCMResponse$inboundSchema, { key: "object" })
|
|
277
|
+
.match(response, { extraFields: responseFields$ });
|
|
278
|
+
|
|
279
|
+
return result$;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Perform instant refine on a LCM image
|
|
284
|
+
*
|
|
285
|
+
* @remarks
|
|
286
|
+
* This endpoint will perform instant refine on a LCM image
|
|
287
|
+
*/
|
|
288
|
+
async performInstantRefine(
|
|
289
|
+
request?: operations.PerformInstantRefineRequestBody | undefined,
|
|
290
|
+
options?: RequestOptions
|
|
291
|
+
): Promise<operations.PerformInstantRefineResponse> {
|
|
292
|
+
const input$ = request;
|
|
293
|
+
|
|
294
|
+
const payload$ = schemas$.parse(
|
|
295
|
+
input$,
|
|
296
|
+
(value$) =>
|
|
297
|
+
operations.PerformInstantRefineRequestBody$outboundSchema.optional().parse(value$),
|
|
298
|
+
"Input validation failed"
|
|
299
|
+
);
|
|
300
|
+
const body$ =
|
|
301
|
+
payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true });
|
|
302
|
+
|
|
303
|
+
const path$ = this.templateURLComponent("/lcm-instant-refine")();
|
|
304
|
+
|
|
305
|
+
const query$ = "";
|
|
306
|
+
|
|
307
|
+
const headers$ = new Headers({
|
|
308
|
+
"Content-Type": "application/json",
|
|
309
|
+
Accept: "application/json",
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
let security$;
|
|
313
|
+
if (typeof this.options$.bearerAuth === "function") {
|
|
314
|
+
security$ = { bearerAuth: await this.options$.bearerAuth() };
|
|
315
|
+
} else if (this.options$.bearerAuth) {
|
|
316
|
+
security$ = { bearerAuth: this.options$.bearerAuth };
|
|
317
|
+
} else {
|
|
318
|
+
security$ = {};
|
|
319
|
+
}
|
|
320
|
+
const context = {
|
|
321
|
+
operationID: "performInstantRefine",
|
|
322
|
+
oAuth2Scopes: [],
|
|
323
|
+
securitySource: this.options$.bearerAuth,
|
|
324
|
+
};
|
|
325
|
+
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
326
|
+
|
|
327
|
+
const request$ = this.createRequest$(
|
|
328
|
+
context,
|
|
329
|
+
{
|
|
330
|
+
security: securitySettings$,
|
|
331
|
+
method: "POST",
|
|
332
|
+
path: path$,
|
|
333
|
+
headers: headers$,
|
|
334
|
+
query: query$,
|
|
335
|
+
body: body$,
|
|
336
|
+
timeoutMs: options?.timeoutMs || this.options$.timeoutMs || -1,
|
|
337
|
+
},
|
|
338
|
+
options
|
|
339
|
+
);
|
|
340
|
+
|
|
341
|
+
const response = await this.do$(request$, {
|
|
342
|
+
context,
|
|
343
|
+
errorCodes: [],
|
|
344
|
+
retryConfig: options?.retries || this.options$.retryConfig,
|
|
345
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
const responseFields$ = {
|
|
349
|
+
ContentType: response.headers.get("content-type") ?? "application/octet-stream",
|
|
350
|
+
StatusCode: response.status,
|
|
351
|
+
RawResponse: response,
|
|
352
|
+
Headers: {},
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
const [result$] = await this.matcher<operations.PerformInstantRefineResponse>()
|
|
356
|
+
.json(200, operations.PerformInstantRefineResponse$inboundSchema, { key: "object" })
|
|
357
|
+
.match(response, { extraFields: responseFields$ });
|
|
358
|
+
|
|
359
|
+
return result$;
|
|
360
|
+
}
|
|
361
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Code generated by Speakeasy (https://
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { SDKHooks } from "../hooks";
|
|
6
|
-
import { SDKOptions, serverURLFromOptions } from "../lib/config";
|
|
7
|
-
import { HTTPClient } from "../lib/http";
|
|
8
|
-
import { ClientSDK } from "../lib/sdks";
|
|
9
|
-
import { Dataset } from "./dataset";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
5
|
+
import { SDKHooks } from "../hooks/hooks.js";
|
|
6
|
+
import { SDKOptions, serverURLFromOptions } from "../lib/config.js";
|
|
7
|
+
import { HTTPClient } from "../lib/http.js";
|
|
8
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
9
|
+
import { Dataset } from "./dataset.js";
|
|
10
|
+
import { Elements } from "./elements.js";
|
|
11
|
+
import { Image } from "./image.js";
|
|
12
|
+
import { InitImages } from "./initimages.js";
|
|
13
|
+
import { Models } from "./models.js";
|
|
14
|
+
import { Motion } from "./motion.js";
|
|
15
|
+
import { PricingCalculator } from "./pricingcalculator.js";
|
|
16
|
+
import { Prompt } from "./prompt.js";
|
|
17
|
+
import { RealtimeCanvas } from "./realtimecanvas.js";
|
|
18
|
+
import { Texture } from "./texture.js";
|
|
19
|
+
import { ThreeDModelAssets } from "./threedmodelassets.js";
|
|
20
|
+
import { User } from "./user.js";
|
|
21
|
+
import { Variation } from "./variation.js";
|
|
17
22
|
|
|
18
23
|
export class Leonardo extends ClientSDK {
|
|
19
24
|
private readonly options$: SDKOptions & { hooks?: SDKHooks };
|
|
@@ -42,24 +47,39 @@ export class Leonardo extends ClientSDK {
|
|
|
42
47
|
void this.options$;
|
|
43
48
|
}
|
|
44
49
|
|
|
50
|
+
private _initImages?: InitImages;
|
|
51
|
+
get initImages(): InitImages {
|
|
52
|
+
return (this._initImages ??= new InitImages(this.options$));
|
|
53
|
+
}
|
|
54
|
+
|
|
45
55
|
private _dataset?: Dataset;
|
|
46
56
|
get dataset(): Dataset {
|
|
47
57
|
return (this._dataset ??= new Dataset(this.options$));
|
|
48
58
|
}
|
|
49
59
|
|
|
50
|
-
private
|
|
51
|
-
get
|
|
52
|
-
return (this.
|
|
60
|
+
private _elements?: Elements;
|
|
61
|
+
get elements(): Elements {
|
|
62
|
+
return (this._elements ??= new Elements(this.options$));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
private _image?: Image;
|
|
66
|
+
get image(): Image {
|
|
67
|
+
return (this._image ??= new Image(this.options$));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private _realtimeCanvas?: RealtimeCanvas;
|
|
71
|
+
get realtimeCanvas(): RealtimeCanvas {
|
|
72
|
+
return (this._realtimeCanvas ??= new RealtimeCanvas(this.options$));
|
|
53
73
|
}
|
|
54
74
|
|
|
55
|
-
private
|
|
56
|
-
get
|
|
57
|
-
return (this.
|
|
75
|
+
private _motion?: Motion;
|
|
76
|
+
get motion(): Motion {
|
|
77
|
+
return (this._motion ??= new Motion(this.options$));
|
|
58
78
|
}
|
|
59
79
|
|
|
60
|
-
private
|
|
61
|
-
get
|
|
62
|
-
return (this.
|
|
80
|
+
private _texture?: Texture;
|
|
81
|
+
get texture(): Texture {
|
|
82
|
+
return (this._texture ??= new Texture(this.options$));
|
|
63
83
|
}
|
|
64
84
|
|
|
65
85
|
private _user?: User;
|
|
@@ -67,9 +87,19 @@ export class Leonardo extends ClientSDK {
|
|
|
67
87
|
return (this._user ??= new User(this.options$));
|
|
68
88
|
}
|
|
69
89
|
|
|
70
|
-
private
|
|
71
|
-
get
|
|
72
|
-
return (this.
|
|
90
|
+
private _models?: Models;
|
|
91
|
+
get models(): Models {
|
|
92
|
+
return (this._models ??= new Models(this.options$));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private _threeDModelAssets?: ThreeDModelAssets;
|
|
96
|
+
get threeDModelAssets(): ThreeDModelAssets {
|
|
97
|
+
return (this._threeDModelAssets ??= new ThreeDModelAssets(this.options$));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private _pricingCalculator?: PricingCalculator;
|
|
101
|
+
get pricingCalculator(): PricingCalculator {
|
|
102
|
+
return (this._pricingCalculator ??= new PricingCalculator(this.options$));
|
|
73
103
|
}
|
|
74
104
|
|
|
75
105
|
private _prompt?: Prompt;
|