@crevio/sdk 0.1.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 +30 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +87 -0
- package/README.md +464 -0
- package/RUNTIMES.md +48 -0
- package/dist/commonjs/core.d.ts +10 -0
- package/dist/commonjs/core.d.ts.map +1 -0
- package/dist/commonjs/core.js +17 -0
- package/dist/commonjs/core.js.map +1 -0
- package/dist/commonjs/funcs/accountsGet.d.ts +19 -0
- package/dist/commonjs/funcs/accountsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsGet.js +124 -0
- package/dist/commonjs/funcs/accountsGet.js.map +1 -0
- package/dist/commonjs/funcs/checkoutsCreate.d.ts +18 -0
- package/dist/commonjs/funcs/checkoutsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/checkoutsCreate.js +118 -0
- package/dist/commonjs/funcs/checkoutsCreate.js.map +1 -0
- package/dist/commonjs/funcs/productsGet.d.ts +19 -0
- package/dist/commonjs/funcs/productsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/productsGet.js +124 -0
- package/dist/commonjs/funcs/productsGet.js.map +1 -0
- package/dist/commonjs/funcs/productsList.d.ts +18 -0
- package/dist/commonjs/funcs/productsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/productsList.js +109 -0
- package/dist/commonjs/funcs/productsList.js.map +1 -0
- package/dist/commonjs/funcs/userDelete.d.ts +18 -0
- package/dist/commonjs/funcs/userDelete.d.ts.map +1 -0
- package/dist/commonjs/funcs/userDelete.js +108 -0
- package/dist/commonjs/funcs/userDelete.js.map +1 -0
- package/dist/commonjs/funcs/userGet.d.ts +18 -0
- package/dist/commonjs/funcs/userGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/userGet.js +108 -0
- package/dist/commonjs/funcs/userGet.js.map +1 -0
- package/dist/commonjs/hooks/hooks.d.ts +25 -0
- package/dist/commonjs/hooks/hooks.d.ts.map +1 -0
- package/dist/commonjs/hooks/hooks.js +86 -0
- package/dist/commonjs/hooks/hooks.js.map +1 -0
- package/dist/commonjs/hooks/index.d.ts +3 -0
- package/dist/commonjs/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/hooks/index.js +22 -0
- package/dist/commonjs/hooks/index.js.map +1 -0
- package/dist/commonjs/hooks/registration.d.ts +3 -0
- package/dist/commonjs/hooks/registration.d.ts.map +1 -0
- package/dist/commonjs/hooks/registration.js +15 -0
- package/dist/commonjs/hooks/registration.js.map +1 -0
- package/dist/commonjs/hooks/types.d.ts +76 -0
- package/dist/commonjs/hooks/types.d.ts.map +1 -0
- package/dist/commonjs/hooks/types.js +6 -0
- package/dist/commonjs/hooks/types.js.map +1 -0
- package/dist/commonjs/index.d.ts +6 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +48 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lib/base64.d.ts +10 -0
- package/dist/commonjs/lib/base64.d.ts.map +1 -0
- package/dist/commonjs/lib/base64.js +71 -0
- package/dist/commonjs/lib/base64.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +38 -0
- package/dist/commonjs/lib/config.d.ts.map +1 -0
- package/dist/commonjs/lib/config.js +42 -0
- package/dist/commonjs/lib/config.js.map +1 -0
- package/dist/commonjs/lib/dlv.d.ts +14 -0
- package/dist/commonjs/lib/dlv.d.ts.map +1 -0
- package/dist/commonjs/lib/dlv.js +49 -0
- package/dist/commonjs/lib/dlv.js.map +1 -0
- package/dist/commonjs/lib/encodings.d.ts +52 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -0
- package/dist/commonjs/lib/encodings.js +368 -0
- package/dist/commonjs/lib/encodings.js.map +1 -0
- package/dist/commonjs/lib/env.d.ts +15 -0
- package/dist/commonjs/lib/env.d.ts.map +1 -0
- package/dist/commonjs/lib/env.js +65 -0
- package/dist/commonjs/lib/env.js.map +1 -0
- package/dist/commonjs/lib/files.d.ts +13 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -0
- package/dist/commonjs/lib/files.js +77 -0
- package/dist/commonjs/lib/files.js.map +1 -0
- package/dist/commonjs/lib/http.d.ts +67 -0
- package/dist/commonjs/lib/http.d.ts.map +1 -0
- package/dist/commonjs/lib/http.js +217 -0
- package/dist/commonjs/lib/http.js.map +1 -0
- package/dist/commonjs/lib/is-plain-object.d.ts +2 -0
- package/dist/commonjs/lib/is-plain-object.d.ts.map +1 -0
- package/dist/commonjs/lib/is-plain-object.js +41 -0
- package/dist/commonjs/lib/is-plain-object.js.map +1 -0
- package/dist/commonjs/lib/logger.d.ts +6 -0
- package/dist/commonjs/lib/logger.d.ts.map +1 -0
- package/dist/commonjs/lib/logger.js +6 -0
- package/dist/commonjs/lib/logger.js.map +1 -0
- package/dist/commonjs/lib/matchers.d.ts +59 -0
- package/dist/commonjs/lib/matchers.d.ts.map +1 -0
- package/dist/commonjs/lib/matchers.js +222 -0
- package/dist/commonjs/lib/matchers.js.map +1 -0
- package/dist/commonjs/lib/primitives.d.ts +26 -0
- package/dist/commonjs/lib/primitives.d.ts.map +1 -0
- package/dist/commonjs/lib/primitives.js +111 -0
- package/dist/commonjs/lib/primitives.js.map +1 -0
- package/dist/commonjs/lib/retries.d.ts +38 -0
- package/dist/commonjs/lib/retries.d.ts.map +1 -0
- package/dist/commonjs/lib/retries.js +153 -0
- package/dist/commonjs/lib/retries.js.map +1 -0
- package/dist/commonjs/lib/schemas.d.ts +19 -0
- package/dist/commonjs/lib/schemas.d.ts.map +1 -0
- package/dist/commonjs/lib/schemas.js +62 -0
- package/dist/commonjs/lib/schemas.js.map +1 -0
- package/dist/commonjs/lib/sdks.d.ts +63 -0
- package/dist/commonjs/lib/sdks.d.ts.map +1 -0
- package/dist/commonjs/lib/sdks.js +273 -0
- package/dist/commonjs/lib/sdks.js.map +1 -0
- package/dist/commonjs/lib/security.d.ts +83 -0
- package/dist/commonjs/lib/security.d.ts.map +1 -0
- package/dist/commonjs/lib/security.js +144 -0
- package/dist/commonjs/lib/security.js.map +1 -0
- package/dist/commonjs/lib/url.d.ts +5 -0
- package/dist/commonjs/lib/url.d.ts.map +1 -0
- package/dist/commonjs/lib/url.js +25 -0
- package/dist/commonjs/lib/url.js.map +1 -0
- package/dist/commonjs/models/account.d.ts +44 -0
- package/dist/commonjs/models/account.d.ts.map +1 -0
- package/dist/commonjs/models/account.js +99 -0
- package/dist/commonjs/models/account.js.map +1 -0
- package/dist/commonjs/models/accountslim.d.ts +33 -0
- package/dist/commonjs/models/accountslim.d.ts.map +1 -0
- package/dist/commonjs/models/accountslim.js +73 -0
- package/dist/commonjs/models/accountslim.js.map +1 -0
- package/dist/commonjs/models/checkoutrequest.d.ts +94 -0
- package/dist/commonjs/models/checkoutrequest.d.ts.map +1 -0
- package/dist/commonjs/models/checkoutrequest.js +160 -0
- package/dist/commonjs/models/checkoutrequest.js.map +1 -0
- package/dist/commonjs/models/checkoutresponse.d.ts +31 -0
- package/dist/commonjs/models/checkoutresponse.d.ts.map +1 -0
- package/dist/commonjs/models/checkoutresponse.js +82 -0
- package/dist/commonjs/models/checkoutresponse.js.map +1 -0
- package/dist/commonjs/models/errors/creviodefaulterror.d.ts +10 -0
- package/dist/commonjs/models/errors/creviodefaulterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/creviodefaulterror.js +34 -0
- package/dist/commonjs/models/errors/creviodefaulterror.js.map +1 -0
- package/dist/commonjs/models/errors/crevioerror.d.ts +19 -0
- package/dist/commonjs/models/errors/crevioerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/crevioerror.js +20 -0
- package/dist/commonjs/models/errors/crevioerror.js.map +1 -0
- package/dist/commonjs/models/errors/error.d.ts +45 -0
- package/dist/commonjs/models/errors/error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/error.js +94 -0
- package/dist/commonjs/models/errors/error.js.map +1 -0
- package/dist/commonjs/models/errors/httpclienterrors.d.ts +44 -0
- package/dist/commonjs/models/errors/httpclienterrors.d.ts.map +1 -0
- package/dist/commonjs/models/errors/httpclienterrors.js +78 -0
- package/dist/commonjs/models/errors/httpclienterrors.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +6 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -0
- package/dist/commonjs/models/errors/index.js +25 -0
- package/dist/commonjs/models/errors/index.js.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js +66 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts +21 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js +129 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js.map +1 -0
- package/dist/commonjs/models/fileattachment.d.ts +37 -0
- package/dist/commonjs/models/fileattachment.d.ts.map +1 -0
- package/dist/commonjs/models/fileattachment.js +88 -0
- package/dist/commonjs/models/fileattachment.js.map +1 -0
- package/dist/commonjs/models/imageattachment.d.ts +37 -0
- package/dist/commonjs/models/imageattachment.d.ts.map +1 -0
- package/dist/commonjs/models/imageattachment.js +88 -0
- package/dist/commonjs/models/imageattachment.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +15 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +34 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/linkinbiopage.d.ts +33 -0
- package/dist/commonjs/models/linkinbiopage.d.ts.map +1 -0
- package/dist/commonjs/models/linkinbiopage.js +73 -0
- package/dist/commonjs/models/linkinbiopage.js.map +1 -0
- package/dist/commonjs/models/operations/delete.d.ts +28 -0
- package/dist/commonjs/models/operations/delete.d.ts.map +1 -0
- package/dist/commonjs/models/operations/delete.js +65 -0
- package/dist/commonjs/models/operations/delete.js.map +1 -0
- package/dist/commonjs/models/operations/getaccount.d.ts +32 -0
- package/dist/commonjs/models/operations/getaccount.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getaccount.js +78 -0
- package/dist/commonjs/models/operations/getaccount.js.map +1 -0
- package/dist/commonjs/models/operations/getproduct.d.ts +32 -0
- package/dist/commonjs/models/operations/getproduct.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getproduct.js +78 -0
- package/dist/commonjs/models/operations/getproduct.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -0
- package/dist/commonjs/models/operations/index.js +23 -0
- package/dist/commonjs/models/operations/index.js.map +1 -0
- package/dist/commonjs/models/pricevariant.d.ts +46 -0
- package/dist/commonjs/models/pricevariant.d.ts.map +1 -0
- package/dist/commonjs/models/pricevariant.js +92 -0
- package/dist/commonjs/models/pricevariant.js.map +1 -0
- package/dist/commonjs/models/product.d.ts +94 -0
- package/dist/commonjs/models/product.d.ts.map +1 -0
- package/dist/commonjs/models/product.js +149 -0
- package/dist/commonjs/models/product.js.map +1 -0
- package/dist/commonjs/models/review.d.ts +35 -0
- package/dist/commonjs/models/review.d.ts.map +1 -0
- package/dist/commonjs/models/review.js +85 -0
- package/dist/commonjs/models/review.js.map +1 -0
- package/dist/commonjs/models/security.d.ts +29 -0
- package/dist/commonjs/models/security.d.ts.map +1 -0
- package/dist/commonjs/models/security.js +78 -0
- package/dist/commonjs/models/security.js.map +1 -0
- package/dist/commonjs/models/seo.d.ts +33 -0
- package/dist/commonjs/models/seo.d.ts.map +1 -0
- package/dist/commonjs/models/seo.js +75 -0
- package/dist/commonjs/models/seo.js.map +1 -0
- package/dist/commonjs/models/sociallink.d.ts +35 -0
- package/dist/commonjs/models/sociallink.d.ts.map +1 -0
- package/dist/commonjs/models/sociallink.js +75 -0
- package/dist/commonjs/models/sociallink.js.map +1 -0
- package/dist/commonjs/models/user.d.ts +65 -0
- package/dist/commonjs/models/user.d.ts.map +1 -0
- package/dist/commonjs/models/user.js +138 -0
- package/dist/commonjs/models/user.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/sdk/accounts.d.ts +13 -0
- package/dist/commonjs/sdk/accounts.d.ts.map +1 -0
- package/dist/commonjs/sdk/accounts.js +22 -0
- package/dist/commonjs/sdk/accounts.js.map +1 -0
- package/dist/commonjs/sdk/checkouts.d.ts +12 -0
- package/dist/commonjs/sdk/checkouts.d.ts.map +1 -0
- package/dist/commonjs/sdk/checkouts.js +22 -0
- package/dist/commonjs/sdk/checkouts.js.map +1 -0
- package/dist/commonjs/sdk/index.d.ts +2 -0
- package/dist/commonjs/sdk/index.d.ts.map +1 -0
- package/dist/commonjs/sdk/index.js +21 -0
- package/dist/commonjs/sdk/index.js.map +1 -0
- package/dist/commonjs/sdk/products.d.ts +20 -0
- package/dist/commonjs/sdk/products.d.ts.map +1 -0
- package/dist/commonjs/sdk/products.js +32 -0
- package/dist/commonjs/sdk/products.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +16 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -0
- package/dist/commonjs/sdk/sdk.js +27 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -0
- package/dist/commonjs/sdk/user.d.ts +20 -0
- package/dist/commonjs/sdk/user.d.ts.map +1 -0
- package/dist/commonjs/sdk/user.js +32 -0
- package/dist/commonjs/sdk/user.js.map +1 -0
- package/dist/commonjs/types/async.d.ts +23 -0
- package/dist/commonjs/types/async.d.ts.map +1 -0
- package/dist/commonjs/types/async.js +44 -0
- package/dist/commonjs/types/async.js.map +1 -0
- package/dist/commonjs/types/blobs.d.ts +4 -0
- package/dist/commonjs/types/blobs.d.ts.map +1 -0
- package/dist/commonjs/types/blobs.js +62 -0
- package/dist/commonjs/types/blobs.js.map +1 -0
- package/dist/commonjs/types/constdatetime.d.ts +3 -0
- package/dist/commonjs/types/constdatetime.d.ts.map +1 -0
- package/dist/commonjs/types/constdatetime.js +46 -0
- package/dist/commonjs/types/constdatetime.js.map +1 -0
- package/dist/commonjs/types/enums.d.ts +12 -0
- package/dist/commonjs/types/enums.d.ts.map +1 -0
- package/dist/commonjs/types/enums.js +10 -0
- package/dist/commonjs/types/enums.js.map +1 -0
- package/dist/commonjs/types/fp.d.ts +31 -0
- package/dist/commonjs/types/fp.d.ts.map +1 -0
- package/dist/commonjs/types/fp.js +37 -0
- package/dist/commonjs/types/fp.js.map +1 -0
- package/dist/commonjs/types/index.d.ts +8 -0
- package/dist/commonjs/types/index.d.ts.map +1 -0
- package/dist/commonjs/types/index.js +16 -0
- package/dist/commonjs/types/index.js.map +1 -0
- package/dist/commonjs/types/operations.d.ts +27 -0
- package/dist/commonjs/types/operations.d.ts.map +1 -0
- package/dist/commonjs/types/operations.js +83 -0
- package/dist/commonjs/types/operations.js.map +1 -0
- package/dist/commonjs/types/rfcdate.d.ts +21 -0
- package/dist/commonjs/types/rfcdate.d.ts.map +1 -0
- package/dist/commonjs/types/rfcdate.js +46 -0
- package/dist/commonjs/types/rfcdate.js.map +1 -0
- package/dist/commonjs/types/streams.d.ts +2 -0
- package/dist/commonjs/types/streams.d.ts.map +1 -0
- package/dist/commonjs/types/streams.js +18 -0
- package/dist/commonjs/types/streams.js.map +1 -0
- package/dist/esm/core.d.ts +10 -0
- package/dist/esm/core.d.ts.map +1 -0
- package/dist/esm/core.js +13 -0
- package/dist/esm/core.js.map +1 -0
- package/dist/esm/funcs/accountsGet.d.ts +19 -0
- package/dist/esm/funcs/accountsGet.d.ts.map +1 -0
- package/dist/esm/funcs/accountsGet.js +88 -0
- package/dist/esm/funcs/accountsGet.js.map +1 -0
- package/dist/esm/funcs/checkoutsCreate.d.ts +18 -0
- package/dist/esm/funcs/checkoutsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/checkoutsCreate.js +82 -0
- package/dist/esm/funcs/checkoutsCreate.js.map +1 -0
- package/dist/esm/funcs/productsGet.d.ts +19 -0
- package/dist/esm/funcs/productsGet.d.ts.map +1 -0
- package/dist/esm/funcs/productsGet.js +88 -0
- package/dist/esm/funcs/productsGet.js.map +1 -0
- package/dist/esm/funcs/productsList.d.ts +18 -0
- package/dist/esm/funcs/productsList.d.ts.map +1 -0
- package/dist/esm/funcs/productsList.js +73 -0
- package/dist/esm/funcs/productsList.js.map +1 -0
- package/dist/esm/funcs/userDelete.d.ts +18 -0
- package/dist/esm/funcs/userDelete.d.ts.map +1 -0
- package/dist/esm/funcs/userDelete.js +72 -0
- package/dist/esm/funcs/userDelete.js.map +1 -0
- package/dist/esm/funcs/userGet.d.ts +18 -0
- package/dist/esm/funcs/userGet.d.ts.map +1 -0
- package/dist/esm/funcs/userGet.js +72 -0
- package/dist/esm/funcs/userGet.js.map +1 -0
- package/dist/esm/hooks/hooks.d.ts +25 -0
- package/dist/esm/hooks/hooks.d.ts.map +1 -0
- package/dist/esm/hooks/hooks.js +82 -0
- package/dist/esm/hooks/hooks.js.map +1 -0
- package/dist/esm/hooks/index.d.ts +3 -0
- package/dist/esm/hooks/index.d.ts.map +1 -0
- package/dist/esm/hooks/index.js +6 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/registration.d.ts +3 -0
- package/dist/esm/hooks/registration.d.ts.map +1 -0
- package/dist/esm/hooks/registration.js +12 -0
- package/dist/esm/hooks/registration.js.map +1 -0
- package/dist/esm/hooks/types.d.ts +76 -0
- package/dist/esm/hooks/types.d.ts.map +1 -0
- package/dist/esm/hooks/types.js +5 -0
- package/dist/esm/hooks/types.js.map +1 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/base64.d.ts +10 -0
- package/dist/esm/lib/base64.d.ts.map +1 -0
- package/dist/esm/lib/base64.js +29 -0
- package/dist/esm/lib/base64.js.map +1 -0
- package/dist/esm/lib/config.d.ts +38 -0
- package/dist/esm/lib/config.d.ts.map +1 -0
- package/dist/esm/lib/config.js +38 -0
- package/dist/esm/lib/config.js.map +1 -0
- package/dist/esm/lib/dlv.d.ts +14 -0
- package/dist/esm/lib/dlv.d.ts.map +1 -0
- package/dist/esm/lib/dlv.js +46 -0
- package/dist/esm/lib/dlv.js.map +1 -0
- package/dist/esm/lib/encodings.d.ts +52 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -0
- package/dist/esm/lib/encodings.js +354 -0
- package/dist/esm/lib/encodings.js.map +1 -0
- package/dist/esm/lib/env.d.ts +15 -0
- package/dist/esm/lib/env.d.ts.map +1 -0
- package/dist/esm/lib/env.js +27 -0
- package/dist/esm/lib/env.js.map +1 -0
- package/dist/esm/lib/files.d.ts +13 -0
- package/dist/esm/lib/files.d.ts.map +1 -0
- package/dist/esm/lib/files.js +73 -0
- package/dist/esm/lib/files.js.map +1 -0
- package/dist/esm/lib/http.d.ts +67 -0
- package/dist/esm/lib/http.d.ts.map +1 -0
- package/dist/esm/lib/http.js +207 -0
- package/dist/esm/lib/http.js.map +1 -0
- package/dist/esm/lib/is-plain-object.d.ts +2 -0
- package/dist/esm/lib/is-plain-object.d.ts.map +1 -0
- package/dist/esm/lib/is-plain-object.js +38 -0
- package/dist/esm/lib/is-plain-object.js.map +1 -0
- package/dist/esm/lib/logger.d.ts +6 -0
- package/dist/esm/lib/logger.d.ts.map +1 -0
- package/dist/esm/lib/logger.js +5 -0
- package/dist/esm/lib/logger.js.map +1 -0
- package/dist/esm/lib/matchers.d.ts +59 -0
- package/dist/esm/lib/matchers.d.ts.map +1 -0
- package/dist/esm/lib/matchers.js +203 -0
- package/dist/esm/lib/matchers.js.map +1 -0
- package/dist/esm/lib/primitives.d.ts +26 -0
- package/dist/esm/lib/primitives.d.ts.map +1 -0
- package/dist/esm/lib/primitives.js +103 -0
- package/dist/esm/lib/primitives.js.map +1 -0
- package/dist/esm/lib/retries.d.ts +38 -0
- package/dist/esm/lib/retries.d.ts.map +1 -0
- package/dist/esm/lib/retries.js +147 -0
- package/dist/esm/lib/retries.js.map +1 -0
- package/dist/esm/lib/schemas.d.ts +19 -0
- package/dist/esm/lib/schemas.d.ts.map +1 -0
- package/dist/esm/lib/schemas.js +57 -0
- package/dist/esm/lib/schemas.js.map +1 -0
- package/dist/esm/lib/sdks.d.ts +63 -0
- package/dist/esm/lib/sdks.d.ts.map +1 -0
- package/dist/esm/lib/sdks.js +269 -0
- package/dist/esm/lib/sdks.js.map +1 -0
- package/dist/esm/lib/security.d.ts +83 -0
- package/dist/esm/lib/security.d.ts.map +1 -0
- package/dist/esm/lib/security.js +137 -0
- package/dist/esm/lib/security.js.map +1 -0
- package/dist/esm/lib/url.d.ts +5 -0
- package/dist/esm/lib/url.d.ts.map +1 -0
- package/dist/esm/lib/url.js +22 -0
- package/dist/esm/lib/url.js.map +1 -0
- package/dist/esm/models/account.d.ts +44 -0
- package/dist/esm/models/account.d.ts.map +1 -0
- package/dist/esm/models/account.js +61 -0
- package/dist/esm/models/account.js.map +1 -0
- package/dist/esm/models/accountslim.d.ts +33 -0
- package/dist/esm/models/accountslim.d.ts.map +1 -0
- package/dist/esm/models/accountslim.js +35 -0
- package/dist/esm/models/accountslim.js.map +1 -0
- package/dist/esm/models/checkoutrequest.d.ts +94 -0
- package/dist/esm/models/checkoutrequest.d.ts.map +1 -0
- package/dist/esm/models/checkoutrequest.js +118 -0
- package/dist/esm/models/checkoutrequest.js.map +1 -0
- package/dist/esm/models/checkoutresponse.d.ts +31 -0
- package/dist/esm/models/checkoutresponse.d.ts.map +1 -0
- package/dist/esm/models/checkoutresponse.js +44 -0
- package/dist/esm/models/checkoutresponse.js.map +1 -0
- package/dist/esm/models/errors/creviodefaulterror.d.ts +10 -0
- package/dist/esm/models/errors/creviodefaulterror.d.ts.map +1 -0
- package/dist/esm/models/errors/creviodefaulterror.js +30 -0
- package/dist/esm/models/errors/creviodefaulterror.js.map +1 -0
- package/dist/esm/models/errors/crevioerror.d.ts +19 -0
- package/dist/esm/models/errors/crevioerror.d.ts.map +1 -0
- package/dist/esm/models/errors/crevioerror.js +16 -0
- package/dist/esm/models/errors/crevioerror.js.map +1 -0
- package/dist/esm/models/errors/error.d.ts +45 -0
- package/dist/esm/models/errors/error.d.ts.map +1 -0
- package/dist/esm/models/errors/error.js +57 -0
- package/dist/esm/models/errors/error.js.map +1 -0
- package/dist/esm/models/errors/httpclienterrors.d.ts +44 -0
- package/dist/esm/models/errors/httpclienterrors.d.ts.map +1 -0
- package/dist/esm/models/errors/httpclienterrors.js +69 -0
- package/dist/esm/models/errors/httpclienterrors.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +6 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -0
- package/dist/esm/models/errors/index.js +9 -0
- package/dist/esm/models/errors/index.js.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.js +29 -0
- package/dist/esm/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts +21 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.js +91 -0
- package/dist/esm/models/errors/sdkvalidationerror.js.map +1 -0
- package/dist/esm/models/fileattachment.d.ts +37 -0
- package/dist/esm/models/fileattachment.d.ts.map +1 -0
- package/dist/esm/models/fileattachment.js +50 -0
- package/dist/esm/models/fileattachment.js.map +1 -0
- package/dist/esm/models/imageattachment.d.ts +37 -0
- package/dist/esm/models/imageattachment.d.ts.map +1 -0
- package/dist/esm/models/imageattachment.js +50 -0
- package/dist/esm/models/imageattachment.js.map +1 -0
- package/dist/esm/models/index.d.ts +15 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +18 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/linkinbiopage.d.ts +33 -0
- package/dist/esm/models/linkinbiopage.d.ts.map +1 -0
- package/dist/esm/models/linkinbiopage.js +35 -0
- package/dist/esm/models/linkinbiopage.js.map +1 -0
- package/dist/esm/models/operations/delete.d.ts +28 -0
- package/dist/esm/models/operations/delete.d.ts.map +1 -0
- package/dist/esm/models/operations/delete.js +27 -0
- package/dist/esm/models/operations/delete.js.map +1 -0
- package/dist/esm/models/operations/getaccount.d.ts +32 -0
- package/dist/esm/models/operations/getaccount.d.ts.map +1 -0
- package/dist/esm/models/operations/getaccount.js +40 -0
- package/dist/esm/models/operations/getaccount.js.map +1 -0
- package/dist/esm/models/operations/getproduct.d.ts +32 -0
- package/dist/esm/models/operations/getproduct.d.ts.map +1 -0
- package/dist/esm/models/operations/getproduct.js +40 -0
- package/dist/esm/models/operations/getproduct.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -0
- package/dist/esm/models/operations/index.js +7 -0
- package/dist/esm/models/operations/index.js.map +1 -0
- package/dist/esm/models/pricevariant.d.ts +46 -0
- package/dist/esm/models/pricevariant.d.ts.map +1 -0
- package/dist/esm/models/pricevariant.js +54 -0
- package/dist/esm/models/pricevariant.js.map +1 -0
- package/dist/esm/models/product.d.ts +94 -0
- package/dist/esm/models/product.d.ts.map +1 -0
- package/dist/esm/models/product.js +111 -0
- package/dist/esm/models/product.js.map +1 -0
- package/dist/esm/models/review.d.ts +35 -0
- package/dist/esm/models/review.d.ts.map +1 -0
- package/dist/esm/models/review.js +47 -0
- package/dist/esm/models/review.js.map +1 -0
- package/dist/esm/models/security.d.ts +29 -0
- package/dist/esm/models/security.d.ts.map +1 -0
- package/dist/esm/models/security.js +40 -0
- package/dist/esm/models/security.js.map +1 -0
- package/dist/esm/models/seo.d.ts +33 -0
- package/dist/esm/models/seo.d.ts.map +1 -0
- package/dist/esm/models/seo.js +37 -0
- package/dist/esm/models/seo.js.map +1 -0
- package/dist/esm/models/sociallink.d.ts +35 -0
- package/dist/esm/models/sociallink.d.ts.map +1 -0
- package/dist/esm/models/sociallink.js +37 -0
- package/dist/esm/models/sociallink.js.map +1 -0
- package/dist/esm/models/user.d.ts +65 -0
- package/dist/esm/models/user.d.ts.map +1 -0
- package/dist/esm/models/user.js +100 -0
- package/dist/esm/models/user.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/sdk/accounts.d.ts +13 -0
- package/dist/esm/sdk/accounts.d.ts.map +1 -0
- package/dist/esm/sdk/accounts.js +18 -0
- package/dist/esm/sdk/accounts.js.map +1 -0
- package/dist/esm/sdk/checkouts.d.ts +12 -0
- package/dist/esm/sdk/checkouts.d.ts.map +1 -0
- package/dist/esm/sdk/checkouts.js +18 -0
- package/dist/esm/sdk/checkouts.js.map +1 -0
- package/dist/esm/sdk/index.d.ts +2 -0
- package/dist/esm/sdk/index.d.ts.map +1 -0
- package/dist/esm/sdk/index.js +5 -0
- package/dist/esm/sdk/index.js.map +1 -0
- package/dist/esm/sdk/products.d.ts +20 -0
- package/dist/esm/sdk/products.d.ts.map +1 -0
- package/dist/esm/sdk/products.js +28 -0
- package/dist/esm/sdk/products.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +16 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -0
- package/dist/esm/sdk/sdk.js +23 -0
- package/dist/esm/sdk/sdk.js.map +1 -0
- package/dist/esm/sdk/user.d.ts +20 -0
- package/dist/esm/sdk/user.d.ts.map +1 -0
- package/dist/esm/sdk/user.js +28 -0
- package/dist/esm/sdk/user.js.map +1 -0
- package/dist/esm/types/async.d.ts +23 -0
- package/dist/esm/types/async.d.ts.map +1 -0
- package/dist/esm/types/async.js +40 -0
- package/dist/esm/types/async.js.map +1 -0
- package/dist/esm/types/blobs.d.ts +4 -0
- package/dist/esm/types/blobs.d.ts.map +1 -0
- package/dist/esm/types/blobs.js +25 -0
- package/dist/esm/types/blobs.js.map +1 -0
- package/dist/esm/types/constdatetime.d.ts +3 -0
- package/dist/esm/types/constdatetime.d.ts.map +1 -0
- package/dist/esm/types/constdatetime.js +10 -0
- package/dist/esm/types/constdatetime.js.map +1 -0
- package/dist/esm/types/enums.d.ts +12 -0
- package/dist/esm/types/enums.d.ts.map +1 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/enums.js.map +1 -0
- package/dist/esm/types/fp.d.ts +31 -0
- package/dist/esm/types/fp.d.ts.map +1 -0
- package/dist/esm/types/fp.js +31 -0
- package/dist/esm/types/fp.js.map +1 -0
- package/dist/esm/types/index.d.ts +8 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +8 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/operations.d.ts +27 -0
- package/dist/esm/types/operations.d.ts.map +1 -0
- package/dist/esm/types/operations.js +77 -0
- package/dist/esm/types/operations.js.map +1 -0
- package/dist/esm/types/rfcdate.d.ts +21 -0
- package/dist/esm/types/rfcdate.d.ts.map +1 -0
- package/dist/esm/types/rfcdate.js +42 -0
- package/dist/esm/types/rfcdate.js.map +1 -0
- package/dist/esm/types/streams.d.ts +2 -0
- package/dist/esm/types/streams.d.ts.map +1 -0
- package/dist/esm/types/streams.js +15 -0
- package/dist/esm/types/streams.js.map +1 -0
- package/docs/sdks/accounts/README.md +84 -0
- package/docs/sdks/checkouts/README.md +96 -0
- package/docs/sdks/crevio/README.md +7 -0
- package/docs/sdks/products/README.md +154 -0
- package/docs/sdks/user/README.md +149 -0
- package/examples/README.md +31 -0
- package/examples/package-lock.json +611 -0
- package/examples/package.json +18 -0
- package/examples/userGet.example.ts +26 -0
- package/jsr.json +27 -0
- package/package.json +122 -0
- package/src/core.ts +13 -0
- package/src/funcs/accountsGet.ts +176 -0
- package/src/funcs/checkoutsCreate.ts +169 -0
- package/src/funcs/productsGet.ts +176 -0
- package/src/funcs/productsList.ts +152 -0
- package/src/funcs/userDelete.ts +151 -0
- package/src/funcs/userGet.ts +151 -0
- package/src/hooks/hooks.ts +132 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -0
- package/src/hooks/types.ts +107 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +71 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +483 -0
- package/src/lib/env.ts +41 -0
- package/src/lib/files.ts +82 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +352 -0
- package/src/lib/primitives.ts +150 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +91 -0
- package/src/lib/sdks.ts +406 -0
- package/src/lib/security.ts +261 -0
- package/src/lib/url.ts +33 -0
- package/src/models/account.ts +116 -0
- package/src/models/accountslim.ts +70 -0
- package/src/models/checkoutrequest.ts +232 -0
- package/src/models/checkoutresponse.ts +81 -0
- package/src/models/errors/creviodefaulterror.ts +40 -0
- package/src/models/errors/crevioerror.ts +35 -0
- package/src/models/errors/error.ts +88 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +9 -0
- package/src/models/errors/responsevalidationerror.ts +50 -0
- package/src/models/errors/sdkvalidationerror.ts +109 -0
- package/src/models/fileattachment.ts +89 -0
- package/src/models/imageattachment.ts +91 -0
- package/src/models/index.ts +18 -0
- package/src/models/linkinbiopage.ts +70 -0
- package/src/models/operations/delete.ts +57 -0
- package/src/models/operations/getaccount.ts +78 -0
- package/src/models/operations/getproduct.ts +78 -0
- package/src/models/operations/index.ts +7 -0
- package/src/models/pricevariant.ts +102 -0
- package/src/models/product.ts +205 -0
- package/src/models/review.ts +80 -0
- package/src/models/security.ts +71 -0
- package/src/models/seo.ts +64 -0
- package/src/models/sociallink.ts +74 -0
- package/src/models/user.ts +172 -0
- package/src/sdk/accounts.ts +28 -0
- package/src/sdk/checkouts.ts +27 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/products.ts +44 -0
- package/src/sdk/sdk.ts +31 -0
- package/src/sdk/user.ts +42 -0
- package/src/types/async.ts +68 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/tsconfig.json +41 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as models from "../models/index.js";
|
|
6
|
+
import { env } from "./env.js";
|
|
7
|
+
|
|
8
|
+
type OAuth2PasswordFlow = {
|
|
9
|
+
username: string;
|
|
10
|
+
password: string;
|
|
11
|
+
clientID?: string | undefined;
|
|
12
|
+
clientSecret?: string | undefined;
|
|
13
|
+
tokenURL: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export enum SecurityErrorCode {
|
|
17
|
+
Incomplete = "incomplete",
|
|
18
|
+
UnrecognisedSecurityType = "unrecognized_security_type",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class SecurityError extends Error {
|
|
22
|
+
constructor(
|
|
23
|
+
public code: SecurityErrorCode,
|
|
24
|
+
message: string,
|
|
25
|
+
) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.name = "SecurityError";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static incomplete(): SecurityError {
|
|
31
|
+
return new SecurityError(
|
|
32
|
+
SecurityErrorCode.Incomplete,
|
|
33
|
+
"Security requirements not met in order to perform the operation",
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
static unrecognizedType(type: string): SecurityError {
|
|
37
|
+
return new SecurityError(
|
|
38
|
+
SecurityErrorCode.UnrecognisedSecurityType,
|
|
39
|
+
`Unrecognised security type: ${type}`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type SecurityState = {
|
|
45
|
+
basic: { username?: string | undefined; password?: string | undefined };
|
|
46
|
+
headers: Record<string, string>;
|
|
47
|
+
queryParams: Record<string, string>;
|
|
48
|
+
cookies: Record<string, string>;
|
|
49
|
+
oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" };
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
type SecurityInputBasic = {
|
|
53
|
+
type: "http:basic";
|
|
54
|
+
value:
|
|
55
|
+
| { username?: string | undefined; password?: string | undefined }
|
|
56
|
+
| null
|
|
57
|
+
| undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type SecurityInputBearer = {
|
|
61
|
+
type: "http:bearer";
|
|
62
|
+
value: string | null | undefined;
|
|
63
|
+
fieldName: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
type SecurityInputAPIKey = {
|
|
67
|
+
type: "apiKey:header" | "apiKey:query" | "apiKey:cookie";
|
|
68
|
+
value: string | null | undefined;
|
|
69
|
+
fieldName: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type SecurityInputOIDC = {
|
|
73
|
+
type: "openIdConnect";
|
|
74
|
+
value: string | null | undefined;
|
|
75
|
+
fieldName: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
type SecurityInputOAuth2 = {
|
|
79
|
+
type: "oauth2";
|
|
80
|
+
value: string | null | undefined;
|
|
81
|
+
fieldName: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
type SecurityInputOAuth2ClientCredentials = {
|
|
85
|
+
type: "oauth2:client_credentials";
|
|
86
|
+
value:
|
|
87
|
+
| { clientID?: string | undefined; clientSecret?: string | undefined }
|
|
88
|
+
| null
|
|
89
|
+
| string
|
|
90
|
+
| undefined;
|
|
91
|
+
fieldName?: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
type SecurityInputOAuth2PasswordCredentials = {
|
|
95
|
+
type: "oauth2:password";
|
|
96
|
+
value:
|
|
97
|
+
| string
|
|
98
|
+
| null
|
|
99
|
+
| undefined;
|
|
100
|
+
fieldName?: string;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
type SecurityInputCustom = {
|
|
104
|
+
type: "http:custom";
|
|
105
|
+
value: any | null | undefined;
|
|
106
|
+
fieldName?: string;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export type SecurityInput =
|
|
110
|
+
| SecurityInputBasic
|
|
111
|
+
| SecurityInputBearer
|
|
112
|
+
| SecurityInputAPIKey
|
|
113
|
+
| SecurityInputOAuth2
|
|
114
|
+
| SecurityInputOAuth2ClientCredentials
|
|
115
|
+
| SecurityInputOAuth2PasswordCredentials
|
|
116
|
+
| SecurityInputOIDC
|
|
117
|
+
| SecurityInputCustom;
|
|
118
|
+
|
|
119
|
+
export function resolveSecurity(
|
|
120
|
+
...options: SecurityInput[][]
|
|
121
|
+
): SecurityState | null {
|
|
122
|
+
const state: SecurityState = {
|
|
123
|
+
basic: {},
|
|
124
|
+
headers: {},
|
|
125
|
+
queryParams: {},
|
|
126
|
+
cookies: {},
|
|
127
|
+
oauth2: { type: "none" },
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const option = options.find((opts) => {
|
|
131
|
+
return opts.every((o) => {
|
|
132
|
+
if (o.value == null) {
|
|
133
|
+
return false;
|
|
134
|
+
} else if (o.type === "http:basic") {
|
|
135
|
+
return o.value.username != null || o.value.password != null;
|
|
136
|
+
} else if (o.type === "http:custom") {
|
|
137
|
+
return null;
|
|
138
|
+
} else if (o.type === "oauth2:password") {
|
|
139
|
+
return (
|
|
140
|
+
typeof o.value === "string" && !!o.value
|
|
141
|
+
);
|
|
142
|
+
} else if (o.type === "oauth2:client_credentials") {
|
|
143
|
+
if (typeof o.value == "string") {
|
|
144
|
+
return !!o.value;
|
|
145
|
+
}
|
|
146
|
+
return o.value.clientID != null || o.value.clientSecret != null;
|
|
147
|
+
} else if (typeof o.value === "string") {
|
|
148
|
+
return !!o.value;
|
|
149
|
+
} else {
|
|
150
|
+
throw new Error(
|
|
151
|
+
`Unrecognized security type: ${o.type} (value type: ${typeof o
|
|
152
|
+
.value})`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
if (option == null) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
option.forEach((spec) => {
|
|
162
|
+
if (spec.value == null) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const { type } = spec;
|
|
167
|
+
|
|
168
|
+
switch (type) {
|
|
169
|
+
case "apiKey:header":
|
|
170
|
+
state.headers[spec.fieldName] = spec.value;
|
|
171
|
+
break;
|
|
172
|
+
case "apiKey:query":
|
|
173
|
+
state.queryParams[spec.fieldName] = spec.value;
|
|
174
|
+
break;
|
|
175
|
+
case "apiKey:cookie":
|
|
176
|
+
state.cookies[spec.fieldName] = spec.value;
|
|
177
|
+
break;
|
|
178
|
+
case "http:basic":
|
|
179
|
+
applyBasic(state, spec);
|
|
180
|
+
break;
|
|
181
|
+
case "http:custom":
|
|
182
|
+
break;
|
|
183
|
+
case "http:bearer":
|
|
184
|
+
applyBearer(state, spec);
|
|
185
|
+
break;
|
|
186
|
+
case "oauth2":
|
|
187
|
+
applyBearer(state, spec);
|
|
188
|
+
break;
|
|
189
|
+
case "oauth2:password":
|
|
190
|
+
applyBearer(state, spec);
|
|
191
|
+
break;
|
|
192
|
+
case "oauth2:client_credentials":
|
|
193
|
+
break;
|
|
194
|
+
case "openIdConnect":
|
|
195
|
+
applyBearer(state, spec);
|
|
196
|
+
break;
|
|
197
|
+
default:
|
|
198
|
+
spec satisfies never;
|
|
199
|
+
throw SecurityError.unrecognizedType(type);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
return state;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function applyBasic(
|
|
207
|
+
state: SecurityState,
|
|
208
|
+
spec: SecurityInputBasic,
|
|
209
|
+
) {
|
|
210
|
+
if (spec.value == null) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
state.basic = spec.value;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function applyBearer(
|
|
218
|
+
state: SecurityState,
|
|
219
|
+
spec:
|
|
220
|
+
| SecurityInputBearer
|
|
221
|
+
| SecurityInputOAuth2
|
|
222
|
+
| SecurityInputOIDC
|
|
223
|
+
| SecurityInputOAuth2PasswordCredentials,
|
|
224
|
+
) {
|
|
225
|
+
if (typeof spec.value !== "string" || !spec.value) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
let value = spec.value;
|
|
230
|
+
if (value.slice(0, 7).toLowerCase() !== "bearer ") {
|
|
231
|
+
value = `Bearer ${value}`;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (spec.fieldName !== undefined) {
|
|
235
|
+
state.headers[spec.fieldName] = value;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function resolveGlobalSecurity(
|
|
240
|
+
security: Partial<models.Security> | null | undefined,
|
|
241
|
+
): SecurityState | null {
|
|
242
|
+
return resolveSecurity(
|
|
243
|
+
[
|
|
244
|
+
{
|
|
245
|
+
fieldName: "Authorization",
|
|
246
|
+
type: "apiKey:header",
|
|
247
|
+
value: security?.apiKeyAuth ?? env().CREVIO_API_KEY_AUTH,
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export async function extractSecurity<
|
|
254
|
+
T extends string | Record<string, unknown>,
|
|
255
|
+
>(sec: T | (() => Promise<T>) | undefined): Promise<T | undefined> {
|
|
256
|
+
if (sec == null) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return typeof sec === "function" ? sec() : sec;
|
|
261
|
+
}
|
package/src/lib/url.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const hasOwn = Object.prototype.hasOwnProperty;
|
|
6
|
+
|
|
7
|
+
export type Params = Partial<Record<string, string | number>>;
|
|
8
|
+
|
|
9
|
+
export function pathToFunc(
|
|
10
|
+
pathPattern: string,
|
|
11
|
+
options?: { charEncoding?: "percent" | "none" },
|
|
12
|
+
): (params?: Params) => string {
|
|
13
|
+
const paramRE = /\{([a-zA-Z0-9_]+?)\}/g;
|
|
14
|
+
|
|
15
|
+
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
+
return pathPattern.replace(paramRE, function (_, placeholder) {
|
|
17
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
18
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const value = params[placeholder];
|
|
22
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return options?.charEncoding === "percent"
|
|
29
|
+
? encodeURIComponent(`${value}`)
|
|
30
|
+
: `${value}`;
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ImageAttachment,
|
|
12
|
+
ImageAttachment$inboundSchema,
|
|
13
|
+
ImageAttachment$Outbound,
|
|
14
|
+
ImageAttachment$outboundSchema,
|
|
15
|
+
} from "./imageattachment.js";
|
|
16
|
+
import {
|
|
17
|
+
LinkInBioPage,
|
|
18
|
+
LinkInBioPage$inboundSchema,
|
|
19
|
+
LinkInBioPage$Outbound,
|
|
20
|
+
LinkInBioPage$outboundSchema,
|
|
21
|
+
} from "./linkinbiopage.js";
|
|
22
|
+
import {
|
|
23
|
+
SocialLink,
|
|
24
|
+
SocialLink$inboundSchema,
|
|
25
|
+
SocialLink$Outbound,
|
|
26
|
+
SocialLink$outboundSchema,
|
|
27
|
+
} from "./sociallink.js";
|
|
28
|
+
|
|
29
|
+
export type Account = {
|
|
30
|
+
id?: number | undefined;
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
subdomain?: string | undefined;
|
|
33
|
+
avatarBlob?: ImageAttachment | undefined;
|
|
34
|
+
linkInBioPage?: LinkInBioPage | undefined;
|
|
35
|
+
socialLinks?: Array<SocialLink> | undefined;
|
|
36
|
+
referralUrl?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const Account$inboundSchema: z.ZodType<Account, z.ZodTypeDef, unknown> =
|
|
41
|
+
z.object({
|
|
42
|
+
id: z.number().int().optional(),
|
|
43
|
+
name: z.string().optional(),
|
|
44
|
+
subdomain: z.string().optional(),
|
|
45
|
+
avatar_blob: ImageAttachment$inboundSchema.optional(),
|
|
46
|
+
link_in_bio_page: LinkInBioPage$inboundSchema.optional(),
|
|
47
|
+
social_links: z.array(SocialLink$inboundSchema).optional(),
|
|
48
|
+
referral_url: z.string().optional(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
"avatar_blob": "avatarBlob",
|
|
52
|
+
"link_in_bio_page": "linkInBioPage",
|
|
53
|
+
"social_links": "socialLinks",
|
|
54
|
+
"referral_url": "referralUrl",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type Account$Outbound = {
|
|
60
|
+
id?: number | undefined;
|
|
61
|
+
name?: string | undefined;
|
|
62
|
+
subdomain?: string | undefined;
|
|
63
|
+
avatar_blob?: ImageAttachment$Outbound | undefined;
|
|
64
|
+
link_in_bio_page?: LinkInBioPage$Outbound | undefined;
|
|
65
|
+
social_links?: Array<SocialLink$Outbound> | undefined;
|
|
66
|
+
referral_url?: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const Account$outboundSchema: z.ZodType<
|
|
71
|
+
Account$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
Account
|
|
74
|
+
> = z.object({
|
|
75
|
+
id: z.number().int().optional(),
|
|
76
|
+
name: z.string().optional(),
|
|
77
|
+
subdomain: z.string().optional(),
|
|
78
|
+
avatarBlob: ImageAttachment$outboundSchema.optional(),
|
|
79
|
+
linkInBioPage: LinkInBioPage$outboundSchema.optional(),
|
|
80
|
+
socialLinks: z.array(SocialLink$outboundSchema).optional(),
|
|
81
|
+
referralUrl: z.string().optional(),
|
|
82
|
+
}).transform((v) => {
|
|
83
|
+
return remap$(v, {
|
|
84
|
+
avatarBlob: "avatar_blob",
|
|
85
|
+
linkInBioPage: "link_in_bio_page",
|
|
86
|
+
socialLinks: "social_links",
|
|
87
|
+
referralUrl: "referral_url",
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
94
|
+
*/
|
|
95
|
+
export namespace Account$ {
|
|
96
|
+
/** @deprecated use `Account$inboundSchema` instead. */
|
|
97
|
+
export const inboundSchema = Account$inboundSchema;
|
|
98
|
+
/** @deprecated use `Account$outboundSchema` instead. */
|
|
99
|
+
export const outboundSchema = Account$outboundSchema;
|
|
100
|
+
/** @deprecated use `Account$Outbound` instead. */
|
|
101
|
+
export type Outbound = Account$Outbound;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function accountToJSON(account: Account): string {
|
|
105
|
+
return JSON.stringify(Account$outboundSchema.parse(account));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function accountFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<Account, SDKValidationError> {
|
|
111
|
+
return safeParse(
|
|
112
|
+
jsonString,
|
|
113
|
+
(x) => Account$inboundSchema.parse(JSON.parse(x)),
|
|
114
|
+
`Failed to parse 'Account' from JSON`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type AccountSlim = {
|
|
11
|
+
id?: number | undefined;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
subdomain?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const AccountSlim$inboundSchema: z.ZodType<
|
|
18
|
+
AccountSlim,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
id: z.number().int().optional(),
|
|
23
|
+
name: z.string().optional(),
|
|
24
|
+
subdomain: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type AccountSlim$Outbound = {
|
|
29
|
+
id?: number | undefined;
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
subdomain?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const AccountSlim$outboundSchema: z.ZodType<
|
|
36
|
+
AccountSlim$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
AccountSlim
|
|
39
|
+
> = z.object({
|
|
40
|
+
id: z.number().int().optional(),
|
|
41
|
+
name: z.string().optional(),
|
|
42
|
+
subdomain: z.string().optional(),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
+
*/
|
|
49
|
+
export namespace AccountSlim$ {
|
|
50
|
+
/** @deprecated use `AccountSlim$inboundSchema` instead. */
|
|
51
|
+
export const inboundSchema = AccountSlim$inboundSchema;
|
|
52
|
+
/** @deprecated use `AccountSlim$outboundSchema` instead. */
|
|
53
|
+
export const outboundSchema = AccountSlim$outboundSchema;
|
|
54
|
+
/** @deprecated use `AccountSlim$Outbound` instead. */
|
|
55
|
+
export type Outbound = AccountSlim$Outbound;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function accountSlimToJSON(accountSlim: AccountSlim): string {
|
|
59
|
+
return JSON.stringify(AccountSlim$outboundSchema.parse(accountSlim));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function accountSlimFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<AccountSlim, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => AccountSlim$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'AccountSlim' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type CheckoutItemsAttribute = {
|
|
12
|
+
priceVariantId: number;
|
|
13
|
+
quantity?: number | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Custom amount in cents (for pay-what-you-want products)
|
|
16
|
+
*/
|
|
17
|
+
customAmount?: number | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type Checkout = {
|
|
21
|
+
email?: string | undefined;
|
|
22
|
+
returnUrl?: string | undefined;
|
|
23
|
+
cancelUrl?: string | undefined;
|
|
24
|
+
discountCode?: string | undefined;
|
|
25
|
+
checkoutItemsAttributes: Array<CheckoutItemsAttribute>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type CheckoutRequest = {
|
|
29
|
+
checkout: Checkout;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const CheckoutItemsAttribute$inboundSchema: z.ZodType<
|
|
34
|
+
CheckoutItemsAttribute,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
price_variant_id: z.number().int(),
|
|
39
|
+
quantity: z.number().int().optional(),
|
|
40
|
+
custom_amount: z.number().int().optional(),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"price_variant_id": "priceVariantId",
|
|
44
|
+
"custom_amount": "customAmount",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type CheckoutItemsAttribute$Outbound = {
|
|
50
|
+
price_variant_id: number;
|
|
51
|
+
quantity?: number | undefined;
|
|
52
|
+
custom_amount?: number | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const CheckoutItemsAttribute$outboundSchema: z.ZodType<
|
|
57
|
+
CheckoutItemsAttribute$Outbound,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
CheckoutItemsAttribute
|
|
60
|
+
> = z.object({
|
|
61
|
+
priceVariantId: z.number().int(),
|
|
62
|
+
quantity: z.number().int().optional(),
|
|
63
|
+
customAmount: z.number().int().optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
priceVariantId: "price_variant_id",
|
|
67
|
+
customAmount: "custom_amount",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
74
|
+
*/
|
|
75
|
+
export namespace CheckoutItemsAttribute$ {
|
|
76
|
+
/** @deprecated use `CheckoutItemsAttribute$inboundSchema` instead. */
|
|
77
|
+
export const inboundSchema = CheckoutItemsAttribute$inboundSchema;
|
|
78
|
+
/** @deprecated use `CheckoutItemsAttribute$outboundSchema` instead. */
|
|
79
|
+
export const outboundSchema = CheckoutItemsAttribute$outboundSchema;
|
|
80
|
+
/** @deprecated use `CheckoutItemsAttribute$Outbound` instead. */
|
|
81
|
+
export type Outbound = CheckoutItemsAttribute$Outbound;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function checkoutItemsAttributeToJSON(
|
|
85
|
+
checkoutItemsAttribute: CheckoutItemsAttribute,
|
|
86
|
+
): string {
|
|
87
|
+
return JSON.stringify(
|
|
88
|
+
CheckoutItemsAttribute$outboundSchema.parse(checkoutItemsAttribute),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function checkoutItemsAttributeFromJSON(
|
|
93
|
+
jsonString: string,
|
|
94
|
+
): SafeParseResult<CheckoutItemsAttribute, SDKValidationError> {
|
|
95
|
+
return safeParse(
|
|
96
|
+
jsonString,
|
|
97
|
+
(x) => CheckoutItemsAttribute$inboundSchema.parse(JSON.parse(x)),
|
|
98
|
+
`Failed to parse 'CheckoutItemsAttribute' from JSON`,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const Checkout$inboundSchema: z.ZodType<
|
|
104
|
+
Checkout,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
unknown
|
|
107
|
+
> = z.object({
|
|
108
|
+
email: z.string().optional(),
|
|
109
|
+
return_url: z.string().optional(),
|
|
110
|
+
cancel_url: z.string().optional(),
|
|
111
|
+
discount_code: z.string().optional(),
|
|
112
|
+
checkout_items_attributes: z.array(
|
|
113
|
+
z.lazy(() => CheckoutItemsAttribute$inboundSchema),
|
|
114
|
+
),
|
|
115
|
+
}).transform((v) => {
|
|
116
|
+
return remap$(v, {
|
|
117
|
+
"return_url": "returnUrl",
|
|
118
|
+
"cancel_url": "cancelUrl",
|
|
119
|
+
"discount_code": "discountCode",
|
|
120
|
+
"checkout_items_attributes": "checkoutItemsAttributes",
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
export type Checkout$Outbound = {
|
|
126
|
+
email?: string | undefined;
|
|
127
|
+
return_url?: string | undefined;
|
|
128
|
+
cancel_url?: string | undefined;
|
|
129
|
+
discount_code?: string | undefined;
|
|
130
|
+
checkout_items_attributes: Array<CheckoutItemsAttribute$Outbound>;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const Checkout$outboundSchema: z.ZodType<
|
|
135
|
+
Checkout$Outbound,
|
|
136
|
+
z.ZodTypeDef,
|
|
137
|
+
Checkout
|
|
138
|
+
> = z.object({
|
|
139
|
+
email: z.string().optional(),
|
|
140
|
+
returnUrl: z.string().optional(),
|
|
141
|
+
cancelUrl: z.string().optional(),
|
|
142
|
+
discountCode: z.string().optional(),
|
|
143
|
+
checkoutItemsAttributes: z.array(
|
|
144
|
+
z.lazy(() => CheckoutItemsAttribute$outboundSchema),
|
|
145
|
+
),
|
|
146
|
+
}).transform((v) => {
|
|
147
|
+
return remap$(v, {
|
|
148
|
+
returnUrl: "return_url",
|
|
149
|
+
cancelUrl: "cancel_url",
|
|
150
|
+
discountCode: "discount_code",
|
|
151
|
+
checkoutItemsAttributes: "checkout_items_attributes",
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @internal
|
|
157
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
158
|
+
*/
|
|
159
|
+
export namespace Checkout$ {
|
|
160
|
+
/** @deprecated use `Checkout$inboundSchema` instead. */
|
|
161
|
+
export const inboundSchema = Checkout$inboundSchema;
|
|
162
|
+
/** @deprecated use `Checkout$outboundSchema` instead. */
|
|
163
|
+
export const outboundSchema = Checkout$outboundSchema;
|
|
164
|
+
/** @deprecated use `Checkout$Outbound` instead. */
|
|
165
|
+
export type Outbound = Checkout$Outbound;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function checkoutToJSON(checkout: Checkout): string {
|
|
169
|
+
return JSON.stringify(Checkout$outboundSchema.parse(checkout));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function checkoutFromJSON(
|
|
173
|
+
jsonString: string,
|
|
174
|
+
): SafeParseResult<Checkout, SDKValidationError> {
|
|
175
|
+
return safeParse(
|
|
176
|
+
jsonString,
|
|
177
|
+
(x) => Checkout$inboundSchema.parse(JSON.parse(x)),
|
|
178
|
+
`Failed to parse 'Checkout' from JSON`,
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** @internal */
|
|
183
|
+
export const CheckoutRequest$inboundSchema: z.ZodType<
|
|
184
|
+
CheckoutRequest,
|
|
185
|
+
z.ZodTypeDef,
|
|
186
|
+
unknown
|
|
187
|
+
> = z.object({
|
|
188
|
+
checkout: z.lazy(() => Checkout$inboundSchema),
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export type CheckoutRequest$Outbound = {
|
|
193
|
+
checkout: Checkout$Outbound;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/** @internal */
|
|
197
|
+
export const CheckoutRequest$outboundSchema: z.ZodType<
|
|
198
|
+
CheckoutRequest$Outbound,
|
|
199
|
+
z.ZodTypeDef,
|
|
200
|
+
CheckoutRequest
|
|
201
|
+
> = z.object({
|
|
202
|
+
checkout: z.lazy(() => Checkout$outboundSchema),
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @internal
|
|
207
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
208
|
+
*/
|
|
209
|
+
export namespace CheckoutRequest$ {
|
|
210
|
+
/** @deprecated use `CheckoutRequest$inboundSchema` instead. */
|
|
211
|
+
export const inboundSchema = CheckoutRequest$inboundSchema;
|
|
212
|
+
/** @deprecated use `CheckoutRequest$outboundSchema` instead. */
|
|
213
|
+
export const outboundSchema = CheckoutRequest$outboundSchema;
|
|
214
|
+
/** @deprecated use `CheckoutRequest$Outbound` instead. */
|
|
215
|
+
export type Outbound = CheckoutRequest$Outbound;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export function checkoutRequestToJSON(
|
|
219
|
+
checkoutRequest: CheckoutRequest,
|
|
220
|
+
): string {
|
|
221
|
+
return JSON.stringify(CheckoutRequest$outboundSchema.parse(checkoutRequest));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function checkoutRequestFromJSON(
|
|
225
|
+
jsonString: string,
|
|
226
|
+
): SafeParseResult<CheckoutRequest, SDKValidationError> {
|
|
227
|
+
return safeParse(
|
|
228
|
+
jsonString,
|
|
229
|
+
(x) => CheckoutRequest$inboundSchema.parse(JSON.parse(x)),
|
|
230
|
+
`Failed to parse 'CheckoutRequest' from JSON`,
|
|
231
|
+
);
|
|
232
|
+
}
|