@djust-b2b/djust-front-sdk 3.0.0-beta.9 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -30
- package/dist/.tsbuildinfo +1 -1
- package/dist/.tsbuildinfo-esm +1 -1
- package/dist/client/create-client.d.ts +18 -0
- package/dist/client/create-client.d.ts.map +1 -1
- package/dist/client/transport.d.ts +5 -0
- package/dist/client/transport.d.ts.map +1 -1
- package/dist/errors/classes/not-found.error.d.ts +1 -1
- package/dist/errors/classes/not-found.error.d.ts.map +1 -1
- package/dist/errors/factory.d.ts.map +1 -1
- package/dist/errors/helpers/djust-api-error.d.ts +29 -0
- package/dist/errors/helpers/djust-api-error.d.ts.map +1 -0
- package/dist/errors/types.d.ts +4 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/index.d.ts +42 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +269 -63
- package/dist/interfaces/index.d.ts +15 -3
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/services/base.service.d.ts +2 -0
- package/dist/services/base.service.d.ts.map +1 -1
- package/dist/services/commercial-order/commercial-order.service.d.ts +8 -5
- package/dist/services/commercial-order/commercial-order.service.d.ts.map +1 -1
- package/dist/services/commercial-order/definitions.d.ts +13 -0
- package/dist/services/commercial-order/definitions.d.ts.map +1 -1
- package/dist/services/commercial-order/index.d.ts +30 -19
- package/dist/services/commercial-order/index.d.ts.map +1 -1
- package/dist/services/commercial-order/module.d.ts +1 -1
- package/dist/services/commercial-order/module.d.ts.map +1 -1
- package/dist/services/commercial-order/types.d.ts +1 -0
- package/dist/services/commercial-order/types.d.ts.map +1 -1
- package/dist/services/logistic-order/definitions.d.ts +23 -1
- package/dist/services/logistic-order/definitions.d.ts.map +1 -1
- package/dist/services/logistic-order/endpoints.d.ts +1 -0
- package/dist/services/logistic-order/endpoints.d.ts.map +1 -1
- package/dist/services/logistic-order/index.d.ts +77 -1
- package/dist/services/logistic-order/index.d.ts.map +1 -1
- package/dist/services/logistic-order/logistic-order.service.d.ts +6 -1
- package/dist/services/logistic-order/logistic-order.service.d.ts.map +1 -1
- package/dist/services/logistic-order/module.d.ts +1 -1
- package/dist/services/logistic-order/module.d.ts.map +1 -1
- package/dist/services/logistic-order/types.d.ts +9 -0
- package/dist/services/logistic-order/types.d.ts.map +1 -1
- package/dist/services/operation/definitions.d.ts +1 -18
- package/dist/services/operation/definitions.d.ts.map +1 -1
- package/dist/services/payment/definitions.d.ts +0 -10
- package/dist/services/payment/definitions.d.ts.map +1 -1
- package/dist/services/product/definitions.d.ts +1 -0
- package/dist/services/product/definitions.d.ts.map +1 -1
- package/dist/services/product/index.d.ts +6 -5
- package/dist/services/product/index.d.ts.map +1 -1
- package/dist/services/product-variant/definitions.d.ts +3 -142
- package/dist/services/product-variant/definitions.d.ts.map +1 -1
- package/dist/services/quote/index.d.ts +1 -1
- package/dist/settings/fetch-instance.d.ts.map +1 -1
- package/dist/settings/sdk-version.d.ts +3 -0
- package/dist/settings/sdk-version.d.ts.map +1 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/client/create-client.d.ts +251 -0
- package/lib/client/create-client.d.ts.map +1 -0
- package/lib/client/create-client.js +233 -0
- package/lib/client/create-client.js.map +1 -0
- package/lib/client/index.d.ts +14 -0
- package/lib/client/index.d.ts.map +1 -0
- package/lib/client/index.js +91 -0
- package/lib/client/index.js.map +1 -0
- package/lib/client/performance.d.ts +203 -0
- package/lib/client/performance.d.ts.map +1 -0
- package/lib/client/performance.js +409 -0
- package/lib/client/performance.js.map +1 -0
- package/lib/client/transport.d.ts +372 -0
- package/lib/client/transport.d.ts.map +1 -0
- package/lib/client/transport.js +735 -0
- package/lib/client/transport.js.map +1 -0
- package/lib/errors/base.d.ts +101 -0
- package/lib/errors/base.d.ts.map +1 -0
- package/lib/errors/base.js +145 -0
- package/lib/errors/base.js.map +1 -0
- package/lib/errors/classes/auth.error.d.ts +64 -0
- package/lib/errors/classes/auth.error.d.ts.map +1 -0
- package/lib/errors/classes/auth.error.js +116 -0
- package/lib/errors/classes/auth.error.js.map +1 -0
- package/lib/errors/classes/forbidden.error.d.ts +52 -0
- package/lib/errors/classes/forbidden.error.d.ts.map +1 -0
- package/lib/errors/classes/forbidden.error.js +90 -0
- package/lib/errors/classes/forbidden.error.js.map +1 -0
- package/lib/errors/classes/index.d.ts +17 -0
- package/lib/errors/classes/index.d.ts.map +1 -0
- package/lib/errors/classes/index.js +29 -0
- package/lib/errors/classes/index.js.map +1 -0
- package/lib/errors/classes/network.error.d.ts +63 -0
- package/lib/errors/classes/network.error.d.ts.map +1 -0
- package/lib/errors/classes/network.error.js +122 -0
- package/lib/errors/classes/network.error.js.map +1 -0
- package/lib/errors/classes/not-found.error.d.ts +58 -0
- package/lib/errors/classes/not-found.error.d.ts.map +1 -0
- package/lib/errors/classes/not-found.error.js +120 -0
- package/lib/errors/classes/not-found.error.js.map +1 -0
- package/lib/errors/classes/rate-limit.error.d.ts +49 -0
- package/lib/errors/classes/rate-limit.error.d.ts.map +1 -0
- package/lib/errors/classes/rate-limit.error.js +107 -0
- package/lib/errors/classes/rate-limit.error.js.map +1 -0
- package/lib/errors/classes/server.error.d.ts +63 -0
- package/lib/errors/classes/server.error.d.ts.map +1 -0
- package/lib/errors/classes/server.error.js +156 -0
- package/lib/errors/classes/server.error.js.map +1 -0
- package/lib/errors/classes/timeout.error.d.ts +64 -0
- package/lib/errors/classes/timeout.error.d.ts.map +1 -0
- package/lib/errors/classes/timeout.error.js +90 -0
- package/lib/errors/classes/timeout.error.js.map +1 -0
- package/lib/errors/classes/unexpected.error.d.ts +70 -0
- package/lib/errors/classes/unexpected.error.d.ts.map +1 -0
- package/lib/errors/classes/unexpected.error.js +105 -0
- package/lib/errors/classes/unexpected.error.js.map +1 -0
- package/lib/errors/classes/validation.error.d.ts +68 -0
- package/lib/errors/classes/validation.error.d.ts.map +1 -0
- package/lib/errors/classes/validation.error.js +103 -0
- package/lib/errors/classes/validation.error.js.map +1 -0
- package/lib/errors/codes.d.ts +111 -0
- package/lib/errors/codes.d.ts.map +1 -0
- package/lib/errors/codes.js +143 -0
- package/lib/errors/codes.js.map +1 -0
- package/lib/errors/compat.d.ts +99 -0
- package/lib/errors/compat.d.ts.map +1 -0
- package/lib/errors/compat.js +280 -0
- package/lib/errors/compat.js.map +1 -0
- package/lib/errors/factory.d.ts +33 -0
- package/lib/errors/factory.d.ts.map +1 -0
- package/lib/errors/factory.js +298 -0
- package/lib/errors/factory.js.map +1 -0
- package/lib/errors/guards.d.ts +142 -0
- package/lib/errors/guards.d.ts.map +1 -0
- package/lib/errors/guards.js +281 -0
- package/lib/errors/guards.js.map +1 -0
- package/lib/errors/helpers/djust-api-error.d.ts +29 -0
- package/lib/errors/helpers/djust-api-error.d.ts.map +1 -0
- package/lib/errors/helpers/djust-api-error.js +49 -0
- package/lib/errors/helpers/djust-api-error.js.map +1 -0
- package/lib/errors/index.d.ts +25 -0
- package/lib/errors/index.d.ts.map +1 -0
- package/lib/errors/index.js +89 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/errors/types.d.ts +104 -0
- package/lib/errors/types.d.ts.map +1 -0
- package/lib/errors/types.js +10 -0
- package/lib/errors/types.js.map +1 -0
- package/lib/helpers/index.d.ts +42 -0
- package/lib/helpers/index.d.ts.map +1 -0
- package/lib/helpers/index.js +102 -0
- package/lib/helpers/index.js.map +1 -0
- package/lib/helpers/parameters-validation.d.ts +3 -0
- package/lib/helpers/parameters-validation.d.ts.map +1 -0
- package/lib/helpers/parameters-validation.js +22 -0
- package/lib/helpers/parameters-validation.js.map +1 -0
- package/lib/helpers/utils.d.ts +5 -0
- package/lib/helpers/utils.d.ts.map +1 -0
- package/lib/helpers/utils.js +30 -0
- package/lib/helpers/utils.js.map +1 -0
- package/lib/index.d.ts +267 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +182 -0
- package/lib/index.js.map +1 -0
- package/lib/interfaces/index.d.ts +43 -0
- package/lib/interfaces/index.d.ts.map +1 -0
- package/lib/interfaces/index.js +36 -0
- package/lib/interfaces/index.js.map +1 -0
- package/lib/interfaces/models/address.d.ts +61 -0
- package/lib/interfaces/models/address.d.ts.map +1 -0
- package/lib/interfaces/models/address.js +3 -0
- package/lib/interfaces/models/address.js.map +1 -0
- package/lib/interfaces/models/attribute.d.ts +31 -0
- package/lib/interfaces/models/attribute.d.ts.map +1 -0
- package/lib/interfaces/models/attribute.js +3 -0
- package/lib/interfaces/models/attribute.js.map +1 -0
- package/lib/interfaces/models/auth.d.ts +37 -0
- package/lib/interfaces/models/auth.d.ts.map +1 -0
- package/lib/interfaces/models/auth.js +3 -0
- package/lib/interfaces/models/auth.js.map +1 -0
- package/lib/interfaces/models/cart.d.ts +64 -0
- package/lib/interfaces/models/cart.d.ts.map +1 -0
- package/lib/interfaces/models/cart.js +3 -0
- package/lib/interfaces/models/cart.js.map +1 -0
- package/lib/interfaces/models/common.d.ts +68 -0
- package/lib/interfaces/models/common.d.ts.map +1 -0
- package/lib/interfaces/models/common.js +3 -0
- package/lib/interfaces/models/common.js.map +1 -0
- package/lib/interfaces/models/custom-field.d.ts +57 -0
- package/lib/interfaces/models/custom-field.d.ts.map +1 -0
- package/lib/interfaces/models/custom-field.js +3 -0
- package/lib/interfaces/models/custom-field.js.map +1 -0
- package/lib/interfaces/models/customer-account.d.ts +52 -0
- package/lib/interfaces/models/customer-account.d.ts.map +1 -0
- package/lib/interfaces/models/customer-account.js +3 -0
- package/lib/interfaces/models/customer-account.js.map +1 -0
- package/lib/interfaces/models/customer-organisation.d.ts +14 -0
- package/lib/interfaces/models/customer-organisation.d.ts.map +1 -0
- package/lib/interfaces/models/customer-organisation.js +3 -0
- package/lib/interfaces/models/customer-organisation.js.map +1 -0
- package/lib/interfaces/models/customer-user.d.ts +114 -0
- package/lib/interfaces/models/customer-user.d.ts.map +1 -0
- package/lib/interfaces/models/customer-user.js +3 -0
- package/lib/interfaces/models/customer-user.js.map +1 -0
- package/lib/interfaces/models/incident.d.ts +37 -0
- package/lib/interfaces/models/incident.d.ts.map +1 -0
- package/lib/interfaces/models/incident.js +3 -0
- package/lib/interfaces/models/incident.js.map +1 -0
- package/lib/interfaces/models/navigation-category.d.ts +22 -0
- package/lib/interfaces/models/navigation-category.d.ts.map +1 -0
- package/lib/interfaces/models/navigation-category.js +3 -0
- package/lib/interfaces/models/navigation-category.js.map +1 -0
- package/lib/interfaces/models/offer.d.ts +151 -0
- package/lib/interfaces/models/offer.d.ts.map +1 -0
- package/lib/interfaces/models/offer.js +3 -0
- package/lib/interfaces/models/offer.js.map +1 -0
- package/lib/interfaces/models/order.d.ts +701 -0
- package/lib/interfaces/models/order.d.ts.map +1 -0
- package/lib/interfaces/models/order.js +3 -0
- package/lib/interfaces/models/order.js.map +1 -0
- package/lib/interfaces/models/payment.d.ts +20 -0
- package/lib/interfaces/models/payment.d.ts.map +1 -0
- package/lib/interfaces/models/payment.js +3 -0
- package/lib/interfaces/models/payment.js.map +1 -0
- package/lib/interfaces/models/price.d.ts +6 -0
- package/lib/interfaces/models/price.d.ts.map +1 -0
- package/lib/interfaces/models/price.js +3 -0
- package/lib/interfaces/models/price.js.map +1 -0
- package/lib/interfaces/models/product.d.ts +243 -0
- package/lib/interfaces/models/product.d.ts.map +1 -0
- package/lib/interfaces/models/product.js +3 -0
- package/lib/interfaces/models/product.js.map +1 -0
- package/lib/interfaces/models/quote.d.ts +77 -0
- package/lib/interfaces/models/quote.d.ts.map +1 -0
- package/lib/interfaces/models/quote.js +3 -0
- package/lib/interfaces/models/quote.js.map +1 -0
- package/lib/interfaces/models/searchProduct.d.ts +128 -0
- package/lib/interfaces/models/searchProduct.d.ts.map +1 -0
- package/lib/interfaces/models/searchProduct.js +3 -0
- package/lib/interfaces/models/searchProduct.js.map +1 -0
- package/lib/interfaces/models/supplier.d.ts +72 -0
- package/lib/interfaces/models/supplier.d.ts.map +1 -0
- package/lib/interfaces/models/supplier.js +3 -0
- package/lib/interfaces/models/supplier.js.map +1 -0
- package/lib/services/attributes/attributes.service.d.ts +18 -0
- package/lib/services/attributes/attributes.service.d.ts.map +1 -0
- package/lib/services/attributes/attributes.service.js +37 -0
- package/lib/services/attributes/attributes.service.js.map +1 -0
- package/lib/services/attributes/definitions.d.ts +28 -0
- package/lib/services/attributes/definitions.d.ts.map +1 -0
- package/lib/services/attributes/definitions.js +3 -0
- package/lib/services/attributes/definitions.js.map +1 -0
- package/lib/services/attributes/endpoints.d.ts +12 -0
- package/lib/services/attributes/endpoints.d.ts.map +1 -0
- package/lib/services/attributes/endpoints.js +14 -0
- package/lib/services/attributes/endpoints.js.map +1 -0
- package/lib/services/attributes/index.d.ts +33 -0
- package/lib/services/attributes/index.d.ts.map +1 -0
- package/lib/services/attributes/index.js +50 -0
- package/lib/services/attributes/index.js.map +1 -0
- package/lib/services/attributes/module.d.ts +11 -0
- package/lib/services/attributes/module.d.ts.map +1 -0
- package/lib/services/attributes/module.js +15 -0
- package/lib/services/attributes/module.js.map +1 -0
- package/lib/services/attributes/types.d.ts +35 -0
- package/lib/services/attributes/types.d.ts.map +1 -0
- package/lib/services/attributes/types.js +10 -0
- package/lib/services/attributes/types.js.map +1 -0
- package/lib/services/auth/__mocks__/auth.mocks.d.ts +249 -0
- package/lib/services/auth/__mocks__/auth.mocks.d.ts.map +1 -0
- package/lib/services/auth/__mocks__/auth.mocks.js +221 -0
- package/lib/services/auth/__mocks__/auth.mocks.js.map +1 -0
- package/lib/services/auth/auth.service.d.ts +286 -0
- package/lib/services/auth/auth.service.d.ts.map +1 -0
- package/lib/services/auth/auth.service.js +423 -0
- package/lib/services/auth/auth.service.js.map +1 -0
- package/lib/services/auth/definitions.d.ts +69 -0
- package/lib/services/auth/definitions.d.ts.map +1 -0
- package/lib/services/auth/definitions.js +3 -0
- package/lib/services/auth/definitions.js.map +1 -0
- package/lib/services/auth/definitions.requests.d.ts +25 -0
- package/lib/services/auth/definitions.requests.d.ts.map +1 -0
- package/lib/services/auth/definitions.requests.js +6 -0
- package/lib/services/auth/definitions.requests.js.map +1 -0
- package/lib/services/auth/endpoints.d.ts +30 -0
- package/lib/services/auth/endpoints.d.ts.map +1 -0
- package/lib/services/auth/endpoints.js +32 -0
- package/lib/services/auth/endpoints.js.map +1 -0
- package/lib/services/auth/index.d.ts +232 -0
- package/lib/services/auth/index.d.ts.map +1 -0
- package/lib/services/auth/index.js +310 -0
- package/lib/services/auth/index.js.map +1 -0
- package/lib/services/auth/module.d.ts +11 -0
- package/lib/services/auth/module.d.ts.map +1 -0
- package/lib/services/auth/module.js +17 -0
- package/lib/services/auth/module.js.map +1 -0
- package/lib/services/auth/types.d.ts +124 -0
- package/lib/services/auth/types.d.ts.map +1 -0
- package/lib/services/auth/types.js +10 -0
- package/lib/services/auth/types.js.map +1 -0
- package/lib/services/base.service.d.ts +83 -0
- package/lib/services/base.service.d.ts.map +1 -0
- package/lib/services/base.service.js +121 -0
- package/lib/services/base.service.js.map +1 -0
- package/lib/services/cart/cart.service.d.ts +443 -0
- package/lib/services/cart/cart.service.d.ts.map +1 -0
- package/lib/services/cart/cart.service.js +551 -0
- package/lib/services/cart/cart.service.js.map +1 -0
- package/lib/services/cart/definitions.d.ts +84 -0
- package/lib/services/cart/definitions.d.ts.map +1 -0
- package/lib/services/cart/definitions.js +3 -0
- package/lib/services/cart/definitions.js.map +1 -0
- package/lib/services/cart/endpoints.d.ts +24 -0
- package/lib/services/cart/endpoints.d.ts.map +1 -0
- package/lib/services/cart/endpoints.js +26 -0
- package/lib/services/cart/endpoints.js.map +1 -0
- package/lib/services/cart/index.d.ts +330 -0
- package/lib/services/cart/index.d.ts.map +1 -0
- package/lib/services/cart/index.js +464 -0
- package/lib/services/cart/index.js.map +1 -0
- package/lib/services/cart/module.d.ts +11 -0
- package/lib/services/cart/module.d.ts.map +1 -0
- package/lib/services/cart/module.js +17 -0
- package/lib/services/cart/module.js.map +1 -0
- package/lib/services/cart/types.d.ts +236 -0
- package/lib/services/cart/types.d.ts.map +1 -0
- package/lib/services/cart/types.js +10 -0
- package/lib/services/cart/types.js.map +1 -0
- package/lib/services/commercial-order/commercial-order.service.d.ts +435 -0
- package/lib/services/commercial-order/commercial-order.service.d.ts.map +1 -0
- package/lib/services/commercial-order/commercial-order.service.js +690 -0
- package/lib/services/commercial-order/commercial-order.service.js.map +1 -0
- package/lib/services/commercial-order/definitions.d.ts +182 -0
- package/lib/services/commercial-order/definitions.d.ts.map +1 -0
- package/lib/services/commercial-order/definitions.js +3 -0
- package/lib/services/commercial-order/definitions.js.map +1 -0
- package/lib/services/commercial-order/endpoints.d.ts +28 -0
- package/lib/services/commercial-order/endpoints.d.ts.map +1 -0
- package/lib/services/commercial-order/endpoints.js +33 -0
- package/lib/services/commercial-order/endpoints.js.map +1 -0
- package/lib/services/commercial-order/index.d.ts +721 -0
- package/lib/services/commercial-order/index.d.ts.map +1 -0
- package/lib/services/commercial-order/index.js +986 -0
- package/lib/services/commercial-order/index.js.map +1 -0
- package/lib/services/commercial-order/module.d.ts +11 -0
- package/lib/services/commercial-order/module.d.ts.map +1 -0
- package/lib/services/commercial-order/module.js +15 -0
- package/lib/services/commercial-order/module.js.map +1 -0
- package/lib/services/commercial-order/types.d.ts +244 -0
- package/lib/services/commercial-order/types.d.ts.map +1 -0
- package/lib/services/commercial-order/types.js +10 -0
- package/lib/services/commercial-order/types.js.map +1 -0
- package/lib/services/custom-field/custom-field.service.d.ts +23 -0
- package/lib/services/custom-field/custom-field.service.d.ts.map +1 -0
- package/lib/services/custom-field/custom-field.service.js +64 -0
- package/lib/services/custom-field/custom-field.service.js.map +1 -0
- package/lib/services/custom-field/definitions.d.ts +107 -0
- package/lib/services/custom-field/definitions.d.ts.map +1 -0
- package/lib/services/custom-field/definitions.js +61 -0
- package/lib/services/custom-field/definitions.js.map +1 -0
- package/lib/services/custom-field/endpoints.d.ts +13 -0
- package/lib/services/custom-field/endpoints.d.ts.map +1 -0
- package/lib/services/custom-field/endpoints.js +15 -0
- package/lib/services/custom-field/endpoints.js.map +1 -0
- package/lib/services/custom-field/index.d.ts +115 -0
- package/lib/services/custom-field/index.d.ts.map +1 -0
- package/lib/services/custom-field/index.js +144 -0
- package/lib/services/custom-field/index.js.map +1 -0
- package/lib/services/custom-field/module.d.ts +11 -0
- package/lib/services/custom-field/module.d.ts.map +1 -0
- package/lib/services/custom-field/module.js +15 -0
- package/lib/services/custom-field/module.js.map +1 -0
- package/lib/services/custom-field/types.d.ts +51 -0
- package/lib/services/custom-field/types.d.ts.map +1 -0
- package/lib/services/custom-field/types.js +10 -0
- package/lib/services/custom-field/types.js.map +1 -0
- package/lib/services/customer-account/customer-account.service.d.ts +387 -0
- package/lib/services/customer-account/customer-account.service.d.ts.map +1 -0
- package/lib/services/customer-account/customer-account.service.js +579 -0
- package/lib/services/customer-account/customer-account.service.js.map +1 -0
- package/lib/services/customer-account/definitions.d.ts +164 -0
- package/lib/services/customer-account/definitions.d.ts.map +1 -0
- package/lib/services/customer-account/definitions.js +3 -0
- package/lib/services/customer-account/definitions.js.map +1 -0
- package/lib/services/customer-account/endpoints.d.ts +25 -0
- package/lib/services/customer-account/endpoints.d.ts.map +1 -0
- package/lib/services/customer-account/endpoints.js +33 -0
- package/lib/services/customer-account/endpoints.js.map +1 -0
- package/lib/services/customer-account/index.d.ts +656 -0
- package/lib/services/customer-account/index.d.ts.map +1 -0
- package/lib/services/customer-account/index.js +929 -0
- package/lib/services/customer-account/index.js.map +1 -0
- package/lib/services/customer-account/module.d.ts +11 -0
- package/lib/services/customer-account/module.d.ts.map +1 -0
- package/lib/services/customer-account/module.js +15 -0
- package/lib/services/customer-account/module.js.map +1 -0
- package/lib/services/customer-account/types.d.ts +253 -0
- package/lib/services/customer-account/types.d.ts.map +1 -0
- package/lib/services/customer-account/types.js +10 -0
- package/lib/services/customer-account/types.js.map +1 -0
- package/lib/services/customer-user/customer-user.service.d.ts +280 -0
- package/lib/services/customer-user/customer-user.service.d.ts.map +1 -0
- package/lib/services/customer-user/customer-user.service.js +402 -0
- package/lib/services/customer-user/customer-user.service.js.map +1 -0
- package/lib/services/customer-user/definitions.d.ts +84 -0
- package/lib/services/customer-user/definitions.d.ts.map +1 -0
- package/lib/services/customer-user/definitions.js +3 -0
- package/lib/services/customer-user/definitions.js.map +1 -0
- package/lib/services/customer-user/endpoints.d.ts +19 -0
- package/lib/services/customer-user/endpoints.d.ts.map +1 -0
- package/lib/services/customer-user/endpoints.js +21 -0
- package/lib/services/customer-user/endpoints.js.map +1 -0
- package/lib/services/customer-user/index.d.ts +394 -0
- package/lib/services/customer-user/index.d.ts.map +1 -0
- package/lib/services/customer-user/index.js +528 -0
- package/lib/services/customer-user/index.js.map +1 -0
- package/lib/services/customer-user/module.d.ts +11 -0
- package/lib/services/customer-user/module.d.ts.map +1 -0
- package/lib/services/customer-user/module.js +15 -0
- package/lib/services/customer-user/module.js.map +1 -0
- package/lib/services/customer-user/types.d.ts +118 -0
- package/lib/services/customer-user/types.d.ts.map +1 -0
- package/lib/services/customer-user/types.js +10 -0
- package/lib/services/customer-user/types.js.map +1 -0
- package/lib/services/factory.d.ts +104 -0
- package/lib/services/factory.d.ts.map +1 -0
- package/lib/services/factory.js +89 -0
- package/lib/services/factory.js.map +1 -0
- package/lib/services/incident/definitions.d.ts +85 -0
- package/lib/services/incident/definitions.d.ts.map +1 -0
- package/lib/services/incident/definitions.js +3 -0
- package/lib/services/incident/definitions.js.map +1 -0
- package/lib/services/incident/endpoints.d.ts +17 -0
- package/lib/services/incident/endpoints.d.ts.map +1 -0
- package/lib/services/incident/endpoints.js +19 -0
- package/lib/services/incident/endpoints.js.map +1 -0
- package/lib/services/incident/incident.service.d.ts +24 -0
- package/lib/services/incident/incident.service.d.ts.map +1 -0
- package/lib/services/incident/incident.service.js +141 -0
- package/lib/services/incident/incident.service.js.map +1 -0
- package/lib/services/incident/index.d.ts +270 -0
- package/lib/services/incident/index.d.ts.map +1 -0
- package/lib/services/incident/index.js +389 -0
- package/lib/services/incident/index.js.map +1 -0
- package/lib/services/incident/module.d.ts +11 -0
- package/lib/services/incident/module.d.ts.map +1 -0
- package/lib/services/incident/module.js +15 -0
- package/lib/services/incident/module.js.map +1 -0
- package/lib/services/incident/types.d.ts +116 -0
- package/lib/services/incident/types.d.ts.map +1 -0
- package/lib/services/incident/types.js +10 -0
- package/lib/services/incident/types.js.map +1 -0
- package/lib/services/logistic-order/definitions.d.ts +315 -0
- package/lib/services/logistic-order/definitions.d.ts.map +1 -0
- package/lib/services/logistic-order/definitions.js +3 -0
- package/lib/services/logistic-order/definitions.js.map +1 -0
- package/lib/services/logistic-order/endpoints.d.ts +44 -0
- package/lib/services/logistic-order/endpoints.d.ts.map +1 -0
- package/lib/services/logistic-order/endpoints.js +57 -0
- package/lib/services/logistic-order/endpoints.js.map +1 -0
- package/lib/services/logistic-order/index.d.ts +1376 -0
- package/lib/services/logistic-order/index.d.ts.map +1 -0
- package/lib/services/logistic-order/index.js +1823 -0
- package/lib/services/logistic-order/index.js.map +1 -0
- package/lib/services/logistic-order/logistic-order.service.d.ts +62 -0
- package/lib/services/logistic-order/logistic-order.service.d.ts.map +1 -0
- package/lib/services/logistic-order/logistic-order.service.js +499 -0
- package/lib/services/logistic-order/logistic-order.service.js.map +1 -0
- package/lib/services/logistic-order/module.d.ts +11 -0
- package/lib/services/logistic-order/module.d.ts.map +1 -0
- package/lib/services/logistic-order/module.js +15 -0
- package/lib/services/logistic-order/module.js.map +1 -0
- package/lib/services/logistic-order/types.d.ts +411 -0
- package/lib/services/logistic-order/types.d.ts.map +1 -0
- package/lib/services/logistic-order/types.js +10 -0
- package/lib/services/logistic-order/types.js.map +1 -0
- package/lib/services/module.d.ts +64 -0
- package/lib/services/module.d.ts.map +1 -0
- package/lib/services/module.js +147 -0
- package/lib/services/module.js.map +1 -0
- package/lib/services/navigation-category/definitions.d.ts +31 -0
- package/lib/services/navigation-category/definitions.d.ts.map +1 -0
- package/lib/services/navigation-category/definitions.js +3 -0
- package/lib/services/navigation-category/definitions.js.map +1 -0
- package/lib/services/navigation-category/endpoints.d.ts +15 -0
- package/lib/services/navigation-category/endpoints.d.ts.map +1 -0
- package/lib/services/navigation-category/endpoints.js +17 -0
- package/lib/services/navigation-category/endpoints.js.map +1 -0
- package/lib/services/navigation-category/index.d.ts +114 -0
- package/lib/services/navigation-category/index.d.ts.map +1 -0
- package/lib/services/navigation-category/index.js +160 -0
- package/lib/services/navigation-category/index.js.map +1 -0
- package/lib/services/navigation-category/module.d.ts +11 -0
- package/lib/services/navigation-category/module.d.ts.map +1 -0
- package/lib/services/navigation-category/module.js +15 -0
- package/lib/services/navigation-category/module.js.map +1 -0
- package/lib/services/navigation-category/navigation-category.service.d.ts +148 -0
- package/lib/services/navigation-category/navigation-category.service.d.ts.map +1 -0
- package/lib/services/navigation-category/navigation-category.service.js +191 -0
- package/lib/services/navigation-category/navigation-category.service.js.map +1 -0
- package/lib/services/navigation-category/types.d.ts +51 -0
- package/lib/services/navigation-category/types.d.ts.map +1 -0
- package/lib/services/navigation-category/types.js +10 -0
- package/lib/services/navigation-category/types.js.map +1 -0
- package/lib/services/offer-inventories/definitions.d.ts +73 -0
- package/lib/services/offer-inventories/definitions.d.ts.map +1 -0
- package/lib/services/offer-inventories/definitions.js +3 -0
- package/lib/services/offer-inventories/definitions.js.map +1 -0
- package/lib/services/offer-inventories/endpoints.d.ts +16 -0
- package/lib/services/offer-inventories/endpoints.d.ts.map +1 -0
- package/lib/services/offer-inventories/endpoints.js +18 -0
- package/lib/services/offer-inventories/endpoints.js.map +1 -0
- package/lib/services/offer-inventories/index.d.ts +120 -0
- package/lib/services/offer-inventories/index.d.ts.map +1 -0
- package/lib/services/offer-inventories/index.js +175 -0
- package/lib/services/offer-inventories/index.js.map +1 -0
- package/lib/services/offer-inventories/module.d.ts +11 -0
- package/lib/services/offer-inventories/module.d.ts.map +1 -0
- package/lib/services/offer-inventories/module.js +15 -0
- package/lib/services/offer-inventories/module.js.map +1 -0
- package/lib/services/offer-inventories/offer-inventories.service.d.ts +26 -0
- package/lib/services/offer-inventories/offer-inventories.service.d.ts.map +1 -0
- package/lib/services/offer-inventories/offer-inventories.service.js +80 -0
- package/lib/services/offer-inventories/offer-inventories.service.js.map +1 -0
- package/lib/services/offer-inventories/types.d.ts +85 -0
- package/lib/services/offer-inventories/types.d.ts.map +1 -0
- package/lib/services/offer-inventories/types.js +10 -0
- package/lib/services/offer-inventories/types.js.map +1 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts +109 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts.map +1 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js +201 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js.map +1 -0
- package/lib/services/offer-prices/definitions.d.ts +24 -0
- package/lib/services/offer-prices/definitions.d.ts.map +1 -0
- package/lib/services/offer-prices/definitions.js +3 -0
- package/lib/services/offer-prices/definitions.js.map +1 -0
- package/lib/services/offer-prices/endpoints.d.ts +12 -0
- package/lib/services/offer-prices/endpoints.d.ts.map +1 -0
- package/lib/services/offer-prices/endpoints.js +14 -0
- package/lib/services/offer-prices/endpoints.js.map +1 -0
- package/lib/services/offer-prices/index.d.ts +36 -0
- package/lib/services/offer-prices/index.d.ts.map +1 -0
- package/lib/services/offer-prices/index.js +53 -0
- package/lib/services/offer-prices/index.js.map +1 -0
- package/lib/services/offer-prices/module.d.ts +11 -0
- package/lib/services/offer-prices/module.d.ts.map +1 -0
- package/lib/services/offer-prices/module.js +15 -0
- package/lib/services/offer-prices/module.js.map +1 -0
- package/lib/services/offer-prices/offer-prices.service.d.ts +18 -0
- package/lib/services/offer-prices/offer-prices.service.d.ts.map +1 -0
- package/lib/services/offer-prices/offer-prices.service.js +36 -0
- package/lib/services/offer-prices/offer-prices.service.js.map +1 -0
- package/lib/services/offer-prices/types.d.ts +33 -0
- package/lib/services/offer-prices/types.d.ts.map +1 -0
- package/lib/services/offer-prices/types.js +10 -0
- package/lib/services/offer-prices/types.js.map +1 -0
- package/lib/services/operation/definitions.d.ts +263 -0
- package/lib/services/operation/definitions.d.ts.map +1 -0
- package/lib/services/operation/definitions.js +18 -0
- package/lib/services/operation/definitions.js.map +1 -0
- package/lib/services/operation/endpoints.d.ts +18 -0
- package/lib/services/operation/endpoints.d.ts.map +1 -0
- package/lib/services/operation/endpoints.js +22 -0
- package/lib/services/operation/endpoints.js.map +1 -0
- package/lib/services/operation/index.d.ts +520 -0
- package/lib/services/operation/index.d.ts.map +1 -0
- package/lib/services/operation/index.js +704 -0
- package/lib/services/operation/index.js.map +1 -0
- package/lib/services/operation/module.d.ts +11 -0
- package/lib/services/operation/module.d.ts.map +1 -0
- package/lib/services/operation/module.js +15 -0
- package/lib/services/operation/module.js.map +1 -0
- package/lib/services/operation/operation.service.d.ts +32 -0
- package/lib/services/operation/operation.service.d.ts.map +1 -0
- package/lib/services/operation/operation.service.js +206 -0
- package/lib/services/operation/operation.service.js.map +1 -0
- package/lib/services/operation/types.d.ts +174 -0
- package/lib/services/operation/types.d.ts.map +1 -0
- package/lib/services/operation/types.js +10 -0
- package/lib/services/operation/types.js.map +1 -0
- package/lib/services/payment/definitions.d.ts +69 -0
- package/lib/services/payment/definitions.d.ts.map +1 -0
- package/lib/services/payment/definitions.js +3 -0
- package/lib/services/payment/definitions.js.map +1 -0
- package/lib/services/payment/endpoints.d.ts +16 -0
- package/lib/services/payment/endpoints.d.ts.map +1 -0
- package/lib/services/payment/endpoints.js +18 -0
- package/lib/services/payment/endpoints.js.map +1 -0
- package/lib/services/payment/index.d.ts +150 -0
- package/lib/services/payment/index.d.ts.map +1 -0
- package/lib/services/payment/index.js +220 -0
- package/lib/services/payment/index.js.map +1 -0
- package/lib/services/payment/module.d.ts +11 -0
- package/lib/services/payment/module.d.ts.map +1 -0
- package/lib/services/payment/module.js +15 -0
- package/lib/services/payment/module.js.map +1 -0
- package/lib/services/payment/payment.service.d.ts +224 -0
- package/lib/services/payment/payment.service.d.ts.map +1 -0
- package/lib/services/payment/payment.service.js +288 -0
- package/lib/services/payment/payment.service.js.map +1 -0
- package/lib/services/payment/types.d.ts +93 -0
- package/lib/services/payment/types.d.ts.map +1 -0
- package/lib/services/payment/types.js +10 -0
- package/lib/services/payment/types.js.map +1 -0
- package/lib/services/product/definitions.d.ts +150 -0
- package/lib/services/product/definitions.d.ts.map +1 -0
- package/lib/services/product/definitions.js +9 -0
- package/lib/services/product/definitions.js.map +1 -0
- package/lib/services/product/endpoints.d.ts +40 -0
- package/lib/services/product/endpoints.d.ts.map +1 -0
- package/lib/services/product/endpoints.js +42 -0
- package/lib/services/product/endpoints.js.map +1 -0
- package/lib/services/product/index.d.ts +388 -0
- package/lib/services/product/index.d.ts.map +1 -0
- package/lib/services/product/index.js +564 -0
- package/lib/services/product/index.js.map +1 -0
- package/lib/services/product/module.d.ts +11 -0
- package/lib/services/product/module.d.ts.map +1 -0
- package/lib/services/product/module.js +17 -0
- package/lib/services/product/module.js.map +1 -0
- package/lib/services/product/product.service.d.ts +452 -0
- package/lib/services/product/product.service.d.ts.map +1 -0
- package/lib/services/product/product.service.js +624 -0
- package/lib/services/product/product.service.js.map +1 -0
- package/lib/services/product/types.d.ts +344 -0
- package/lib/services/product/types.d.ts.map +1 -0
- package/lib/services/product/types.js +10 -0
- package/lib/services/product/types.js.map +1 -0
- package/lib/services/product-variant/definitions.d.ts +33 -0
- package/lib/services/product-variant/definitions.d.ts.map +1 -0
- package/lib/services/product-variant/definitions.js +7 -0
- package/lib/services/product-variant/definitions.js.map +1 -0
- package/lib/services/product-variant/endpoints.d.ts +15 -0
- package/lib/services/product-variant/endpoints.d.ts.map +1 -0
- package/lib/services/product-variant/endpoints.js +17 -0
- package/lib/services/product-variant/endpoints.js.map +1 -0
- package/lib/services/product-variant/index.d.ts +123 -0
- package/lib/services/product-variant/index.d.ts.map +1 -0
- package/lib/services/product-variant/index.js +172 -0
- package/lib/services/product-variant/index.js.map +1 -0
- package/lib/services/product-variant/module.d.ts +11 -0
- package/lib/services/product-variant/module.d.ts.map +1 -0
- package/lib/services/product-variant/module.js +15 -0
- package/lib/services/product-variant/module.js.map +1 -0
- package/lib/services/product-variant/product-variant.service.d.ts +21 -0
- package/lib/services/product-variant/product-variant.service.d.ts.map +1 -0
- package/lib/services/product-variant/product-variant.service.js +69 -0
- package/lib/services/product-variant/product-variant.service.js.map +1 -0
- package/lib/services/product-variant/types.d.ts +73 -0
- package/lib/services/product-variant/types.d.ts.map +1 -0
- package/lib/services/product-variant/types.js +10 -0
- package/lib/services/product-variant/types.js.map +1 -0
- package/lib/services/quote/definitions.d.ts +102 -0
- package/lib/services/quote/definitions.d.ts.map +1 -0
- package/lib/services/quote/definitions.js +3 -0
- package/lib/services/quote/definitions.js.map +1 -0
- package/lib/services/quote/endpoints.d.ts +20 -0
- package/lib/services/quote/endpoints.d.ts.map +1 -0
- package/lib/services/quote/endpoints.js +24 -0
- package/lib/services/quote/endpoints.js.map +1 -0
- package/lib/services/quote/index.d.ts +378 -0
- package/lib/services/quote/index.d.ts.map +1 -0
- package/lib/services/quote/index.js +506 -0
- package/lib/services/quote/index.js.map +1 -0
- package/lib/services/quote/module.d.ts +11 -0
- package/lib/services/quote/module.d.ts.map +1 -0
- package/lib/services/quote/module.js +15 -0
- package/lib/services/quote/module.js.map +1 -0
- package/lib/services/quote/quote.service.d.ts +346 -0
- package/lib/services/quote/quote.service.d.ts.map +1 -0
- package/lib/services/quote/quote.service.js +479 -0
- package/lib/services/quote/quote.service.js.map +1 -0
- package/lib/services/quote/types.d.ts +160 -0
- package/lib/services/quote/types.d.ts.map +1 -0
- package/lib/services/quote/types.js +10 -0
- package/lib/services/quote/types.js.map +1 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.d.ts +49 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.d.ts.map +1 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.js +168 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.js.map +1 -0
- package/lib/services/supplier/definitions.d.ts +30 -0
- package/lib/services/supplier/definitions.d.ts.map +1 -0
- package/lib/services/supplier/definitions.js +3 -0
- package/lib/services/supplier/definitions.js.map +1 -0
- package/lib/services/supplier/endpoints.d.ts +14 -0
- package/lib/services/supplier/endpoints.d.ts.map +1 -0
- package/lib/services/supplier/endpoints.js +16 -0
- package/lib/services/supplier/endpoints.js.map +1 -0
- package/lib/services/supplier/index.d.ts +102 -0
- package/lib/services/supplier/index.d.ts.map +1 -0
- package/lib/services/supplier/index.js +146 -0
- package/lib/services/supplier/index.js.map +1 -0
- package/lib/services/supplier/module.d.ts +11 -0
- package/lib/services/supplier/module.d.ts.map +1 -0
- package/lib/services/supplier/module.js +15 -0
- package/lib/services/supplier/module.js.map +1 -0
- package/lib/services/supplier/supplier.service.d.ts +20 -0
- package/lib/services/supplier/supplier.service.d.ts.map +1 -0
- package/lib/services/supplier/supplier.service.js +63 -0
- package/lib/services/supplier/supplier.service.js.map +1 -0
- package/lib/services/supplier/types.d.ts +58 -0
- package/lib/services/supplier/types.d.ts.map +1 -0
- package/lib/services/supplier/types.js +10 -0
- package/lib/services/supplier/types.js.map +1 -0
- package/lib/services/types.d.ts +81 -0
- package/lib/services/types.d.ts.map +1 -0
- package/lib/services/types.js +10 -0
- package/lib/services/types.js.map +1 -0
- package/lib/settings/fetch-instance.d.ts +30 -0
- package/lib/settings/fetch-instance.d.ts.map +1 -0
- package/lib/settings/fetch-instance.js +223 -0
- package/lib/settings/fetch-instance.js.map +1 -0
- package/lib/settings/sdk-version.d.ts +3 -0
- package/lib/settings/sdk-version.d.ts.map +1 -0
- package/lib/settings/sdk-version.js +6 -0
- package/lib/settings/sdk-version.js.map +1 -0
- package/package.json +27 -8
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DJUST SDK Error Guards
|
|
4
|
+
* Type guards and utility functions for error handling.
|
|
5
|
+
*
|
|
6
|
+
* @module errors/guards
|
|
7
|
+
* @since 2.17.0
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.isSDKError = isSDKError;
|
|
11
|
+
exports.isAuthError = isAuthError;
|
|
12
|
+
exports.isForbiddenError = isForbiddenError;
|
|
13
|
+
exports.isNetworkError = isNetworkError;
|
|
14
|
+
exports.isTimeoutError = isTimeoutError;
|
|
15
|
+
exports.isServerError = isServerError;
|
|
16
|
+
exports.isValidationError = isValidationError;
|
|
17
|
+
exports.isNotFoundError = isNotFoundError;
|
|
18
|
+
exports.isRateLimitError = isRateLimitError;
|
|
19
|
+
exports.isUnexpectedError = isUnexpectedError;
|
|
20
|
+
exports.isRetryable = isRetryable;
|
|
21
|
+
exports.getRetryDelay = getRetryDelay;
|
|
22
|
+
exports.shouldReauthenticate = shouldReauthenticate;
|
|
23
|
+
exports.isClientError = isClientError;
|
|
24
|
+
exports.isTransientError = isTransientError;
|
|
25
|
+
exports.extractStatusCode = extractStatusCode;
|
|
26
|
+
exports.extractErrorCode = extractErrorCode;
|
|
27
|
+
exports.getUserFriendlyMessage = getUserFriendlyMessage;
|
|
28
|
+
const base_1 = require("./base");
|
|
29
|
+
const codes_1 = require("./codes");
|
|
30
|
+
const auth_error_1 = require("./classes/auth.error");
|
|
31
|
+
const forbidden_error_1 = require("./classes/forbidden.error");
|
|
32
|
+
const network_error_1 = require("./classes/network.error");
|
|
33
|
+
const timeout_error_1 = require("./classes/timeout.error");
|
|
34
|
+
const server_error_1 = require("./classes/server.error");
|
|
35
|
+
const validation_error_1 = require("./classes/validation.error");
|
|
36
|
+
const not_found_error_1 = require("./classes/not-found.error");
|
|
37
|
+
const rate_limit_error_1 = require("./classes/rate-limit.error");
|
|
38
|
+
const unexpected_error_1 = require("./classes/unexpected.error");
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// TYPE GUARDS
|
|
41
|
+
// ============================================================================
|
|
42
|
+
/**
|
|
43
|
+
* Checks if an error is an SDKError.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* if (isSDKError(error)) {
|
|
48
|
+
* console.log(error.code); // TypeScript knows it's SDKError
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
function isSDKError(error) {
|
|
53
|
+
return error instanceof base_1.SDKError;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Checks if an error is an AuthError (401).
|
|
57
|
+
*/
|
|
58
|
+
function isAuthError(error) {
|
|
59
|
+
return error instanceof auth_error_1.AuthError;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Checks if an error is a ForbiddenError (403).
|
|
63
|
+
*/
|
|
64
|
+
function isForbiddenError(error) {
|
|
65
|
+
return error instanceof forbidden_error_1.ForbiddenError;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Checks if an error is a NetworkError.
|
|
69
|
+
*/
|
|
70
|
+
function isNetworkError(error) {
|
|
71
|
+
return error instanceof network_error_1.NetworkError;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Checks if an error is a TimeoutError.
|
|
75
|
+
*/
|
|
76
|
+
function isTimeoutError(error) {
|
|
77
|
+
return error instanceof timeout_error_1.TimeoutError;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Checks if an error is a ServerError (5xx).
|
|
81
|
+
*/
|
|
82
|
+
function isServerError(error) {
|
|
83
|
+
return error instanceof server_error_1.ServerError;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Checks if an error is a ValidationError.
|
|
87
|
+
*/
|
|
88
|
+
function isValidationError(error) {
|
|
89
|
+
return error instanceof validation_error_1.ValidationError;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Checks if an error is a NotFoundError (404).
|
|
93
|
+
*/
|
|
94
|
+
function isNotFoundError(error) {
|
|
95
|
+
return error instanceof not_found_error_1.NotFoundError;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Checks if an error is a RateLimitError (429).
|
|
99
|
+
*/
|
|
100
|
+
function isRateLimitError(error) {
|
|
101
|
+
return error instanceof rate_limit_error_1.RateLimitError;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Checks if an error is an UnexpectedError.
|
|
105
|
+
*/
|
|
106
|
+
function isUnexpectedError(error) {
|
|
107
|
+
return error instanceof unexpected_error_1.UnexpectedError;
|
|
108
|
+
}
|
|
109
|
+
// ============================================================================
|
|
110
|
+
// UTILITY FUNCTIONS
|
|
111
|
+
// ============================================================================
|
|
112
|
+
/**
|
|
113
|
+
* Checks if an error is retriable.
|
|
114
|
+
*
|
|
115
|
+
* Returns true for:
|
|
116
|
+
* - Network errors
|
|
117
|
+
* - Timeout errors
|
|
118
|
+
* - Rate limit errors (after delay)
|
|
119
|
+
* - Server errors (5xx)
|
|
120
|
+
* - Any SDKError with retriable=true
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* if (isRetryable(error)) {
|
|
125
|
+
* await sleep(1000);
|
|
126
|
+
* return retry();
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
function isRetryable(error) {
|
|
131
|
+
if (error instanceof base_1.SDKError) {
|
|
132
|
+
return error.retriable;
|
|
133
|
+
}
|
|
134
|
+
// Network errors from fetch are typically retryable
|
|
135
|
+
if (error instanceof TypeError && error.message.includes("fetch")) {
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Gets the retry delay for an error (in milliseconds).
|
|
142
|
+
*
|
|
143
|
+
* For rate limit errors, returns the Retry-After value.
|
|
144
|
+
* For other retriable errors, returns a default backoff.
|
|
145
|
+
* For non-retriable errors, returns undefined.
|
|
146
|
+
*
|
|
147
|
+
* @param error - The error to check
|
|
148
|
+
* @param attempt - Current retry attempt (1-based) for backoff calculation
|
|
149
|
+
* @param baseDelayMs - Base delay for exponential backoff (default: 1000ms)
|
|
150
|
+
*/
|
|
151
|
+
function getRetryDelay(error, attempt = 1, baseDelayMs = 1000) {
|
|
152
|
+
if (!isRetryable(error)) {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
if (error instanceof base_1.SDKError && error.retryAfterMs) {
|
|
156
|
+
return error.retryAfterMs;
|
|
157
|
+
}
|
|
158
|
+
// Exponential backoff with jitter
|
|
159
|
+
const exponentialDelay = baseDelayMs * Math.pow(2, attempt - 1);
|
|
160
|
+
const jitter = Math.random() * 0.2 - 0.1; // ±10%
|
|
161
|
+
return Math.round(exponentialDelay * (1 + jitter));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Checks if an error indicates the user should re-authenticate.
|
|
165
|
+
*
|
|
166
|
+
* Returns true for:
|
|
167
|
+
* - Token expired
|
|
168
|
+
* - Token invalid
|
|
169
|
+
* - Token missing
|
|
170
|
+
*/
|
|
171
|
+
function shouldReauthenticate(error) {
|
|
172
|
+
if (error instanceof auth_error_1.AuthError) {
|
|
173
|
+
return error.shouldRedirectToLogin();
|
|
174
|
+
}
|
|
175
|
+
if (error instanceof base_1.SDKError) {
|
|
176
|
+
const reauthCodes = [
|
|
177
|
+
codes_1.SDKErrorCode.TOKEN_EXPIRED,
|
|
178
|
+
codes_1.SDKErrorCode.TOKEN_INVALID,
|
|
179
|
+
codes_1.SDKErrorCode.TOKEN_MISSING,
|
|
180
|
+
];
|
|
181
|
+
return reauthCodes.includes(error.code);
|
|
182
|
+
}
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Checks if an error is a client error (4xx).
|
|
187
|
+
*/
|
|
188
|
+
function isClientError(error) {
|
|
189
|
+
if (error instanceof base_1.SDKError) {
|
|
190
|
+
return error.httpStatus >= 400 && error.httpStatus < 500;
|
|
191
|
+
}
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Checks if an error is transient (likely to resolve on retry).
|
|
196
|
+
*
|
|
197
|
+
* More conservative than isRetryable - only returns true for
|
|
198
|
+
* errors that are very likely to succeed on retry.
|
|
199
|
+
*/
|
|
200
|
+
function isTransientError(error) {
|
|
201
|
+
if (error instanceof server_error_1.ServerError) {
|
|
202
|
+
return error.isTransient();
|
|
203
|
+
}
|
|
204
|
+
if (error instanceof rate_limit_error_1.RateLimitError || error instanceof timeout_error_1.TimeoutError) {
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
if (error instanceof network_error_1.NetworkError) {
|
|
208
|
+
// Connection errors are often transient
|
|
209
|
+
return error.code !== codes_1.SDKErrorCode.DNS_ERROR;
|
|
210
|
+
}
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Extracts HTTP status code from an error.
|
|
215
|
+
*
|
|
216
|
+
* Works with both SDKError and legacy error formats.
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```typescript
|
|
220
|
+
* const status = extractStatusCode(error);
|
|
221
|
+
* if (status === 401) {
|
|
222
|
+
* redirectToLogin();
|
|
223
|
+
* }
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
function extractStatusCode(error) {
|
|
227
|
+
if (error instanceof base_1.SDKError) {
|
|
228
|
+
return error.httpStatus || null;
|
|
229
|
+
}
|
|
230
|
+
// Legacy format: "[API] Error 401: ..."
|
|
231
|
+
if (error instanceof Error) {
|
|
232
|
+
const match = error.message.match(/Error (\d{3}):/);
|
|
233
|
+
if (match) {
|
|
234
|
+
return parseInt(match[1], 10);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Extracts error code from an error.
|
|
241
|
+
*/
|
|
242
|
+
function extractErrorCode(error) {
|
|
243
|
+
if (error instanceof base_1.SDKError) {
|
|
244
|
+
return error.code;
|
|
245
|
+
}
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Gets a user-friendly error message.
|
|
250
|
+
*
|
|
251
|
+
* Returns a safe message that can be shown to end users.
|
|
252
|
+
* Does not include sensitive details.
|
|
253
|
+
*/
|
|
254
|
+
function getUserFriendlyMessage(error) {
|
|
255
|
+
if (error instanceof base_1.SDKError) {
|
|
256
|
+
// For certain error types, provide generic messages
|
|
257
|
+
if (error instanceof server_error_1.ServerError) {
|
|
258
|
+
return "Service temporarily unavailable. Please try again later.";
|
|
259
|
+
}
|
|
260
|
+
if (error instanceof network_error_1.NetworkError) {
|
|
261
|
+
return "Unable to connect. Please check your internet connection.";
|
|
262
|
+
}
|
|
263
|
+
if (error instanceof timeout_error_1.TimeoutError) {
|
|
264
|
+
return "Request timed out. Please try again.";
|
|
265
|
+
}
|
|
266
|
+
if (error instanceof unexpected_error_1.UnexpectedError) {
|
|
267
|
+
return "An unexpected error occurred. Please try again.";
|
|
268
|
+
}
|
|
269
|
+
// For other errors, the message should be safe
|
|
270
|
+
return error.message;
|
|
271
|
+
}
|
|
272
|
+
if (error instanceof Error) {
|
|
273
|
+
// Be careful with unknown error messages
|
|
274
|
+
if (error.message.length < 100 && !error.message.includes("Error")) {
|
|
275
|
+
return error.message;
|
|
276
|
+
}
|
|
277
|
+
return "An error occurred. Please try again.";
|
|
278
|
+
}
|
|
279
|
+
return "An error occurred. Please try again.";
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=guards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/errors/guards.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AA4BH,gCAEC;AAKD,kCAEC;AAKD,4CAEC;AAKD,wCAEC;AAKD,wCAEC;AAKD,sCAEC;AAKD,8CAEC;AAKD,0CAEC;AAKD,4CAEC;AAKD,8CAEC;AAwBD,kCAWC;AAaD,sCAiBC;AAUD,oDAeC;AAKD,sCAKC;AAQD,4CAeC;AAeD,8CAcC;AAKD,4CAOC;AAQD,wDA4BC;AAnSD,iCAAkC;AAClC,mCAA+E;AAC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eAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,IAAI,CAAC;IACpB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,KAAc;IACnD,IAAI,KAAK,YAAY,eAAQ,EAAE,CAAC;QAC9B,oDAAoD;QACpD,IAAI,KAAK,YAAY,0BAAW,EAAE,CAAC;YACjC,OAAO,0DAA0D,CAAC;QACpE,CAAC;QACD,IAAI,KAAK,YAAY,4BAAY,EAAE,CAAC;YAClC,OAAO,2DAA2D,CAAC;QACrE,CAAC;QACD,IAAI,KAAK,YAAY,4BAAY,EAAE,CAAC;YAClC,OAAO,sCAAsC,CAAC;QAChD,CAAC;QACD,IAAI,KAAK,YAAY,kCAAe,EAAE,CAAC;YACrC,OAAO,iDAAiD,CAAC;QAC3D,CAAC;QACD,+CAA+C;QAC/C,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,yCAAyC;QACzC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACnE,OAAO,KAAK,CAAC,OAAO,CAAC;QACvB,CAAC;QACD,OAAO,sCAAsC,CAAC;IAChD,CAAC;IAED,OAAO,sCAAsC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for parsing DJUST API error response bodies.
|
|
3
|
+
*
|
|
4
|
+
* @module errors/helpers/djust-api-error
|
|
5
|
+
*/
|
|
6
|
+
export interface DjustApiErrorItem {
|
|
7
|
+
code?: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
detail?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DjustApiErrorBody {
|
|
12
|
+
message?: string;
|
|
13
|
+
resource?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
errors?: DjustApiErrorItem[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parses a DJUST API error response body.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseDjustApiErrorBody(body: string): DjustApiErrorBody;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the most relevant error message from a DJUST API response body.
|
|
23
|
+
*/
|
|
24
|
+
export declare function extractDjustApiErrorMessage(body: string): string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Maps known DJUST error codes to a resource label for 404 responses.
|
|
27
|
+
*/
|
|
28
|
+
export declare function inferResourceFromDjustErrorCode(code?: string): string | undefined;
|
|
29
|
+
//# sourceMappingURL=djust-api-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"djust-api-error.d.ts","sourceRoot":"","sources":["../../../src/errors/helpers/djust-api-error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAMtE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAa5E;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAUpB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Helpers for parsing DJUST API error response bodies.
|
|
4
|
+
*
|
|
5
|
+
* @module errors/helpers/djust-api-error
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.parseDjustApiErrorBody = parseDjustApiErrorBody;
|
|
9
|
+
exports.extractDjustApiErrorMessage = extractDjustApiErrorMessage;
|
|
10
|
+
exports.inferResourceFromDjustErrorCode = inferResourceFromDjustErrorCode;
|
|
11
|
+
/**
|
|
12
|
+
* Parses a DJUST API error response body.
|
|
13
|
+
*/
|
|
14
|
+
function parseDjustApiErrorBody(body) {
|
|
15
|
+
try {
|
|
16
|
+
return JSON.parse(body);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns the most relevant error message from a DJUST API response body.
|
|
24
|
+
*/
|
|
25
|
+
function extractDjustApiErrorMessage(body) {
|
|
26
|
+
const parsed = parseDjustApiErrorBody(body);
|
|
27
|
+
const apiError = parsed.errors?.find((error) => error.message?.trim());
|
|
28
|
+
if (apiError?.message) {
|
|
29
|
+
return apiError.message;
|
|
30
|
+
}
|
|
31
|
+
if (parsed.message?.trim()) {
|
|
32
|
+
return parsed.message;
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Maps known DJUST error codes to a resource label for 404 responses.
|
|
38
|
+
*/
|
|
39
|
+
function inferResourceFromDjustErrorCode(code) {
|
|
40
|
+
if (!code)
|
|
41
|
+
return undefined;
|
|
42
|
+
const codeMap = {
|
|
43
|
+
STO0001: "Store",
|
|
44
|
+
USR0001: "User",
|
|
45
|
+
ACC0001: "Customer account",
|
|
46
|
+
};
|
|
47
|
+
return codeMap[code];
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=djust-api-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"djust-api-error.js","sourceRoot":"","sources":["../../../src/errors/helpers/djust-api-error.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAkBH,wDAMC;AAKD,kEAaC;AAKD,0EAYC;AA5CD;;GAEG;AACH,SAAgB,sBAAsB,CAAC,IAAY;IACjD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAsB,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CAAC,IAAY;IACtD,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvE,IAAI,QAAQ,EAAE,OAAO,EAAE,CAAC;QACtB,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;QAC3B,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,SAAgB,+BAA+B,CAC7C,IAAa;IAEb,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAE5B,MAAM,OAAO,GAA2B;QACtC,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,kBAAkB;KAC5B,CAAC;IAEF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DJUST SDK Error Module
|
|
3
|
+
* Production-grade structured error handling.
|
|
4
|
+
*
|
|
5
|
+
* Architecture:
|
|
6
|
+
* - types.ts - Type definitions
|
|
7
|
+
* - codes.ts - Error code constants
|
|
8
|
+
* - base.ts - SDKError base class
|
|
9
|
+
* - classes/ - Specific error types
|
|
10
|
+
* - factory.ts - Error creation from responses
|
|
11
|
+
* - guards.ts - Type guards and utilities
|
|
12
|
+
* - compat.ts - Backward compatibility helpers
|
|
13
|
+
*
|
|
14
|
+
* @module errors
|
|
15
|
+
* @since 2.17.0
|
|
16
|
+
*/
|
|
17
|
+
export type { RequestMetadata, SDKErrorOptions, ErrorFactoryOptions, SerializedError, ClientSafeError, } from "./types";
|
|
18
|
+
export { SDKErrorCode, RETRIABLE_ERROR_CODES, RETRIABLE_HTTP_STATUS_CODES, isRetriableCode, isRetriableStatus, } from "./codes";
|
|
19
|
+
export type { SDKErrorCodeType } from "./codes";
|
|
20
|
+
export { SDKError } from "./base";
|
|
21
|
+
export { ValidationError, AuthError, ForbiddenError, NotFoundError, RateLimitError, NetworkError, TimeoutError, ServerError, UnexpectedError, } from "./classes";
|
|
22
|
+
export { createErrorFromResponse, createErrorFromException } from "./factory";
|
|
23
|
+
export { isSDKError, isAuthError, isForbiddenError, isNetworkError, isTimeoutError, isServerError, isValidationError, isNotFoundError, isRateLimitError, isUnexpectedError, isRetryable, getRetryDelay, shouldReauthenticate, isClientError, isTransientError, extractStatusCode, extractErrorCode, getUserFriendlyMessage, } from "./guards";
|
|
24
|
+
export { toLegacyError, fromLegacyError, isLegacyError, parseLegacyError, withLegacyErrors, withStructuredErrors, isApiError, getHttpStatus, } from "./compat";
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,YAAY,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,eAAe,GAChB,MAAM,SAAS,CAAC;AAMjB,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,2BAA2B,EAC3B,eAAe,EACf,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMhD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAMlC,OAAO,EACL,eAAe,EACf,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,GAChB,MAAM,WAAW,CAAC;AAMnB,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAM9E,OAAO,EAEL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EAGjB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAMlB,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,aAAa,GACd,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DJUST SDK Error Module
|
|
4
|
+
* Production-grade structured error handling.
|
|
5
|
+
*
|
|
6
|
+
* Architecture:
|
|
7
|
+
* - types.ts - Type definitions
|
|
8
|
+
* - codes.ts - Error code constants
|
|
9
|
+
* - base.ts - SDKError base class
|
|
10
|
+
* - classes/ - Specific error types
|
|
11
|
+
* - factory.ts - Error creation from responses
|
|
12
|
+
* - guards.ts - Type guards and utilities
|
|
13
|
+
* - compat.ts - Backward compatibility helpers
|
|
14
|
+
*
|
|
15
|
+
* @module errors
|
|
16
|
+
* @since 2.17.0
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.getHttpStatus = exports.isApiError = exports.withStructuredErrors = exports.withLegacyErrors = exports.parseLegacyError = exports.isLegacyError = exports.fromLegacyError = exports.toLegacyError = exports.getUserFriendlyMessage = exports.extractErrorCode = exports.extractStatusCode = exports.isTransientError = exports.isClientError = exports.shouldReauthenticate = exports.getRetryDelay = exports.isRetryable = exports.isUnexpectedError = exports.isRateLimitError = exports.isNotFoundError = exports.isValidationError = exports.isServerError = exports.isTimeoutError = exports.isNetworkError = exports.isForbiddenError = exports.isAuthError = exports.isSDKError = exports.createErrorFromException = exports.createErrorFromResponse = exports.UnexpectedError = exports.ServerError = exports.TimeoutError = exports.NetworkError = exports.RateLimitError = exports.NotFoundError = exports.ForbiddenError = exports.AuthError = exports.ValidationError = exports.SDKError = exports.isRetriableStatus = exports.isRetriableCode = exports.RETRIABLE_HTTP_STATUS_CODES = exports.RETRIABLE_ERROR_CODES = exports.SDKErrorCode = void 0;
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// ERROR CODES
|
|
22
|
+
// ============================================================================
|
|
23
|
+
var codes_1 = require("./codes");
|
|
24
|
+
Object.defineProperty(exports, "SDKErrorCode", { enumerable: true, get: function () { return codes_1.SDKErrorCode; } });
|
|
25
|
+
Object.defineProperty(exports, "RETRIABLE_ERROR_CODES", { enumerable: true, get: function () { return codes_1.RETRIABLE_ERROR_CODES; } });
|
|
26
|
+
Object.defineProperty(exports, "RETRIABLE_HTTP_STATUS_CODES", { enumerable: true, get: function () { return codes_1.RETRIABLE_HTTP_STATUS_CODES; } });
|
|
27
|
+
Object.defineProperty(exports, "isRetriableCode", { enumerable: true, get: function () { return codes_1.isRetriableCode; } });
|
|
28
|
+
Object.defineProperty(exports, "isRetriableStatus", { enumerable: true, get: function () { return codes_1.isRetriableStatus; } });
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// BASE ERROR CLASS
|
|
31
|
+
// ============================================================================
|
|
32
|
+
var base_1 = require("./base");
|
|
33
|
+
Object.defineProperty(exports, "SDKError", { enumerable: true, get: function () { return base_1.SDKError; } });
|
|
34
|
+
// ============================================================================
|
|
35
|
+
// ERROR CLASSES
|
|
36
|
+
// ============================================================================
|
|
37
|
+
var classes_1 = require("./classes");
|
|
38
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return classes_1.ValidationError; } });
|
|
39
|
+
Object.defineProperty(exports, "AuthError", { enumerable: true, get: function () { return classes_1.AuthError; } });
|
|
40
|
+
Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return classes_1.ForbiddenError; } });
|
|
41
|
+
Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return classes_1.NotFoundError; } });
|
|
42
|
+
Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return classes_1.RateLimitError; } });
|
|
43
|
+
Object.defineProperty(exports, "NetworkError", { enumerable: true, get: function () { return classes_1.NetworkError; } });
|
|
44
|
+
Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function () { return classes_1.TimeoutError; } });
|
|
45
|
+
Object.defineProperty(exports, "ServerError", { enumerable: true, get: function () { return classes_1.ServerError; } });
|
|
46
|
+
Object.defineProperty(exports, "UnexpectedError", { enumerable: true, get: function () { return classes_1.UnexpectedError; } });
|
|
47
|
+
// ============================================================================
|
|
48
|
+
// FACTORY FUNCTIONS
|
|
49
|
+
// ============================================================================
|
|
50
|
+
var factory_1 = require("./factory");
|
|
51
|
+
Object.defineProperty(exports, "createErrorFromResponse", { enumerable: true, get: function () { return factory_1.createErrorFromResponse; } });
|
|
52
|
+
Object.defineProperty(exports, "createErrorFromException", { enumerable: true, get: function () { return factory_1.createErrorFromException; } });
|
|
53
|
+
// ============================================================================
|
|
54
|
+
// TYPE GUARDS & UTILITIES
|
|
55
|
+
// ============================================================================
|
|
56
|
+
var guards_1 = require("./guards");
|
|
57
|
+
// Type guards
|
|
58
|
+
Object.defineProperty(exports, "isSDKError", { enumerable: true, get: function () { return guards_1.isSDKError; } });
|
|
59
|
+
Object.defineProperty(exports, "isAuthError", { enumerable: true, get: function () { return guards_1.isAuthError; } });
|
|
60
|
+
Object.defineProperty(exports, "isForbiddenError", { enumerable: true, get: function () { return guards_1.isForbiddenError; } });
|
|
61
|
+
Object.defineProperty(exports, "isNetworkError", { enumerable: true, get: function () { return guards_1.isNetworkError; } });
|
|
62
|
+
Object.defineProperty(exports, "isTimeoutError", { enumerable: true, get: function () { return guards_1.isTimeoutError; } });
|
|
63
|
+
Object.defineProperty(exports, "isServerError", { enumerable: true, get: function () { return guards_1.isServerError; } });
|
|
64
|
+
Object.defineProperty(exports, "isValidationError", { enumerable: true, get: function () { return guards_1.isValidationError; } });
|
|
65
|
+
Object.defineProperty(exports, "isNotFoundError", { enumerable: true, get: function () { return guards_1.isNotFoundError; } });
|
|
66
|
+
Object.defineProperty(exports, "isRateLimitError", { enumerable: true, get: function () { return guards_1.isRateLimitError; } });
|
|
67
|
+
Object.defineProperty(exports, "isUnexpectedError", { enumerable: true, get: function () { return guards_1.isUnexpectedError; } });
|
|
68
|
+
// Utility functions
|
|
69
|
+
Object.defineProperty(exports, "isRetryable", { enumerable: true, get: function () { return guards_1.isRetryable; } });
|
|
70
|
+
Object.defineProperty(exports, "getRetryDelay", { enumerable: true, get: function () { return guards_1.getRetryDelay; } });
|
|
71
|
+
Object.defineProperty(exports, "shouldReauthenticate", { enumerable: true, get: function () { return guards_1.shouldReauthenticate; } });
|
|
72
|
+
Object.defineProperty(exports, "isClientError", { enumerable: true, get: function () { return guards_1.isClientError; } });
|
|
73
|
+
Object.defineProperty(exports, "isTransientError", { enumerable: true, get: function () { return guards_1.isTransientError; } });
|
|
74
|
+
Object.defineProperty(exports, "extractStatusCode", { enumerable: true, get: function () { return guards_1.extractStatusCode; } });
|
|
75
|
+
Object.defineProperty(exports, "extractErrorCode", { enumerable: true, get: function () { return guards_1.extractErrorCode; } });
|
|
76
|
+
Object.defineProperty(exports, "getUserFriendlyMessage", { enumerable: true, get: function () { return guards_1.getUserFriendlyMessage; } });
|
|
77
|
+
// ============================================================================
|
|
78
|
+
// BACKWARD COMPATIBILITY
|
|
79
|
+
// ============================================================================
|
|
80
|
+
var compat_1 = require("./compat");
|
|
81
|
+
Object.defineProperty(exports, "toLegacyError", { enumerable: true, get: function () { return compat_1.toLegacyError; } });
|
|
82
|
+
Object.defineProperty(exports, "fromLegacyError", { enumerable: true, get: function () { return compat_1.fromLegacyError; } });
|
|
83
|
+
Object.defineProperty(exports, "isLegacyError", { enumerable: true, get: function () { return compat_1.isLegacyError; } });
|
|
84
|
+
Object.defineProperty(exports, "parseLegacyError", { enumerable: true, get: function () { return compat_1.parseLegacyError; } });
|
|
85
|
+
Object.defineProperty(exports, "withLegacyErrors", { enumerable: true, get: function () { return compat_1.withLegacyErrors; } });
|
|
86
|
+
Object.defineProperty(exports, "withStructuredErrors", { enumerable: true, get: function () { return compat_1.withStructuredErrors; } });
|
|
87
|
+
Object.defineProperty(exports, "isApiError", { enumerable: true, get: function () { return compat_1.isApiError; } });
|
|
88
|
+
Object.defineProperty(exports, "getHttpStatus", { enumerable: true, get: function () { return compat_1.getHttpStatus; } });
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAcH,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,iCAMiB;AALf,qGAAA,YAAY,OAAA;AACZ,8GAAA,qBAAqB,OAAA;AACrB,oHAAA,2BAA2B,OAAA;AAC3B,wGAAA,eAAe,OAAA;AACf,0GAAA,iBAAiB,OAAA;AAKnB,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,+BAAkC;AAAzB,gGAAA,QAAQ,OAAA;AAEjB,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,qCAUmB;AATjB,0GAAA,eAAe,OAAA;AACf,oG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|
+
*
|
|
5
|
+
* @module errors/types
|
|
6
|
+
* @since 2.17.0
|
|
7
|
+
*/
|
|
8
|
+
import type { SDKErrorCodeType } from "./codes";
|
|
9
|
+
/**
|
|
10
|
+
* Metadata attached to errors for debugging and observability.
|
|
11
|
+
* Contains request context without sensitive data.
|
|
12
|
+
*/
|
|
13
|
+
export interface RequestMetadata {
|
|
14
|
+
/** Unique request identifier for log correlation */
|
|
15
|
+
requestId?: string;
|
|
16
|
+
/** API endpoint path (e.g., "/v1/shop/carts") */
|
|
17
|
+
endpoint?: string;
|
|
18
|
+
/** HTTP method (GET, POST, etc.) */
|
|
19
|
+
method?: string;
|
|
20
|
+
/** Request duration in milliseconds */
|
|
21
|
+
durationMs?: number;
|
|
22
|
+
/** Service or provider name */
|
|
23
|
+
service?: string;
|
|
24
|
+
/** SDK method name (e.g., "updateCommercialOrderLines") */
|
|
25
|
+
sdkMethod?: string;
|
|
26
|
+
/** Retry attempt number (1-based) */
|
|
27
|
+
attempt?: number;
|
|
28
|
+
/** Query parameters (sanitized, no sensitive data) */
|
|
29
|
+
queryParams?: Record<string, unknown>;
|
|
30
|
+
/** Request body (sanitized, no sensitive data like passwords/tokens) */
|
|
31
|
+
body?: unknown;
|
|
32
|
+
/** Outbound request headers (sanitized, no secrets) */
|
|
33
|
+
headers?: Record<string, string>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Options for constructing an SDKError.
|
|
37
|
+
*/
|
|
38
|
+
export interface SDKErrorOptions {
|
|
39
|
+
/** Stable error code for programmatic handling */
|
|
40
|
+
code: SDKErrorCodeType;
|
|
41
|
+
/** Human-readable error message */
|
|
42
|
+
message: string;
|
|
43
|
+
/** HTTP status code (0 for non-HTTP errors) */
|
|
44
|
+
httpStatus?: number;
|
|
45
|
+
/** Additional structured details (non-sensitive) */
|
|
46
|
+
details?: Record<string, unknown>;
|
|
47
|
+
/** Original error that caused this error */
|
|
48
|
+
cause?: Error;
|
|
49
|
+
/** Whether the operation can be retried */
|
|
50
|
+
retriable?: boolean;
|
|
51
|
+
/** Suggested delay before retry in milliseconds */
|
|
52
|
+
retryAfterMs?: number;
|
|
53
|
+
/** Request context metadata */
|
|
54
|
+
metadata?: RequestMetadata;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Options for creating errors from HTTP responses.
|
|
58
|
+
*/
|
|
59
|
+
export interface ErrorFactoryOptions {
|
|
60
|
+
/** HTTP response status code */
|
|
61
|
+
statusCode: number;
|
|
62
|
+
/** Response body as string */
|
|
63
|
+
body: string;
|
|
64
|
+
/** Request URL */
|
|
65
|
+
url?: string;
|
|
66
|
+
/** HTTP method */
|
|
67
|
+
method?: string;
|
|
68
|
+
/** Request duration in milliseconds */
|
|
69
|
+
durationMs?: number;
|
|
70
|
+
/** Request correlation ID */
|
|
71
|
+
requestId?: string;
|
|
72
|
+
/** SDK method name (e.g., "updateCommercialOrderLines") */
|
|
73
|
+
sdkMethod?: string;
|
|
74
|
+
/** Query parameters from the request */
|
|
75
|
+
queryParams?: Record<string, unknown>;
|
|
76
|
+
/** Request body (will be sanitized in metadata) */
|
|
77
|
+
requestBody?: unknown;
|
|
78
|
+
/** Outbound request headers (sanitized, no secrets) */
|
|
79
|
+
requestHeaders?: Record<string, string>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* JSON-serializable error representation for logging.
|
|
83
|
+
*/
|
|
84
|
+
export interface SerializedError {
|
|
85
|
+
name: string;
|
|
86
|
+
code: SDKErrorCodeType;
|
|
87
|
+
message: string;
|
|
88
|
+
httpStatus: number;
|
|
89
|
+
retriable: boolean;
|
|
90
|
+
retryAfterMs?: number;
|
|
91
|
+
details: Record<string, unknown>;
|
|
92
|
+
metadata: RequestMetadata;
|
|
93
|
+
timestamp: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Client-safe error representation (no sensitive data).
|
|
97
|
+
*/
|
|
98
|
+
export interface ClientSafeError {
|
|
99
|
+
code: SDKErrorCodeType;
|
|
100
|
+
message: string;
|
|
101
|
+
httpStatus: number;
|
|
102
|
+
retriable: boolean;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/errors/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMhD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEtC,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAMD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,IAAI,EAAE,gBAAgB,CAAC;IAEvB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAElC,4CAA4C;IAC5C,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd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