@leonardo-ai/sdk 2.30.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/README.md +35 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/.devcontainer/setup.sh +30 -0
- package/.github/workflows/speakeasy_sdk_generate.yml +28 -0
- package/.speakeasy/gen.lock +236 -0
- package/README.md +66 -38
- package/docs/sdks/dataset/README.md +56 -56
- package/docs/sdks/element/README.md +7 -7
- package/docs/sdks/generation/README.md +71 -72
- package/docs/sdks/initimage/README.md +28 -28
- package/docs/sdks/model/README.md +56 -56
- package/docs/sdks/user/README.md +7 -7
- package/docs/sdks/variation/README.md +34 -34
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/{dist/sdk/index.js → index.js} +2 -0
- package/index.js.map +1 -0
- package/lib/base64.d.ts +10 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +61 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +31 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +36 -0
- package/lib/config.js.map +1 -0
- package/lib/encodings.d.ts +41 -0
- package/lib/encodings.d.ts.map +1 -0
- package/lib/encodings.js +311 -0
- package/lib/encodings.js.map +1 -0
- package/lib/event-streams.d.ts +16 -0
- package/lib/event-streams.d.ts.map +1 -0
- package/lib/event-streams.js +153 -0
- package/lib/event-streams.js.map +1 -0
- package/lib/http.d.ts +45 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +136 -0
- package/lib/http.js.map +1 -0
- package/lib/retries.d.ts +18 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +136 -0
- package/lib/retries.js.map +1 -0
- package/lib/sdks.d.ts +32 -0
- package/lib/sdks.d.ts.map +1 -0
- package/lib/sdks.js +76 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.d.ts +57 -0
- package/lib/security.d.ts.map +1 -0
- package/lib/security.js +99 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +4 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +26 -0
- package/lib/url.js.map +1 -0
- package/package.json +26 -27
- package/{dist/sdk → sdk}/dataset.d.ts +11 -10
- package/sdk/dataset.d.ts.map +1 -0
- package/sdk/dataset.js +332 -0
- package/sdk/dataset.js.map +1 -0
- package/sdk/element.d.ts +15 -0
- package/sdk/element.d.ts.map +1 -0
- package/sdk/element.js +88 -0
- package/sdk/element.js.map +1 -0
- package/sdk/generation.d.ts +57 -0
- package/sdk/generation.d.ts.map +1 -0
- package/sdk/generation.js +442 -0
- package/sdk/generation.js.map +1 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -0
- package/{dist → sdk}/index.js +1 -0
- package/sdk/index.js.map +1 -0
- package/sdk/initimage.d.ts +29 -0
- package/sdk/initimage.d.ts.map +1 -0
- package/sdk/initimage.js +210 -0
- package/sdk/initimage.js.map +1 -0
- package/sdk/model.d.ts +50 -0
- package/sdk/model.d.ts.map +1 -0
- package/sdk/model.js +363 -0
- package/sdk/model.js.map +1 -0
- package/sdk/models/errors/index.d.ts +2 -0
- package/sdk/models/errors/index.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/errors/index.js +1 -0
- package/sdk/models/errors/index.js.map +1 -0
- package/sdk/models/errors/sdkerror.d.ts +7 -0
- package/sdk/models/errors/sdkerror.d.ts.map +1 -0
- package/sdk/models/errors/sdkerror.js +22 -0
- package/sdk/models/errors/sdkerror.js.map +1 -0
- package/sdk/models/operations/createdataset.d.ts +100 -0
- package/sdk/models/operations/createdataset.d.ts.map +1 -0
- package/sdk/models/operations/createdataset.js +118 -0
- package/sdk/models/operations/createdataset.js.map +1 -0
- package/sdk/models/operations/creategeneration.d.ts +299 -0
- package/sdk/models/operations/creategeneration.d.ts.map +1 -0
- package/sdk/models/operations/creategeneration.js +312 -0
- package/sdk/models/operations/creategeneration.js.map +1 -0
- package/sdk/models/operations/createmodel.d.ts +143 -0
- package/sdk/models/operations/createmodel.d.ts.map +1 -0
- package/sdk/models/operations/createmodel.js +170 -0
- package/sdk/models/operations/createmodel.js.map +1 -0
- package/sdk/models/operations/createvariationnobg.d.ts +94 -0
- package/sdk/models/operations/createvariationnobg.d.ts.map +1 -0
- package/sdk/models/operations/createvariationnobg.js +118 -0
- package/sdk/models/operations/createvariationnobg.js.map +1 -0
- package/sdk/models/operations/createvariationupscale.d.ts +91 -0
- package/sdk/models/operations/createvariationupscale.d.ts.map +1 -0
- package/sdk/models/operations/createvariationupscale.js +118 -0
- package/sdk/models/operations/createvariationupscale.js.map +1 -0
- package/sdk/models/operations/deletedatasetbyid.d.ts +91 -0
- package/sdk/models/operations/deletedatasetbyid.d.ts.map +1 -0
- package/sdk/models/operations/deletedatasetbyid.js +118 -0
- package/sdk/models/operations/deletedatasetbyid.js.map +1 -0
- package/sdk/models/operations/deletegenerationbyid.d.ts +91 -0
- package/sdk/models/operations/deletegenerationbyid.d.ts.map +1 -0
- package/sdk/models/operations/deletegenerationbyid.js +116 -0
- package/sdk/models/operations/deletegenerationbyid.js.map +1 -0
- package/sdk/models/operations/deletegenerationstextureid.d.ts +114 -0
- package/sdk/models/operations/deletegenerationstextureid.d.ts.map +1 -0
- package/sdk/models/operations/deletegenerationstextureid.js +152 -0
- package/sdk/models/operations/deletegenerationstextureid.js.map +1 -0
- package/sdk/models/operations/deleteinitimagebyid.d.ts +91 -0
- package/sdk/models/operations/deleteinitimagebyid.d.ts.map +1 -0
- package/sdk/models/operations/deleteinitimagebyid.js +116 -0
- package/sdk/models/operations/deleteinitimagebyid.js.map +1 -0
- package/sdk/models/operations/deletemodelbyid.d.ts +91 -0
- package/sdk/models/operations/deletemodelbyid.d.ts.map +1 -0
- package/sdk/models/operations/deletemodelbyid.js +118 -0
- package/sdk/models/operations/deletemodelbyid.js.map +1 -0
- package/sdk/models/operations/deletemodels3did.d.ts +114 -0
- package/sdk/models/operations/deletemodels3did.d.ts.map +1 -0
- package/sdk/models/operations/deletemodels3did.js +142 -0
- package/sdk/models/operations/deletemodels3did.js.map +1 -0
- package/sdk/models/operations/getdatasetbyid.d.ts +129 -0
- package/sdk/models/operations/getdatasetbyid.d.ts.map +1 -0
- package/sdk/models/operations/getdatasetbyid.js +164 -0
- package/sdk/models/operations/getdatasetbyid.js.map +1 -0
- package/sdk/models/operations/getelements.d.ts +123 -0
- package/sdk/models/operations/getelements.d.ts.map +1 -0
- package/sdk/models/operations/getelements.js +144 -0
- package/sdk/models/operations/getelements.js.map +1 -0
- package/sdk/models/operations/getgenerationbyid.d.ts +364 -0
- package/sdk/models/operations/getgenerationbyid.d.ts.map +1 -0
- package/sdk/models/operations/getgenerationbyid.js +434 -0
- package/sdk/models/operations/getgenerationbyid.js.map +1 -0
- package/sdk/models/operations/getgenerationsbyuserid.d.ts +364 -0
- package/sdk/models/operations/getgenerationsbyuserid.d.ts.map +1 -0
- package/sdk/models/operations/getgenerationsbyuserid.js +442 -0
- package/sdk/models/operations/getgenerationsbyuserid.js.map +1 -0
- package/sdk/models/operations/getinitimagebyid.d.ts +97 -0
- package/sdk/models/operations/getinitimagebyid.d.ts.map +1 -0
- package/sdk/models/operations/getinitimagebyid.js +126 -0
- package/sdk/models/operations/getinitimagebyid.js.map +1 -0
- package/sdk/models/operations/getmodelbyid.d.ts +134 -0
- package/sdk/models/operations/getmodelbyid.d.ts.map +1 -0
- package/sdk/models/operations/getmodelbyid.js +186 -0
- package/sdk/models/operations/getmodelbyid.js.map +1 -0
- package/sdk/models/operations/getplatformmodels.d.ts +109 -0
- package/sdk/models/operations/getplatformmodels.d.ts.map +1 -0
- package/sdk/models/operations/getplatformmodels.js +144 -0
- package/sdk/models/operations/getplatformmodels.js.map +1 -0
- package/sdk/models/operations/getuserself.d.ts +109 -0
- package/sdk/models/operations/getuserself.d.ts.map +1 -0
- package/sdk/models/operations/getuserself.js +154 -0
- package/sdk/models/operations/getuserself.js.map +1 -0
- package/sdk/models/operations/getvariationbyid.d.ts +107 -0
- package/sdk/models/operations/getvariationbyid.d.ts.map +1 -0
- package/sdk/models/operations/getvariationbyid.js +158 -0
- package/sdk/models/operations/getvariationbyid.js.map +1 -0
- package/{dist/sdk → sdk}/models/operations/index.d.ts +1 -0
- package/sdk/models/operations/index.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/operations/index.js +1 -0
- package/sdk/models/operations/index.js.map +1 -0
- package/sdk/models/operations/postgenerationsmotionsvd.d.ts +118 -0
- package/sdk/models/operations/postgenerationsmotionsvd.d.ts.map +1 -0
- package/sdk/models/operations/postgenerationsmotionsvd.js +140 -0
- package/sdk/models/operations/postgenerationsmotionsvd.js.map +1 -0
- package/sdk/models/operations/postgenerationstexture.d.ts +112 -0
- package/sdk/models/operations/postgenerationstexture.d.ts.map +1 -0
- package/sdk/models/operations/postgenerationstexture.js +158 -0
- package/sdk/models/operations/postgenerationstexture.js.map +1 -0
- package/sdk/models/operations/postmodels3dupload.d.ts +97 -0
- package/sdk/models/operations/postmodels3dupload.d.ts.map +1 -0
- package/sdk/models/operations/postmodels3dupload.js +136 -0
- package/sdk/models/operations/postmodels3dupload.js.map +1 -0
- package/sdk/models/operations/postvariationsunzoom.d.ts +94 -0
- package/sdk/models/operations/postvariationsunzoom.d.ts.map +1 -0
- package/sdk/models/operations/postvariationsunzoom.js +118 -0
- package/sdk/models/operations/postvariationsunzoom.js.map +1 -0
- package/sdk/models/operations/uploaddatasetimage.d.ts +120 -0
- package/sdk/models/operations/uploaddatasetimage.d.ts.map +1 -0
- package/sdk/models/operations/uploaddatasetimage.js +156 -0
- package/sdk/models/operations/uploaddatasetimage.js.map +1 -0
- package/sdk/models/operations/uploaddatasetimagefromgen.d.ts +111 -0
- package/sdk/models/operations/uploaddatasetimagefromgen.d.ts.map +1 -0
- package/sdk/models/operations/uploaddatasetimagefromgen.js +144 -0
- package/sdk/models/operations/uploaddatasetimagefromgen.js.map +1 -0
- package/sdk/models/operations/uploadinitimage.d.ts +97 -0
- package/sdk/models/operations/uploadinitimage.d.ts.map +1 -0
- package/sdk/models/operations/uploadinitimage.js +130 -0
- package/sdk/models/operations/uploadinitimage.js.map +1 -0
- package/sdk/models/shared/controlnettype.d.ts +12 -0
- package/sdk/models/shared/controlnettype.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/controlnettype.js +6 -2
- package/sdk/models/shared/controlnettype.js.map +1 -0
- package/{dist/sdk → sdk}/models/shared/custommodeltype.d.ts +4 -0
- package/sdk/models/shared/custommodeltype.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/custommodeltype.js +6 -2
- package/sdk/models/shared/custommodeltype.js.map +1 -0
- package/sdk/models/shared/elementinput.d.ts +25 -0
- package/sdk/models/shared/elementinput.d.ts.map +1 -0
- package/sdk/models/shared/elementinput.js +34 -0
- package/sdk/models/shared/elementinput.js.map +1 -0
- package/{dist/sdk → sdk}/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -0
- package/{dist/sdk → sdk}/models/shared/jobstatus.d.ts +4 -0
- package/sdk/models/shared/jobstatus.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/jobstatus.js +6 -2
- package/sdk/models/shared/jobstatus.js.map +1 -0
- package/{dist/sdk → sdk}/models/shared/sdgenerationschedulers.d.ts +4 -0
- package/sdk/models/shared/sdgenerationschedulers.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/sdgenerationschedulers.js +6 -2
- package/sdk/models/shared/sdgenerationschedulers.js.map +1 -0
- package/{dist/sdk → sdk}/models/shared/sdgenerationstyle.d.ts +4 -0
- package/sdk/models/shared/sdgenerationstyle.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/sdgenerationstyle.js +6 -2
- package/sdk/models/shared/sdgenerationstyle.js.map +1 -0
- package/{dist/sdk → sdk}/models/shared/sdversions.d.ts +4 -0
- package/sdk/models/shared/sdversions.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/sdversions.js +6 -2
- package/sdk/models/shared/sdversions.js.map +1 -0
- package/sdk/models/shared/security.d.ts +4 -0
- package/sdk/models/shared/security.d.ts.map +1 -0
- package/sdk/models/shared/security.js +6 -0
- package/sdk/models/shared/security.js.map +1 -0
- package/{dist/sdk → sdk}/models/shared/strength.d.ts +4 -0
- package/sdk/models/shared/strength.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/strength.js +6 -2
- package/sdk/models/shared/strength.js.map +1 -0
- package/{dist/sdk → sdk}/models/shared/variationtype.d.ts +4 -0
- package/sdk/models/shared/variationtype.d.ts.map +1 -0
- package/{dist/sdk → sdk}/models/shared/variationtype.js +6 -2
- package/sdk/models/shared/variationtype.js.map +1 -0
- package/sdk/sdk.d.ts +28 -0
- package/sdk/sdk.d.ts.map +1 -0
- package/sdk/sdk.js +56 -0
- package/sdk/sdk.js.map +1 -0
- package/sdk/types/blobs.d.ts +4 -0
- package/sdk/types/blobs.d.ts.map +1 -0
- package/sdk/types/blobs.js +52 -0
- package/sdk/types/blobs.js.map +1 -0
- package/sdk/types/decimal.d.ts +2 -0
- package/sdk/types/decimal.d.ts.map +1 -0
- package/{dist/sdk/types/index.js → sdk/types/decimal.js} +2 -1
- package/sdk/types/decimal.js.map +1 -0
- package/sdk/types/index.d.ts +6 -0
- package/sdk/types/index.d.ts.map +1 -0
- package/sdk/types/index.js +16 -0
- package/sdk/types/index.js.map +1 -0
- package/sdk/types/operations.d.ts +13 -0
- package/sdk/types/operations.d.ts.map +1 -0
- package/sdk/types/operations.js +19 -0
- package/sdk/types/operations.js.map +1 -0
- package/sdk/types/rfcdate.d.ts +21 -0
- package/sdk/types/rfcdate.d.ts.map +1 -0
- package/sdk/types/rfcdate.js +46 -0
- package/sdk/types/rfcdate.js.map +1 -0
- package/{dist/sdk → sdk}/user.d.ts +7 -6
- package/sdk/user.d.ts.map +1 -0
- package/sdk/user.js +88 -0
- package/sdk/user.js.map +1 -0
- package/sdk/variation.d.ts +36 -0
- package/sdk/variation.d.ts.map +1 -0
- package/sdk/variation.js +260 -0
- package/sdk/variation.js.map +1 -0
- package/src/index.ts +6 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +57 -0
- package/src/lib/encodings.ts +384 -0
- package/src/lib/event-streams.ts +192 -0
- package/src/lib/http.ts +203 -0
- package/src/lib/retries.ts +207 -0
- package/src/lib/sdks.ts +107 -0
- package/src/lib/security.ts +164 -0
- package/src/lib/url.ts +31 -0
- package/src/sdk/dataset.ts +361 -0
- package/src/sdk/element.ts +69 -0
- package/src/sdk/generation.ts +492 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/initimage.ts +215 -0
- package/src/sdk/model.ts +397 -0
- package/src/sdk/models/errors/index.ts +5 -0
- package/src/sdk/models/errors/sdkerror.ts +24 -0
- package/src/sdk/models/operations/createdataset.ts +209 -0
- package/src/sdk/models/operations/creategeneration.ts +578 -0
- package/src/sdk/models/operations/createmodel.ts +280 -0
- package/src/sdk/models/operations/createvariationnobg.ts +209 -0
- package/src/sdk/models/operations/createvariationupscale.ts +225 -0
- package/src/sdk/models/operations/deletedatasetbyid.ts +201 -0
- package/src/sdk/models/operations/deletegenerationbyid.ts +203 -0
- package/src/sdk/models/operations/deletegenerationstextureid.ts +296 -0
- package/src/sdk/models/operations/deleteinitimagebyid.ts +203 -0
- package/src/sdk/models/operations/deletemodelbyid.ts +200 -0
- package/src/sdk/models/operations/deletemodels3did.ts +246 -0
- package/src/sdk/models/operations/getdatasetbyid.ts +283 -0
- package/src/sdk/models/operations/getelements.ts +235 -0
- package/src/sdk/models/operations/getgenerationbyid.ts +778 -0
- package/src/sdk/models/operations/getgenerationsbyuserid.ts +825 -0
- package/src/sdk/models/operations/getinitimagebyid.ts +214 -0
- package/src/sdk/models/operations/getmodelbyid.ts +287 -0
- package/src/sdk/models/operations/getplatformmodels.ts +251 -0
- package/src/sdk/models/operations/getuserself.ts +254 -0
- package/src/sdk/models/operations/getvariationbyid.ts +237 -0
- package/src/sdk/models/operations/index.ts +31 -0
- package/src/sdk/models/operations/postgenerationsmotionsvd.ts +270 -0
- package/src/sdk/models/operations/postgenerationstexture.ts +278 -0
- package/src/sdk/models/operations/postmodels3dupload.ts +226 -0
- package/src/sdk/models/operations/postvariationsunzoom.ts +213 -0
- package/src/sdk/models/operations/uploaddatasetimage.ts +268 -0
- package/src/sdk/models/operations/uploaddatasetimagefromgen.ts +274 -0
- package/src/sdk/models/operations/uploadinitimage.ts +218 -0
- package/src/sdk/models/shared/controlnettype.ts +17 -0
- package/src/sdk/models/shared/custommodeltype.ts +28 -0
- package/src/sdk/models/shared/elementinput.ts +53 -0
- package/src/sdk/models/shared/index.ts +14 -0
- package/src/sdk/models/shared/jobstatus.ts +17 -0
- package/src/sdk/models/shared/sdgenerationschedulers.ts +21 -0
- package/src/sdk/models/shared/sdgenerationstyle.ts +29 -0
- package/src/sdk/models/shared/sdversions.ts +16 -0
- package/src/sdk/models/shared/security.ts +7 -0
- package/src/sdk/models/shared/strength.ts +18 -0
- package/src/sdk/models/shared/variationtype.ts +19 -0
- package/src/sdk/sdk.ts +63 -0
- package/src/sdk/types/blobs.ts +30 -0
- package/src/sdk/types/decimal.ts +5 -0
- package/src/sdk/types/index.ts +9 -0
- package/src/sdk/types/operations.ts +25 -0
- package/src/sdk/types/rfcdate.ts +54 -0
- package/src/sdk/user.ts +69 -0
- package/src/sdk/variation.ts +275 -0
- package/dist/index.d.ts +0 -1
- package/dist/internal/utils/contenttype.d.ts +0 -1
- package/dist/internal/utils/contenttype.js +0 -33
- package/dist/internal/utils/headers.d.ts +0 -4
- package/dist/internal/utils/headers.js +0 -92
- package/dist/internal/utils/index.d.ts +0 -8
- package/dist/internal/utils/index.js +0 -27
- package/dist/internal/utils/pathparams.d.ts +0 -2
- package/dist/internal/utils/pathparams.js +0 -53
- package/dist/internal/utils/queryparams.d.ts +0 -2
- package/dist/internal/utils/queryparams.js +0 -182
- package/dist/internal/utils/requestbody.d.ts +0 -2
- package/dist/internal/utils/requestbody.js +0 -328
- package/dist/internal/utils/retries.d.ts +0 -20
- package/dist/internal/utils/retries.js +0 -250
- package/dist/internal/utils/security.d.ts +0 -5
- package/dist/internal/utils/security.js +0 -196
- package/dist/internal/utils/utils.d.ts +0 -37
- package/dist/internal/utils/utils.js +0 -368
- package/dist/sdk/dataset.js +0 -446
- package/dist/sdk/element.d.ts +0 -14
- package/dist/sdk/element.js +0 -145
- package/dist/sdk/generation.d.ts +0 -56
- package/dist/sdk/generation.js +0 -576
- package/dist/sdk/index.d.ts +0 -1
- package/dist/sdk/initimage.d.ts +0 -28
- package/dist/sdk/initimage.js +0 -298
- package/dist/sdk/model.d.ts +0 -49
- package/dist/sdk/model.js +0 -499
- package/dist/sdk/models/errors/index.d.ts +0 -1
- package/dist/sdk/models/errors/sdkerror.d.ts +0 -7
- package/dist/sdk/models/errors/sdkerror.js +0 -40
- package/dist/sdk/models/operations/createdataset.d.ts +0 -48
- package/dist/sdk/models/operations/createdataset.js +0 -110
- package/dist/sdk/models/operations/creategeneration.d.ts +0 -175
- package/dist/sdk/models/operations/creategeneration.js +0 -312
- package/dist/sdk/models/operations/createmodel.d.ts +0 -75
- package/dist/sdk/models/operations/createmodel.js +0 -171
- package/dist/sdk/models/operations/createvariationnobg.d.ts +0 -40
- package/dist/sdk/models/operations/createvariationnobg.js +0 -112
- package/dist/sdk/models/operations/createvariationupscale.d.ts +0 -39
- package/dist/sdk/models/operations/createvariationupscale.js +0 -107
- package/dist/sdk/models/operations/deletedatasetbyid.d.ts +0 -41
- package/dist/sdk/models/operations/deletedatasetbyid.js +0 -101
- package/dist/sdk/models/operations/deletegenerationbyid.d.ts +0 -41
- package/dist/sdk/models/operations/deletegenerationbyid.js +0 -101
- package/dist/sdk/models/operations/deletegenerationstextureid.d.ts +0 -51
- package/dist/sdk/models/operations/deletegenerationstextureid.js +0 -121
- package/dist/sdk/models/operations/deleteinitimagebyid.d.ts +0 -41
- package/dist/sdk/models/operations/deleteinitimagebyid.js +0 -101
- package/dist/sdk/models/operations/deletemodelbyid.d.ts +0 -41
- package/dist/sdk/models/operations/deletemodelbyid.js +0 -101
- package/dist/sdk/models/operations/deletemodels3did.d.ts +0 -51
- package/dist/sdk/models/operations/deletemodels3did.js +0 -121
- package/dist/sdk/models/operations/getdatasetbyid.d.ts +0 -54
- package/dist/sdk/models/operations/getdatasetbyid.js +0 -153
- package/dist/sdk/models/operations/getelements.d.ts +0 -68
- package/dist/sdk/models/operations/getelements.js +0 -153
- package/dist/sdk/models/operations/getgenerationbyid.d.ts +0 -184
- package/dist/sdk/models/operations/getgenerationbyid.js +0 -408
- package/dist/sdk/models/operations/getgenerationsbyuserid.d.ts +0 -180
- package/dist/sdk/models/operations/getgenerationsbyuserid.js +0 -416
- package/dist/sdk/models/operations/getinitimagebyid.d.ts +0 -43
- package/dist/sdk/models/operations/getinitimagebyid.js +0 -111
- package/dist/sdk/models/operations/getmodelbyid.d.ts +0 -62
- package/dist/sdk/models/operations/getmodelbyid.js +0 -180
- package/dist/sdk/models/operations/getplatformmodels.d.ts +0 -47
- package/dist/sdk/models/operations/getplatformmodels.js +0 -136
- package/dist/sdk/models/operations/getuserself.d.ts +0 -47
- package/dist/sdk/models/operations/getuserself.js +0 -136
- package/dist/sdk/models/operations/getvariationbyid.d.ts +0 -49
- package/dist/sdk/models/operations/getvariationbyid.js +0 -145
- package/dist/sdk/models/operations/postgenerationsmotionsvd.d.ts +0 -58
- package/dist/sdk/models/operations/postgenerationsmotionsvd.js +0 -127
- package/dist/sdk/models/operations/postgenerationstexture.d.ts +0 -46
- package/dist/sdk/models/operations/postgenerationstexture.js +0 -142
- package/dist/sdk/models/operations/postmodels3dupload.d.ts +0 -39
- package/dist/sdk/models/operations/postmodels3dupload.js +0 -122
- package/dist/sdk/models/operations/postvariationsunzoom.d.ts +0 -40
- package/dist/sdk/models/operations/postvariationsunzoom.js +0 -112
- package/dist/sdk/models/operations/uploaddatasetimage.d.ts +0 -51
- package/dist/sdk/models/operations/uploaddatasetimage.js +0 -133
- package/dist/sdk/models/operations/uploaddatasetimagefromgen.d.ts +0 -48
- package/dist/sdk/models/operations/uploaddatasetimagefromgen.js +0 -118
- package/dist/sdk/models/operations/uploadinitimage.d.ts +0 -41
- package/dist/sdk/models/operations/uploadinitimage.js +0 -117
- package/dist/sdk/models/shared/controlnettype.d.ts +0 -8
- package/dist/sdk/models/shared/elementinput.d.ts +0 -11
- package/dist/sdk/models/shared/elementinput.js +0 -50
- package/dist/sdk/models/shared/security.d.ts +0 -4
- package/dist/sdk/models/shared/security.js +0 -45
- package/dist/sdk/sdk.d.ts +0 -63
- package/dist/sdk/sdk.js +0 -91
- package/dist/sdk/types/index.d.ts +0 -1
- package/dist/sdk/types/rfcdate.d.ts +0 -9
- package/dist/sdk/types/rfcdate.js +0 -59
- package/dist/sdk/user.js +0 -145
- package/dist/sdk/variation.d.ts +0 -35
- package/dist/sdk/variation.js +0 -379
- package/docs/sdk/models/operations/createdatasetrequestbody.md +0 -11
- package/docs/sdk/models/operations/createdatasetresponse.md +0 -11
- package/docs/sdk/models/operations/createdatasetresponsebody.md +0 -10
- package/docs/sdk/models/operations/creategenerationrequestbody.md +0 -46
- package/docs/sdk/models/operations/creategenerationresponse.md +0 -11
- package/docs/sdk/models/operations/creategenerationresponsebody.md +0 -10
- package/docs/sdk/models/operations/createmodelrequestbody.md +0 -18
- package/docs/sdk/models/operations/createmodelresponse.md +0 -11
- package/docs/sdk/models/operations/createmodelresponsebody.md +0 -10
- package/docs/sdk/models/operations/createvariationnobgrequestbody.md +0 -11
- package/docs/sdk/models/operations/createvariationnobgresponse.md +0 -11
- package/docs/sdk/models/operations/createvariationnobgresponsebody.md +0 -10
- package/docs/sdk/models/operations/createvariationupscalerequestbody.md +0 -10
- package/docs/sdk/models/operations/createvariationupscaleresponse.md +0 -11
- package/docs/sdk/models/operations/createvariationupscaleresponsebody.md +0 -10
- package/docs/sdk/models/operations/createvariationupscalesdupscalejoboutput.md +0 -9
- package/docs/sdk/models/operations/custommodels.md +0 -10
- package/docs/sdk/models/operations/datasetgenuploadoutput.md +0 -8
- package/docs/sdk/models/operations/datasetimages.md +0 -12
- package/docs/sdk/models/operations/datasets.md +0 -10
- package/docs/sdk/models/operations/datasetuploadoutput.md +0 -11
- package/docs/sdk/models/operations/deletedatasetbyiddatasets.md +0 -10
- package/docs/sdk/models/operations/deletedatasetbyidrequest.md +0 -8
- package/docs/sdk/models/operations/deletedatasetbyidresponse.md +0 -11
- package/docs/sdk/models/operations/deletedatasetbyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/deletegenerationbyidrequest.md +0 -8
- package/docs/sdk/models/operations/deletegenerationbyidresponse.md +0 -11
- package/docs/sdk/models/operations/deletegenerationbyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/deletegenerationstextureidrequest.md +0 -9
- package/docs/sdk/models/operations/deletegenerationstextureidrequestbody.md +0 -10
- package/docs/sdk/models/operations/deletegenerationstextureidresponse.md +0 -11
- package/docs/sdk/models/operations/deletegenerationstextureidresponsebody.md +0 -10
- package/docs/sdk/models/operations/deleteinitimagebyidrequest.md +0 -8
- package/docs/sdk/models/operations/deleteinitimagebyidresponse.md +0 -11
- package/docs/sdk/models/operations/deleteinitimagebyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/deletemodelbyidrequest.md +0 -8
- package/docs/sdk/models/operations/deletemodelbyidresponse.md +0 -11
- package/docs/sdk/models/operations/deletemodelbyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/deletemodels3didrequest.md +0 -9
- package/docs/sdk/models/operations/deletemodels3didrequestbody.md +0 -10
- package/docs/sdk/models/operations/deletemodels3didresponse.md +0 -11
- package/docs/sdk/models/operations/deletemodels3didresponsebody.md +0 -10
- package/docs/sdk/models/operations/elements.md +0 -17
- package/docs/sdk/models/operations/generatedimages.md +0 -19
- package/docs/sdk/models/operations/generatedimagevariationgeneric.md +0 -14
- package/docs/sdk/models/operations/generationelements.md +0 -12
- package/docs/sdk/models/operations/generations.md +0 -10
- package/docs/sdk/models/operations/getdatasetbyiddatasets.md +0 -15
- package/docs/sdk/models/operations/getdatasetbyidrequest.md +0 -8
- package/docs/sdk/models/operations/getdatasetbyidresponse.md +0 -11
- package/docs/sdk/models/operations/getdatasetbyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/getelementsresponse.md +0 -11
- package/docs/sdk/models/operations/getelementsresponsebody.md +0 -10
- package/docs/sdk/models/operations/getgenerationbyidgeneratedimagevariationgeneric.md +0 -13
- package/docs/sdk/models/operations/getgenerationbyidgenerations.md +0 -32
- package/docs/sdk/models/operations/getgenerationbyidloras.md +0 -17
- package/docs/sdk/models/operations/getgenerationbyidrequest.md +0 -8
- package/docs/sdk/models/operations/getgenerationbyidresponse.md +0 -11
- package/docs/sdk/models/operations/getgenerationbyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/getgenerationsbyuseridgeneratedimages.md +0 -19
- package/docs/sdk/models/operations/getgenerationsbyuseridgeneratedimagevariationgeneric.md +0 -13
- package/docs/sdk/models/operations/getgenerationsbyuseridgenerationelements.md +0 -12
- package/docs/sdk/models/operations/getgenerationsbyuseridgenerations.md +0 -32
- package/docs/sdk/models/operations/getgenerationsbyuseridrequest.md +0 -10
- package/docs/sdk/models/operations/getgenerationsbyuseridresponse.md +0 -11
- package/docs/sdk/models/operations/getgenerationsbyuseridresponsebody.md +0 -10
- package/docs/sdk/models/operations/getinitimagebyidinitimages.md +0 -12
- package/docs/sdk/models/operations/getinitimagebyidrequest.md +0 -8
- package/docs/sdk/models/operations/getinitimagebyidresponse.md +0 -11
- package/docs/sdk/models/operations/getinitimagebyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/getmodelbyidcustommodels.md +0 -21
- package/docs/sdk/models/operations/getmodelbyidrequest.md +0 -8
- package/docs/sdk/models/operations/getmodelbyidresponse.md +0 -11
- package/docs/sdk/models/operations/getmodelbyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/getplatformmodelscustommodels.md +0 -15
- package/docs/sdk/models/operations/getplatformmodelsgeneratedimages.md +0 -11
- package/docs/sdk/models/operations/getplatformmodelsresponse.md +0 -11
- package/docs/sdk/models/operations/getplatformmodelsresponsebody.md +0 -10
- package/docs/sdk/models/operations/getuserselfresponse.md +0 -11
- package/docs/sdk/models/operations/getuserselfresponsebody.md +0 -10
- package/docs/sdk/models/operations/getvariationbyidrequest.md +0 -8
- package/docs/sdk/models/operations/getvariationbyidresponse.md +0 -11
- package/docs/sdk/models/operations/getvariationbyidresponsebody.md +0 -10
- package/docs/sdk/models/operations/initimages.md +0 -10
- package/docs/sdk/models/operations/initimageuploadoutput.md +0 -11
- package/docs/sdk/models/operations/loras.md +0 -18
- package/docs/sdk/models/operations/modelassets.md +0 -10
- package/docs/sdk/models/operations/modelassettexturegenerations.md +0 -10
- package/docs/sdk/models/operations/modelassetuploadoutput.md +0 -11
- package/docs/sdk/models/operations/motionsvdgenerationoutput.md +0 -9
- package/docs/sdk/models/operations/postgenerationsmotionsvdrequestbody.md +0 -14
- package/docs/sdk/models/operations/postgenerationsmotionsvdresponse.md +0 -11
- package/docs/sdk/models/operations/postgenerationsmotionsvdresponsebody.md +0 -10
- package/docs/sdk/models/operations/postgenerationstexturerequestbody.md +0 -17
- package/docs/sdk/models/operations/postgenerationstextureresponse.md +0 -11
- package/docs/sdk/models/operations/postgenerationstextureresponsebody.md +0 -10
- package/docs/sdk/models/operations/postmodels3duploadrequestbody.md +0 -11
- package/docs/sdk/models/operations/postmodels3duploadresponse.md +0 -11
- package/docs/sdk/models/operations/postmodels3duploadresponsebody.md +0 -10
- package/docs/sdk/models/operations/postvariationsunzoomrequestbody.md +0 -11
- package/docs/sdk/models/operations/postvariationsunzoomresponse.md +0 -11
- package/docs/sdk/models/operations/postvariationsunzoomresponsebody.md +0 -10
- package/docs/sdk/models/operations/sdgenerationoutput.md +0 -9
- package/docs/sdk/models/operations/sdtrainingoutput.md +0 -9
- package/docs/sdk/models/operations/sdunzoomoutput.md +0 -9
- package/docs/sdk/models/operations/sdupscalejoboutput.md +0 -9
- package/docs/sdk/models/operations/texturegenerationjoboutput.md +0 -9
- package/docs/sdk/models/operations/uploaddatasetimagefromgenrequest.md +0 -9
- package/docs/sdk/models/operations/uploaddatasetimagefromgenrequestbody.md +0 -10
- package/docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md +0 -11
- package/docs/sdk/models/operations/uploaddatasetimagefromgenresponsebody.md +0 -10
- package/docs/sdk/models/operations/uploaddatasetimagerequest.md +0 -9
- package/docs/sdk/models/operations/uploaddatasetimagerequestbody.md +0 -10
- package/docs/sdk/models/operations/uploaddatasetimageresponse.md +0 -11
- package/docs/sdk/models/operations/uploaddatasetimageresponsebody.md +0 -10
- package/docs/sdk/models/operations/uploadinitimagerequestbody.md +0 -10
- package/docs/sdk/models/operations/uploadinitimageresponse.md +0 -11
- package/docs/sdk/models/operations/uploadinitimageresponsebody.md +0 -10
- package/docs/sdk/models/operations/userdetails.md +0 -15
- package/docs/sdk/models/operations/users.md +0 -11
- package/docs/sdk/models/shared/controlnettype.md +0 -12
- package/docs/sdk/models/shared/custommodeltype.md +0 -23
- package/docs/sdk/models/shared/elementinput.md +0 -9
- package/docs/sdk/models/shared/jobstatus.md +0 -12
- package/docs/sdk/models/shared/sdgenerationschedulers.md +0 -16
- package/docs/sdk/models/shared/sdgenerationstyle.md +0 -24
- package/docs/sdk/models/shared/sdversions.md +0 -11
- package/docs/sdk/models/shared/security.md +0 -8
- package/docs/sdk/models/shared/strength.md +0 -13
- package/docs/sdk/models/shared/variationtype.md +0 -14
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
6
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
7
|
-
if (!m) return o;
|
|
8
|
-
var i = m.call(o), r, ar = [], e;
|
|
9
|
-
try {
|
|
10
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
11
|
-
}
|
|
12
|
-
catch (error) { e = { error: error }; }
|
|
13
|
-
finally {
|
|
14
|
-
try {
|
|
15
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
16
|
-
}
|
|
17
|
-
finally { if (e) throw e.error; }
|
|
18
|
-
}
|
|
19
|
-
return ar;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.serializeRequestBody = exports.requestMetadataKey = void 0;
|
|
26
|
-
var utils_1 = require("./utils");
|
|
27
|
-
var form_data_1 = __importDefault(require("form-data"));
|
|
28
|
-
var types_1 = require("../../sdk/types");
|
|
29
|
-
var class_transformer_1 = require("class-transformer");
|
|
30
|
-
exports.requestMetadataKey = "request";
|
|
31
|
-
var mpFormMetadataKey = "multipart_form";
|
|
32
|
-
function serializeRequestBody(request, requestFieldName, serializationMethod) {
|
|
33
|
-
if (request !== Object(request) || !request.hasOwnProperty(requestFieldName)) {
|
|
34
|
-
return serializeContentType(utils_1.SerializationMethodToContentType[serializationMethod], request);
|
|
35
|
-
}
|
|
36
|
-
var requestBodyAnn = Reflect.getMetadata(exports.requestMetadataKey, request, requestFieldName);
|
|
37
|
-
if (!requestBodyAnn) {
|
|
38
|
-
throw new Error("invalid request type");
|
|
39
|
-
}
|
|
40
|
-
var requestDecorator = parseRequestDecorator(requestBodyAnn);
|
|
41
|
-
return serializeContentType(requestDecorator.MediaType, request[requestFieldName]);
|
|
42
|
-
}
|
|
43
|
-
exports.serializeRequestBody = serializeRequestBody;
|
|
44
|
-
var serializeContentType = function (contentType, reqBody) {
|
|
45
|
-
var _a, _b, _c;
|
|
46
|
-
var _d = __read([{}, {}], 2), requestHeaders = _d[0], requestBody = _d[1];
|
|
47
|
-
switch (contentType) {
|
|
48
|
-
case "multipart/form-data":
|
|
49
|
-
requestBody = encodeMultipartFormData(reqBody);
|
|
50
|
-
break;
|
|
51
|
-
case "multipart/mixed":
|
|
52
|
-
requestBody = encodeMultipartFormData(reqBody);
|
|
53
|
-
requestHeaders = requestBody.getHeaders();
|
|
54
|
-
break;
|
|
55
|
-
case "application/x-www-form-urlencoded":
|
|
56
|
-
_a = __read([
|
|
57
|
-
{ "Content-Type": "".concat(contentType) },
|
|
58
|
-
encodeFormUrlEncodedData(reqBody),
|
|
59
|
-
], 2), requestHeaders = _a[0], requestBody = _a[1];
|
|
60
|
-
break;
|
|
61
|
-
case "application/json":
|
|
62
|
-
_b = __read([
|
|
63
|
-
{ "Content-Type": "".concat(contentType) },
|
|
64
|
-
(0, class_transformer_1.classToPlain)(reqBody, { exposeUnsetFields: false }),
|
|
65
|
-
], 2), requestHeaders = _b[0], requestBody = _b[1];
|
|
66
|
-
break;
|
|
67
|
-
case "text/json":
|
|
68
|
-
_c = __read([{ "Content-Type": "".concat(contentType) }, reqBody], 2), requestHeaders = _c[0], requestBody = _c[1];
|
|
69
|
-
break;
|
|
70
|
-
default: {
|
|
71
|
-
requestBody = reqBody;
|
|
72
|
-
var requestBodyType = typeof requestBody;
|
|
73
|
-
if (requestBodyType === "string" ||
|
|
74
|
-
requestBody instanceof String ||
|
|
75
|
-
requestBody instanceof Uint8Array)
|
|
76
|
-
requestHeaders = { "Content-Type": "".concat(contentType) };
|
|
77
|
-
else
|
|
78
|
-
throw new Error("invalid request body type ".concat(requestBodyType, " for mediaType ").concat(contentType));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return [requestHeaders, requestBody];
|
|
82
|
-
};
|
|
83
|
-
var encodeFormUrlEncodedData = function (data) {
|
|
84
|
-
var fieldNames = Object.getOwnPropertyNames(data);
|
|
85
|
-
var urlencoded = "";
|
|
86
|
-
var amp = "";
|
|
87
|
-
var appendPair = function (key, value) {
|
|
88
|
-
urlencoded += "".concat(amp).concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
|
|
89
|
-
amp = "&";
|
|
90
|
-
};
|
|
91
|
-
if ((0, utils_1.isNumberRecord)(data) || (0, utils_1.isBooleanRecord)(data) || (0, utils_1.isStringRecord)(data)) {
|
|
92
|
-
fieldNames.forEach(function (fname) {
|
|
93
|
-
var _a, _b;
|
|
94
|
-
var formAnn = Reflect.getMetadata("form", data, fname);
|
|
95
|
-
var name = fname;
|
|
96
|
-
if (formAnn) {
|
|
97
|
-
var formDecorator = parseFormDecorator(formAnn);
|
|
98
|
-
name = (_a = formDecorator.Name) !== null && _a !== void 0 ? _a : fname;
|
|
99
|
-
}
|
|
100
|
-
appendPair(name, (_b = data[fname]) === null || _b === void 0 ? void 0 : _b.toString());
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
fieldNames.forEach(function (fname) {
|
|
105
|
-
var _a, _b;
|
|
106
|
-
var formAnn = Reflect.getMetadata("form", data, fname);
|
|
107
|
-
if (formAnn === null) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
var formDecorator = parseFormDecorator(formAnn);
|
|
111
|
-
if (formDecorator.JSON) {
|
|
112
|
-
var name = (_a = formDecorator.Name) !== null && _a !== void 0 ? _a : fname;
|
|
113
|
-
var val = JSON.stringify(data[fname]);
|
|
114
|
-
appendPair(name, val);
|
|
115
|
-
}
|
|
116
|
-
else if (formDecorator.Style === "form") {
|
|
117
|
-
var parsed_1;
|
|
118
|
-
var name = (_b = formDecorator.Name) !== null && _b !== void 0 ? _b : fname;
|
|
119
|
-
if (formDecorator.Explode === true) {
|
|
120
|
-
parsed_1 = formExplode(name, data[fname]);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
parsed_1 = formNotExplode(name, data[fname]);
|
|
124
|
-
}
|
|
125
|
-
Object.keys(parsed_1).forEach(function (key) {
|
|
126
|
-
parsed_1[key].forEach(function (v) { return appendPair(key, v); });
|
|
127
|
-
});
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
return urlencoded;
|
|
133
|
-
};
|
|
134
|
-
var formExplode = function (fname, data) {
|
|
135
|
-
var exploded = {};
|
|
136
|
-
if (Array.isArray(data)) {
|
|
137
|
-
data.forEach(function (value) {
|
|
138
|
-
if (!exploded[fname]) {
|
|
139
|
-
exploded[fname] = [];
|
|
140
|
-
}
|
|
141
|
-
exploded[fname].push(value);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
else if (typeof data === "object") {
|
|
145
|
-
if (data instanceof Date || data instanceof types_1.RFCDate) {
|
|
146
|
-
if (!exploded[fname]) {
|
|
147
|
-
exploded[fname] = [];
|
|
148
|
-
}
|
|
149
|
-
exploded[fname].push((0, utils_1.valToString)(data));
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
Object.keys(data).forEach(function (key) {
|
|
153
|
-
if (!exploded[key]) {
|
|
154
|
-
exploded[key] = [];
|
|
155
|
-
}
|
|
156
|
-
exploded[key].push(data[key]);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
if (!exploded[fname]) {
|
|
162
|
-
exploded[fname] = [];
|
|
163
|
-
}
|
|
164
|
-
exploded[fname].push((0, utils_1.valToString)(data));
|
|
165
|
-
}
|
|
166
|
-
return exploded;
|
|
167
|
-
};
|
|
168
|
-
var formNotExplode = function (fname, data) {
|
|
169
|
-
var notExploded = {};
|
|
170
|
-
if (Array.isArray(data)) {
|
|
171
|
-
if (!notExploded[fname]) {
|
|
172
|
-
notExploded[fname] = [];
|
|
173
|
-
}
|
|
174
|
-
notExploded[fname].push(data.map(function (item) { return item.toString(); }).join(","));
|
|
175
|
-
}
|
|
176
|
-
else if (typeof data === "object") {
|
|
177
|
-
if (data instanceof Date || data instanceof types_1.RFCDate) {
|
|
178
|
-
if (!notExploded[fname]) {
|
|
179
|
-
notExploded[fname] = [];
|
|
180
|
-
}
|
|
181
|
-
notExploded[fname].push((0, utils_1.valToString)(data));
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
Object.keys(data).forEach(function (key) {
|
|
185
|
-
if (!notExploded[key]) {
|
|
186
|
-
notExploded[key] = [];
|
|
187
|
-
}
|
|
188
|
-
notExploded[fname].push("".concat(key, "=").concat(data[key]));
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
if (!notExploded[fname]) {
|
|
194
|
-
notExploded[fname] = [];
|
|
195
|
-
}
|
|
196
|
-
notExploded[fname].push((0, utils_1.valToString)(data));
|
|
197
|
-
}
|
|
198
|
-
return notExploded;
|
|
199
|
-
};
|
|
200
|
-
function parseFormDecorator(formAnn) {
|
|
201
|
-
var formDecorator = new FormDecorator("", "form", false, false);
|
|
202
|
-
formAnn.split(";").forEach(function (formAnnPart) {
|
|
203
|
-
var _a = __read(formAnnPart.split("="), 2), formKey = _a[0], formVal = _a[1];
|
|
204
|
-
switch (formKey) {
|
|
205
|
-
case "name":
|
|
206
|
-
formDecorator.Name = formVal;
|
|
207
|
-
break;
|
|
208
|
-
case "style":
|
|
209
|
-
formDecorator.Style = formVal;
|
|
210
|
-
break;
|
|
211
|
-
case "explode":
|
|
212
|
-
formDecorator.Explode = formVal === "true";
|
|
213
|
-
break;
|
|
214
|
-
case "json":
|
|
215
|
-
formDecorator.JSON = formVal === "true";
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
return formDecorator;
|
|
220
|
-
}
|
|
221
|
-
var FormDecorator = /** @class */ (function () {
|
|
222
|
-
function FormDecorator(Name, Style, Explode, JSON) {
|
|
223
|
-
this.Name = Name;
|
|
224
|
-
this.Style = Style;
|
|
225
|
-
this.Explode = Explode;
|
|
226
|
-
this.JSON = JSON;
|
|
227
|
-
}
|
|
228
|
-
return FormDecorator;
|
|
229
|
-
}());
|
|
230
|
-
function encodeMultipartFormData(form) {
|
|
231
|
-
var formData = new form_data_1.default();
|
|
232
|
-
var fieldNames = Object.getOwnPropertyNames(form);
|
|
233
|
-
fieldNames.forEach(function (fname) {
|
|
234
|
-
var mpFormAnn = Reflect.getMetadata(mpFormMetadataKey, form, fname);
|
|
235
|
-
if (mpFormAnn == null)
|
|
236
|
-
return;
|
|
237
|
-
var mpFormDecorator = parseMultipartFormDecorator(mpFormAnn);
|
|
238
|
-
if (mpFormDecorator.File)
|
|
239
|
-
return encodeMultipartFormDataFile(formData, form[fname]);
|
|
240
|
-
else if (mpFormDecorator.JSON) {
|
|
241
|
-
formData.append(mpFormDecorator.Name, JSON.stringify(form[fname]));
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
if (Array.isArray(form[fname])) {
|
|
245
|
-
form[fname].forEach(function (val) {
|
|
246
|
-
formData.append(mpFormDecorator.Name + "[]", (0, utils_1.valToString)(val));
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
formData.append(mpFormDecorator.Name, (0, utils_1.valToString)(form[fname]));
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
return formData;
|
|
255
|
-
}
|
|
256
|
-
function encodeMultipartFormDataFile(formData, file) {
|
|
257
|
-
if (typeof file !== "object" || Array.isArray(file) || file == null) {
|
|
258
|
-
throw new Error("invalid type for multipart/form-data file");
|
|
259
|
-
}
|
|
260
|
-
var content = null;
|
|
261
|
-
var fileName = "";
|
|
262
|
-
var mpFormDecoratorName = "";
|
|
263
|
-
var fieldNames = Object.getOwnPropertyNames(file);
|
|
264
|
-
fieldNames.forEach(function (fname) {
|
|
265
|
-
var mpFormAnn = Reflect.getMetadata(mpFormMetadataKey, file, fname);
|
|
266
|
-
if (mpFormAnn == null)
|
|
267
|
-
return;
|
|
268
|
-
var mpFormDecorator = parseMultipartFormDecorator(mpFormAnn);
|
|
269
|
-
if (!mpFormDecorator.Content && mpFormDecorator.Name == "")
|
|
270
|
-
return;
|
|
271
|
-
if (mpFormDecorator.Content)
|
|
272
|
-
content = file[fname];
|
|
273
|
-
else {
|
|
274
|
-
mpFormDecoratorName = mpFormDecorator.Name;
|
|
275
|
-
fileName = file[fname];
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
if (mpFormDecoratorName === "" || fileName === "" || content == null) {
|
|
279
|
-
throw new Error("invalid multipart/form-data file");
|
|
280
|
-
}
|
|
281
|
-
formData.append(mpFormDecoratorName, Buffer.from(content), fileName);
|
|
282
|
-
return formData;
|
|
283
|
-
}
|
|
284
|
-
function parseMultipartFormDecorator(mpFormAnn) {
|
|
285
|
-
// example "name=file"
|
|
286
|
-
var mpFormDecorator = new MultipartFormDecorator(false, false, false, "");
|
|
287
|
-
mpFormAnn.split(";").forEach(function (mpFormAnnPart) {
|
|
288
|
-
var _a = __read(mpFormAnnPart.split("="), 2), mpFormKey = _a[0], mpFormVal = _a[1];
|
|
289
|
-
switch (mpFormKey) {
|
|
290
|
-
case "file":
|
|
291
|
-
mpFormDecorator.File = mpFormVal == "true";
|
|
292
|
-
break;
|
|
293
|
-
case "content":
|
|
294
|
-
mpFormDecorator.Content = mpFormVal == "true";
|
|
295
|
-
break;
|
|
296
|
-
case "name":
|
|
297
|
-
mpFormDecorator.Name = mpFormVal;
|
|
298
|
-
break;
|
|
299
|
-
case "json":
|
|
300
|
-
mpFormDecorator.JSON = mpFormVal == "true";
|
|
301
|
-
break;
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
return mpFormDecorator;
|
|
305
|
-
}
|
|
306
|
-
var MultipartFormDecorator = /** @class */ (function () {
|
|
307
|
-
function MultipartFormDecorator(File, Content, JSON, Name) {
|
|
308
|
-
this.File = File;
|
|
309
|
-
this.Content = Content;
|
|
310
|
-
this.JSON = JSON;
|
|
311
|
-
this.Name = Name;
|
|
312
|
-
}
|
|
313
|
-
return MultipartFormDecorator;
|
|
314
|
-
}());
|
|
315
|
-
function parseRequestDecorator(requestAnn) {
|
|
316
|
-
// example "media_type=multipart/form-data"
|
|
317
|
-
var requestDecorator = new RequestDecorator("application/octet-stream");
|
|
318
|
-
var _a = __read(requestAnn.split("="), 2), mediaTypeKey = _a[0], mediaTypeVal = _a[1];
|
|
319
|
-
if (mediaTypeKey === "media_type")
|
|
320
|
-
requestDecorator.MediaType = mediaTypeVal;
|
|
321
|
-
return requestDecorator;
|
|
322
|
-
}
|
|
323
|
-
var RequestDecorator = /** @class */ (function () {
|
|
324
|
-
function RequestDecorator(MediaType) {
|
|
325
|
-
this.MediaType = MediaType;
|
|
326
|
-
}
|
|
327
|
-
return RequestDecorator;
|
|
328
|
-
}());
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse } from "axios";
|
|
2
|
-
export declare class BackoffStrategy {
|
|
3
|
-
initialInterval: number;
|
|
4
|
-
maxInterval: number;
|
|
5
|
-
exponent: number;
|
|
6
|
-
maxElapsedTime: number;
|
|
7
|
-
constructor(initialInterval: number, maxInterval: number, exponent: number, maxElapsedTime: number);
|
|
8
|
-
}
|
|
9
|
-
export declare class RetryConfig {
|
|
10
|
-
strategy: "backoff" | "none";
|
|
11
|
-
backoff?: BackoffStrategy;
|
|
12
|
-
retryConnectionErrors: boolean;
|
|
13
|
-
constructor(strategy: "backoff" | "none", backoff?: BackoffStrategy, retryConnectionErrors?: boolean);
|
|
14
|
-
}
|
|
15
|
-
export declare class Retries {
|
|
16
|
-
config: RetryConfig;
|
|
17
|
-
statusCodes: string[];
|
|
18
|
-
constructor(config: RetryConfig, statusCodes: string[]);
|
|
19
|
-
}
|
|
20
|
-
export declare function Retry(fn: () => Promise<AxiosResponse<any, any>>, retries: Retries): Promise<AxiosResponse<any, any>>;
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __extends = (this && this.__extends) || (function () {
|
|
6
|
-
var extendStatics = function (d, b) {
|
|
7
|
-
extendStatics = Object.setPrototypeOf ||
|
|
8
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
-
return extendStatics(d, b);
|
|
11
|
-
};
|
|
12
|
-
return function (d, b) {
|
|
13
|
-
if (typeof b !== "function" && b !== null)
|
|
14
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
-
extendStatics(d, b);
|
|
16
|
-
function __() { this.constructor = d; }
|
|
17
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
-
};
|
|
19
|
-
})();
|
|
20
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
25
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
26
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
30
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
31
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
32
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
33
|
-
function step(op) {
|
|
34
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
35
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
36
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
37
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
38
|
-
switch (op[0]) {
|
|
39
|
-
case 0: case 1: t = op; break;
|
|
40
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
41
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
42
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
43
|
-
default:
|
|
44
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
45
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
46
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
47
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
48
|
-
if (t[2]) _.ops.pop();
|
|
49
|
-
_.trys.pop(); continue;
|
|
50
|
-
}
|
|
51
|
-
op = body.call(thisArg, _);
|
|
52
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
53
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
var __values = (this && this.__values) || function(o) {
|
|
57
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
58
|
-
if (m) return m.call(o);
|
|
59
|
-
if (o && typeof o.length === "number") return {
|
|
60
|
-
next: function () {
|
|
61
|
-
if (o && i >= o.length) o = void 0;
|
|
62
|
-
return { value: o && o[i++], done: !o };
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
66
|
-
};
|
|
67
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68
|
-
exports.Retry = exports.Retries = exports.RetryConfig = exports.BackoffStrategy = void 0;
|
|
69
|
-
var axios_1 = require("axios");
|
|
70
|
-
var BackoffStrategy = /** @class */ (function () {
|
|
71
|
-
function BackoffStrategy(initialInterval, maxInterval, exponent, maxElapsedTime) {
|
|
72
|
-
this.initialInterval = initialInterval;
|
|
73
|
-
this.maxInterval = maxInterval;
|
|
74
|
-
this.exponent = exponent;
|
|
75
|
-
this.maxElapsedTime = maxElapsedTime;
|
|
76
|
-
}
|
|
77
|
-
return BackoffStrategy;
|
|
78
|
-
}());
|
|
79
|
-
exports.BackoffStrategy = BackoffStrategy;
|
|
80
|
-
var RetryConfig = /** @class */ (function () {
|
|
81
|
-
function RetryConfig(strategy, backoff, retryConnectionErrors) {
|
|
82
|
-
if (retryConnectionErrors === void 0) { retryConnectionErrors = true; }
|
|
83
|
-
this.strategy = strategy;
|
|
84
|
-
this.backoff = backoff;
|
|
85
|
-
this.retryConnectionErrors = retryConnectionErrors;
|
|
86
|
-
}
|
|
87
|
-
return RetryConfig;
|
|
88
|
-
}());
|
|
89
|
-
exports.RetryConfig = RetryConfig;
|
|
90
|
-
var Retries = /** @class */ (function () {
|
|
91
|
-
function Retries(config, statusCodes) {
|
|
92
|
-
this.config = config;
|
|
93
|
-
this.statusCodes = statusCodes;
|
|
94
|
-
}
|
|
95
|
-
return Retries;
|
|
96
|
-
}());
|
|
97
|
-
exports.Retries = Retries;
|
|
98
|
-
var PermanentError = /** @class */ (function (_super) {
|
|
99
|
-
__extends(PermanentError, _super);
|
|
100
|
-
function PermanentError(inner) {
|
|
101
|
-
var _this = _super.call(this, "Permanent error") || this;
|
|
102
|
-
_this.inner = inner;
|
|
103
|
-
Object.setPrototypeOf(_this, PermanentError.prototype);
|
|
104
|
-
return _this;
|
|
105
|
-
}
|
|
106
|
-
return PermanentError;
|
|
107
|
-
}(Error));
|
|
108
|
-
var TemporaryError = /** @class */ (function (_super) {
|
|
109
|
-
__extends(TemporaryError, _super);
|
|
110
|
-
function TemporaryError(res) {
|
|
111
|
-
var _this = _super.call(this, "Temporary error") || this;
|
|
112
|
-
_this.res = res;
|
|
113
|
-
Object.setPrototypeOf(_this, TemporaryError.prototype);
|
|
114
|
-
return _this;
|
|
115
|
-
}
|
|
116
|
-
return TemporaryError;
|
|
117
|
-
}(Error));
|
|
118
|
-
function Retry(fn, retries) {
|
|
119
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
120
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
121
|
-
var _j;
|
|
122
|
-
var _this = this;
|
|
123
|
-
return __generator(this, function (_k) {
|
|
124
|
-
switch (_k.label) {
|
|
125
|
-
case 0:
|
|
126
|
-
_j = retries.config.strategy;
|
|
127
|
-
switch (_j) {
|
|
128
|
-
case "backoff": return [3 /*break*/, 1];
|
|
129
|
-
}
|
|
130
|
-
return [3 /*break*/, 2];
|
|
131
|
-
case 1: return [2 /*return*/, retryBackoff(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
132
|
-
var res, err_1;
|
|
133
|
-
return __generator(this, function (_a) {
|
|
134
|
-
switch (_a.label) {
|
|
135
|
-
case 0:
|
|
136
|
-
_a.trys.push([0, 2, , 3]);
|
|
137
|
-
return [4 /*yield*/, fn()];
|
|
138
|
-
case 1:
|
|
139
|
-
res = _a.sent();
|
|
140
|
-
if (isRetryableResponse(res, retries.statusCodes)) {
|
|
141
|
-
throw new TemporaryError(res);
|
|
142
|
-
}
|
|
143
|
-
return [2 /*return*/, res];
|
|
144
|
-
case 2:
|
|
145
|
-
err_1 = _a.sent();
|
|
146
|
-
if (err_1 instanceof axios_1.AxiosError) {
|
|
147
|
-
if (err_1.response) {
|
|
148
|
-
if (isRetryableResponse(err_1.response, retries.statusCodes)) {
|
|
149
|
-
throw err_1;
|
|
150
|
-
}
|
|
151
|
-
throw new PermanentError(err_1);
|
|
152
|
-
}
|
|
153
|
-
else if (err_1.request) {
|
|
154
|
-
throw err_1;
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
throw new PermanentError(err_1);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
else if (err_1 instanceof TemporaryError) {
|
|
161
|
-
throw err_1;
|
|
162
|
-
}
|
|
163
|
-
throw new PermanentError(err_1);
|
|
164
|
-
case 3: return [2 /*return*/];
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
}); }, (_b = (_a = retries.config.backoff) === null || _a === void 0 ? void 0 : _a.initialInterval) !== null && _b !== void 0 ? _b : 500, (_d = (_c = retries.config.backoff) === null || _c === void 0 ? void 0 : _c.maxInterval) !== null && _d !== void 0 ? _d : 60000, (_f = (_e = retries.config.backoff) === null || _e === void 0 ? void 0 : _e.exponent) !== null && _f !== void 0 ? _f : 1.5, (_h = (_g = retries.config.backoff) === null || _g === void 0 ? void 0 : _g.maxElapsedTime) !== null && _h !== void 0 ? _h : 3600000)];
|
|
168
|
-
case 2: return [4 /*yield*/, fn()];
|
|
169
|
-
case 3: return [2 /*return*/, _k.sent()];
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
exports.Retry = Retry;
|
|
175
|
-
function isRetryableResponse(res, statusCodes) {
|
|
176
|
-
var e_1, _a;
|
|
177
|
-
try {
|
|
178
|
-
for (var statusCodes_1 = __values(statusCodes), statusCodes_1_1 = statusCodes_1.next(); !statusCodes_1_1.done; statusCodes_1_1 = statusCodes_1.next()) {
|
|
179
|
-
var code = statusCodes_1_1.value;
|
|
180
|
-
if (code.toUpperCase().includes("X")) {
|
|
181
|
-
var codeRange = parseInt(code[0]);
|
|
182
|
-
if (isNaN(codeRange)) {
|
|
183
|
-
throw new Error("Invalid status code range");
|
|
184
|
-
}
|
|
185
|
-
var s = res.status / 100;
|
|
186
|
-
if (s >= codeRange && s < codeRange + 1) {
|
|
187
|
-
return true;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
else if (res.status == parseInt(code)) {
|
|
191
|
-
return true;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
196
|
-
finally {
|
|
197
|
-
try {
|
|
198
|
-
if (statusCodes_1_1 && !statusCodes_1_1.done && (_a = statusCodes_1.return)) _a.call(statusCodes_1);
|
|
199
|
-
}
|
|
200
|
-
finally { if (e_1) throw e_1.error; }
|
|
201
|
-
}
|
|
202
|
-
return false;
|
|
203
|
-
}
|
|
204
|
-
function retryBackoff(fn, initialInterval, maxInterval, exponent, maxElapsedTime) {
|
|
205
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
206
|
-
var start, x, err_2, now, d;
|
|
207
|
-
return __generator(this, function (_a) {
|
|
208
|
-
switch (_a.label) {
|
|
209
|
-
case 0:
|
|
210
|
-
start = Date.now();
|
|
211
|
-
x = 0;
|
|
212
|
-
_a.label = 1;
|
|
213
|
-
case 1:
|
|
214
|
-
if (!true) return [3 /*break*/, 7];
|
|
215
|
-
_a.label = 2;
|
|
216
|
-
case 2:
|
|
217
|
-
_a.trys.push([2, 4, , 6]);
|
|
218
|
-
return [4 /*yield*/, fn()];
|
|
219
|
-
case 3: return [2 /*return*/, _a.sent()];
|
|
220
|
-
case 4:
|
|
221
|
-
err_2 = _a.sent();
|
|
222
|
-
if (err_2 instanceof PermanentError) {
|
|
223
|
-
throw err_2.inner;
|
|
224
|
-
}
|
|
225
|
-
now = Date.now();
|
|
226
|
-
if (now - start > maxElapsedTime) {
|
|
227
|
-
if (err_2 instanceof TemporaryError) {
|
|
228
|
-
return [2 /*return*/, err_2.res];
|
|
229
|
-
}
|
|
230
|
-
throw err_2;
|
|
231
|
-
}
|
|
232
|
-
d = Math.min(initialInterval * Math.pow(x, exponent) + Math.random() * 1000, maxInterval);
|
|
233
|
-
return [4 /*yield*/, delay(d)];
|
|
234
|
-
case 5:
|
|
235
|
-
_a.sent();
|
|
236
|
-
x++;
|
|
237
|
-
return [3 /*break*/, 6];
|
|
238
|
-
case 6: return [3 /*break*/, 1];
|
|
239
|
-
case 7: return [2 /*return*/];
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
function delay(delay) {
|
|
245
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
246
|
-
return __generator(this, function (_a) {
|
|
247
|
-
return [2 /*return*/, new Promise(function (resolve) { return setTimeout(resolve, delay); })];
|
|
248
|
-
});
|
|
249
|
-
});
|
|
250
|
-
}
|