@quickshops/sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +88 -0
- package/README.md +486 -0
- package/RUNTIMES.md +48 -0
- package/esm/core.d.ts +10 -0
- package/esm/core.d.ts.map +1 -0
- package/esm/core.js +13 -0
- package/esm/core.js.map +1 -0
- package/esm/funcs/cart-cart-add-line.d.ts +15 -0
- package/esm/funcs/cart-cart-add-line.d.ts.map +1 -0
- package/esm/funcs/cart-cart-add-line.js +87 -0
- package/esm/funcs/cart-cart-add-line.js.map +1 -0
- package/esm/funcs/cart-cart-clear.d.ts +15 -0
- package/esm/funcs/cart-cart-clear.d.ts.map +1 -0
- package/esm/funcs/cart-cart-clear.js +86 -0
- package/esm/funcs/cart-cart-clear.js.map +1 -0
- package/esm/funcs/cart-cart-create.d.ts +15 -0
- package/esm/funcs/cart-cart-create.d.ts.map +1 -0
- package/esm/funcs/cart-cart-create.js +70 -0
- package/esm/funcs/cart-cart-create.js.map +1 -0
- package/esm/funcs/cart-cart-get.d.ts +15 -0
- package/esm/funcs/cart-cart-get.d.ts.map +1 -0
- package/esm/funcs/cart-cart-get.js +86 -0
- package/esm/funcs/cart-cart-get.js.map +1 -0
- package/esm/funcs/cart-cart-remove-line.d.ts +15 -0
- package/esm/funcs/cart-cart-remove-line.d.ts.map +1 -0
- package/esm/funcs/cart-cart-remove-line.js +90 -0
- package/esm/funcs/cart-cart-remove-line.js.map +1 -0
- package/esm/funcs/cart-cart-update-line.d.ts +15 -0
- package/esm/funcs/cart-cart-update-line.d.ts.map +1 -0
- package/esm/funcs/cart-cart-update-line.js +91 -0
- package/esm/funcs/cart-cart-update-line.js.map +1 -0
- package/esm/funcs/checkout-checkout-create-session.d.ts +15 -0
- package/esm/funcs/checkout-checkout-create-session.d.ts.map +1 -0
- package/esm/funcs/checkout-checkout-create-session.js +81 -0
- package/esm/funcs/checkout-checkout-create-session.js.map +1 -0
- package/esm/funcs/health-health-check.d.ts +15 -0
- package/esm/funcs/health-health-check.d.ts.map +1 -0
- package/esm/funcs/health-health-check.js +70 -0
- package/esm/funcs/health-health-check.js.map +1 -0
- package/esm/funcs/products-products-get-all.d.ts +15 -0
- package/esm/funcs/products-products-get-all.d.ts.map +1 -0
- package/esm/funcs/products-products-get-all.js +70 -0
- package/esm/funcs/products-products-get-all.js.map +1 -0
- package/esm/funcs/products-products-get-by-id.d.ts +15 -0
- package/esm/funcs/products-products-get-by-id.d.ts.map +1 -0
- package/esm/funcs/products-products-get-by-id.js +86 -0
- package/esm/funcs/products-products-get-by-id.js.map +1 -0
- package/esm/funcs/store-store-get.d.ts +15 -0
- package/esm/funcs/store-store-get.d.ts.map +1 -0
- package/esm/funcs/store-store-get.js +70 -0
- package/esm/funcs/store-store-get.js.map +1 -0
- package/esm/funcs/subscription-subscription-create-portal-session.d.ts +15 -0
- package/esm/funcs/subscription-subscription-create-portal-session.d.ts.map +1 -0
- package/esm/funcs/subscription-subscription-create-portal-session.js +81 -0
- package/esm/funcs/subscription-subscription-create-portal-session.js.map +1 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.d.ts.map +1 -0
- package/esm/hooks/hooks.js +80 -0
- package/esm/hooks/hooks.js.map +1 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.d.ts.map +1 -0
- package/esm/hooks/index.js +6 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/types.d.ts +77 -0
- package/esm/hooks/types.d.ts.map +1 -0
- package/esm/hooks/types.js +5 -0
- package/esm/hooks/types.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +8 -0
- package/esm/index.js.map +1 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.d.ts.map +1 -0
- package/esm/lib/base64.js +31 -0
- package/esm/lib/base64.js.map +1 -0
- package/esm/lib/config.d.ts +30 -0
- package/esm/lib/config.d.ts.map +1 -0
- package/esm/lib/config.js +21 -0
- package/esm/lib/config.js.map +1 -0
- package/esm/lib/encodings.d.ts +54 -0
- package/esm/lib/encodings.d.ts.map +1 -0
- package/esm/lib/encodings.js +391 -0
- package/esm/lib/encodings.js.map +1 -0
- package/esm/lib/env.d.ts +15 -0
- package/esm/lib/env.d.ts.map +1 -0
- package/esm/lib/env.js +44 -0
- package/esm/lib/env.js.map +1 -0
- package/esm/lib/files.d.ts +26 -0
- package/esm/lib/files.d.ts.map +1 -0
- package/esm/lib/files.js +91 -0
- package/esm/lib/files.js.map +1 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.d.ts.map +1 -0
- package/esm/lib/http.js +209 -0
- package/esm/lib/http.js.map +1 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.d.ts.map +1 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/logger.js.map +1 -0
- package/esm/lib/matchers.d.ts +59 -0
- package/esm/lib/matchers.d.ts.map +1 -0
- package/esm/lib/matchers.js +202 -0
- package/esm/lib/matchers.js.map +1 -0
- package/esm/lib/primitives.d.ts +27 -0
- package/esm/lib/primitives.d.ts.map +1 -0
- package/esm/lib/primitives.js +120 -0
- package/esm/lib/primitives.js.map +1 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.d.ts.map +1 -0
- package/esm/lib/retries.js +150 -0
- package/esm/lib/retries.js.map +1 -0
- package/esm/lib/schemas.d.ts +21 -0
- package/esm/lib/schemas.d.ts.map +1 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/schemas.js.map +1 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.d.ts.map +1 -0
- package/esm/lib/sdks.js +294 -0
- package/esm/lib/sdks.js.map +1 -0
- package/esm/lib/security.d.ts +83 -0
- package/esm/lib/security.d.ts.map +1 -0
- package/esm/lib/security.js +149 -0
- package/esm/lib/security.js.map +1 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.d.ts.map +1 -0
- package/esm/lib/url.js +24 -0
- package/esm/lib/url.js.map +1 -0
- package/esm/models/errors/cart-add-line.d.ts +141 -0
- package/esm/models/errors/cart-add-line.d.ts.map +1 -0
- package/esm/models/errors/cart-add-line.js +205 -0
- package/esm/models/errors/cart-add-line.js.map +1 -0
- package/esm/models/errors/cart-clear.d.ts +118 -0
- package/esm/models/errors/cart-clear.d.ts.map +1 -0
- package/esm/models/errors/cart-clear.js +172 -0
- package/esm/models/errors/cart-clear.js.map +1 -0
- package/esm/models/errors/cart-create.d.ts +118 -0
- package/esm/models/errors/cart-create.d.ts.map +1 -0
- package/esm/models/errors/cart-create.js +172 -0
- package/esm/models/errors/cart-create.js.map +1 -0
- package/esm/models/errors/cart-get.d.ts +95 -0
- package/esm/models/errors/cart-get.d.ts.map +1 -0
- package/esm/models/errors/cart-get.js +139 -0
- package/esm/models/errors/cart-get.js.map +1 -0
- package/esm/models/errors/cart-remove-line.d.ts +141 -0
- package/esm/models/errors/cart-remove-line.d.ts.map +1 -0
- package/esm/models/errors/cart-remove-line.js +205 -0
- package/esm/models/errors/cart-remove-line.js.map +1 -0
- package/esm/models/errors/cart-update-line.d.ts +141 -0
- package/esm/models/errors/cart-update-line.d.ts.map +1 -0
- package/esm/models/errors/cart-update-line.js +205 -0
- package/esm/models/errors/cart-update-line.js.map +1 -0
- package/esm/models/errors/checkout-create-session.d.ts +118 -0
- package/esm/models/errors/checkout-create-session.d.ts.map +1 -0
- package/esm/models/errors/checkout-create-session.js +172 -0
- package/esm/models/errors/checkout-create-session.js.map +1 -0
- package/esm/models/errors/health-check.d.ts +72 -0
- package/esm/models/errors/health-check.d.ts.map +1 -0
- package/esm/models/errors/health-check.js +106 -0
- package/esm/models/errors/health-check.js.map +1 -0
- package/esm/models/errors/http-client-errors.d.ts +44 -0
- package/esm/models/errors/http-client-errors.d.ts.map +1 -0
- package/esm/models/errors/http-client-errors.js +56 -0
- package/esm/models/errors/http-client-errors.js.map +1 -0
- package/esm/models/errors/index.d.ts +18 -0
- package/esm/models/errors/index.d.ts.map +1 -0
- package/esm/models/errors/index.js +21 -0
- package/esm/models/errors/index.js.map +1 -0
- package/esm/models/errors/products-get-all.d.ts +72 -0
- package/esm/models/errors/products-get-all.d.ts.map +1 -0
- package/esm/models/errors/products-get-all.js +106 -0
- package/esm/models/errors/products-get-all.js.map +1 -0
- package/esm/models/errors/products-get-by-id.d.ts +95 -0
- package/esm/models/errors/products-get-by-id.d.ts.map +1 -0
- package/esm/models/errors/products-get-by-id.js +139 -0
- package/esm/models/errors/products-get-by-id.js.map +1 -0
- package/esm/models/errors/quickshops-default-error.d.ts +10 -0
- package/esm/models/errors/quickshops-default-error.d.ts.map +1 -0
- package/esm/models/errors/quickshops-default-error.js +30 -0
- package/esm/models/errors/quickshops-default-error.js.map +1 -0
- package/esm/models/errors/quickshops-error.d.ts +19 -0
- package/esm/models/errors/quickshops-error.d.ts.map +1 -0
- package/esm/models/errors/quickshops-error.js +26 -0
- package/esm/models/errors/quickshops-error.js.map +1 -0
- package/esm/models/errors/response-validation-error.d.ts +26 -0
- package/esm/models/errors/response-validation-error.d.ts.map +1 -0
- package/esm/models/errors/response-validation-error.js +37 -0
- package/esm/models/errors/response-validation-error.js.map +1 -0
- package/esm/models/errors/sdk-validation-error.d.ts +21 -0
- package/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/esm/models/errors/sdk-validation-error.js +52 -0
- package/esm/models/errors/sdk-validation-error.js.map +1 -0
- package/esm/models/errors/store-get.d.ts +95 -0
- package/esm/models/errors/store-get.d.ts.map +1 -0
- package/esm/models/errors/store-get.js +139 -0
- package/esm/models/errors/store-get.js.map +1 -0
- package/esm/models/errors/subscription-create-portal-session.d.ts +118 -0
- package/esm/models/errors/subscription-create-portal-session.d.ts.map +1 -0
- package/esm/models/errors/subscription-create-portal-session.js +175 -0
- package/esm/models/errors/subscription-create-portal-session.js.map +1 -0
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.d.ts.map +1 -0
- package/esm/models/index.js +5 -0
- package/esm/models/index.js.map +1 -0
- package/esm/models/operations/cart-add-line.d.ts +61 -0
- package/esm/models/operations/cart-add-line.d.ts.map +1 -0
- package/esm/models/operations/cart-add-line.js +57 -0
- package/esm/models/operations/cart-add-line.js.map +1 -0
- package/esm/models/operations/cart-clear.d.ts +47 -0
- package/esm/models/operations/cart-clear.d.ts.map +1 -0
- package/esm/models/operations/cart-clear.js +48 -0
- package/esm/models/operations/cart-clear.js.map +1 -0
- package/esm/models/operations/cart-create.d.ts +37 -0
- package/esm/models/operations/cart-create.d.ts.map +1 -0
- package/esm/models/operations/cart-create.js +41 -0
- package/esm/models/operations/cart-create.js.map +1 -0
- package/esm/models/operations/cart-get.d.ts +47 -0
- package/esm/models/operations/cart-get.d.ts.map +1 -0
- package/esm/models/operations/cart-get.js +50 -0
- package/esm/models/operations/cart-get.js.map +1 -0
- package/esm/models/operations/cart-remove-line.d.ts +49 -0
- package/esm/models/operations/cart-remove-line.d.ts.map +1 -0
- package/esm/models/operations/cart-remove-line.js +49 -0
- package/esm/models/operations/cart-remove-line.js.map +1 -0
- package/esm/models/operations/cart-update-line.d.ts +61 -0
- package/esm/models/operations/cart-update-line.d.ts.map +1 -0
- package/esm/models/operations/cart-update-line.js +57 -0
- package/esm/models/operations/cart-update-line.js.map +1 -0
- package/esm/models/operations/checkout-create-session.d.ts +29 -0
- package/esm/models/operations/checkout-create-session.d.ts.map +1 -0
- package/esm/models/operations/checkout-create-session.js +28 -0
- package/esm/models/operations/checkout-create-session.js.map +1 -0
- package/esm/models/operations/health-check.d.ts +13 -0
- package/esm/models/operations/health-check.d.ts.map +1 -0
- package/esm/models/operations/health-check.js +14 -0
- package/esm/models/operations/health-check.js.map +1 -0
- package/esm/models/operations/index.d.ts +13 -0
- package/esm/models/operations/index.d.ts.map +1 -0
- package/esm/models/operations/index.js +16 -0
- package/esm/models/operations/index.js.map +1 -0
- package/esm/models/operations/products-get-all.d.ts +45 -0
- package/esm/models/operations/products-get-all.d.ts.map +1 -0
- package/esm/models/operations/products-get-all.js +50 -0
- package/esm/models/operations/products-get-all.js.map +1 -0
- package/esm/models/operations/products-get-by-id.d.ts +55 -0
- package/esm/models/operations/products-get-by-id.d.ts.map +1 -0
- package/esm/models/operations/products-get-by-id.js +57 -0
- package/esm/models/operations/products-get-by-id.js.map +1 -0
- package/esm/models/operations/store-get.d.ts +31 -0
- package/esm/models/operations/store-get.d.ts.map +1 -0
- package/esm/models/operations/store-get.js +39 -0
- package/esm/models/operations/store-get.js.map +1 -0
- package/esm/models/operations/subscription-create-portal-session.d.ts +29 -0
- package/esm/models/operations/subscription-create-portal-session.d.ts.map +1 -0
- package/esm/models/operations/subscription-create-portal-session.js +28 -0
- package/esm/models/operations/subscription-create-portal-session.js.map +1 -0
- package/esm/models/security.d.ts +12 -0
- package/esm/models/security.d.ts.map +1 -0
- package/esm/models/security.js +17 -0
- package/esm/models/security.js.map +1 -0
- package/esm/sdk/cart.d.ts +29 -0
- package/esm/sdk/cart.d.ts.map +1 -0
- package/esm/sdk/cart.js +50 -0
- package/esm/sdk/cart.js.map +1 -0
- package/esm/sdk/checkout.d.ts +9 -0
- package/esm/sdk/checkout.d.ts.map +1 -0
- package/esm/sdk/checkout.js +15 -0
- package/esm/sdk/checkout.js.map +1 -0
- package/esm/sdk/health.d.ts +9 -0
- package/esm/sdk/health.d.ts.map +1 -0
- package/esm/sdk/health.js +15 -0
- package/esm/sdk/health.js.map +1 -0
- package/esm/sdk/index.d.ts +2 -0
- package/esm/sdk/index.d.ts.map +1 -0
- package/esm/sdk/index.js +5 -0
- package/esm/sdk/index.js.map +1 -0
- package/esm/sdk/products.d.ts +13 -0
- package/esm/sdk/products.d.ts.map +1 -0
- package/esm/sdk/products.js +22 -0
- package/esm/sdk/products.js.map +1 -0
- package/esm/sdk/sdk.d.ts +22 -0
- package/esm/sdk/sdk.d.ts.map +1 -0
- package/esm/sdk/sdk.js +37 -0
- package/esm/sdk/sdk.js.map +1 -0
- package/esm/sdk/store.d.ts +9 -0
- package/esm/sdk/store.d.ts.map +1 -0
- package/esm/sdk/store.js +15 -0
- package/esm/sdk/store.js.map +1 -0
- package/esm/sdk/subscription.d.ts +9 -0
- package/esm/sdk/subscription.d.ts.map +1 -0
- package/esm/sdk/subscription.js +15 -0
- package/esm/sdk/subscription.js.map +1 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.d.ts.map +1 -0
- package/esm/types/async.js +28 -0
- package/esm/types/async.js.map +1 -0
- package/esm/types/blobs.d.ts +4 -0
- package/esm/types/blobs.d.ts.map +1 -0
- package/esm/types/blobs.js +25 -0
- package/esm/types/blobs.js.map +1 -0
- package/esm/types/const-date-time.d.ts +3 -0
- package/esm/types/const-date-time.d.ts.map +1 -0
- package/esm/types/const-date-time.js +10 -0
- package/esm/types/const-date-time.js.map +1 -0
- package/esm/types/default-to-zero-value.d.ts +12 -0
- package/esm/types/default-to-zero-value.d.ts.map +1 -0
- package/esm/types/default-to-zero-value.js +31 -0
- package/esm/types/default-to-zero-value.js.map +1 -0
- package/esm/types/enums.d.ts +9 -0
- package/esm/types/enums.d.ts.map +1 -0
- package/esm/types/enums.js +27 -0
- package/esm/types/enums.js.map +1 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.d.ts.map +1 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/fp.js.map +1 -0
- package/esm/types/index.d.ts +10 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +10 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/operations.d.ts +27 -0
- package/esm/types/operations.d.ts.map +1 -0
- package/esm/types/operations.js +77 -0
- package/esm/types/operations.js.map +1 -0
- package/esm/types/primitives.d.ts +9 -0
- package/esm/types/primitives.d.ts.map +1 -0
- package/esm/types/primitives.js +109 -0
- package/esm/types/primitives.js.map +1 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.d.ts.map +1 -0
- package/esm/types/rfcdate.js +43 -0
- package/esm/types/rfcdate.js.map +1 -0
- package/esm/types/smart-union.d.ts +7 -0
- package/esm/types/smart-union.d.ts.map +1 -0
- package/esm/types/smart-union.js +117 -0
- package/esm/types/smart-union.js.map +1 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.d.ts.map +1 -0
- package/esm/types/streams.js +15 -0
- package/esm/types/streams.js.map +1 -0
- package/esm/types/unrecognized.d.ts +16 -0
- package/esm/types/unrecognized.d.ts.map +1 -0
- package/esm/types/unrecognized.js +31 -0
- package/esm/types/unrecognized.js.map +1 -0
- package/examples/healthHealthCheck.example.ts +27 -0
- package/examples/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/examples/node_modules/@types/node/assert.d.ts +1062 -0
- package/examples/node_modules/@types/node/async_hooks.d.ts +605 -0
- package/examples/node_modules/@types/node/buffer.buffer.d.ts +471 -0
- package/examples/node_modules/@types/node/buffer.d.ts +1936 -0
- package/examples/node_modules/@types/node/child_process.d.ts +1475 -0
- package/examples/node_modules/@types/node/cluster.d.ts +577 -0
- package/examples/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/examples/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/examples/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/examples/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/examples/node_modules/@types/node/console.d.ts +452 -0
- package/examples/node_modules/@types/node/constants.d.ts +21 -0
- package/examples/node_modules/@types/node/crypto.d.ts +4590 -0
- package/examples/node_modules/@types/node/dgram.d.ts +597 -0
- package/examples/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
- package/examples/node_modules/@types/node/dns/promises.d.ts +479 -0
- package/examples/node_modules/@types/node/dns.d.ts +871 -0
- package/examples/node_modules/@types/node/domain.d.ts +170 -0
- package/examples/node_modules/@types/node/events.d.ts +977 -0
- package/examples/node_modules/@types/node/fs/promises.d.ts +1270 -0
- package/examples/node_modules/@types/node/fs.d.ts +4375 -0
- package/examples/node_modules/@types/node/globals.d.ts +172 -0
- package/examples/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/examples/node_modules/@types/node/http.d.ts +2049 -0
- package/examples/node_modules/@types/node/http2.d.ts +2712 -0
- package/examples/node_modules/@types/node/https.d.ts +578 -0
- package/examples/node_modules/@types/node/index.d.ts +93 -0
- package/examples/node_modules/@types/node/inspector.generated.d.ts +3966 -0
- package/examples/node_modules/@types/node/module.d.ts +539 -0
- package/examples/node_modules/@types/node/net.d.ts +1031 -0
- package/examples/node_modules/@types/node/os.d.ts +506 -0
- package/examples/node_modules/@types/node/path.d.ts +200 -0
- package/examples/node_modules/@types/node/perf_hooks.d.ts +961 -0
- package/examples/node_modules/@types/node/process.d.ts +1961 -0
- package/examples/node_modules/@types/node/punycode.d.ts +117 -0
- package/examples/node_modules/@types/node/querystring.d.ts +152 -0
- package/examples/node_modules/@types/node/readline/promises.d.ts +162 -0
- package/examples/node_modules/@types/node/readline.d.ts +589 -0
- package/examples/node_modules/@types/node/repl.d.ts +430 -0
- package/examples/node_modules/@types/node/sea.d.ts +153 -0
- package/examples/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/examples/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/examples/node_modules/@types/node/stream/web.d.ts +533 -0
- package/examples/node_modules/@types/node/stream.d.ts +1698 -0
- package/examples/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/examples/node_modules/@types/node/test.d.ts +1787 -0
- package/examples/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/examples/node_modules/@types/node/timers.d.ts +286 -0
- package/examples/node_modules/@types/node/tls.d.ts +1259 -0
- package/examples/node_modules/@types/node/trace_events.d.ts +197 -0
- package/examples/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/examples/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/examples/node_modules/@types/node/ts5.6/index.d.ts +93 -0
- package/examples/node_modules/@types/node/tty.d.ts +208 -0
- package/examples/node_modules/@types/node/url.d.ts +964 -0
- package/examples/node_modules/@types/node/util.d.ts +2331 -0
- package/examples/node_modules/@types/node/v8.d.ts +809 -0
- package/examples/node_modules/@types/node/vm.d.ts +1001 -0
- package/examples/node_modules/@types/node/wasi.d.ts +181 -0
- package/examples/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/examples/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/examples/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/examples/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
- package/examples/node_modules/@types/node/worker_threads.d.ts +715 -0
- package/examples/node_modules/@types/node/zlib.d.ts +598 -0
- package/examples/node_modules/dotenv/config.d.ts +1 -0
- package/examples/node_modules/dotenv/config.js +9 -0
- package/examples/node_modules/dotenv/lib/cli-options.js +17 -0
- package/examples/node_modules/dotenv/lib/env-options.js +28 -0
- package/examples/node_modules/dotenv/lib/main.d.ts +162 -0
- package/examples/node_modules/dotenv/lib/main.js +386 -0
- package/examples/node_modules/esbuild/install.js +300 -0
- package/examples/node_modules/esbuild/lib/main.d.ts +716 -0
- package/examples/node_modules/esbuild/lib/main.js +2532 -0
- package/examples/node_modules/fsevents/fsevents.d.ts +46 -0
- package/examples/node_modules/fsevents/fsevents.js +83 -0
- package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/cli.mjs +55 -0
- package/examples/node_modules/tsx/dist/client-D_mPDF5S.mjs +1 -0
- package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/esm/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/get-pipe-path-_tAJyU_v.mjs +1 -0
- package/examples/node_modules/tsx/dist/index-XurvG3JN.mjs +14 -0
- package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +1 -0
- package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +3 -0
- package/examples/node_modules/tsx/dist/loader.mjs +1 -0
- package/examples/node_modules/tsx/dist/node-features-B9BBLzwu.mjs +1 -0
- package/examples/node_modules/tsx/dist/package-Bj47PlGH.mjs +1 -0
- package/examples/node_modules/tsx/dist/patch-repl.mjs +1 -0
- package/examples/node_modules/tsx/dist/preflight.mjs +1 -0
- package/examples/node_modules/tsx/dist/register-BnTWPeIB.mjs +10 -0
- package/examples/node_modules/tsx/dist/register-CqMfTiWi.mjs +2 -0
- package/examples/node_modules/tsx/dist/repl.mjs +3 -0
- package/examples/node_modules/tsx/dist/require-DzmC1hVr.mjs +1 -0
- package/examples/node_modules/tsx/dist/suppress-warnings.mjs +1 -0
- package/examples/node_modules/tsx/dist/temporary-directory-BDDVQOvU.mjs +1 -0
- package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +5 -0
- package/examples/node_modules/undici-types/agent.d.ts +31 -0
- package/examples/node_modules/undici-types/api.d.ts +43 -0
- package/examples/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/examples/node_modules/undici-types/cache.d.ts +36 -0
- package/examples/node_modules/undici-types/client.d.ts +108 -0
- package/examples/node_modules/undici-types/connector.d.ts +34 -0
- package/examples/node_modules/undici-types/content-type.d.ts +21 -0
- package/examples/node_modules/undici-types/cookies.d.ts +28 -0
- package/examples/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/examples/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/examples/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/examples/node_modules/undici-types/errors.d.ts +149 -0
- package/examples/node_modules/undici-types/eventsource.d.ts +61 -0
- package/examples/node_modules/undici-types/fetch.d.ts +209 -0
- package/examples/node_modules/undici-types/file.d.ts +39 -0
- package/examples/node_modules/undici-types/filereader.d.ts +54 -0
- package/examples/node_modules/undici-types/formdata.d.ts +108 -0
- package/examples/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/examples/node_modules/undici-types/global-origin.d.ts +7 -0
- package/examples/node_modules/undici-types/handlers.d.ts +15 -0
- package/examples/node_modules/undici-types/header.d.ts +4 -0
- package/examples/node_modules/undici-types/index.d.ts +71 -0
- package/examples/node_modules/undici-types/interceptors.d.ts +17 -0
- package/examples/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/examples/node_modules/undici-types/mock-client.d.ts +25 -0
- package/examples/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/examples/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/examples/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/examples/node_modules/undici-types/patch.d.ts +33 -0
- package/examples/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/examples/node_modules/undici-types/pool.d.ts +39 -0
- package/examples/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/examples/node_modules/undici-types/readable.d.ts +65 -0
- package/examples/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/examples/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/examples/node_modules/undici-types/util.d.ts +18 -0
- package/examples/node_modules/undici-types/webidl.d.ts +228 -0
- package/examples/node_modules/undici-types/websocket.d.ts +150 -0
- package/jsr.json +27 -0
- package/package.json +63 -0
- package/src/core.ts +13 -0
- package/src/funcs/cart-cart-add-line.ts +195 -0
- package/src/funcs/cart-cart-clear.ts +190 -0
- package/src/funcs/cart-cart-create.ts +166 -0
- package/src/funcs/cart-cart-get.ts +186 -0
- package/src/funcs/cart-cart-remove-line.ts +198 -0
- package/src/funcs/cart-cart-update-line.ts +199 -0
- package/src/funcs/checkout-checkout-create-session.ts +189 -0
- package/src/funcs/health-health-check.ts +158 -0
- package/src/funcs/products-products-get-all.ts +158 -0
- package/src/funcs/products-products-get-by-id.ts +186 -0
- package/src/funcs/store-store-get.ts +162 -0
- package/src/funcs/subscription-subscription-create-portal-session.ts +207 -0
- package/src/hooks/hooks.ts +129 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +108 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +39 -0
- package/src/lib/config.ts +49 -0
- package/src/lib/encodings.ts +529 -0
- package/src/lib/env.ts +61 -0
- package/src/lib/files.ts +104 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +353 -0
- package/src/lib/primitives.ts +166 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +94 -0
- package/src/lib/sdks.ts +442 -0
- package/src/lib/security.ts +275 -0
- package/src/lib/url.ts +35 -0
- package/src/models/errors/cart-add-line.ts +337 -0
- package/src/models/errors/cart-clear.ts +282 -0
- package/src/models/errors/cart-create.ts +282 -0
- package/src/models/errors/cart-get.ts +227 -0
- package/src/models/errors/cart-remove-line.ts +337 -0
- package/src/models/errors/cart-update-line.ts +337 -0
- package/src/models/errors/checkout-create-session.ts +278 -0
- package/src/models/errors/health-check.ts +172 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +21 -0
- package/src/models/errors/products-get-all.ts +172 -0
- package/src/models/errors/products-get-by-id.ts +227 -0
- package/src/models/errors/quickshops-default-error.ts +40 -0
- package/src/models/errors/quickshops-error.ts +35 -0
- package/src/models/errors/response-validation-error.ts +50 -0
- package/src/models/errors/sdk-validation-error.ts +54 -0
- package/src/models/errors/store-get.ts +227 -0
- package/src/models/errors/subscription-create-portal-session.ts +286 -0
- package/src/models/index.ts +5 -0
- package/src/models/operations/cart-add-line.ts +168 -0
- package/src/models/operations/cart-clear.ts +137 -0
- package/src/models/operations/cart-create.ts +112 -0
- package/src/models/operations/cart-get.ts +129 -0
- package/src/models/operations/cart-remove-line.ts +140 -0
- package/src/models/operations/cart-update-line.ts +168 -0
- package/src/models/operations/checkout-create-session.ts +83 -0
- package/src/models/operations/health-check.ts +34 -0
- package/src/models/operations/index.ts +16 -0
- package/src/models/operations/products-get-all.ts +116 -0
- package/src/models/operations/products-get-by-id.ts +141 -0
- package/src/models/operations/store-get.ts +96 -0
- package/src/models/operations/subscription-create-portal-session.ts +90 -0
- package/src/models/security.ts +34 -0
- package/src/sdk/cart.ts +97 -0
- package/src/sdk/checkout.ts +24 -0
- package/src/sdk/health.ts +22 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/products.ts +37 -0
- package/src/sdk/sdk.ts +43 -0
- package/src/sdk/store.ts +22 -0
- package/src/sdk/subscription.ts +24 -0
- package/src/types/async.ts +69 -0
- package/src/types/blobs.ts +33 -0
- package/src/types/const-date-time.ts +15 -0
- package/src/types/default-to-zero-value.ts +33 -0
- package/src/types/enums.ts +45 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +13 -0
- package/src/types/operations.ts +105 -0
- package/src/types/primitives.ts +140 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/smart-union.ts +153 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { defaultToZeroValue } from "./default-to-zero-value.js";
|
|
6
|
+
import { unrecognized } from "./unrecognized.js";
|
|
7
|
+
export function string() {
|
|
8
|
+
return z.union([
|
|
9
|
+
z.string(),
|
|
10
|
+
// Null or undefined -> ""
|
|
11
|
+
zodDefaultToZeroValue(""),
|
|
12
|
+
// Any other value -> String(x)
|
|
13
|
+
z.pipe(z.any(), z.transform((x) => unrecognized(JSON.stringify(x)))),
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
export function boolean() {
|
|
17
|
+
return z.union([
|
|
18
|
+
z.boolean(),
|
|
19
|
+
// String "true" (case insensitive) -> true, "false" -> false
|
|
20
|
+
z.pipe(z.string(), z.transform((x, ctx) => {
|
|
21
|
+
const lower = x.toLowerCase();
|
|
22
|
+
if (lower === "true")
|
|
23
|
+
return unrecognized(true);
|
|
24
|
+
if (lower === "false")
|
|
25
|
+
return unrecognized(false);
|
|
26
|
+
ctx.issues.push({
|
|
27
|
+
input: x,
|
|
28
|
+
code: "invalid_type",
|
|
29
|
+
expected: "boolean",
|
|
30
|
+
received: "string",
|
|
31
|
+
});
|
|
32
|
+
return z.NEVER;
|
|
33
|
+
})),
|
|
34
|
+
zodDefaultToZeroValue(false),
|
|
35
|
+
]);
|
|
36
|
+
}
|
|
37
|
+
export function number() {
|
|
38
|
+
return z.union([
|
|
39
|
+
z.number(),
|
|
40
|
+
// String -> Number
|
|
41
|
+
z.pipe(z.string(), z.transform((x, ctx) => {
|
|
42
|
+
const num = Number(x);
|
|
43
|
+
if (isNaN(num)) {
|
|
44
|
+
ctx.issues.push({
|
|
45
|
+
input: x,
|
|
46
|
+
code: "invalid_type",
|
|
47
|
+
expected: "number",
|
|
48
|
+
received: "string",
|
|
49
|
+
});
|
|
50
|
+
return z.NEVER;
|
|
51
|
+
}
|
|
52
|
+
return unrecognized(num);
|
|
53
|
+
})),
|
|
54
|
+
// Null or undefined -> 0
|
|
55
|
+
zodDefaultToZeroValue(0),
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
export function date() {
|
|
59
|
+
return z.union([
|
|
60
|
+
z.pipe(z.pipe(z.union([z.string(), zodDefaultToZeroValue(0)]), z.transform((x) => new Date(x))), z.date()),
|
|
61
|
+
z.pipe(z.number(), z.transform((x, ctx) => {
|
|
62
|
+
const date = new Date(x);
|
|
63
|
+
if (isNaN(date.getTime())) {
|
|
64
|
+
ctx.issues.push({
|
|
65
|
+
input: x,
|
|
66
|
+
code: "invalid_type",
|
|
67
|
+
expected: "date",
|
|
68
|
+
received: "number",
|
|
69
|
+
});
|
|
70
|
+
return z.NEVER;
|
|
71
|
+
}
|
|
72
|
+
return unrecognized(date);
|
|
73
|
+
})),
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
export function literal(value) {
|
|
77
|
+
return z.union([z.literal(value), zodDefaultToZeroValue(value)]);
|
|
78
|
+
}
|
|
79
|
+
export function optional(t) {
|
|
80
|
+
return z.optional(z.union([
|
|
81
|
+
// Null -> undefined
|
|
82
|
+
z.pipe(z.null(), z.transform(() => unrecognized(undefined))),
|
|
83
|
+
t,
|
|
84
|
+
]));
|
|
85
|
+
}
|
|
86
|
+
export function nullable(t) {
|
|
87
|
+
return z.union([
|
|
88
|
+
z.null(),
|
|
89
|
+
// Undefined -> null
|
|
90
|
+
z.pipe(z.undefined(), z.transform(() => defaultToZeroValue(null))),
|
|
91
|
+
t,
|
|
92
|
+
]);
|
|
93
|
+
}
|
|
94
|
+
function zodDefaultToZeroValue(value) {
|
|
95
|
+
return z.pipe(z.any(), z.transform((input, ctx) => {
|
|
96
|
+
if (input === undefined)
|
|
97
|
+
return defaultToZeroValue(value);
|
|
98
|
+
if (input === null)
|
|
99
|
+
return defaultToZeroValue(value);
|
|
100
|
+
ctx.issues.push({
|
|
101
|
+
input: input,
|
|
102
|
+
code: "invalid_type",
|
|
103
|
+
expected: "undefined",
|
|
104
|
+
received: "unknown",
|
|
105
|
+
});
|
|
106
|
+
return z.NEVER;
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/types/primitives.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,UAAU,MAAM,GAA0B;IAC9C,OAAO,CAAC,CAAC,KAAK,CAAC;QACb,CAAC,CAAC,MAAM,EAAE;QAEV,0BAA0B;QAC1B,qBAAqB,CAAC,EAAE,CAAC;QAEzB,+BAA+B;QAC/B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,C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CAAC,CAAC,KAAK,CAAC;IAAA,CAChB,CAAC,CACH,CAAC;AAAA,CACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class RFCDate {
|
|
2
|
+
private serialized;
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new RFCDate instance using today's date.
|
|
5
|
+
*/
|
|
6
|
+
static today(): RFCDate;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new RFCDate instance using the provided input.
|
|
9
|
+
* If a string is used then in must be in the format YYYY-MM-DD.
|
|
10
|
+
*
|
|
11
|
+
* @param date A Date object or a date string in YYYY-MM-DD format
|
|
12
|
+
* @example
|
|
13
|
+
* new RFCDate("2022-01-01")
|
|
14
|
+
* @example
|
|
15
|
+
* new RFCDate(new Date())
|
|
16
|
+
*/
|
|
17
|
+
constructor(date: Date | string);
|
|
18
|
+
toJSON(): string;
|
|
19
|
+
toString(): string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=rfcdate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rfcdate.d.ts","sourceRoot":"","sources":["../../src/types/rfcdate.ts"],"names":[],"mappings":"AAMA,qBAAa,OAAO;IAClB,OAAO,CAAC,UAAU,CAAS;IAE3B;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,OAAO,CAEtB;IAED;;;;;;;;;OASG;IACH,YAAY,IAAI,EAAE,IAAI,GAAG,MAAM,EAkB9B;IAED,MAAM,IAAI,MAAM,CAEf;IAED,QAAQ,IAAI,MAAM,CAEjB;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
const dateRE = /^\d{4}-\d{2}-\d{2}$/;
|
|
5
|
+
export class RFCDate {
|
|
6
|
+
serialized;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new RFCDate instance using today's date.
|
|
9
|
+
*/
|
|
10
|
+
static today() {
|
|
11
|
+
return new RFCDate(new Date());
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new RFCDate instance using the provided input.
|
|
15
|
+
* If a string is used then in must be in the format YYYY-MM-DD.
|
|
16
|
+
*
|
|
17
|
+
* @param date A Date object or a date string in YYYY-MM-DD format
|
|
18
|
+
* @example
|
|
19
|
+
* new RFCDate("2022-01-01")
|
|
20
|
+
* @example
|
|
21
|
+
* new RFCDate(new Date())
|
|
22
|
+
*/
|
|
23
|
+
constructor(date) {
|
|
24
|
+
if (typeof date === "string" && !dateRE.test(date)) {
|
|
25
|
+
throw new RangeError("RFCDate: date strings must be in the format YYYY-MM-DD: " + date);
|
|
26
|
+
}
|
|
27
|
+
const value = new Date(date);
|
|
28
|
+
if (isNaN(+value)) {
|
|
29
|
+
throw new RangeError("RFCDate: invalid date provided: " + date);
|
|
30
|
+
}
|
|
31
|
+
this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length);
|
|
32
|
+
if (!dateRE.test(this.serialized)) {
|
|
33
|
+
throw new TypeError(`RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
toJSON() {
|
|
37
|
+
return this.toString();
|
|
38
|
+
}
|
|
39
|
+
toString() {
|
|
40
|
+
return this.serialized;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=rfcdate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rfcdate.js","sourceRoot":"","sources":["../../src/types/rfcdate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,GAAG,qBAAqB,CAAC;AAErC,MAAM,OAAO,OAAO;IACV,UAAU,CAAS;IAE3B;;OAEG;IACH,MAAM,CAAC,KAAK,GAAY;QACtB,OAAO,IAAI,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAAA,CAChC;IAED;;;;;;;;;OASG;IACH,YAAY,IAAmB,EAAE;QAC/B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACnD,MAAM,IAAI,UAAU,CAClB,0DAA0D,GAAG,IAAI,CAClE,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YAClB,MAAM,IAAI,UAAU,CAAC,kCAAkC,GAAG,IAAI,CAAC,CAAC;QAClE,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,SAAS,CACjB,yDAAyD,IAAI,kBAAkB,IAAI,CAAC,UAAU,EAAE,CACjG,CAAC;QACJ,CAAC;IAAA,CACF;IAED,MAAM,GAAW;QACf,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAAA,CACxB;IAED,QAAQ,GAAW;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC;IAAA,CACxB;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
/**
|
|
3
|
+
* Smart union parser that tries all schemas and returns the best match
|
|
4
|
+
* based on the number of populated fields.
|
|
5
|
+
*/
|
|
6
|
+
export declare function smartUnion<Options extends readonly [z.ZodMiniType, z.ZodMiniType, ...z.ZodMiniType[]]>(options: Options): z.ZodMiniType<z.output<Options[number]>, z.input<Options[number]>>;
|
|
7
|
+
//# sourceMappingURL=smart-union.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-union.d.ts","sourceRoot":"","sources":["../../src/types/smart-union.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAejC;;;GAGG;AACH,wBAAgB,UAAU,CACxB,OAAO,SAAS,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,EAE3E,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CA2DpE"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
// Not needed if lax mode
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { startCountingDefaultToZeroValue } from "./default-to-zero-value.js";
|
|
7
|
+
import { RFCDate } from "./rfcdate.js";
|
|
8
|
+
import { startCountingUnrecognized } from "./unrecognized.js";
|
|
9
|
+
/**
|
|
10
|
+
* Smart union parser that tries all schemas and returns the best match
|
|
11
|
+
* based on the number of populated fields.
|
|
12
|
+
*/
|
|
13
|
+
export function smartUnion(options) {
|
|
14
|
+
return z.pipe(z.unknown(), z.transform((input, ctx) => {
|
|
15
|
+
const candidates = [];
|
|
16
|
+
const errors = options.map(() => []);
|
|
17
|
+
const parentUnrecognizedCtr = startCountingUnrecognized();
|
|
18
|
+
const parentZeroDefaultCtr = startCountingDefaultToZeroValue();
|
|
19
|
+
// Filter out invalid options
|
|
20
|
+
for (const [i, option] of options.entries()) {
|
|
21
|
+
const unrecognizedCtr = startCountingUnrecognized();
|
|
22
|
+
const zeroDefaultCtr = startCountingDefaultToZeroValue();
|
|
23
|
+
const result = option.safeParse(input);
|
|
24
|
+
const inexactCount = unrecognizedCtr.end();
|
|
25
|
+
const zeroDefaultCount = zeroDefaultCtr.end();
|
|
26
|
+
if (result.success) {
|
|
27
|
+
candidates.push({
|
|
28
|
+
data: result.data,
|
|
29
|
+
inexactCount,
|
|
30
|
+
zeroDefaultCount,
|
|
31
|
+
fieldCount: -1, // We'll count this later if needed
|
|
32
|
+
});
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
errors[i].push(...result.error.issues);
|
|
36
|
+
}
|
|
37
|
+
// No valid options
|
|
38
|
+
if (candidates.length === 0) {
|
|
39
|
+
parentUnrecognizedCtr.end(0);
|
|
40
|
+
parentZeroDefaultCtr.end(0);
|
|
41
|
+
ctx.issues.push({
|
|
42
|
+
input: input,
|
|
43
|
+
code: "invalid_union",
|
|
44
|
+
errors: errors,
|
|
45
|
+
});
|
|
46
|
+
return z.NEVER;
|
|
47
|
+
}
|
|
48
|
+
let best = candidates[0];
|
|
49
|
+
// Find the best option
|
|
50
|
+
for (const candidate of candidates) {
|
|
51
|
+
// Minor optimization to avoid counting fields if there's only one candidate
|
|
52
|
+
if (candidates.length > 1) {
|
|
53
|
+
candidate.fieldCount = countFieldsRecursive(candidate.data);
|
|
54
|
+
}
|
|
55
|
+
best = better(candidate, best);
|
|
56
|
+
}
|
|
57
|
+
// The cost of this union should be the cost of the best candidate not all the candidates
|
|
58
|
+
parentUnrecognizedCtr.end(best.inexactCount);
|
|
59
|
+
parentZeroDefaultCtr.end(best.zeroDefaultCount);
|
|
60
|
+
return best.data;
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
function better(a, b) {
|
|
64
|
+
// First prefer exact matches over inexact ones
|
|
65
|
+
const aIsExact = a.inexactCount === 0;
|
|
66
|
+
const bIsExact = b.inexactCount === 0;
|
|
67
|
+
if (aIsExact !== bIsExact) {
|
|
68
|
+
return aIsExact ? a : b;
|
|
69
|
+
}
|
|
70
|
+
// Then compare field counts
|
|
71
|
+
const actualFieldCountA = a.fieldCount - a.zeroDefaultCount;
|
|
72
|
+
const actualFieldCountB = b.fieldCount - b.zeroDefaultCount;
|
|
73
|
+
if (actualFieldCountA !== actualFieldCountB) {
|
|
74
|
+
return actualFieldCountA > actualFieldCountB ? a : b;
|
|
75
|
+
}
|
|
76
|
+
return a.inexactCount < b.inexactCount ? a : b;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Counts the number of fields in a parsed value recursively.
|
|
80
|
+
* @param `parsed` assumed to *not* contain cycles
|
|
81
|
+
* fieldCount: total number of fields found
|
|
82
|
+
* inexactCount: number of primitive values that are not unrecognized enum values
|
|
83
|
+
*/
|
|
84
|
+
function countFieldsRecursive(parsed) {
|
|
85
|
+
let fieldCount = 0;
|
|
86
|
+
const queue = [parsed];
|
|
87
|
+
let index = 0;
|
|
88
|
+
while (index < queue.length) {
|
|
89
|
+
const value = queue[index++];
|
|
90
|
+
if (value === undefined) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
// Check if it's a primitive value
|
|
94
|
+
const type = typeof value;
|
|
95
|
+
if (value === null
|
|
96
|
+
|| type === "number"
|
|
97
|
+
|| type === "string"
|
|
98
|
+
|| type === "boolean"
|
|
99
|
+
|| type === "bigint"
|
|
100
|
+
|| value instanceof Date
|
|
101
|
+
|| value instanceof RFCDate) {
|
|
102
|
+
fieldCount++;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
// Handle arrays
|
|
106
|
+
if (Array.isArray(value)) {
|
|
107
|
+
queue.push(...value);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
// Handle objects
|
|
111
|
+
if (type === "object") {
|
|
112
|
+
queue.push(...Object.values(value));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return fieldCount;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=smart-union.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-union.js","sourceRoot":"","sources":["../../src/types/smart-union.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,yBAAyB;AACzB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EAAE,CAAC;YACzB,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QAED,iBAAiB;QACjB,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AAAA,CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../../src/types/streams.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,UAAU,EAC7C,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,CAc1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
export function isReadableStream(val) {
|
|
5
|
+
if (typeof val !== "object" || val === null) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
// Check for the presence of methods specific to ReadableStream
|
|
9
|
+
const stream = val;
|
|
10
|
+
// ReadableStream has methods like getReader, cancel, and tee
|
|
11
|
+
return (typeof stream.getReader === "function" &&
|
|
12
|
+
typeof stream.cancel === "function" &&
|
|
13
|
+
typeof stream.tee === "function");
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=streams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streams.js","sourceRoot":"","sources":["../../src/types/streams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,gBAAgB,CAC9B,GAAY,EACc;IAC1B,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,+DAA+D;IAC/D,MAAM,MAAM,GAAG,GAAiC,CAAC;IAEjD,6DAA6D;IAC7D,OAAO,CACL,OAAO,MAAM,CAAC,SAAS,KAAK,UAAU;QACtC,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU;QACnC,OAAO,MAAM,CAAC,GAAG,KAAK,UAAU,CACjC,CAAC;AAAA,CACH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const __brand: unique symbol;
|
|
2
|
+
export type Unrecognized<T> = T & {
|
|
3
|
+
[__brand]: "unrecognized";
|
|
4
|
+
};
|
|
5
|
+
declare function unrecognized<T>(value: T): Unrecognized<T>;
|
|
6
|
+
export declare function startCountingUnrecognized(): {
|
|
7
|
+
/**
|
|
8
|
+
* Ends counting and returns the delta.
|
|
9
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
10
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
11
|
+
* If not provided, records all counts since start().
|
|
12
|
+
*/
|
|
13
|
+
end: (delta?: number | undefined) => number;
|
|
14
|
+
};
|
|
15
|
+
export { unrecognized };
|
|
16
|
+
//# sourceMappingURL=unrecognized.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;IAIrC;;;;;OAKG;;EASN;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
function unrecognized(value) {
|
|
5
|
+
globalCount++;
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
let globalCount = 0;
|
|
9
|
+
let refCount = 0;
|
|
10
|
+
export function startCountingUnrecognized() {
|
|
11
|
+
refCount++;
|
|
12
|
+
const start = globalCount;
|
|
13
|
+
return {
|
|
14
|
+
/**
|
|
15
|
+
* Ends counting and returns the delta.
|
|
16
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
17
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
18
|
+
* If not provided, records all counts since start().
|
|
19
|
+
*/
|
|
20
|
+
end: (delta) => {
|
|
21
|
+
const count = globalCount - start;
|
|
22
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
23
|
+
globalCount = start + (delta ?? count);
|
|
24
|
+
if (--refCount === 0)
|
|
25
|
+
globalCount = 0;
|
|
26
|
+
return count;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export { unrecognized };
|
|
31
|
+
//# sourceMappingURL=unrecognized.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../../src/types/unrecognized.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,SAAS,YAAY,CAAI,KAAQ,EAAmB;IAClD,WAAW,EAAE,CAAC;IACd,OAAO,KAAwB,CAAC;AAAA,CACjC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,UAAU,yBAAyB,GAAG;IAC1C,QAAQ,EAAE,CAAC;IACX,MAAM,KAAK,GAAG,WAAW,CAAC;IAC1B,OAAO;QACL;;;;;WAKG;QACH,GAAG,EAAE,CAAC,KAAc,EAAE,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,qEAAqE;YACrE,WAAW,GAAG,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;YACvC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QAAA,CACd;KACF,CAAC;AAAA,CACH;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import dotenv from "dotenv";
|
|
6
|
+
dotenv.config();
|
|
7
|
+
/**
|
|
8
|
+
* Example usage of the @quickshops/sdk SDK
|
|
9
|
+
*
|
|
10
|
+
* To run this example from the examples directory:
|
|
11
|
+
* npm run build && npx tsx healthHealthCheck.example.ts
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { Quickshops } from "@quickshops/sdk";
|
|
15
|
+
|
|
16
|
+
const quickshops = new Quickshops({
|
|
17
|
+
serverURL: "https://api.example.com",
|
|
18
|
+
bearerAuth: process.env["QUICKSHOPS_BEARER_AUTH"] ?? "",
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
async function main() {
|
|
22
|
+
const result = await quickshops.health.healthCheck();
|
|
23
|
+
|
|
24
|
+
console.log(result);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
main().catch(console.error);
|