@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,564 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.autoCompleteSearchProducts = autoCompleteSearchProducts;
|
|
4
|
+
exports.getProductsList = getProductsList;
|
|
5
|
+
exports.getProductVariantOffers = getProductVariantOffers;
|
|
6
|
+
exports.getProductVariantSuppliers = getProductVariantSuppliers;
|
|
7
|
+
exports.getProduct = getProduct;
|
|
8
|
+
exports.getProductOffers = getProductOffers;
|
|
9
|
+
exports.getRelatedProducts = getRelatedProducts;
|
|
10
|
+
exports.getProductReviews = getProductReviews;
|
|
11
|
+
exports.getProductStatReviews = getProductStatReviews;
|
|
12
|
+
exports.getProductVariantAttributes = getProductVariantAttributes;
|
|
13
|
+
exports.createProductReview = createProductReview;
|
|
14
|
+
exports.updateProductReview = updateProductReview;
|
|
15
|
+
exports.getProductPaginatedOffers = getProductPaginatedOffers;
|
|
16
|
+
const parameters_validation_1 = require("../../helpers/parameters-validation");
|
|
17
|
+
const fetch_instance_1 = require("../../settings/fetch-instance");
|
|
18
|
+
/**
|
|
19
|
+
* 📄 Search products with a text expression for search and autocomplete.
|
|
20
|
+
*
|
|
21
|
+
* This function provides product search and autocomplete capabilities.
|
|
22
|
+
*
|
|
23
|
+
* 🛠 **Endpoint**: `GET /v2/shop/autocomplete`
|
|
24
|
+
*
|
|
25
|
+
* | Parameter | Type | Required | Description |
|
|
26
|
+
* |-----------------|--------------|----------|---------------------------------------------|
|
|
27
|
+
* | `input` | `string` | ✅ | The text expression to search for. |
|
|
28
|
+
* | `locale` | `string` | ✅ | The locale for the search. |
|
|
29
|
+
* | `currency` | `string` | ✅ | The currency for price formatting. |
|
|
30
|
+
* | `pageable.page` | `number` | ❌ | The page number to fetch (0-based index). |
|
|
31
|
+
* | `pageable.size` | `number` | ❌ | The number of items per page. |
|
|
32
|
+
* | `aggregation` | `boolean` | ❌ | Whether to include aggregation data. |
|
|
33
|
+
* | `productTags` | `string[]` | ❌ | Filters by product tags. |
|
|
34
|
+
*
|
|
35
|
+
* 📤 **Returns**:
|
|
36
|
+
* A `Promise` resolving to a `SearchProductsResponse` containing the matched products.
|
|
37
|
+
*
|
|
38
|
+
* 🛠 **Example usage**:
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const products = await autoCompleteSearchProducts({
|
|
41
|
+
* input: 'laptop',
|
|
42
|
+
* locale: 'en-US',
|
|
43
|
+
* currency: 'USD',
|
|
44
|
+
* pageable: { page: 0, size: 10 },
|
|
45
|
+
* });
|
|
46
|
+
* console.log(products);
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
async function autoCompleteSearchProducts({ input, locale, currency, pageable, aggregation, productTags, }) {
|
|
50
|
+
(0, parameters_validation_1.required)({ input, locale, currency });
|
|
51
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
52
|
+
method: "GET",
|
|
53
|
+
path: `/v2/shop/autocomplete`,
|
|
54
|
+
params: {
|
|
55
|
+
input,
|
|
56
|
+
locale,
|
|
57
|
+
currency,
|
|
58
|
+
aggregation,
|
|
59
|
+
productTags,
|
|
60
|
+
page: pageable?.page,
|
|
61
|
+
size: pageable?.size,
|
|
62
|
+
sort: pageable?.sort,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
return data;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 📄 Fetches a list of products with thumbnails, reviews, attributes, and best offers.
|
|
69
|
+
*
|
|
70
|
+
* 🛠 **Endpoint**: `GET /v2/shop/search`
|
|
71
|
+
*
|
|
72
|
+
* | Parameter | Type | Required | Description |
|
|
73
|
+
* |-----------------|--------------|----------|---------------------------------------------|
|
|
74
|
+
* | `locale` | `string` | ✅ | The locale for product data. |
|
|
75
|
+
* | `hasOfferPrice` | `boolean` | ❌ | If `true`, only products with an offer price. Default `false`. |
|
|
76
|
+
* | `filters` | `object` | ❌ | Filters for narrowing down search results. |
|
|
77
|
+
* | `pageable.page` | `number` | ❌ | The page number to fetch (0-based index). |
|
|
78
|
+
* | `pageable.size` | `number` | ❌ | The number of items per page. |
|
|
79
|
+
*
|
|
80
|
+
* 📤 **Returns**:
|
|
81
|
+
* A `Promise` resolving to a `GetProductsListResponse` containing the products and their metadata.
|
|
82
|
+
*
|
|
83
|
+
* 🛠 **Example usage**:
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const products = await getProductsList({
|
|
86
|
+
* locale: 'en-US',
|
|
87
|
+
* filters: { category: 'electronics' },
|
|
88
|
+
* pageable: { page: 1, size: 20 },
|
|
89
|
+
* });
|
|
90
|
+
* console.log(products);
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
async function getProductsList({ locale, filters, pageable, hasOfferPrice = false, }) {
|
|
94
|
+
(0, parameters_validation_1.required)({ locale });
|
|
95
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
96
|
+
method: "GET",
|
|
97
|
+
path: "/v2/shop/search",
|
|
98
|
+
params: {
|
|
99
|
+
...filters,
|
|
100
|
+
locale,
|
|
101
|
+
page: pageable?.page,
|
|
102
|
+
size: pageable?.size,
|
|
103
|
+
sort: pageable?.sort,
|
|
104
|
+
hasOfferPrice,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
return data;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* 📄 Fetches offers for a specific product variant.
|
|
111
|
+
*
|
|
112
|
+
* Retrieves the list of offers available for a product variant identified by SKU, ID, or external ID.
|
|
113
|
+
*
|
|
114
|
+
* 🛠 **Endpoint**: `GET /v1/shop/product-variants/{productIdentifier}/offers`
|
|
115
|
+
*
|
|
116
|
+
* | Parameter | Type | Required | Description |
|
|
117
|
+
* |-----------------------|-------------|------------|---------------------------------------------------------------|
|
|
118
|
+
* | `productIdentifier` | `string` | ✅ | Unique identifier for the product variant (e.g., SKU, ID). |
|
|
119
|
+
* | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
|
|
120
|
+
* | `currency` | `string` | ✅ | Currency in which offers should be returned (e.g., `"USD"`). |
|
|
121
|
+
*
|
|
122
|
+
* 📤 **Returns**:
|
|
123
|
+
* A `Promise<GetProductVariantOffersResponse>` containing a list of offers for the product variant.
|
|
124
|
+
*
|
|
125
|
+
* 🛠 **Example usage**:
|
|
126
|
+
* ```ts
|
|
127
|
+
* const offers = await getProductVariantOffers({
|
|
128
|
+
* productIdentifier: 'sku123',
|
|
129
|
+
* productIdType: 'sku',
|
|
130
|
+
* currency: 'USD',
|
|
131
|
+
* });
|
|
132
|
+
*
|
|
133
|
+
* console.log(offers);
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* **Example Response**:
|
|
137
|
+
* ```json
|
|
138
|
+
* {
|
|
139
|
+
* "offers": [
|
|
140
|
+
* {
|
|
141
|
+
* "id": "offer1",
|
|
142
|
+
* "price": 19.99,
|
|
143
|
+
* "currency": "USD",
|
|
144
|
+
* "availability": "In Stock",
|
|
145
|
+
* "seller": "Seller A"
|
|
146
|
+
* },
|
|
147
|
+
* {
|
|
148
|
+
* "id": "offer2",
|
|
149
|
+
* "price": 17.99,
|
|
150
|
+
* "currency": "USD",
|
|
151
|
+
* "availability": "Limited Stock",
|
|
152
|
+
* "seller": "Seller B"
|
|
153
|
+
* }
|
|
154
|
+
* ]
|
|
155
|
+
* }
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
async function getProductVariantOffers({ productIdentifier, productIdType, currency, withoutPrice, }) {
|
|
159
|
+
(0, parameters_validation_1.required)({ productIdentifier, productIdType });
|
|
160
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
161
|
+
method: "GET",
|
|
162
|
+
path: `/v1/shop/product-variants/${productIdentifier}/offers`,
|
|
163
|
+
params: {
|
|
164
|
+
productIdType,
|
|
165
|
+
currency,
|
|
166
|
+
withoutPrice,
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
return data;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* 📄 Fetches suppliers associated with a product variant.
|
|
173
|
+
*
|
|
174
|
+
* Retrieves a list of suppliers for a given product variant.
|
|
175
|
+
*
|
|
176
|
+
* 🛠 **Endpoint**: `GET /v1/shop/product-variants/{productVariantId}/suppliers`
|
|
177
|
+
*
|
|
178
|
+
* | Parameter | Type | Required | Description |
|
|
179
|
+
* |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
|
|
180
|
+
* | `productVariantId` | `string` | ✅ | ID of the product variant. |
|
|
181
|
+
*
|
|
182
|
+
* 📤 **Returns**:
|
|
183
|
+
* A `Promise<GetProductVariantSuppliersResponse>` containing the list of suppliers.
|
|
184
|
+
*
|
|
185
|
+
* 🛠 **Example usage**:
|
|
186
|
+
* ```ts
|
|
187
|
+
* const suppliers = await getProductVariantSuppliers({
|
|
188
|
+
* productVariantId: 'variant123',
|
|
189
|
+
* });
|
|
190
|
+
*
|
|
191
|
+
* console.log(suppliers);
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
async function getProductVariantSuppliers({ productVariantId, }) {
|
|
195
|
+
(0, parameters_validation_1.required)({ productVariantId });
|
|
196
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
197
|
+
method: "GET",
|
|
198
|
+
path: `/v1/shop/product-variants/${productVariantId}/suppliers`,
|
|
199
|
+
});
|
|
200
|
+
return data;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* 📄 Fetches details for a specific product.
|
|
204
|
+
*
|
|
205
|
+
* Retrieves information about a product identified by SKU, ID, or external ID.
|
|
206
|
+
*
|
|
207
|
+
* 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}`
|
|
208
|
+
*
|
|
209
|
+
* | Parameter | Type | Required | Description |
|
|
210
|
+
* |-----------------------|-------------|------------|---------------------------------------------------------------|
|
|
211
|
+
* | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
|
|
212
|
+
* | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
|
|
213
|
+
* | `locale` | `string` | ✅ | Locale for the product details (e.g., `"en_US"`). |
|
|
214
|
+
*
|
|
215
|
+
* 📤 **Returns**:
|
|
216
|
+
* A `Promise<GetProductsListResponse>` containing the product details.
|
|
217
|
+
*
|
|
218
|
+
* 🛠 **Example usage**:
|
|
219
|
+
* ```ts
|
|
220
|
+
* const product = await getProduct({
|
|
221
|
+
* productIdentifier: 'sku123',
|
|
222
|
+
* productIdType: 'sku',
|
|
223
|
+
* locale: 'en_US',
|
|
224
|
+
* });
|
|
225
|
+
*
|
|
226
|
+
* console.log(product);
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
async function getProduct({ productIdentifier, productIdType, locale, }) {
|
|
230
|
+
(0, parameters_validation_1.required)({ productIdentifier, productIdType });
|
|
231
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
232
|
+
method: "GET",
|
|
233
|
+
path: `/v1/shop/products/${productIdentifier}`,
|
|
234
|
+
params: {
|
|
235
|
+
productIdType,
|
|
236
|
+
locale,
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
return data;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @deprecated
|
|
243
|
+
*
|
|
244
|
+
* 📄 Fetches product offers by SKU, ID, or external ID.
|
|
245
|
+
*
|
|
246
|
+
* 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/offers`
|
|
247
|
+
*
|
|
248
|
+
* | Parameter | Type | Required | Description |
|
|
249
|
+
* |---------------------|--------------|----------|-------------------------------------------------|
|
|
250
|
+
* | `productIdentifier` | `string` | ✅ | The unique identifier of the product. |
|
|
251
|
+
* | `productIdType` | `string` | ✅ | The type of the identifier (`sku`, `id`, etc.).|
|
|
252
|
+
* | `currency` | `string` | ✅ | The currency for the offer details. |
|
|
253
|
+
*
|
|
254
|
+
* 📤 **Returns**:
|
|
255
|
+
* A `Promise` resolving to a `GetProductVariantOffersResponse` containing the offers.
|
|
256
|
+
*
|
|
257
|
+
* 🛠 **Example usage**:
|
|
258
|
+
* ```typescript
|
|
259
|
+
* const offers = await getProductVariantOffers({
|
|
260
|
+
* productIdentifier: 'sku123',
|
|
261
|
+
* productIdType: 'sku',
|
|
262
|
+
* currency: 'USD',
|
|
263
|
+
* });
|
|
264
|
+
* console.log(offers);
|
|
265
|
+
* ```
|
|
266
|
+
* SWAGGER [PRODUCT-502]
|
|
267
|
+
*/
|
|
268
|
+
async function getProductOffers({ productIdentifier, productIdType, locale, currency, withoutPrice, }) {
|
|
269
|
+
(0, parameters_validation_1.required)({ productIdentifier, productIdType });
|
|
270
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
271
|
+
method: "GET",
|
|
272
|
+
path: `/v1/shop/products/${productIdentifier}/offers`,
|
|
273
|
+
params: {
|
|
274
|
+
productIdType,
|
|
275
|
+
locale,
|
|
276
|
+
currency,
|
|
277
|
+
withoutPrice,
|
|
278
|
+
},
|
|
279
|
+
});
|
|
280
|
+
return data;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* 📄 Fetches related products for a specific product.
|
|
284
|
+
*
|
|
285
|
+
* Retrieves a paginated list of related products identified by SKU, ID, or external ID.
|
|
286
|
+
*
|
|
287
|
+
* 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/related-products`
|
|
288
|
+
*
|
|
289
|
+
* | Parameter | Type | Required | Description |
|
|
290
|
+
* |-----------------------|-------------|------------|---------------------------------------------------------------|
|
|
291
|
+
* | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
|
|
292
|
+
* | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
|
|
293
|
+
* | `locale` | `string` | ✅ | Locale for the related products (e.g., `"en_US"`). |
|
|
294
|
+
* | `currency` | `string` | ✅ | Currency for the related products (e.g., `"USD"`). |
|
|
295
|
+
* | `pageable` | `object` | ❌ | Pagination details: `page`, `size`, `sort`. |
|
|
296
|
+
*
|
|
297
|
+
* 📤 **Returns**:
|
|
298
|
+
* A `Promise<GetRelatedProductsParameters>` containing related products.
|
|
299
|
+
*
|
|
300
|
+
* 🛠 **Example usage**:
|
|
301
|
+
* ```ts
|
|
302
|
+
* const relatedProducts = await getRelatedProducts({
|
|
303
|
+
* productIdentifier: 'sku123',
|
|
304
|
+
* productIdType: 'sku',
|
|
305
|
+
* locale: 'en_US',
|
|
306
|
+
* currency: 'USD',
|
|
307
|
+
* pageable: { page: 1, size: 10 },
|
|
308
|
+
* });
|
|
309
|
+
*
|
|
310
|
+
* console.log(relatedProducts);
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
async function getRelatedProducts({ productIdentifier, productIdType, locale, currency, pageable, }) {
|
|
314
|
+
(0, parameters_validation_1.required)({ productIdentifier, productIdType });
|
|
315
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
316
|
+
method: "GET",
|
|
317
|
+
path: `/v1/shop/products/${productIdentifier}/related-products`,
|
|
318
|
+
params: {
|
|
319
|
+
productIdType,
|
|
320
|
+
locale,
|
|
321
|
+
currency,
|
|
322
|
+
page: pageable?.page,
|
|
323
|
+
size: pageable?.size,
|
|
324
|
+
sort: pageable?.sort,
|
|
325
|
+
},
|
|
326
|
+
});
|
|
327
|
+
return data;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* 📄 Fetches reviews for a specific product.
|
|
331
|
+
*
|
|
332
|
+
* Retrieves a list of reviews for a product identified by SKU, ID, or external ID.
|
|
333
|
+
*
|
|
334
|
+
* 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/reviews`
|
|
335
|
+
*
|
|
336
|
+
* | Parameter | Type | Required | Description |
|
|
337
|
+
* |-----------------------|-------------|------------|---------------------------------------------------------------|
|
|
338
|
+
* | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
|
|
339
|
+
* | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
|
|
340
|
+
*
|
|
341
|
+
* 📤 **Returns**:
|
|
342
|
+
* A `Promise<GetProductReviewsResponse>` containing the reviews.
|
|
343
|
+
*
|
|
344
|
+
* 🛠 **Example usage**:
|
|
345
|
+
* ```ts
|
|
346
|
+
* const reviews = await getProductReviews({
|
|
347
|
+
* productIdentifier: 'sku123',
|
|
348
|
+
* productIdType: 'sku',
|
|
349
|
+
* });
|
|
350
|
+
*
|
|
351
|
+
* console.log(reviews);
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
354
|
+
async function getProductReviews({ productIdentifier, productIdType, }) {
|
|
355
|
+
(0, parameters_validation_1.required)({ productIdentifier, productIdType });
|
|
356
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
357
|
+
method: "GET",
|
|
358
|
+
path: `/v1/shop/products/${productIdentifier}/reviews`,
|
|
359
|
+
params: {
|
|
360
|
+
productIdType,
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
return data;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* 📄 Fetches statistical review data for a specific product.
|
|
367
|
+
*
|
|
368
|
+
* Retrieves aggregate review statistics for a product identified by SKU, ID, or external ID.
|
|
369
|
+
*
|
|
370
|
+
* 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/stat-reviews`
|
|
371
|
+
*
|
|
372
|
+
* | Parameter | Type | Required | Description |
|
|
373
|
+
* |-----------------------|-------------|------------|---------------------------------------------------------------|
|
|
374
|
+
* | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
|
|
375
|
+
* | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
|
|
376
|
+
*
|
|
377
|
+
* 📤 **Returns**:
|
|
378
|
+
* A `Promise<GetProductStatReviewsResponse>` containing review statistics.
|
|
379
|
+
*
|
|
380
|
+
* 🛠 **Example usage**:
|
|
381
|
+
* ```ts
|
|
382
|
+
* const stats = await getProductStatReviews({
|
|
383
|
+
* productIdentifier: 'sku123',
|
|
384
|
+
* productIdType: 'sku',
|
|
385
|
+
* });
|
|
386
|
+
*
|
|
387
|
+
* console.log(stats);
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
async function getProductStatReviews({ productIdentifier, productIdType, }) {
|
|
391
|
+
(0, parameters_validation_1.required)({ productIdentifier, productIdType });
|
|
392
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
393
|
+
method: "GET",
|
|
394
|
+
path: `/v1/shop/products/${productIdentifier}/stat-reviews`,
|
|
395
|
+
params: {
|
|
396
|
+
productIdType,
|
|
397
|
+
},
|
|
398
|
+
});
|
|
399
|
+
return data;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* 📄 Fetches attributes for a product variant.
|
|
403
|
+
*
|
|
404
|
+
* Retrieves attributes for a product variant identified by SKU, ID, or external ID.
|
|
405
|
+
*
|
|
406
|
+
* 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/variant-attributes`
|
|
407
|
+
*
|
|
408
|
+
* | Parameter | Type | Required | Description |
|
|
409
|
+
* |-----------------------|-------------|------------|---------------------------------------------------------------|
|
|
410
|
+
* | `productIdentifier` | `string` | ✅ | Unique identifier for the product variant (e.g., SKU, ID). |
|
|
411
|
+
* | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
|
|
412
|
+
* | `locale` | `string` | ✅ | Locale for the attributes (e.g., `"en_US"`). |
|
|
413
|
+
*
|
|
414
|
+
* 📤 **Returns**:
|
|
415
|
+
* A `Promise<GetProductVariantAttributesResponse>` containing variant attributes.
|
|
416
|
+
*
|
|
417
|
+
* 🛠 **Example usage**:
|
|
418
|
+
* ```ts
|
|
419
|
+
* const attributes = await getProductVariantAttributes({
|
|
420
|
+
* productIdentifier: 'sku123',
|
|
421
|
+
* productIdType: 'sku',
|
|
422
|
+
* locale: 'en_US',
|
|
423
|
+
* });
|
|
424
|
+
*
|
|
425
|
+
* console.log(attributes);
|
|
426
|
+
* ```
|
|
427
|
+
*/
|
|
428
|
+
async function getProductVariantAttributes({ productIdentifier, productIdType, locale, }) {
|
|
429
|
+
(0, parameters_validation_1.required)({ productIdentifier, productIdType });
|
|
430
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
431
|
+
method: "GET",
|
|
432
|
+
path: `/v1/shop/products/${productIdentifier}/variant-attributes`,
|
|
433
|
+
params: {
|
|
434
|
+
productIdType,
|
|
435
|
+
locale,
|
|
436
|
+
},
|
|
437
|
+
});
|
|
438
|
+
return data;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* 📄 Creates a review for a product.
|
|
442
|
+
*
|
|
443
|
+
* Submits a review for a specific product based on its SKU.
|
|
444
|
+
*
|
|
445
|
+
* 🛠 **Endpoint**: `POST /v1/shop/reviews`
|
|
446
|
+
*
|
|
447
|
+
* | Parameter | Type | Required | Description |
|
|
448
|
+
* |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
|
|
449
|
+
* | `message` | `string` | ✅ | Review content. |
|
|
450
|
+
* | `productSku` | `string` | ✅ | SKU of the product to review. |
|
|
451
|
+
* | `rating` | `number` | ✅ | Rating (e.g., 1 to 5). |
|
|
452
|
+
*
|
|
453
|
+
* 📤 **Returns**:
|
|
454
|
+
* A `Promise<CreateProductReviewResponse>` indicating the result of the operation.
|
|
455
|
+
*
|
|
456
|
+
* 🛠 **Example usage**:
|
|
457
|
+
* ```ts
|
|
458
|
+
* const review = await createProductReview({
|
|
459
|
+
* message: 'Great product!',
|
|
460
|
+
* productSku: 'sku123',
|
|
461
|
+
* rating: 5,
|
|
462
|
+
* });
|
|
463
|
+
*
|
|
464
|
+
* console.log(review);
|
|
465
|
+
* ```
|
|
466
|
+
*/
|
|
467
|
+
async function createProductReview({ message, productSku, rating, }) {
|
|
468
|
+
(0, parameters_validation_1.required)({ message, productSku, rating });
|
|
469
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
470
|
+
method: "POST",
|
|
471
|
+
path: "/v1/shop/reviews",
|
|
472
|
+
body: JSON.stringify({
|
|
473
|
+
message: message,
|
|
474
|
+
productSku: productSku,
|
|
475
|
+
rating: rating,
|
|
476
|
+
}),
|
|
477
|
+
});
|
|
478
|
+
return data;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* 📄 Updates an existing review for a product.
|
|
482
|
+
*
|
|
483
|
+
* Modifies the content and/or rating of an existing review for a specific product.
|
|
484
|
+
*
|
|
485
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/reviews/{productReviewId}`
|
|
486
|
+
*
|
|
487
|
+
* | Parameter | Type | Required | Description |
|
|
488
|
+
* |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
|
|
489
|
+
* | `productReviewId` | `string` | ✅ | ID of the review to update. |
|
|
490
|
+
* | `message` | `string` | ✅ | New review content. |
|
|
491
|
+
* | `rating` | `number` | ✅ | New rating (e.g., 1 to 5). |
|
|
492
|
+
*
|
|
493
|
+
* 📤 **Returns**:
|
|
494
|
+
* A `Promise<UpdateProductReviewResponse>` indicating the result of the operation.
|
|
495
|
+
*
|
|
496
|
+
* 🛠 **Example usage**:
|
|
497
|
+
* ```ts
|
|
498
|
+
* const updatedReview = await updateProductReview({
|
|
499
|
+
* productReviewId: 'review123',
|
|
500
|
+
* message: 'Updated my thoughts, still a great product!',
|
|
501
|
+
* rating: 4,
|
|
502
|
+
* });
|
|
503
|
+
*
|
|
504
|
+
* console.log(updatedReview);
|
|
505
|
+
* ```
|
|
506
|
+
*/
|
|
507
|
+
async function updateProductReview({ productReviewId, message, rating, }) {
|
|
508
|
+
(0, parameters_validation_1.required)({ productReviewId, message, rating });
|
|
509
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
510
|
+
method: "PUT",
|
|
511
|
+
path: `/v1/shop/reviews/${productReviewId}`,
|
|
512
|
+
body: JSON.stringify({
|
|
513
|
+
message: message,
|
|
514
|
+
rating: rating,
|
|
515
|
+
}),
|
|
516
|
+
});
|
|
517
|
+
return data;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* 📄 Fetches paginated offers for a product.
|
|
521
|
+
*
|
|
522
|
+
* Retrieves offers for a product identified by SKU, ID, or external ID, with pagination support.
|
|
523
|
+
*
|
|
524
|
+
* 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/paginated-offers`
|
|
525
|
+
*
|
|
526
|
+
* | Parameter | Type | Required | Description |
|
|
527
|
+
* |-----------------------|-------------|------------|---------------------------------------------------------------|
|
|
528
|
+
* | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
|
|
529
|
+
* | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
|
|
530
|
+
* | `currency` | `string` | ✅ | Currency for the offers (e.g., `"USD"`). |
|
|
531
|
+
* | `locale` | `string` | ✅ | Locale for the offers (e.g., `"en_US"`). |
|
|
532
|
+
* | `withoutPrices` | `boolean` | ❌ | Whether to exclude prices from the response. |
|
|
533
|
+
* | `pageable` | `object` | ❌ | Pagination details: `page`, `size`, `sort`. |
|
|
534
|
+
*
|
|
535
|
+
* 📤 **Returns**:
|
|
536
|
+
* A `Promise<GetProductPaginatedOffersResponse>` containing paginated offers.
|
|
537
|
+
*
|
|
538
|
+
* 🛠 **Example usage**:
|
|
539
|
+
* ```ts
|
|
540
|
+
* const offers = await getProductPaginatedOffers({
|
|
541
|
+
* productIdentifier: 'sku123',
|
|
542
|
+
* productIdType: 'sku',
|
|
543
|
+
* currency: 'USD',
|
|
544
|
+
* locale: 'en_US',
|
|
545
|
+
* pageable: { page: 1, size
|
|
546
|
+
*/
|
|
547
|
+
async function getProductPaginatedOffers({ productIdentifier, productIdType, currency, locale, withoutPrices, pageable, }) {
|
|
548
|
+
(0, parameters_validation_1.required)({ productIdentifier, productIdType });
|
|
549
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
550
|
+
method: "GET",
|
|
551
|
+
path: `/v1/shop/products/${productIdentifier}/paginated-offers`,
|
|
552
|
+
params: {
|
|
553
|
+
productIdType,
|
|
554
|
+
currency,
|
|
555
|
+
locale,
|
|
556
|
+
withoutPrices,
|
|
557
|
+
page: pageable?.page,
|
|
558
|
+
size: pageable?.size,
|
|
559
|
+
sort: pageable?.sort,
|
|
560
|
+
},
|
|
561
|
+
});
|
|
562
|
+
return data;
|
|
563
|
+
}
|
|
564
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/product/index.ts"],"names":[],"mappings":";;AA6DA,gEA0BC;AA4BD,0CAsBC;AAmDD,0DAmBC;AA0BD,gEAWC;AA8BD,gCAiBC;AA6BD,4CAqBC;AAkCD,gDAuBC;AA4BD,8CAeC;AA4BD,sDAeC;AA8BD,kEAiBC;AA8BD,kDAkBC;AA8BD,kDAiBC;AA8BD,8DAyBC;AAzqBD,+EAA+D;AAC/D,kEAA8D;AA6B9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACI,KAAK,UAAU,0BAA0B,CAAC,EAC/C,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,WAAW,GAC0B;IACrC,IAAA,gCAAQ,EAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEtC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,8BAAa,EAAyB;QAC3D,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE;YACN,KAAK;YACL,MAAM;YACN,QAAQ;YACR,WAAW;YACX,WAAW;YACX,IAAI,EAAE,QAAQ,EAAE,IAAI;YACpB,IAAI,EAAE,QAAQ,EAAE,IAAI;YACpB,IAAI,EAAE,QAAQ,EAAE,IAAI;SACrB;KACF,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACI,KAAK,UAAU,eAAe,CAAC,EACpC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,aAAa,GAAG,KAAK,GACK;IAC1B,IAAA,gCAAQ,EAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAErB,MAAM,EAAE,IAAI,EA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AAC;IAE/C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,8BAAa,EAAoC;QACtE,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,qBAAqB,iBAAiB,mBAAmB;QAC/D,MAAM,EAAE;YACN,aAAa;YACb,QAAQ;YACR,MAAM;YACN,aAAa;YACb,IAAI,EAAE,QAAQ,EAAE,IAAI;YACpB,IAAI,EAAE,QAAQ,EAAE,IAAI;YACpB,IAAI,EAAE,QAAQ,EAAE,IAAI;SACrB;KACF,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DJUST SDK Product Module
|
|
3
|
+
* Re-exports all product-related types and service.
|
|
4
|
+
*
|
|
5
|
+
* @module services/product
|
|
6
|
+
* @since 2.17.0
|
|
7
|
+
*/
|
|
8
|
+
export type { AutoCompleteSearchParams, GetProductsListParams, GetProductParams, GetProductVariantOffersParams, GetProductVariantSuppliersParams, GetProductOffersParams, GetProductPaginatedOffersParams, GetRelatedProductsParams, GetProductReviewsParams, GetProductStatReviewsParams, GetProductVariantAttributesParams, CreateProductReviewParams, UpdateProductReviewParams, ProductImage, ProductAttribute, ProductOffer, ProductVariant, ProductSummary, Product, Supplier, ProductReview, ReviewStatistics, SearchAggregation, SearchProductsResponse, GetProductsListResponse, GetProductVariantOffersResponse, GetProductVariantSuppliersResponse, GetProductOffersResponse, GetProductPaginatedOffersResponse, GetRelatedProductsResponse, GetProductReviewsResponse, GetProductStatReviewsResponse, GetProductVariantAttributesResponse, CreateProductReviewResponse, UpdateProductReviewResponse, } from "./types";
|
|
9
|
+
export { ProductEndpoints, type ProductEndpoint } from "./endpoints";
|
|
10
|
+
export { ProductService } from "./product.service";
|
|
11
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/services/product/module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,6BAA6B,EAC7B,gCAAgC,EAChC,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,iCAAiC,EACjC,yBAAyB,EACzB,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,OAAO,EACP,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,+BAA+B,EAC/B,kCAAkC,EAClC,wBAAwB,EACxB,iCAAiC,EACjC,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,mCAAmC,EACnC,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGrE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DJUST SDK Product Module
|
|
4
|
+
* Re-exports all product-related types and service.
|
|
5
|
+
*
|
|
6
|
+
* @module services/product
|
|
7
|
+
* @since 2.17.0
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ProductService = exports.ProductEndpoints = void 0;
|
|
11
|
+
// Endpoints
|
|
12
|
+
var endpoints_1 = require("./endpoints");
|
|
13
|
+
Object.defineProperty(exports, "ProductEndpoints", { enumerable: true, get: function () { return endpoints_1.ProductEndpoints; } });
|
|
14
|
+
// Service
|
|
15
|
+
var product_service_1 = require("./product.service");
|
|
16
|
+
Object.defineProperty(exports, "ProductService", { enumerable: true, get: function () { return product_service_1.ProductService; } });
|
|
17
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/services/product/module.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAyCH,YAAY;AACZ,yCAAqE;AAA5D,6GAAA,gBAAgB,OAAA;AAEzB,UAAU;AACV,qDAAmD;AAA1C,iHAAA,cAAc,OAAA"}
|