@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,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 LinkInBioPage = {
|
|
11
|
+
id?: number | undefined;
|
|
12
|
+
title?: string | undefined;
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const LinkInBioPage$inboundSchema: z.ZodType<
|
|
18
|
+
LinkInBioPage,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
id: z.number().int().optional(),
|
|
23
|
+
title: z.string().optional(),
|
|
24
|
+
description: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type LinkInBioPage$Outbound = {
|
|
29
|
+
id?: number | undefined;
|
|
30
|
+
title?: string | undefined;
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const LinkInBioPage$outboundSchema: z.ZodType<
|
|
36
|
+
LinkInBioPage$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
LinkInBioPage
|
|
39
|
+
> = z.object({
|
|
40
|
+
id: z.number().int().optional(),
|
|
41
|
+
title: z.string().optional(),
|
|
42
|
+
description: 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 LinkInBioPage$ {
|
|
50
|
+
/** @deprecated use `LinkInBioPage$inboundSchema` instead. */
|
|
51
|
+
export const inboundSchema = LinkInBioPage$inboundSchema;
|
|
52
|
+
/** @deprecated use `LinkInBioPage$outboundSchema` instead. */
|
|
53
|
+
export const outboundSchema = LinkInBioPage$outboundSchema;
|
|
54
|
+
/** @deprecated use `LinkInBioPage$Outbound` instead. */
|
|
55
|
+
export type Outbound = LinkInBioPage$Outbound;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function linkInBioPageToJSON(linkInBioPage: LinkInBioPage): string {
|
|
59
|
+
return JSON.stringify(LinkInBioPage$outboundSchema.parse(linkInBioPage));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function linkInBioPageFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<LinkInBioPage, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => LinkInBioPage$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'LinkInBioPage' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* Account deleted successfully
|
|
12
|
+
*/
|
|
13
|
+
export type DeleteResponse = {};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const DeleteResponse$inboundSchema: z.ZodType<
|
|
17
|
+
DeleteResponse,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({});
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type DeleteResponse$Outbound = {};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const DeleteResponse$outboundSchema: z.ZodType<
|
|
27
|
+
DeleteResponse$Outbound,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
DeleteResponse
|
|
30
|
+
> = z.object({});
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
35
|
+
*/
|
|
36
|
+
export namespace DeleteResponse$ {
|
|
37
|
+
/** @deprecated use `DeleteResponse$inboundSchema` instead. */
|
|
38
|
+
export const inboundSchema = DeleteResponse$inboundSchema;
|
|
39
|
+
/** @deprecated use `DeleteResponse$outboundSchema` instead. */
|
|
40
|
+
export const outboundSchema = DeleteResponse$outboundSchema;
|
|
41
|
+
/** @deprecated use `DeleteResponse$Outbound` instead. */
|
|
42
|
+
export type Outbound = DeleteResponse$Outbound;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function deleteResponseToJSON(deleteResponse: DeleteResponse): string {
|
|
46
|
+
return JSON.stringify(DeleteResponse$outboundSchema.parse(deleteResponse));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function deleteResponseFromJSON(
|
|
50
|
+
jsonString: string,
|
|
51
|
+
): SafeParseResult<DeleteResponse, SDKValidationError> {
|
|
52
|
+
return safeParse(
|
|
53
|
+
jsonString,
|
|
54
|
+
(x) => DeleteResponse$inboundSchema.parse(JSON.parse(x)),
|
|
55
|
+
`Failed to parse 'DeleteResponse' from JSON`,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 GetAccountRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* The account's prefix ID
|
|
14
|
+
*/
|
|
15
|
+
prefixId: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const GetAccountRequest$inboundSchema: z.ZodType<
|
|
20
|
+
GetAccountRequest,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
prefix_id: z.string(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"prefix_id": "prefixId",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type GetAccountRequest$Outbound = {
|
|
33
|
+
prefix_id: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const GetAccountRequest$outboundSchema: z.ZodType<
|
|
38
|
+
GetAccountRequest$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
GetAccountRequest
|
|
41
|
+
> = z.object({
|
|
42
|
+
prefixId: z.string(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
prefixId: "prefix_id",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
+
*/
|
|
53
|
+
export namespace GetAccountRequest$ {
|
|
54
|
+
/** @deprecated use `GetAccountRequest$inboundSchema` instead. */
|
|
55
|
+
export const inboundSchema = GetAccountRequest$inboundSchema;
|
|
56
|
+
/** @deprecated use `GetAccountRequest$outboundSchema` instead. */
|
|
57
|
+
export const outboundSchema = GetAccountRequest$outboundSchema;
|
|
58
|
+
/** @deprecated use `GetAccountRequest$Outbound` instead. */
|
|
59
|
+
export type Outbound = GetAccountRequest$Outbound;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function getAccountRequestToJSON(
|
|
63
|
+
getAccountRequest: GetAccountRequest,
|
|
64
|
+
): string {
|
|
65
|
+
return JSON.stringify(
|
|
66
|
+
GetAccountRequest$outboundSchema.parse(getAccountRequest),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function getAccountRequestFromJSON(
|
|
71
|
+
jsonString: string,
|
|
72
|
+
): SafeParseResult<GetAccountRequest, SDKValidationError> {
|
|
73
|
+
return safeParse(
|
|
74
|
+
jsonString,
|
|
75
|
+
(x) => GetAccountRequest$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'GetAccountRequest' from JSON`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 GetProductRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* The product's prefix ID
|
|
14
|
+
*/
|
|
15
|
+
prefixId: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const GetProductRequest$inboundSchema: z.ZodType<
|
|
20
|
+
GetProductRequest,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
prefix_id: z.string(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"prefix_id": "prefixId",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type GetProductRequest$Outbound = {
|
|
33
|
+
prefix_id: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const GetProductRequest$outboundSchema: z.ZodType<
|
|
38
|
+
GetProductRequest$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
GetProductRequest
|
|
41
|
+
> = z.object({
|
|
42
|
+
prefixId: z.string(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
prefixId: "prefix_id",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
+
*/
|
|
53
|
+
export namespace GetProductRequest$ {
|
|
54
|
+
/** @deprecated use `GetProductRequest$inboundSchema` instead. */
|
|
55
|
+
export const inboundSchema = GetProductRequest$inboundSchema;
|
|
56
|
+
/** @deprecated use `GetProductRequest$outboundSchema` instead. */
|
|
57
|
+
export const outboundSchema = GetProductRequest$outboundSchema;
|
|
58
|
+
/** @deprecated use `GetProductRequest$Outbound` instead. */
|
|
59
|
+
export type Outbound = GetProductRequest$Outbound;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function getProductRequestToJSON(
|
|
63
|
+
getProductRequest: GetProductRequest,
|
|
64
|
+
): string {
|
|
65
|
+
return JSON.stringify(
|
|
66
|
+
GetProductRequest$outboundSchema.parse(getProductRequest),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function getProductRequestFromJSON(
|
|
71
|
+
jsonString: string,
|
|
72
|
+
): SafeParseResult<GetProductRequest, SDKValidationError> {
|
|
73
|
+
return safeParse(
|
|
74
|
+
jsonString,
|
|
75
|
+
(x) => GetProductRequest$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'GetProductRequest' from JSON`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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 PriceVariant = {
|
|
12
|
+
id?: number | undefined;
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Price in cents
|
|
16
|
+
*/
|
|
17
|
+
amount?: number | undefined;
|
|
18
|
+
currency?: string | undefined;
|
|
19
|
+
trialPeriodDays?: number | null | undefined;
|
|
20
|
+
hidden?: boolean | undefined;
|
|
21
|
+
archived?: boolean | undefined;
|
|
22
|
+
position?: number | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const PriceVariant$inboundSchema: z.ZodType<
|
|
27
|
+
PriceVariant,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
id: z.number().int().optional(),
|
|
32
|
+
name: z.string().optional(),
|
|
33
|
+
amount: z.number().int().optional(),
|
|
34
|
+
currency: z.string().optional(),
|
|
35
|
+
trial_period_days: z.nullable(z.number().int()).optional(),
|
|
36
|
+
hidden: z.boolean().optional(),
|
|
37
|
+
archived: z.boolean().optional(),
|
|
38
|
+
position: z.number().int().optional(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
"trial_period_days": "trialPeriodDays",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type PriceVariant$Outbound = {
|
|
47
|
+
id?: number | undefined;
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
amount?: number | undefined;
|
|
50
|
+
currency?: string | undefined;
|
|
51
|
+
trial_period_days?: number | null | undefined;
|
|
52
|
+
hidden?: boolean | undefined;
|
|
53
|
+
archived?: boolean | undefined;
|
|
54
|
+
position?: number | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const PriceVariant$outboundSchema: z.ZodType<
|
|
59
|
+
PriceVariant$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
PriceVariant
|
|
62
|
+
> = z.object({
|
|
63
|
+
id: z.number().int().optional(),
|
|
64
|
+
name: z.string().optional(),
|
|
65
|
+
amount: z.number().int().optional(),
|
|
66
|
+
currency: z.string().optional(),
|
|
67
|
+
trialPeriodDays: z.nullable(z.number().int()).optional(),
|
|
68
|
+
hidden: z.boolean().optional(),
|
|
69
|
+
archived: z.boolean().optional(),
|
|
70
|
+
position: z.number().int().optional(),
|
|
71
|
+
}).transform((v) => {
|
|
72
|
+
return remap$(v, {
|
|
73
|
+
trialPeriodDays: "trial_period_days",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
+
*/
|
|
81
|
+
export namespace PriceVariant$ {
|
|
82
|
+
/** @deprecated use `PriceVariant$inboundSchema` instead. */
|
|
83
|
+
export const inboundSchema = PriceVariant$inboundSchema;
|
|
84
|
+
/** @deprecated use `PriceVariant$outboundSchema` instead. */
|
|
85
|
+
export const outboundSchema = PriceVariant$outboundSchema;
|
|
86
|
+
/** @deprecated use `PriceVariant$Outbound` instead. */
|
|
87
|
+
export type Outbound = PriceVariant$Outbound;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function priceVariantToJSON(priceVariant: PriceVariant): string {
|
|
91
|
+
return JSON.stringify(PriceVariant$outboundSchema.parse(priceVariant));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function priceVariantFromJSON(
|
|
95
|
+
jsonString: string,
|
|
96
|
+
): SafeParseResult<PriceVariant, SDKValidationError> {
|
|
97
|
+
return safeParse(
|
|
98
|
+
jsonString,
|
|
99
|
+
(x) => PriceVariant$inboundSchema.parse(JSON.parse(x)),
|
|
100
|
+
`Failed to parse 'PriceVariant' from JSON`,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
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 { ClosedEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import {
|
|
11
|
+
AccountSlim,
|
|
12
|
+
AccountSlim$inboundSchema,
|
|
13
|
+
AccountSlim$Outbound,
|
|
14
|
+
AccountSlim$outboundSchema,
|
|
15
|
+
} from "./accountslim.js";
|
|
16
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
17
|
+
import {
|
|
18
|
+
FileAttachment,
|
|
19
|
+
FileAttachment$inboundSchema,
|
|
20
|
+
FileAttachment$Outbound,
|
|
21
|
+
FileAttachment$outboundSchema,
|
|
22
|
+
} from "./fileattachment.js";
|
|
23
|
+
import {
|
|
24
|
+
ImageAttachment,
|
|
25
|
+
ImageAttachment$inboundSchema,
|
|
26
|
+
ImageAttachment$Outbound,
|
|
27
|
+
ImageAttachment$outboundSchema,
|
|
28
|
+
} from "./imageattachment.js";
|
|
29
|
+
import {
|
|
30
|
+
PriceVariant,
|
|
31
|
+
PriceVariant$inboundSchema,
|
|
32
|
+
PriceVariant$Outbound,
|
|
33
|
+
PriceVariant$outboundSchema,
|
|
34
|
+
} from "./pricevariant.js";
|
|
35
|
+
import {
|
|
36
|
+
Review,
|
|
37
|
+
Review$inboundSchema,
|
|
38
|
+
Review$Outbound,
|
|
39
|
+
Review$outboundSchema,
|
|
40
|
+
} from "./review.js";
|
|
41
|
+
import {
|
|
42
|
+
Seo,
|
|
43
|
+
Seo$inboundSchema,
|
|
44
|
+
Seo$Outbound,
|
|
45
|
+
Seo$outboundSchema,
|
|
46
|
+
} from "./seo.js";
|
|
47
|
+
|
|
48
|
+
export const Status = {
|
|
49
|
+
Draft: "draft",
|
|
50
|
+
Published: "published",
|
|
51
|
+
Archived: "archived",
|
|
52
|
+
} as const;
|
|
53
|
+
export type Status = ClosedEnum<typeof Status>;
|
|
54
|
+
|
|
55
|
+
export type Product = {
|
|
56
|
+
id?: number | undefined;
|
|
57
|
+
name?: string | undefined;
|
|
58
|
+
slug?: string | undefined;
|
|
59
|
+
status?: Status | undefined;
|
|
60
|
+
description?: string | undefined;
|
|
61
|
+
bodyHtml?: string | undefined;
|
|
62
|
+
buttonCta?: string | undefined;
|
|
63
|
+
prefixId?: string | undefined;
|
|
64
|
+
thumbnailBlob?: ImageAttachment | undefined;
|
|
65
|
+
sellerAccount?: AccountSlim | undefined;
|
|
66
|
+
mediaFilesBlobs?: Array<FileAttachment> | undefined;
|
|
67
|
+
reviews?: Array<Review> | undefined;
|
|
68
|
+
seo?: Seo | undefined;
|
|
69
|
+
priceVariants?: Array<PriceVariant> | undefined;
|
|
70
|
+
url?: string | undefined;
|
|
71
|
+
hasMedia?: boolean | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
|
|
76
|
+
.nativeEnum(Status);
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
|
|
80
|
+
Status$inboundSchema;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
+
*/
|
|
86
|
+
export namespace Status$ {
|
|
87
|
+
/** @deprecated use `Status$inboundSchema` instead. */
|
|
88
|
+
export const inboundSchema = Status$inboundSchema;
|
|
89
|
+
/** @deprecated use `Status$outboundSchema` instead. */
|
|
90
|
+
export const outboundSchema = Status$outboundSchema;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
95
|
+
z.object({
|
|
96
|
+
id: z.number().int().optional(),
|
|
97
|
+
name: z.string().optional(),
|
|
98
|
+
slug: z.string().optional(),
|
|
99
|
+
status: Status$inboundSchema.optional(),
|
|
100
|
+
description: z.string().optional(),
|
|
101
|
+
body_html: z.string().optional(),
|
|
102
|
+
button_cta: z.string().optional(),
|
|
103
|
+
prefix_id: z.string().optional(),
|
|
104
|
+
thumbnail_blob: ImageAttachment$inboundSchema.optional(),
|
|
105
|
+
seller_account: AccountSlim$inboundSchema.optional(),
|
|
106
|
+
media_files_blobs: z.array(FileAttachment$inboundSchema).optional(),
|
|
107
|
+
reviews: z.array(Review$inboundSchema).optional(),
|
|
108
|
+
seo: Seo$inboundSchema.optional(),
|
|
109
|
+
price_variants: z.array(PriceVariant$inboundSchema).optional(),
|
|
110
|
+
url: z.string().optional(),
|
|
111
|
+
has_media: z.boolean().optional(),
|
|
112
|
+
}).transform((v) => {
|
|
113
|
+
return remap$(v, {
|
|
114
|
+
"body_html": "bodyHtml",
|
|
115
|
+
"button_cta": "buttonCta",
|
|
116
|
+
"prefix_id": "prefixId",
|
|
117
|
+
"thumbnail_blob": "thumbnailBlob",
|
|
118
|
+
"seller_account": "sellerAccount",
|
|
119
|
+
"media_files_blobs": "mediaFilesBlobs",
|
|
120
|
+
"price_variants": "priceVariants",
|
|
121
|
+
"has_media": "hasMedia",
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export type Product$Outbound = {
|
|
127
|
+
id?: number | undefined;
|
|
128
|
+
name?: string | undefined;
|
|
129
|
+
slug?: string | undefined;
|
|
130
|
+
status?: string | undefined;
|
|
131
|
+
description?: string | undefined;
|
|
132
|
+
body_html?: string | undefined;
|
|
133
|
+
button_cta?: string | undefined;
|
|
134
|
+
prefix_id?: string | undefined;
|
|
135
|
+
thumbnail_blob?: ImageAttachment$Outbound | undefined;
|
|
136
|
+
seller_account?: AccountSlim$Outbound | undefined;
|
|
137
|
+
media_files_blobs?: Array<FileAttachment$Outbound> | undefined;
|
|
138
|
+
reviews?: Array<Review$Outbound> | undefined;
|
|
139
|
+
seo?: Seo$Outbound | undefined;
|
|
140
|
+
price_variants?: Array<PriceVariant$Outbound> | undefined;
|
|
141
|
+
url?: string | undefined;
|
|
142
|
+
has_media?: boolean | undefined;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const Product$outboundSchema: z.ZodType<
|
|
147
|
+
Product$Outbound,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
Product
|
|
150
|
+
> = z.object({
|
|
151
|
+
id: z.number().int().optional(),
|
|
152
|
+
name: z.string().optional(),
|
|
153
|
+
slug: z.string().optional(),
|
|
154
|
+
status: Status$outboundSchema.optional(),
|
|
155
|
+
description: z.string().optional(),
|
|
156
|
+
bodyHtml: z.string().optional(),
|
|
157
|
+
buttonCta: z.string().optional(),
|
|
158
|
+
prefixId: z.string().optional(),
|
|
159
|
+
thumbnailBlob: ImageAttachment$outboundSchema.optional(),
|
|
160
|
+
sellerAccount: AccountSlim$outboundSchema.optional(),
|
|
161
|
+
mediaFilesBlobs: z.array(FileAttachment$outboundSchema).optional(),
|
|
162
|
+
reviews: z.array(Review$outboundSchema).optional(),
|
|
163
|
+
seo: Seo$outboundSchema.optional(),
|
|
164
|
+
priceVariants: z.array(PriceVariant$outboundSchema).optional(),
|
|
165
|
+
url: z.string().optional(),
|
|
166
|
+
hasMedia: z.boolean().optional(),
|
|
167
|
+
}).transform((v) => {
|
|
168
|
+
return remap$(v, {
|
|
169
|
+
bodyHtml: "body_html",
|
|
170
|
+
buttonCta: "button_cta",
|
|
171
|
+
prefixId: "prefix_id",
|
|
172
|
+
thumbnailBlob: "thumbnail_blob",
|
|
173
|
+
sellerAccount: "seller_account",
|
|
174
|
+
mediaFilesBlobs: "media_files_blobs",
|
|
175
|
+
priceVariants: "price_variants",
|
|
176
|
+
hasMedia: "has_media",
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @internal
|
|
182
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
183
|
+
*/
|
|
184
|
+
export namespace Product$ {
|
|
185
|
+
/** @deprecated use `Product$inboundSchema` instead. */
|
|
186
|
+
export const inboundSchema = Product$inboundSchema;
|
|
187
|
+
/** @deprecated use `Product$outboundSchema` instead. */
|
|
188
|
+
export const outboundSchema = Product$outboundSchema;
|
|
189
|
+
/** @deprecated use `Product$Outbound` instead. */
|
|
190
|
+
export type Outbound = Product$Outbound;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export function productToJSON(product: Product): string {
|
|
194
|
+
return JSON.stringify(Product$outboundSchema.parse(product));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export function productFromJSON(
|
|
198
|
+
jsonString: string,
|
|
199
|
+
): SafeParseResult<Product, SDKValidationError> {
|
|
200
|
+
return safeParse(
|
|
201
|
+
jsonString,
|
|
202
|
+
(x) => Product$inboundSchema.parse(JSON.parse(x)),
|
|
203
|
+
`Failed to parse 'Product' from JSON`,
|
|
204
|
+
);
|
|
205
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 Review = {
|
|
12
|
+
id?: number | undefined;
|
|
13
|
+
rating?: number | undefined;
|
|
14
|
+
comment?: string | undefined;
|
|
15
|
+
authorName?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const Review$inboundSchema: z.ZodType<Review, z.ZodTypeDef, unknown> = z
|
|
20
|
+
.object({
|
|
21
|
+
id: z.number().int().optional(),
|
|
22
|
+
rating: z.number().int().optional(),
|
|
23
|
+
comment: z.string().optional(),
|
|
24
|
+
author_name: z.string().optional(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"author_name": "authorName",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type Review$Outbound = {
|
|
33
|
+
id?: number | undefined;
|
|
34
|
+
rating?: number | undefined;
|
|
35
|
+
comment?: string | undefined;
|
|
36
|
+
author_name?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const Review$outboundSchema: z.ZodType<
|
|
41
|
+
Review$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
Review
|
|
44
|
+
> = z.object({
|
|
45
|
+
id: z.number().int().optional(),
|
|
46
|
+
rating: z.number().int().optional(),
|
|
47
|
+
comment: z.string().optional(),
|
|
48
|
+
authorName: z.string().optional(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
authorName: "author_name",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
+
*/
|
|
59
|
+
export namespace Review$ {
|
|
60
|
+
/** @deprecated use `Review$inboundSchema` instead. */
|
|
61
|
+
export const inboundSchema = Review$inboundSchema;
|
|
62
|
+
/** @deprecated use `Review$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema = Review$outboundSchema;
|
|
64
|
+
/** @deprecated use `Review$Outbound` instead. */
|
|
65
|
+
export type Outbound = Review$Outbound;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function reviewToJSON(review: Review): string {
|
|
69
|
+
return JSON.stringify(Review$outboundSchema.parse(review));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function reviewFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<Review, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => Review$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'Review' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|