@djust-b2b/djust-front-sdk 3.0.0-beta.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,1823 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLogisticOrders = getLogisticOrders;
|
|
4
|
+
exports.logisticOrdersPaginatedList = logisticOrdersPaginatedList;
|
|
5
|
+
exports.getLogisticOrderCustomFields = getLogisticOrderCustomFields;
|
|
6
|
+
exports.getLogisticOrderLineCustomFields = getLogisticOrderLineCustomFields;
|
|
7
|
+
exports.getLogisticOrder = getLogisticOrder;
|
|
8
|
+
exports.updateLogisticOrderCustomFields = updateLogisticOrderCustomFields;
|
|
9
|
+
exports.updateLogisticOrderData = updateLogisticOrderData;
|
|
10
|
+
exports.getLogisticOrderAccountingDocuments = getLogisticOrderAccountingDocuments;
|
|
11
|
+
exports.getLogisticOrderAccountingDocumentUrl = getLogisticOrderAccountingDocumentUrl;
|
|
12
|
+
exports.approveLogisticOrder = approveLogisticOrder;
|
|
13
|
+
exports.getLogisticOrderApprovers = getLogisticOrderApprovers;
|
|
14
|
+
exports.updateLogisticOrderBillingInformation = updateLogisticOrderBillingInformation;
|
|
15
|
+
exports.cancelLogisticOrder = cancelLogisticOrder;
|
|
16
|
+
exports.confirmLogisticOrderReception = confirmLogisticOrderReception;
|
|
17
|
+
exports.createLogisticOrder = createLogisticOrder;
|
|
18
|
+
exports.disapproveLogisticOrder = disapproveLogisticOrder;
|
|
19
|
+
exports.getLogisticOrderDocuments = getLogisticOrderDocuments;
|
|
20
|
+
exports.getLogisticOrderDocumentUrl = getLogisticOrderDocumentUrl;
|
|
21
|
+
exports.getLogisticOrderLines = getLogisticOrderLines;
|
|
22
|
+
exports.updateOnHoldLogisticOrderLines = updateOnHoldLogisticOrderLines;
|
|
23
|
+
exports.bulkUpdateLogisticOrderLinesCustomFields = bulkUpdateLogisticOrderLinesCustomFields;
|
|
24
|
+
exports.updateLogisticOrderLineCustomFields = updateLogisticOrderLineCustomFields;
|
|
25
|
+
exports.updateOnHoldLogisticOrderLine = updateOnHoldLogisticOrderLine;
|
|
26
|
+
exports.updateLogisticOrderShippingAddress = updateLogisticOrderShippingAddress;
|
|
27
|
+
exports.getLogisticOrderShippingInformation = getLogisticOrderShippingInformation;
|
|
28
|
+
exports.updateLogisticOrderShippingInformation = updateLogisticOrderShippingInformation;
|
|
29
|
+
exports.updateLogisticOrderShippingType = updateLogisticOrderShippingType;
|
|
30
|
+
exports.createLogisticOrderThread = createLogisticOrderThread;
|
|
31
|
+
exports.createLogisticOrderThreadV2 = createLogisticOrderThreadV2;
|
|
32
|
+
exports.getLogisticOrderThreads = getLogisticOrderThreads;
|
|
33
|
+
exports.getLogisticOrderThread = getLogisticOrderThread;
|
|
34
|
+
exports.createOrderLogisticThreadMessages = createOrderLogisticThreadMessages;
|
|
35
|
+
exports.updateOrderLogisticThreadMessage = updateOrderLogisticThreadMessage;
|
|
36
|
+
exports.createLogisticOrderIncidentThreads = createLogisticOrderIncidentThreads;
|
|
37
|
+
exports.getLogisticOrderIncidentThread = getLogisticOrderIncidentThread;
|
|
38
|
+
exports.createLogisticOrderIncidentThreadMessages = createLogisticOrderIncidentThreadMessages;
|
|
39
|
+
exports.updateLogisticOrderIncidentThreadMessage = updateLogisticOrderIncidentThreadMessage;
|
|
40
|
+
exports.getLogisticOrderReview = getLogisticOrderReview;
|
|
41
|
+
exports.addLogisticOrderReview = addLogisticOrderReview;
|
|
42
|
+
exports.getThreadReasonTypes = getThreadReasonTypes;
|
|
43
|
+
exports.getThreadSubReasons = getThreadSubReasons;
|
|
44
|
+
const parameters_validation_1 = require("../../helpers/parameters-validation");
|
|
45
|
+
const fetch_instance_1 = require("../../settings/fetch-instance");
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated
|
|
48
|
+
* 🚚 Gets logistic orders.
|
|
49
|
+
*
|
|
50
|
+
* This function retrieves all logistic orders. The parameter locale is mandatory and validated
|
|
51
|
+
* before the request is executed.
|
|
52
|
+
*
|
|
53
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders [ORDER-550]`
|
|
54
|
+
*
|
|
55
|
+
* | Parameter | Type | Required | Description |
|
|
56
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
57
|
+
* | `approvalIds` | `string` | ❌ | The IDs of the users responsible for the approval of the logistic order. |
|
|
58
|
+
* | `locale` | `string` | ✅ | The locale in which to return the logistic order. |
|
|
59
|
+
* | `logisticStatus` | `OrderLogisticStatusType[]` | ❌ | The statuses of the logistic orders you want to retrieve . |
|
|
60
|
+
* | `incident` | `boolean` | ❌ | Whether you want to retrieve incidents or not. |
|
|
61
|
+
* | `paymentOptions` | `PaymentOption[]` | ❌ | The types of payment (e.g., `BANK WIRE`, `CREDIT_CARD`). |
|
|
62
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
63
|
+
* | `page` | `integer` | ❌ | The page number you want to retrieve. |
|
|
64
|
+
* | `size` | `integer` | ❌ | The size of the page you want to retrieve. |
|
|
65
|
+
* | `sort` | `string` | ❌ | The order how you want to retrieve the custom fields. |
|
|
66
|
+
* | `suppliersIds` | `string[]` | ❌ | The list of supplier IDs for which you want to retrieve the logistic orders. |
|
|
67
|
+
* | `creationDateFrom`| `string` | ❌ | The creation date from which you want to retrieve the logistic orders. |
|
|
68
|
+
* | `creationDateTo` | `string` | ❌ | The creation date to which you want to retrieve the logistic orders. |
|
|
69
|
+
* | `updateDateFrom` | `string` | ❌ | The update date from which you want to retrieve the logistic orders. |
|
|
70
|
+
* | `updateDateTo` | `string` | ❌ | The update date to which you want to retrieve the logistic orders. |
|
|
71
|
+
*
|
|
72
|
+
* 📤 **Returns**:
|
|
73
|
+
* A `Promise` resolving to a single `GetLogisticOrdersResponse` object representing the page of logistic orders.
|
|
74
|
+
*
|
|
75
|
+
* 🛠 **Example usage**:
|
|
76
|
+
* ```ts
|
|
77
|
+
* const orders = await getLogisticOrders({
|
|
78
|
+
* locale: "fr",
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
* @param {GetLogisticOrdersParameters} params - The parameters for the request.
|
|
82
|
+
* @throws {Error} If `locale` is missing.
|
|
83
|
+
* @returns {Promise<GetLogisticOrdersResponse>} A promise resolving to the response containing page object.
|
|
84
|
+
*/
|
|
85
|
+
async function getLogisticOrders({ approvalIds, locale, logisticStatus, incident, paymentOptions, connectedUserOnly, nbPreviewLines, page, size, sort, suppliersIds, creationDateFrom, creationDateTo, updateDateFrom, updateDateTo, }) {
|
|
86
|
+
(0, parameters_validation_1.required)({ locale });
|
|
87
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
88
|
+
method: "GET",
|
|
89
|
+
path: `/v1/shop/logistic-orders`,
|
|
90
|
+
params: {
|
|
91
|
+
approvalIds,
|
|
92
|
+
locale,
|
|
93
|
+
logisticStatus,
|
|
94
|
+
incident,
|
|
95
|
+
paymentOptions,
|
|
96
|
+
nbPreviewLines,
|
|
97
|
+
connectedUserOnly,
|
|
98
|
+
page,
|
|
99
|
+
size,
|
|
100
|
+
sort,
|
|
101
|
+
suppliersIds,
|
|
102
|
+
creationDateFrom,
|
|
103
|
+
creationDateTo,
|
|
104
|
+
updateDateFrom,
|
|
105
|
+
updateDateTo,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
return data;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* 🚚 Get paginated and filtered Order logistics.
|
|
112
|
+
*
|
|
113
|
+
* 🛠 **Endpoint**: `POST /v1/shop/logistic-orders` [ORDER-550]
|
|
114
|
+
*
|
|
115
|
+
* | Parameter | Type | Required | Description |
|
|
116
|
+
* |-----------------------------------------|----------------------------|-----------|--------------------------------------------------------|
|
|
117
|
+
* | `page` | `number` | ❌ | Current Page |
|
|
118
|
+
* | `size` | `number` | ❌ | The size of the page to be returned |
|
|
119
|
+
* | `sort` | `string` | ❌ | Sorting criteria in the format: property,(asc|desc) |
|
|
120
|
+
* | `nbPreviewLines` | `number` | ❌ | The number of lines to display in the logistic order. |
|
|
121
|
+
* | `accountCustomFieldValueCriteria` | `CustomFieldValueObject[]` | ❌ | Account custom field value criteria |
|
|
122
|
+
* | `approvalIds` | `string[]` | ❌ | Approval IDs |
|
|
123
|
+
* | `connectedUserOnly` | `boolean` | ❌ | Connected user only |
|
|
124
|
+
* | `creationDateFrom` | `string` | ❌ | Creation date from |
|
|
125
|
+
* | `creationDateTo` | `string` | ❌ | Creation date to |
|
|
126
|
+
* | `customerAccountIds` | `string[]` | ❌ | Customer account IDs |
|
|
127
|
+
* | `incident` | `boolean` | ❌ | Incident |
|
|
128
|
+
* | `locale` | `string` | ✅ | Locale |
|
|
129
|
+
* | `logisticStatus` | `string[]` | ❌ | Logistic status |
|
|
130
|
+
* | `offerCustomFieldValueCriteria` | `CustomFieldValueObject[]` | ❌ | Offer custom field value criteria |
|
|
131
|
+
* | `orderLogisticCustomFieldValueCriteria` | `CustomFieldValueObject[]` | ❌ | Order logistic custom field value criteria |
|
|
132
|
+
* | `paymentOptions` | `string[]` | ❌ | Payment options |
|
|
133
|
+
* | `supplierIds` | `string[]` | ❌ | Supplier IDs |
|
|
134
|
+
* | `updateDateFrom` | `string` | ❌ | Update date from |
|
|
135
|
+
* | `updateDateTo` | `string` | ❌ | Update date to |
|
|
136
|
+
*
|
|
137
|
+
* 📤 **Returns**:
|
|
138
|
+
* A `Promise` resolving to a `GetPaginatedLogisticOrdersResponse`.
|
|
139
|
+
*
|
|
140
|
+
* 🛠 **Example usage**:
|
|
141
|
+
* ```ts
|
|
142
|
+
* await logisticOrdersPaginatedList({
|
|
143
|
+
* 1,
|
|
144
|
+
* 10,
|
|
145
|
+
* 'asc|desc',
|
|
146
|
+
* 20,
|
|
147
|
+
* {
|
|
148
|
+
* "accountCustomFieldValueCriteria": [
|
|
149
|
+
* {
|
|
150
|
+
* "customFieldId": "string",
|
|
151
|
+
* "customFieldValue": "string"
|
|
152
|
+
* }
|
|
153
|
+
* ],
|
|
154
|
+
* "approvalIds": [ "string" ],
|
|
155
|
+
* "connectedUserOnly": true,
|
|
156
|
+
* "creationDateFrom": "2025-03-26T15:38:31.964Z",
|
|
157
|
+
* "creationDateTo": "2025-03-26T15:38:31.964Z",
|
|
158
|
+
* "incident": true,
|
|
159
|
+
* "locale": "string",
|
|
160
|
+
* "logisticStatus": [ "CREATING" ],
|
|
161
|
+
* "offerCustomFieldValueCriteria": [
|
|
162
|
+
* {
|
|
163
|
+
* "customFieldId": "string",
|
|
164
|
+
* "customFieldValue": "string"
|
|
165
|
+
* }
|
|
166
|
+
* ],
|
|
167
|
+
* "customerAccountIds": [ "string" ],
|
|
168
|
+
* "orderLogisticCustomFieldValueCriteria": [
|
|
169
|
+
* {
|
|
170
|
+
* "customFieldId": "string",
|
|
171
|
+
* "customFieldValue": "string"
|
|
172
|
+
* }
|
|
173
|
+
* ],
|
|
174
|
+
* "paymentOptions": [ "BANK_WIRE" ],
|
|
175
|
+
* "supplierIds": [ "string" ],
|
|
176
|
+
* "updateDateFrom": "2025-03-26T15:38:31.964Z",
|
|
177
|
+
* "updateDateTo": "2025-03-26T15:38:31.964Z"
|
|
178
|
+
* }
|
|
179
|
+
* });
|
|
180
|
+
* ```
|
|
181
|
+
*
|
|
182
|
+
* @param {GetPaginatedLogisticOrdersParameters} params - The parameters for the request.
|
|
183
|
+
* @throws {Error} If `locale` is missing.
|
|
184
|
+
* @returns {Promise<GetPaginatedLogisticOrdersResponse>}
|
|
185
|
+
*/
|
|
186
|
+
async function logisticOrdersPaginatedList({ page, size, sort, nbPreviewLines, accountCustomFieldValueCriteria, approvalIds, connectedUserOnly, creationDateFrom, creationDateTo, customerAccountIds, incident, locale, logisticStatus, offerCustomFieldValueCriteria, orderLogisticCustomFieldValueCriteria, paymentOptions, supplierIds, updateDateFrom, updateDateTo, }) {
|
|
187
|
+
(0, parameters_validation_1.required)({ locale });
|
|
188
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
189
|
+
method: "POST",
|
|
190
|
+
path: `/v1/shop/logistic-orders`,
|
|
191
|
+
params: {
|
|
192
|
+
nbPreviewLines,
|
|
193
|
+
size,
|
|
194
|
+
page,
|
|
195
|
+
sort,
|
|
196
|
+
},
|
|
197
|
+
body: JSON.stringify({
|
|
198
|
+
accountCustomFieldValueCriteria,
|
|
199
|
+
approvalIds,
|
|
200
|
+
connectedUserOnly,
|
|
201
|
+
creationDateFrom,
|
|
202
|
+
creationDateTo,
|
|
203
|
+
customerAccountIds,
|
|
204
|
+
incident,
|
|
205
|
+
locale,
|
|
206
|
+
logisticStatus,
|
|
207
|
+
offerCustomFieldValueCriteria,
|
|
208
|
+
orderLogisticCustomFieldValueCriteria,
|
|
209
|
+
paymentOptions,
|
|
210
|
+
supplierIds,
|
|
211
|
+
updateDateFrom,
|
|
212
|
+
updateDateTo,
|
|
213
|
+
}),
|
|
214
|
+
});
|
|
215
|
+
return data;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* 🚚 Get logistic order's custom fields.
|
|
219
|
+
*
|
|
220
|
+
* This function retrieves custom fields of logistic orders, identified by
|
|
221
|
+
* the `customFieldIds`. This parameter is mandatory and validated
|
|
222
|
+
* before the request is executed.
|
|
223
|
+
*
|
|
224
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/custom-fields [ORDER-553]`
|
|
225
|
+
*
|
|
226
|
+
* | Parameter | Type | Required | Description |
|
|
227
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
228
|
+
* | `customFieldIds` | `string[]` | ✅ | The list of custom fields' ID you want to retrieve. |
|
|
229
|
+
* | `page` | `integer` | ❌ | The page number you want to retrieve. |
|
|
230
|
+
* | `size` | `integer` | ❌ | The size of the page you want to retrieve. |
|
|
231
|
+
* | `sort` | `string` | ❌ | The order how you want to retrieve the custom fields. |
|
|
232
|
+
* | `idType` | `IdType` | ❌ | The type of the ID you want to retrieve. |
|
|
233
|
+
*
|
|
234
|
+
* 📤 **Returns**:
|
|
235
|
+
* A `Promise` resolving to a single `GetLogisticOrderCustomFieldsResponse` object representing the page of custom fields.
|
|
236
|
+
*
|
|
237
|
+
* 🛠 **Example usage**:
|
|
238
|
+
* ```ts
|
|
239
|
+
* const customFields = await getLogisticOrderCustomFields({
|
|
240
|
+
* customFieldIds: ["customFieldId1", "customFieldId2"],
|
|
241
|
+
* page: 1,
|
|
242
|
+
* size: 20,
|
|
243
|
+
* });
|
|
244
|
+
* ```
|
|
245
|
+
*
|
|
246
|
+
* @param {GetLogisticOrderCustomFieldsParameters} params - The parameters for the request.
|
|
247
|
+
* @throws {Error} If `customFieldIds` is missing.
|
|
248
|
+
* @returns {Promise<GetLogisticOrderCustomFieldsResponse>} A promise resolving to the response containing the page object.
|
|
249
|
+
*/
|
|
250
|
+
async function getLogisticOrderCustomFields({ customFieldIds, page, size, sort, idType, }) {
|
|
251
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
252
|
+
method: "GET",
|
|
253
|
+
path: `/v1/shop/logistic-orders/custom-fields`,
|
|
254
|
+
params: {
|
|
255
|
+
customFieldIds,
|
|
256
|
+
page,
|
|
257
|
+
size,
|
|
258
|
+
sort,
|
|
259
|
+
idType,
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
return data;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* 🚚 Get logistic order lines' custom fields.
|
|
266
|
+
*
|
|
267
|
+
* This function retrieves custom fields of logistic order lines, identified by
|
|
268
|
+
* the `customFieldIds`. This parameter is mandatory and validated
|
|
269
|
+
* before the request is executed.
|
|
270
|
+
*
|
|
271
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/lines/custom-fields [ORDER-554]`
|
|
272
|
+
*
|
|
273
|
+
* | Parameter | Type | Required | Description |
|
|
274
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
275
|
+
* | `customFieldIds` | `string[]` | ✅ | The list of custom fields' ID you want to retrieve. |
|
|
276
|
+
* | `page` | `integer` | ❌ | The page number you want to retrieve. |
|
|
277
|
+
* | `size` | `integer` | ❌ | The size of the page you want to retrieve. |
|
|
278
|
+
* | `sort` | `string` | ❌ | The order how you want to retrieve the custom fields. |
|
|
279
|
+
* | `idType` | `IdType` | ❌ | The type of the ID you want to retrieve. |
|
|
280
|
+
* 📤 **Returns**:
|
|
281
|
+
* A `Promise` resolving to a single `GetLogisticOrderLineCustomFieldsResponse` object representing the page of custom fields.
|
|
282
|
+
*
|
|
283
|
+
* 🛠 **Example usage**:
|
|
284
|
+
* ```ts
|
|
285
|
+
* const customFields = await updateLogisticOrderCustomFields({
|
|
286
|
+
* customFieldIds: ["customFieldId1", "customFieldId2"],
|
|
287
|
+
* page: 1,
|
|
288
|
+
* size: 20,
|
|
289
|
+
* });
|
|
290
|
+
* ```
|
|
291
|
+
*
|
|
292
|
+
* @param {GetLogisticOrderLineCustomFieldsParameters} params - The parameters for the request.
|
|
293
|
+
* @throws {Error} If `customFieldIds` is missing.
|
|
294
|
+
* @returns {Promise<GetLogisticOrderLineCustomFieldsResponse>} A promise resolving to the response containing the page object.
|
|
295
|
+
*/
|
|
296
|
+
async function getLogisticOrderLineCustomFields({ customFieldIds, page, size, sort, idType, }) {
|
|
297
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
298
|
+
method: "GET",
|
|
299
|
+
path: `/v1/shop/logistic-orders/lines/custom-fields`,
|
|
300
|
+
params: {
|
|
301
|
+
customFieldIds,
|
|
302
|
+
page,
|
|
303
|
+
size,
|
|
304
|
+
sort,
|
|
305
|
+
idType,
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
return data;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* 🚚 Gets a specific logistic order.
|
|
312
|
+
*
|
|
313
|
+
* This function retrieves a specific logistic order, identified by
|
|
314
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
315
|
+
* before the request is executed.
|
|
316
|
+
*
|
|
317
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId} [ORDER-501]`
|
|
318
|
+
*
|
|
319
|
+
* | Parameter | Type | Required | Description |
|
|
320
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
321
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order you want to retrieve. |
|
|
322
|
+
* | `locale` | `string` | ✅ | The locale in which to return the logistic order. |
|
|
323
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
324
|
+
*
|
|
325
|
+
* 📤 **Returns**:
|
|
326
|
+
* A `Promise` resolving to a single `GetLogisticOrderResponse` object representing the logistic order.
|
|
327
|
+
*
|
|
328
|
+
* 🛠 **Example usage**:
|
|
329
|
+
* ```ts
|
|
330
|
+
* const order = await getLogisticOrder({
|
|
331
|
+
* orderId: "logisticOrder1",
|
|
332
|
+
* locale: "fr",
|
|
333
|
+
* });
|
|
334
|
+
* ```
|
|
335
|
+
*
|
|
336
|
+
* @param {GetLogisticOrderParameters} params - The parameters for the request.
|
|
337
|
+
* @throws {Error} If `orderId` is missing.
|
|
338
|
+
* @returns {Promise<GetLogisticOrderResponse>} A promise resolving to the response containing the logistic order.
|
|
339
|
+
*/
|
|
340
|
+
async function getLogisticOrder({ orderId, locale, nbPreviewLines, }) {
|
|
341
|
+
(0, parameters_validation_1.required)({ orderId, locale });
|
|
342
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
343
|
+
method: "GET",
|
|
344
|
+
path: `/v1/shop/logistic-orders/${orderId}`,
|
|
345
|
+
params: {
|
|
346
|
+
locale,
|
|
347
|
+
nbPreviewLines,
|
|
348
|
+
},
|
|
349
|
+
});
|
|
350
|
+
return data;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* 🚚 Updates a specific logistic order's custom fields.
|
|
354
|
+
*
|
|
355
|
+
* This function updates the custom fields of a specific logistic order, identified by
|
|
356
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
357
|
+
* before the request is executed.
|
|
358
|
+
*
|
|
359
|
+
* 🛠 **Endpoint**: `PATCH /v1/shop/logistic-orders/${orderId} [ORDER-205]`
|
|
360
|
+
*
|
|
361
|
+
* | Parameter | Type | Required | Description |
|
|
362
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
363
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update the custom fields. |
|
|
364
|
+
* | `customFields` | `CustomFieldValueObject[]` | ✅ | The custom fields with value and externalId. |
|
|
365
|
+
* | `locale` | `string` | ❌ | The locale in which to return the logistic order. |
|
|
366
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
367
|
+
*
|
|
368
|
+
* 📤 **Returns**:
|
|
369
|
+
* A `Promise` resolving to a single `UpdateOrderLogisticCustomFieldResponse` object representing the logistic order.
|
|
370
|
+
*
|
|
371
|
+
* 🛠 **Example usage**:
|
|
372
|
+
* ```ts
|
|
373
|
+
* const order = await updateLogisticOrderCustomFields({
|
|
374
|
+
* orderId: "logisticOrder1",
|
|
375
|
+
* customFields: [{ customFieldId: "externalId1", customFieldValue: "value1" }, { customFieldId: "externalId2", customFieldValue: "value2" }],
|
|
376
|
+
* });
|
|
377
|
+
* ```
|
|
378
|
+
*
|
|
379
|
+
* @param {UpdateOrderLogisticCustomFieldParameters} params - The parameters for the request.
|
|
380
|
+
* @throws {Error} If `orderId` or `customFields` is missing.
|
|
381
|
+
* @returns {Promise<UpdateOrderLogisticCustomFieldResponse>} A promise resolving to the response containing the logistic order.
|
|
382
|
+
*/
|
|
383
|
+
async function updateLogisticOrderCustomFields({ orderId, locale, nbPreviewLines, customFields, }) {
|
|
384
|
+
(0, parameters_validation_1.required)({ orderId, customFields });
|
|
385
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
386
|
+
method: "PATCH",
|
|
387
|
+
path: `/v1/shop/logistic-orders/${orderId}`,
|
|
388
|
+
params: {
|
|
389
|
+
locale,
|
|
390
|
+
nbPreviewLines,
|
|
391
|
+
},
|
|
392
|
+
body: JSON.stringify(customFields),
|
|
393
|
+
});
|
|
394
|
+
return data;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* 🚚 Updates a specific logistic order's data (custom fields and externalId).
|
|
398
|
+
*
|
|
399
|
+
* This function updates the custom fields and externalId of a specific logistic order, identified by
|
|
400
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
401
|
+
* before the request is executed.
|
|
402
|
+
*
|
|
403
|
+
* 🛠 **Endpoint**: `PATCH /v1/shop/logistic-orders/${orderId} [ORDER-205]`
|
|
404
|
+
*
|
|
405
|
+
* | Parameter | Type | Required | Description |
|
|
406
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
407
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update the custom fields. |
|
|
408
|
+
* | `customFields` | `CustomFieldValueObject[]` | ❌ | The custom fields with value and externalId. |
|
|
409
|
+
* | `externalId` | `string` | ❌ | The externalId of the logistic order. |
|
|
410
|
+
* | `locale` | `string` | ❌ | The locale in which to return the logistic order. |
|
|
411
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
412
|
+
*
|
|
413
|
+
* 📤 **Returns**:
|
|
414
|
+
* A `Promise` resolving to a single `UpdateOrderLogisticCustomFieldResponse` object representing the logistic order.
|
|
415
|
+
*
|
|
416
|
+
* 🛠 **Example usage**:
|
|
417
|
+
* ```ts
|
|
418
|
+
* const order = await updateLogisticOrderData({
|
|
419
|
+
* orderId: "logisticOrder1",
|
|
420
|
+
* customFields: [
|
|
421
|
+
* { customFieldId: "id1", customFieldValue: "value1" },
|
|
422
|
+
* { customFieldId: "id2", customFieldValue: "value2" },
|
|
423
|
+
* ],
|
|
424
|
+
* externalId: "id",
|
|
425
|
+
* });
|
|
426
|
+
* ```
|
|
427
|
+
* Body sent: `{ customFieldValueRequest: customFields, externalId? }`.
|
|
428
|
+
*
|
|
429
|
+
* @param {UpdateLogisticOrderCustomFieldsParameters} params - The parameters for the request.
|
|
430
|
+
* @throws {Error} If `orderId` or `customFields` is missing.
|
|
431
|
+
* @returns {Promise<UpdateLogisticOrderCustomFieldsResponse>} A promise resolving to the response containing the logistic order.
|
|
432
|
+
*/
|
|
433
|
+
async function updateLogisticOrderData({ orderId, locale, nbPreviewLines, customFields, externalId, }) {
|
|
434
|
+
(0, parameters_validation_1.required)({ orderId, customFields });
|
|
435
|
+
const body = {
|
|
436
|
+
customFieldValueRequest: customFields ?? [],
|
|
437
|
+
...(externalId !== undefined && { externalId }),
|
|
438
|
+
};
|
|
439
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
440
|
+
method: "PATCH",
|
|
441
|
+
path: `/v2/shop/logistic-orders/${orderId}`,
|
|
442
|
+
params: {
|
|
443
|
+
locale,
|
|
444
|
+
nbPreviewLines,
|
|
445
|
+
},
|
|
446
|
+
body: JSON.stringify(body),
|
|
447
|
+
});
|
|
448
|
+
return data;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* 🚚 Gets a specific logistic order's accounting documents.
|
|
452
|
+
*
|
|
453
|
+
* This function retrieves the accounting documents of a specific logistic order, identified by
|
|
454
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
455
|
+
* before the request is executed.
|
|
456
|
+
*
|
|
457
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/accounting-documents [ORDER-551]`
|
|
458
|
+
*
|
|
459
|
+
* | Parameter | Type | Required | Description |
|
|
460
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
461
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the accounting documents. |
|
|
462
|
+
*
|
|
463
|
+
* 📤 **Returns**:
|
|
464
|
+
* A `Promise` resolving to a single `GetLogisticOrderAccountingDocumentsResponse` object representing the list of accounting documents of the logistic order.
|
|
465
|
+
*
|
|
466
|
+
* 🛠 **Example usage**:
|
|
467
|
+
* ```ts
|
|
468
|
+
* const accountingDocuments = await getLogisticOrderAccountingDocuments({
|
|
469
|
+
* orderId: "logisticOrder1",
|
|
470
|
+
* });
|
|
471
|
+
* ```
|
|
472
|
+
*
|
|
473
|
+
* @param {GetLogisticOrderAccountingDocumentsParameters} params - The parameters for the request.
|
|
474
|
+
* @throws {Error} If `orderId` is missing.
|
|
475
|
+
* @returns {Promise<GetLogisticOrderAccountingDocumentsResponse>} A promise resolving to the response containing the list of accounting documents.
|
|
476
|
+
*/
|
|
477
|
+
async function getLogisticOrderAccountingDocuments({ orderId, }) {
|
|
478
|
+
(0, parameters_validation_1.required)({ orderId });
|
|
479
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
480
|
+
method: "GET",
|
|
481
|
+
path: `/v1/shop/logistic-orders/${orderId}/accounting-documents`,
|
|
482
|
+
});
|
|
483
|
+
return data;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* 🚚 Gets specific accounting document urls of a specific logistic order.
|
|
487
|
+
*
|
|
488
|
+
* This function retrieves specific accounting document urls of a specific logistic order, both identified by
|
|
489
|
+
* the `orderId` and the `documentId`. Both parameters are mandatory and validated
|
|
490
|
+
* before the request is executed.
|
|
491
|
+
*
|
|
492
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/accounting-documents/{documentId} [ORDER-506]`
|
|
493
|
+
*
|
|
494
|
+
* | Parameter | Type | Required | Description |
|
|
495
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
496
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the accounting documents. |
|
|
497
|
+
* | `documentId` | `string` | ✅ | The ID of the accounting document to be downloaded. |
|
|
498
|
+
*
|
|
499
|
+
* 📤 **Returns**:
|
|
500
|
+
* A `Promise` resolving to a single `GetLogisticOrderAccountingDocumentsResponse` object representing the list of accounting document's urls.
|
|
501
|
+
*
|
|
502
|
+
* 🛠 **Example usage**:
|
|
503
|
+
* ```ts
|
|
504
|
+
* const accountingDocumentUrls = await getLogisticOrderAccountingDocumentUrl({
|
|
505
|
+
* orderId: "logisticOrder1",
|
|
506
|
+
* documentId: "document1",
|
|
507
|
+
* });
|
|
508
|
+
* ```
|
|
509
|
+
*
|
|
510
|
+
* @param {GetLogisticOrderAccountingDocumentUrlParameters} params - The parameters for the request.
|
|
511
|
+
* @throws {Error} If `orderId` or `documentId` is missing.
|
|
512
|
+
* @returns {Promise<string[]>} A promise resolving to the response containing the list of document's urls.
|
|
513
|
+
*/
|
|
514
|
+
async function getLogisticOrderAccountingDocumentUrl({ orderId, documentId, }) {
|
|
515
|
+
(0, parameters_validation_1.required)({ orderId, documentId });
|
|
516
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
517
|
+
method: "GET",
|
|
518
|
+
path: `/v1/shop/logistic-orders/${orderId}/accounting-documents/${documentId}`,
|
|
519
|
+
});
|
|
520
|
+
return data;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* 🚚 Approves a logistic order.
|
|
524
|
+
*
|
|
525
|
+
* This function approves a specific logistic order, identified by the `orderId`. The parameters `orderId` and `locale` are mandatory and validated
|
|
526
|
+
* before the request is executed.
|
|
527
|
+
*
|
|
528
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/approve [ORDER-200]`
|
|
529
|
+
*
|
|
530
|
+
* | Parameter | Type | Required | Description |
|
|
531
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
532
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order you want to approve. |
|
|
533
|
+
* | `locale` | `string` | ✅ | The locale in which to return the logistic order. |
|
|
534
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
535
|
+
*
|
|
536
|
+
* 📤 **Returns**:
|
|
537
|
+
* A `Promise` resolving to a single `ApproveLogisticOrderResponse` object representing the logistic order approved.
|
|
538
|
+
*
|
|
539
|
+
* 🛠 **Example usage**:
|
|
540
|
+
* ```ts
|
|
541
|
+
* const order = await approveLogisticOrder({
|
|
542
|
+
* orderId: "logisticOrder1",
|
|
543
|
+
* locale: "fr",
|
|
544
|
+
* });
|
|
545
|
+
* ```
|
|
546
|
+
*
|
|
547
|
+
* @param {ApproveLogisticOrderParameters} params - The parameters for the request.
|
|
548
|
+
* @throws {Error} If `orderId` or `locale` is missing.
|
|
549
|
+
* @returns {Promise<ApproveLogisticOrderResponse>} A promise resolving to the response containing the logistic order.
|
|
550
|
+
*/
|
|
551
|
+
async function approveLogisticOrder({ orderId, locale, nbPreviewLines, }) {
|
|
552
|
+
(0, parameters_validation_1.required)({ orderId, locale });
|
|
553
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
554
|
+
method: "PUT",
|
|
555
|
+
path: `/v1/shop/logistic-orders/${orderId}/approve`,
|
|
556
|
+
params: {
|
|
557
|
+
locale,
|
|
558
|
+
nbPreviewLines,
|
|
559
|
+
},
|
|
560
|
+
});
|
|
561
|
+
return data;
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* 🚚 Gets a logistic order's approvers.
|
|
565
|
+
*
|
|
566
|
+
* This function retrieves the users able to approve a specific logistic order, identified by the `orderId`. This parameter is mandatory and validated
|
|
567
|
+
* before the request is executed.
|
|
568
|
+
*
|
|
569
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/approvers [ORDER-556]`
|
|
570
|
+
*
|
|
571
|
+
* | Parameter | Type | Required | Description |
|
|
572
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
573
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the approvers. |
|
|
574
|
+
*
|
|
575
|
+
* 📤 **Returns**:
|
|
576
|
+
* A `Promise` resolving to a single `ApproveLogisticOrderResponse` object representing a list of approval objects, a combination of a user, the logistic order and an approval status.
|
|
577
|
+
*
|
|
578
|
+
* 🛠 **Example usage**:
|
|
579
|
+
* ```ts
|
|
580
|
+
* const approvalObjects = await getLogisticOrderApprovers({
|
|
581
|
+
* orderId: "logisticOrder1",
|
|
582
|
+
* });
|
|
583
|
+
* ```
|
|
584
|
+
*
|
|
585
|
+
* @param {GetLogisticOrderApproversParameters} params - The parameters for the request.
|
|
586
|
+
* @throws {Error} If `orderId` is missing.
|
|
587
|
+
* @returns {Promise<GetLogisticOrderApproversResponse>} A promise resolving to the response containing a list of approval objects.
|
|
588
|
+
*/
|
|
589
|
+
async function getLogisticOrderApprovers({ orderId, }) {
|
|
590
|
+
(0, parameters_validation_1.required)({ orderId });
|
|
591
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
592
|
+
method: "GET",
|
|
593
|
+
path: `/v1/shop/logistic-orders/${orderId}/approvers`,
|
|
594
|
+
});
|
|
595
|
+
return data;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* 🚚 Updates a logistic order's billing information.
|
|
599
|
+
*
|
|
600
|
+
* This function updates the billing information of a specific logistic order, both identified by the `orderId` and the `billingAddressId`. Both parameters are mandatory and validated
|
|
601
|
+
* before the request is executed.
|
|
602
|
+
*
|
|
603
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/billing-information [ORDER-209]`
|
|
604
|
+
*
|
|
605
|
+
* | Parameter | Type | Required | Description |
|
|
606
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
607
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update the billing information. |
|
|
608
|
+
* | `billingAddressId`| `string` | ✅ | The ID of the billing address you want to add to the logistic order. |
|
|
609
|
+
*
|
|
610
|
+
* 📤 **Returns**:
|
|
611
|
+
* A `Promise` resolving when the billing information of the logistic order is updated.
|
|
612
|
+
*
|
|
613
|
+
* 🛠 **Example usage**:
|
|
614
|
+
* ```ts
|
|
615
|
+
* await updateLogisticOrderBillingInformation({
|
|
616
|
+
* orderId: "logisticOrder1",
|
|
617
|
+
* billingAddressId: "address1",
|
|
618
|
+
* });
|
|
619
|
+
* ```
|
|
620
|
+
*
|
|
621
|
+
* @param {UpdateLogisticOrderBillingInformationParameters} params - The parameters for the request.
|
|
622
|
+
* @throws {Error} If `orderId` or `billingAddressId` is missing.
|
|
623
|
+
* @returns {Promise<void>} A promise resolving when the billing information is updated.
|
|
624
|
+
*/
|
|
625
|
+
async function updateLogisticOrderBillingInformation({ orderId, billingAddressId, }) {
|
|
626
|
+
(0, parameters_validation_1.required)({ orderId, billingAddressId });
|
|
627
|
+
(0, fetch_instance_1.enhancedFetch)({
|
|
628
|
+
method: "PUT",
|
|
629
|
+
path: `/v1/shop/logistic-orders/${orderId}/billing-information`,
|
|
630
|
+
body: JSON.stringify({ billingAddressId }),
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* 🚚 Cancels a logistic order.
|
|
635
|
+
*
|
|
636
|
+
* This function cancels a specific logistic order, identified by the `orderId`. The parameters `orderId` and `locale` are mandatory and validated
|
|
637
|
+
* before the request is executed.
|
|
638
|
+
*
|
|
639
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/cancel [ORDER-201]`
|
|
640
|
+
*
|
|
641
|
+
* | Parameter | Type | Required | Description |
|
|
642
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
643
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order you want to cancel. |
|
|
644
|
+
* | `locale` | `string` | ✅ | The locale in which to return the logistic order. |
|
|
645
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
646
|
+
*
|
|
647
|
+
* 📤 **Returns**:
|
|
648
|
+
* A `Promise` resolving to a single `CancelLogisticOrderResponse` object representing the logistic order cancelled.
|
|
649
|
+
*
|
|
650
|
+
* 🛠 **Example usage**:
|
|
651
|
+
* ```ts
|
|
652
|
+
* const order = await cancelLogisticOrder({
|
|
653
|
+
* orderId: "logisticOrder1",
|
|
654
|
+
* locale: "fr",
|
|
655
|
+
* });
|
|
656
|
+
* ```
|
|
657
|
+
*
|
|
658
|
+
* @param {CancelLogisticOrderParameters} params - The parameters for the request.
|
|
659
|
+
* @throws {Error} If `orderId` or `locale` is missing.
|
|
660
|
+
* @returns {Promise<CancelLogisticOrderResponse>} A promise resolving to the response containing the logistic order.
|
|
661
|
+
*/
|
|
662
|
+
async function cancelLogisticOrder({ orderId, locale, nbPreviewLines, }) {
|
|
663
|
+
(0, parameters_validation_1.required)({ orderId, locale });
|
|
664
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
665
|
+
method: "PUT",
|
|
666
|
+
path: `/v1/shop/logistic-orders/${orderId}/cancel`,
|
|
667
|
+
params: {
|
|
668
|
+
locale,
|
|
669
|
+
nbPreviewLines,
|
|
670
|
+
},
|
|
671
|
+
});
|
|
672
|
+
return data;
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* 🚚 Confirms reception of logistic order.
|
|
676
|
+
*
|
|
677
|
+
* This function confirms the reception of a specific logistic order, identified by the `orderId`. The parameters `orderId` and `locale` are mandatory and validated
|
|
678
|
+
* before the request is executed.
|
|
679
|
+
*
|
|
680
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/confirm-reception [ORDER-203]`
|
|
681
|
+
*
|
|
682
|
+
* | Parameter | Type | Required | Description |
|
|
683
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
684
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order you want to confirm reception. |
|
|
685
|
+
* | `locale` | `string` | ✅ | The locale in which to return the logistic order. |
|
|
686
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
687
|
+
*
|
|
688
|
+
* 📤 **Returns**:
|
|
689
|
+
* A `Promise` resolving to a single `ConfirmLogisticOrderReceptionResponse` object representing the logistic order received.
|
|
690
|
+
*
|
|
691
|
+
* 🛠 **Example usage**:
|
|
692
|
+
* ```ts
|
|
693
|
+
* const order = await confirmLogisticOrderReception({
|
|
694
|
+
* orderId: "logisticOrder1",
|
|
695
|
+
* locale: "fr",
|
|
696
|
+
* });
|
|
697
|
+
* ```
|
|
698
|
+
*
|
|
699
|
+
* @param {ConfirmLogisticOrderReceptionParameters} params - The parameters for the request.
|
|
700
|
+
* @throws {Error} If `orderId` or `locale` is missing.
|
|
701
|
+
* @returns {Promise<ConfirmLogisticOrderReceptionResponse>} A promise resolving to the response containing the logistic order.
|
|
702
|
+
*/
|
|
703
|
+
async function confirmLogisticOrderReception({ orderId, locale, nbPreviewLines, }) {
|
|
704
|
+
(0, parameters_validation_1.required)({ orderId, locale });
|
|
705
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
706
|
+
method: "PUT",
|
|
707
|
+
path: `/v1/shop/logistic-orders/${orderId}/confirm-reception`,
|
|
708
|
+
params: {
|
|
709
|
+
locale,
|
|
710
|
+
nbPreviewLines,
|
|
711
|
+
},
|
|
712
|
+
});
|
|
713
|
+
return data;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* 🚚 Update a DRAFT_ORDER_ON_HOLD logistic order to CREATED.
|
|
717
|
+
*
|
|
718
|
+
* This function updates the status of a specific logistic order, identified by the `orderId`, from DRAFT_ORDER_ON_HOLD to CREATED. The parameter `orderId` is mandatory and validated
|
|
719
|
+
* before the request is executed.
|
|
720
|
+
*
|
|
721
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/created [ORDER-220]`
|
|
722
|
+
*
|
|
723
|
+
* | Parameter | Type | Required | Description |
|
|
724
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
725
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order you want to pass to CREATED. |
|
|
726
|
+
*
|
|
727
|
+
* 📤 **Returns**:
|
|
728
|
+
* A `Promise` resolving when the logistic order's status is passed to CREATED.
|
|
729
|
+
*
|
|
730
|
+
* 🛠 **Example usage**:
|
|
731
|
+
* ```ts
|
|
732
|
+
* await createLogisticOrder({
|
|
733
|
+
* orderId: "logisticOrder1",
|
|
734
|
+
* });
|
|
735
|
+
* ```
|
|
736
|
+
*
|
|
737
|
+
* @param {CreateLogisticOrderParameters} params - The parameters for the request.
|
|
738
|
+
* @throws {Error} If `orderId` or `locale` is missing.
|
|
739
|
+
* @returns {Promise<void>} A promise resolving when the logistic order is created.
|
|
740
|
+
*/
|
|
741
|
+
async function createLogisticOrder({ orderId, }) {
|
|
742
|
+
(0, parameters_validation_1.required)({ orderId });
|
|
743
|
+
await (0, fetch_instance_1.enhancedFetch)({
|
|
744
|
+
method: "PUT",
|
|
745
|
+
path: `/v1/shop/logistic-orders/${orderId}/created`,
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* 🚚 Disapproves a logistic order.
|
|
750
|
+
*
|
|
751
|
+
* This function disapproves a specific logistic order, identified by the `orderId`. The parameters `orderId` and `locale` are mandatory and validated
|
|
752
|
+
* before the request is executed.
|
|
753
|
+
*
|
|
754
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/disapprove [ORDER-204]`
|
|
755
|
+
*
|
|
756
|
+
* | Parameter | Type | Required | Description |
|
|
757
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
758
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order you want to disapprove. |
|
|
759
|
+
* | `locale` | `string` | ✅ | The locale in which to return the logistic order. |
|
|
760
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
761
|
+
*
|
|
762
|
+
* 📤 **Returns**:
|
|
763
|
+
* A `Promise` resolving to a single `DisapproveLogisticOrderResponse` object representing the logistic order disapproved.
|
|
764
|
+
*
|
|
765
|
+
* 🛠 **Example usage**:
|
|
766
|
+
* ```ts
|
|
767
|
+
* const order = await disapproveLogisticOrder({
|
|
768
|
+
* orderId: "logisticOrder1",
|
|
769
|
+
* locale: "fr",
|
|
770
|
+
* });
|
|
771
|
+
* ```
|
|
772
|
+
*
|
|
773
|
+
* @param {DisapproveLogisticOrderParameters} params - The parameters for the request.
|
|
774
|
+
* @throws {Error} If `orderId` or `locale` is missing.
|
|
775
|
+
* @returns {Promise<DisapproveLogisticOrderResponse>} A promise resolving to the response containing the logistic order.
|
|
776
|
+
*/
|
|
777
|
+
async function disapproveLogisticOrder({ orderId, locale, nbPreviewLines, }) {
|
|
778
|
+
(0, parameters_validation_1.required)({ orderId, locale });
|
|
779
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
780
|
+
method: "PUT",
|
|
781
|
+
path: `/v1/shop/logistic-orders/${orderId}/disapprove`,
|
|
782
|
+
params: {
|
|
783
|
+
locale,
|
|
784
|
+
nbPreviewLines,
|
|
785
|
+
},
|
|
786
|
+
});
|
|
787
|
+
return data;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* 🚚 Gets a specific logistic order's documents.
|
|
791
|
+
*
|
|
792
|
+
* This function retrieves the documents of a specific logistic order, identified by
|
|
793
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
794
|
+
* before the request is executed.
|
|
795
|
+
*
|
|
796
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/documents [ORDER-552]`
|
|
797
|
+
*
|
|
798
|
+
* | Parameter | Type | Required | Description |
|
|
799
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
800
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the documents. |
|
|
801
|
+
* | `idType` | `OrderIdType` | ❌ | The type of order ID (e.g., `DJUST_ID`, `EXTERNAL_ID`, `REFERENCE`). |
|
|
802
|
+
*
|
|
803
|
+
* 📤 **Returns**:
|
|
804
|
+
* A `Promise` resolving to a single `GetLogisticOrderDocumentsParameters` object representing the list of documents of the logistic order.
|
|
805
|
+
*
|
|
806
|
+
* 🛠 **Example usage**:
|
|
807
|
+
* ```ts
|
|
808
|
+
* const documents = await getLogisticOrderDocuments({
|
|
809
|
+
* orderId: "logisticOrder1",
|
|
810
|
+
* });
|
|
811
|
+
* ```
|
|
812
|
+
*
|
|
813
|
+
* @param {GetLogisticOrderDocumentsParameters} params - The parameters for the request.
|
|
814
|
+
* @throws {Error} If `orderId` is missing.
|
|
815
|
+
* @returns {Promise<GetLogisticOrderDocumentsParameters>} A promise resolving to the response containing the list of documents.
|
|
816
|
+
*/
|
|
817
|
+
async function getLogisticOrderDocuments({ orderId, idType, }) {
|
|
818
|
+
(0, parameters_validation_1.required)({ orderId });
|
|
819
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
820
|
+
method: "GET",
|
|
821
|
+
path: `/v1/shop/logistic-orders/${orderId}/documents`,
|
|
822
|
+
params: {
|
|
823
|
+
orderLogisticIdType: idType,
|
|
824
|
+
},
|
|
825
|
+
});
|
|
826
|
+
return data;
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* 🚚 Gets specific document urls of a specific logistic order.
|
|
830
|
+
*
|
|
831
|
+
* This function retrieves specific document urls of a specific logistic order, both identified by
|
|
832
|
+
* the `orderId` and the `documentId`. Both parameters are mandatory and validated
|
|
833
|
+
* before the request is executed.
|
|
834
|
+
*
|
|
835
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/documents/{documentId} [ORDER-508]`
|
|
836
|
+
*
|
|
837
|
+
* | Parameter | Type | Required | Description |
|
|
838
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
839
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the documents. |
|
|
840
|
+
* | `documentId` | `string` | ✅ | The ID of the document to be downloaded. |
|
|
841
|
+
*
|
|
842
|
+
* 📤 **Returns**:
|
|
843
|
+
* A `Promise` resolving to a single `GetLogisticOrderAccountingDocumentsResponse` object representing the list of document's urls.
|
|
844
|
+
*
|
|
845
|
+
* 🛠 **Example usage**:
|
|
846
|
+
* ```ts
|
|
847
|
+
* const documentUrls = await getLogisticOrderDocumentUrl({
|
|
848
|
+
* orderId: "logisticOrder1",
|
|
849
|
+
* documentId: "document1",
|
|
850
|
+
* });
|
|
851
|
+
* ```
|
|
852
|
+
*
|
|
853
|
+
* @param {GetLogisticOrderAccountingDocumentUrlParameters} params - The parameters for the request.
|
|
854
|
+
* @throws {Error} If `orderId` or `documentId` is missing.
|
|
855
|
+
* @returns {Promise<string[]>} A promise resolving to the response containing the list of document's urls.
|
|
856
|
+
*/
|
|
857
|
+
async function getLogisticOrderDocumentUrl({ orderId, documentId, }) {
|
|
858
|
+
(0, parameters_validation_1.required)({ orderId, documentId });
|
|
859
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
860
|
+
method: "GET",
|
|
861
|
+
path: `/v1/shop/logistic-orders/${orderId}/documents/${documentId}`,
|
|
862
|
+
});
|
|
863
|
+
return data;
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* 🚚 Gets order lines of a specific logistic order.
|
|
867
|
+
*
|
|
868
|
+
* This function retrieves the order lines of a specific logistic order, identified by
|
|
869
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
870
|
+
* before the request is executed.
|
|
871
|
+
*
|
|
872
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/lines [ORDER-555]`
|
|
873
|
+
*
|
|
874
|
+
* | Parameter | Type | Required | Description |
|
|
875
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
876
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the order lines. |
|
|
877
|
+
* | `page` | `integer` | ❌ | The page number you want to retrieve. |
|
|
878
|
+
* | `size` | `integer` | ❌ | The size of the page you want to retrieve. |
|
|
879
|
+
* | `sort` | `string` | ❌ | The order how you want to retrieve the custom fields. |
|
|
880
|
+
* | `locale` | `string` | ❌ | The locale in which to return the logistic order lines. |
|
|
881
|
+
*
|
|
882
|
+
* 📤 **Returns**:
|
|
883
|
+
* A `Promise` resolving to a single `GetLogisticOrderLinesResponse` object representing the page of logistic order lines.
|
|
884
|
+
*
|
|
885
|
+
* 🛠 **Example usage**:
|
|
886
|
+
* ```ts
|
|
887
|
+
* const logisticOrderLines = await getLogisticOrderLines({
|
|
888
|
+
* orderId: "logisticOrder1",
|
|
889
|
+
* });
|
|
890
|
+
* ```
|
|
891
|
+
*
|
|
892
|
+
* @param {GetLogisticOrderLinesParameters} params - The parameters for the request.
|
|
893
|
+
* @throws {Error} If `orderId` is missing.
|
|
894
|
+
* @returns {Promise<GetLogisticOrderLinesResponse>} A promise resolving to the response containing the page object.
|
|
895
|
+
*/
|
|
896
|
+
async function getLogisticOrderLines({ orderId, page, size, sort, locale, }) {
|
|
897
|
+
(0, parameters_validation_1.required)({ orderId });
|
|
898
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
899
|
+
method: "GET",
|
|
900
|
+
path: `/v1/shop/logistic-orders/${orderId}/lines`,
|
|
901
|
+
params: {
|
|
902
|
+
page,
|
|
903
|
+
size,
|
|
904
|
+
sort,
|
|
905
|
+
locale,
|
|
906
|
+
},
|
|
907
|
+
});
|
|
908
|
+
return data;
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* 🚚 Updates order lines of a specific DRAFT_ORDER_ON_HOLD logistic order.
|
|
912
|
+
*
|
|
913
|
+
* This function updates the confirmed quantity and custom field values of the order lines of a specific logistic order, identified by
|
|
914
|
+
* the `orderId`. This parameter, as well as the `lines`, is mandatory and validated before the request is executed.
|
|
915
|
+
*
|
|
916
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/lines [ORDER-250]`
|
|
917
|
+
*
|
|
918
|
+
* | Parameter | Type | Required | Description |
|
|
919
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
920
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update the lines. |
|
|
921
|
+
* | `lines` | `OrderLogisticLineUpdate[]` | ✅ | The lines you want to update. |
|
|
922
|
+
*
|
|
923
|
+
* 📤 **Returns**:
|
|
924
|
+
* A `Promise` resolving to a single `UpdateOnHoldLogisticOrderLinesResponse` object representing the error report for each lines that failed to update.
|
|
925
|
+
*
|
|
926
|
+
* 🛠 **Example usage**:
|
|
927
|
+
* ```ts
|
|
928
|
+
* const errorReport = await updateOnHoldLogisticOrderLines({
|
|
929
|
+
* orderId: "logisticOrder1",
|
|
930
|
+
* lines: [
|
|
931
|
+
{
|
|
932
|
+
"customFields": [
|
|
933
|
+
{
|
|
934
|
+
"customFieldId": "customField1",
|
|
935
|
+
"customFieldValue": "value1"
|
|
936
|
+
}
|
|
937
|
+
],
|
|
938
|
+
"id": "orderLine1",
|
|
939
|
+
"quantity": 1,
|
|
940
|
+
"updateAction": "ADD_QUANTITY"
|
|
941
|
+
}
|
|
942
|
+
]
|
|
943
|
+
* });
|
|
944
|
+
* ```
|
|
945
|
+
*
|
|
946
|
+
* @param {UpdateOnHoldLogisticOrderLinesParameters} params - The parameters for the request.
|
|
947
|
+
* @throws {Error} If `orderId` or `lines` is missing.
|
|
948
|
+
* @returns {Promise<UpdateOnHoldLogisticOrderLinesResponse>} A promise resolving to the response containing the error report.
|
|
949
|
+
*/
|
|
950
|
+
async function updateOnHoldLogisticOrderLines({ orderId, lines, }) {
|
|
951
|
+
(0, parameters_validation_1.required)({ orderId, lines });
|
|
952
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
953
|
+
method: "PUT",
|
|
954
|
+
path: `/v1/shop/logistic-orders/${orderId}/lines`,
|
|
955
|
+
body: JSON.stringify(lines),
|
|
956
|
+
});
|
|
957
|
+
return data;
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* 🚚 Bulk-updates custom field values on multiple lines of a logistic order (partial success).
|
|
961
|
+
*
|
|
962
|
+
* Each line is processed independently: valid lines are updated; failures appear in `warnings`.
|
|
963
|
+
* An empty `warnings` array means every line succeeded. Requires `dj-client: ACCOUNT`; the order
|
|
964
|
+
* must belong to the authenticated customer. `logisticOrderId` is the order **reference**
|
|
965
|
+
* (e.g. OL-2025-001234), not necessarily an internal id.
|
|
966
|
+
*
|
|
967
|
+
* 🛠 **Endpoint**: `PATCH /v1/shop/logistic-orders/${logisticOrderId}/lines [ORDER-251]`
|
|
968
|
+
*
|
|
969
|
+
* | Parameter | Type | Required | Description |
|
|
970
|
+
* |--------------------|---------------------------------------------------|----------|--------------------------------------------------|
|
|
971
|
+
* | `logisticOrderId` | `string` | ✅ | Logistic order reference. |
|
|
972
|
+
* | `lines` | `BulkUpdateLogisticOrderLinesCustomFieldsLineItem[]` | ✅ | Lines with `logisticOrderLineId` and `customFieldValues`. Max 100 entries, no duplicates (422 if invalid). |
|
|
973
|
+
*
|
|
974
|
+
* 📤 **Returns**:
|
|
975
|
+
* A `Promise` resolving to `BulkUpdateLogisticOrderLinesCustomFieldsResponse` (`warnings` only lists lines that failed validation).
|
|
976
|
+
*
|
|
977
|
+
* 🛠 **Example usage**:
|
|
978
|
+
* ```ts
|
|
979
|
+
* const { warnings } = await bulkUpdateLogisticOrderLinesCustomFields({
|
|
980
|
+
* logisticOrderId: "OL-2025-001234",
|
|
981
|
+
* lines: [
|
|
982
|
+
* {
|
|
983
|
+
* logisticOrderLineId: "LOG-LINE-001",
|
|
984
|
+
* customFieldValues: [
|
|
985
|
+
* { customFieldId: "cf-1", customFieldValue: "value1" },
|
|
986
|
+
* ],
|
|
987
|
+
* },
|
|
988
|
+
* ],
|
|
989
|
+
* });
|
|
990
|
+
* ```
|
|
991
|
+
*
|
|
992
|
+
* @param {BulkUpdateLogisticOrderLinesCustomFieldsParameters} params - Path id and line payloads.
|
|
993
|
+
* @throws {Error} If `logisticOrderId` or `lines` is missing.
|
|
994
|
+
* @returns {Promise<BulkUpdateLogisticOrderLinesCustomFieldsResponse>}
|
|
995
|
+
*/
|
|
996
|
+
async function bulkUpdateLogisticOrderLinesCustomFields({ logisticOrderId, lines, }) {
|
|
997
|
+
(0, parameters_validation_1.required)({ logisticOrderId, lines });
|
|
998
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
999
|
+
method: "PATCH",
|
|
1000
|
+
path: `/v1/shop/logistic-orders/${logisticOrderId}/lines`,
|
|
1001
|
+
body: JSON.stringify(lines),
|
|
1002
|
+
});
|
|
1003
|
+
return data;
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* 🚚 Updates specific logistic order line's customFields.
|
|
1007
|
+
*
|
|
1008
|
+
* This function updates a specific logistic order line's customFields, identified by both
|
|
1009
|
+
* the `orderId` and the `lineId`. These parameters, as well as the `customFields` is mandatory and validated
|
|
1010
|
+
* before the request is executed.
|
|
1011
|
+
*
|
|
1012
|
+
* 🛠 **Endpoint**: `PATCH /v1/shop/logistic-orders/${orderId}/lines/${lineId} [ORDER-206]`
|
|
1013
|
+
*
|
|
1014
|
+
* | Parameter | Type | Required | Description |
|
|
1015
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1016
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update an order line. |
|
|
1017
|
+
* | `lineId` | `string` | ✅ | The ID of the logistic order line you want to update. |
|
|
1018
|
+
* | `customFields` | `CustomFieldValueObject[]` | ✅ | The custom fields to add with value and externalId. |
|
|
1019
|
+
* | `locale` | `string` | ❌ | The locale in which to return the logistic order lines. |
|
|
1020
|
+
*
|
|
1021
|
+
* 📤 **Returns**:
|
|
1022
|
+
* A `Promise` resolving to a single `UpdateLogisticOrderLineCustomFieldsResponse` object representing the updated logistic order line.
|
|
1023
|
+
*
|
|
1024
|
+
* 🛠 **Example usage**:
|
|
1025
|
+
* ```ts
|
|
1026
|
+
* const newLogisticOrderLine = await updateLogisticOrderLineCustomFields({
|
|
1027
|
+
* orderId: "logisticOrder1",
|
|
1028
|
+
* lineId: "logisticOrderLine1",
|
|
1029
|
+
* customFields: [{externalId: "cf1", value: "value1"}, {externalId: "cf2", value: "value2"}]
|
|
1030
|
+
* });
|
|
1031
|
+
* ```
|
|
1032
|
+
*
|
|
1033
|
+
* @param {UpdateLogisticOrderLineCustomFieldsParameters} params - The parameters for the request.
|
|
1034
|
+
* @throws {Error} If `orderId` or `lineId` is missing.
|
|
1035
|
+
* @returns {Promise<UpdateLogisticOrderLineCustomFieldsResponse>} A promise resolving to the response containing the logistic order line.
|
|
1036
|
+
*/
|
|
1037
|
+
async function updateLogisticOrderLineCustomFields({ orderId, lineId, locale, customFields, }) {
|
|
1038
|
+
(0, parameters_validation_1.required)({ orderId, lineId, customFields });
|
|
1039
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1040
|
+
method: "PATCH",
|
|
1041
|
+
path: `/v1/shop/logistic-orders/${orderId}/lines/${lineId}`,
|
|
1042
|
+
params: {
|
|
1043
|
+
locale,
|
|
1044
|
+
},
|
|
1045
|
+
body: JSON.stringify(customFields),
|
|
1046
|
+
});
|
|
1047
|
+
return data;
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* 🚚 Updates order line of a specific DRAFT_ORDER_ON_HOLD logistic order.
|
|
1051
|
+
*
|
|
1052
|
+
* This function updates the confirmed quantity of a specific order line of a specific logistic order, both identified by
|
|
1053
|
+
* the `orderId` and the `orderLineId`. Both parameters, as well as the `quantity`, are mandatory and validated before the request is executed.
|
|
1054
|
+
*
|
|
1055
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/lines/${orderLineId} [ORDER-218]`
|
|
1056
|
+
*
|
|
1057
|
+
* | Parameter | Type | Required | Description |
|
|
1058
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1059
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update the lines. |
|
|
1060
|
+
* | `orderLineId` | `string` | ✅ | The ID of the logistic order line you want to update. |
|
|
1061
|
+
* | `quantity` | `number` | ✅ | The lines you want to update. |
|
|
1062
|
+
*
|
|
1063
|
+
* 📤 **Returns**:
|
|
1064
|
+
* A `Promise` resolving when the logistic order line is updated.
|
|
1065
|
+
*
|
|
1066
|
+
* 🛠 **Example usage**:
|
|
1067
|
+
* ```ts
|
|
1068
|
+
* await updateOnHoldLogisticOrderLine({
|
|
1069
|
+
* orderId: "logisticOrder1",
|
|
1070
|
+
* orderLineId: "logisticOrderLine1",
|
|
1071
|
+
* quantity: 1
|
|
1072
|
+
* ```
|
|
1073
|
+
*
|
|
1074
|
+
* @param {UpdateOnHoldLogisticOrderLineParameters} params - The parameters for the request.
|
|
1075
|
+
* @throws {Error} If `orderId`, `orderLineId` or `quantity` is missing.
|
|
1076
|
+
* @returns {Promise<void>} A promise resolving when the logistic order line is updated.
|
|
1077
|
+
*/
|
|
1078
|
+
async function updateOnHoldLogisticOrderLine({ orderId, orderLineId, quantity, }) {
|
|
1079
|
+
(0, parameters_validation_1.required)({ orderId, orderLineId, quantity });
|
|
1080
|
+
await (0, fetch_instance_1.enhancedFetch)({
|
|
1081
|
+
method: "PUT",
|
|
1082
|
+
path: `/v1/shop/logistic-orders/${orderId}/lines/${orderLineId}`,
|
|
1083
|
+
body: JSON.stringify(quantity),
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* 🚚 Updates a logistic order's shipping address.
|
|
1088
|
+
*
|
|
1089
|
+
* This function updates the shipping address of a specific logistic order, both identified by the `orderId` and the `shippingAddressId`. Both parameters are mandatory and validated
|
|
1090
|
+
* before the request is executed.
|
|
1091
|
+
*
|
|
1092
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/shipping-address [ORDER-210]`
|
|
1093
|
+
*
|
|
1094
|
+
* | Parameter | Type | Required | Description |
|
|
1095
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1096
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update the shipping address. |
|
|
1097
|
+
* | `shippingAddressId`| `string` | ✅ | The ID of the shipping address you want to set to the logistic order. |
|
|
1098
|
+
*
|
|
1099
|
+
* 📤 **Returns**:
|
|
1100
|
+
* A `Promise` resolving when the shipping address of the logistic order is set.
|
|
1101
|
+
*
|
|
1102
|
+
* 🛠 **Example usage**:
|
|
1103
|
+
* ```ts
|
|
1104
|
+
* await updateLogisticOrderShippingAddress({
|
|
1105
|
+
* orderId: "logisticOrder1",
|
|
1106
|
+
* shippingAddressId: "address1",
|
|
1107
|
+
* });
|
|
1108
|
+
* ```
|
|
1109
|
+
*
|
|
1110
|
+
* @param {UpdateLogisticOrderShippingInformationParameters} params - The parameters for the request.
|
|
1111
|
+
* @throws {Error} If `orderId` or `shippingAddressId` is missing.
|
|
1112
|
+
* @returns {Promise<void>} A promise resolving when the shipping address of the logistic order is set.
|
|
1113
|
+
*/
|
|
1114
|
+
async function updateLogisticOrderShippingAddress({ orderId, shippingAddressId, }) {
|
|
1115
|
+
(0, parameters_validation_1.required)({ orderId, shippingAddressId });
|
|
1116
|
+
(0, fetch_instance_1.enhancedFetch)({
|
|
1117
|
+
method: "PUT",
|
|
1118
|
+
path: `/v1/shop/logistic-orders/${orderId}/shipping-address`,
|
|
1119
|
+
body: JSON.stringify({ shippingAddressId }),
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* 🚚 Gets a logistic order's shipping information.
|
|
1124
|
+
*
|
|
1125
|
+
* This function retrieves the shipping information of a specific logistic order, identified by the `orderId`. This parameter is mandatory and validated
|
|
1126
|
+
* before the request is executed.
|
|
1127
|
+
*
|
|
1128
|
+
* 🛠 **Endpoint**: `GET /v1/shop/logistic-orders/${orderId}/shipping-information [ORDER-502]`
|
|
1129
|
+
*
|
|
1130
|
+
* | Parameter | Type | Required | Description |
|
|
1131
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1132
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the shipping information. |
|
|
1133
|
+
*
|
|
1134
|
+
* 📤 **Returns**:
|
|
1135
|
+
* A `Promise` resolving to a single `GetLogisticOrderShippingAddressResponse` object representing the array of the logistic order's shipping information.
|
|
1136
|
+
*
|
|
1137
|
+
* 🛠 **Example usage**:
|
|
1138
|
+
* ```ts
|
|
1139
|
+
* const shippingInformation = await getLogisticOrderShippingInformation({
|
|
1140
|
+
* orderId: "logisticOrder1",
|
|
1141
|
+
* });
|
|
1142
|
+
* ```
|
|
1143
|
+
*
|
|
1144
|
+
* @param {GetLogisticOrderShippingAddressParameters} params - The parameters for the request.
|
|
1145
|
+
* @throws {Error} If `orderId` is missing.
|
|
1146
|
+
* @returns {Promise<GetLogisticOrderShippingAddressResponse>} A promise resolving to the response containing the array of shipping information.
|
|
1147
|
+
*/
|
|
1148
|
+
async function getLogisticOrderShippingInformation({ orderId, }) {
|
|
1149
|
+
(0, parameters_validation_1.required)({ orderId });
|
|
1150
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1151
|
+
method: "GET",
|
|
1152
|
+
path: `/v1/shop/logistic-orders/${orderId}/shipping-information`,
|
|
1153
|
+
});
|
|
1154
|
+
return data;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* 🚚 Updates a logistic order's shipping information.
|
|
1158
|
+
*
|
|
1159
|
+
* This function updates the shipping information of a specific logistic order, identified by the `orderId`. This parameter, as well as the `shippingAddressId` and the `shippingType`, are mandatory and validated
|
|
1160
|
+
* before the request is executed.
|
|
1161
|
+
*
|
|
1162
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/shipping-information [ORDER-214]`
|
|
1163
|
+
*
|
|
1164
|
+
* | Parameter | Type | Required | Description |
|
|
1165
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1166
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update the shipping information. |
|
|
1167
|
+
* | `shippingAddressId`| `string` | ✅ | The ID of the shipping address you want to add to the logistic order. |
|
|
1168
|
+
* | `shippingType` | `string` | ✅ | The type of shipping address to be added with the shipping address. |
|
|
1169
|
+
*
|
|
1170
|
+
* 📤 **Returns**:
|
|
1171
|
+
* A `Promise` resolving when the shipping information of the logistic order is updated.
|
|
1172
|
+
*
|
|
1173
|
+
* 🛠 **Example usage**:
|
|
1174
|
+
* ```ts
|
|
1175
|
+
* await updateLogisticOrderShippingInformation({
|
|
1176
|
+
* orderId: "logisticOrder1",
|
|
1177
|
+
* shippingAddressId: "address1",
|
|
1178
|
+
* });
|
|
1179
|
+
* ```
|
|
1180
|
+
*
|
|
1181
|
+
* @param {UpdateLogisticOrderShippingInformationParameters} params - The parameters for the request.
|
|
1182
|
+
* @throws {Error} If `orderId` or `shippingAddressId` is missing.
|
|
1183
|
+
* @returns {Promise<void>} A promise resolving when the shipping information is updated.
|
|
1184
|
+
*/
|
|
1185
|
+
async function updateLogisticOrderShippingInformation({ orderId, shippingAddressId, shippingType, }) {
|
|
1186
|
+
(0, parameters_validation_1.required)({ orderId, shippingAddressId, shippingType });
|
|
1187
|
+
(0, fetch_instance_1.enhancedFetch)({
|
|
1188
|
+
method: "PUT",
|
|
1189
|
+
path: `/v1/shop/logistic-orders/${orderId}/shipping-information`,
|
|
1190
|
+
body: JSON.stringify({ shippingAddressId }),
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* 🚚 Updates a logistic order's shipping type.
|
|
1195
|
+
*
|
|
1196
|
+
* This function updates the shipping type of a specific logistic order, both identified by the `orderId` and the `shippingType`. Both parameters are mandatory and validated
|
|
1197
|
+
* before the request is executed.
|
|
1198
|
+
*
|
|
1199
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/logistic-orders/${orderId}/shipping-information [ORDER-211]`
|
|
1200
|
+
*
|
|
1201
|
+
* | Parameter | Type | Required | Description |
|
|
1202
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1203
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to update the shipping type. |
|
|
1204
|
+
* | `shippingType` | `string` | ✅ | The shipping type you want to set to the logistic order. |
|
|
1205
|
+
*
|
|
1206
|
+
* 📤 **Returns**:
|
|
1207
|
+
* A `Promise` resolving when the shipping type of the logistic order is set.
|
|
1208
|
+
*
|
|
1209
|
+
* 🛠 **Example usage**:
|
|
1210
|
+
* ```ts
|
|
1211
|
+
* await updateLogisticOrderShippingType({
|
|
1212
|
+
* orderId: "logisticOrder1",
|
|
1213
|
+
* shippingType: "shipping_type",
|
|
1214
|
+
* });
|
|
1215
|
+
* ```
|
|
1216
|
+
*
|
|
1217
|
+
* @param {UpdateLogisticOrderShippingTypeParameters} params - The parameters for the request.
|
|
1218
|
+
* @throws {Error} If `orderId` or `shippingType` is missing.
|
|
1219
|
+
* @returns {Promise<void>} A promise resolving when the shipping type of the logistic order is set.
|
|
1220
|
+
*/
|
|
1221
|
+
async function updateLogisticOrderShippingType({ orderId, shippingType, }) {
|
|
1222
|
+
(0, parameters_validation_1.required)({ orderId, shippingType });
|
|
1223
|
+
(0, fetch_instance_1.enhancedFetch)({
|
|
1224
|
+
method: "PUT",
|
|
1225
|
+
path: `/v1/shop/logistic-orders/${orderId}/shipping-type`,
|
|
1226
|
+
body: JSON.stringify({ shippingType }),
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* 🚚 Creates a thread on a specific logistic order.
|
|
1231
|
+
*
|
|
1232
|
+
* This function creates a thread on a specific logistic order, identified by
|
|
1233
|
+
* the `orderId`. This parameter, as well as the `lineId`, the `message` and the `reasonCode`, is mandatory and validated
|
|
1234
|
+
* before the request is executed.
|
|
1235
|
+
*
|
|
1236
|
+
* 🛠 **Endpoint**: `POST /v1/shop/logistic-orders/${orderId}/threads [THREAD-100]`
|
|
1237
|
+
*
|
|
1238
|
+
* | Parameter | Type | Required | Description |
|
|
1239
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1240
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order for which you want to create a thread. |
|
|
1241
|
+
* | `lineId` | `string` | ❌ | The ID of the logistic order line involved in the thread. |
|
|
1242
|
+
* | `message` | `string` | ❌ | A message to add comments on the thread. |
|
|
1243
|
+
* | `reasonCode` | `string` | ❌ | The code indentifying the type of thread. |
|
|
1244
|
+
*
|
|
1245
|
+
* 📤 **Returns**:
|
|
1246
|
+
* A `Promise` resolving to a `CreateLogisticOrderThreadResponse` object when the thread is created.
|
|
1247
|
+
*
|
|
1248
|
+
* 🛠 **Example usage**:
|
|
1249
|
+
* ```ts
|
|
1250
|
+
* await createLogisticOrderThread({
|
|
1251
|
+
* orderId: "logisticOrder1",
|
|
1252
|
+
* lineId: "logisticOrderLine1",
|
|
1253
|
+
* message: "This is a message",
|
|
1254
|
+
* reasonCode: "REFUND"
|
|
1255
|
+
* });
|
|
1256
|
+
* ```
|
|
1257
|
+
*
|
|
1258
|
+
* @param {CreateLogisticOrderThreadParameters} params - The parameters for the request.
|
|
1259
|
+
* @throws {Error} If `orderId` is missing.
|
|
1260
|
+
* @returns {Promise<CreateLogisticOrderThreadResponse>} A promise resolving when the thread is created.
|
|
1261
|
+
*/
|
|
1262
|
+
async function createLogisticOrderThread({ orderId, lineId, message, reasonCode, }) {
|
|
1263
|
+
(0, parameters_validation_1.required)({ orderId, lineId, message, reasonCode });
|
|
1264
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1265
|
+
method: "POST",
|
|
1266
|
+
path: `/v1/shop/logistic-orders/${orderId}/threads`,
|
|
1267
|
+
body: JSON.stringify({ lineId, message, reasonCode }),
|
|
1268
|
+
});
|
|
1269
|
+
return data;
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* 🚚 Creates a thread on a specific logistic order V2.
|
|
1273
|
+
*
|
|
1274
|
+
* This function creates a thread on a specific logistic order, identified by (Version 2)
|
|
1275
|
+
* the `logisticOrderId` and `reasonCode`, are mandatory and validated
|
|
1276
|
+
* before the request is executed.
|
|
1277
|
+
*
|
|
1278
|
+
* 🛠 **Endpoint**: `POST /v2/shop/logistic-orders/${logisticOrderId}/threads [THREAD-101]`
|
|
1279
|
+
*
|
|
1280
|
+
* | Parameter | Type | Required | Description |
|
|
1281
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1282
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order for which you want to create a thread. |
|
|
1283
|
+
* | `idType` | `IdType` | ❌ | The type of the id. |
|
|
1284
|
+
* | `message` | `string` | ❌ | A message to add comments on the thread. |
|
|
1285
|
+
* | `name` | `string` | ❌ | The name of the thread. |
|
|
1286
|
+
* | `reasonCode` | `string` | ✅ | The code indentifying the type of thread. |
|
|
1287
|
+
*
|
|
1288
|
+
* 📤 **Returns**:
|
|
1289
|
+
* A `Promise` resolving to a `CreateLogisticOrderThreadResponseV2` object when the threads are created.
|
|
1290
|
+
*
|
|
1291
|
+
* 🛠 **Example usage**:
|
|
1292
|
+
* ```ts
|
|
1293
|
+
* await createLogisticOrderThreadV2({
|
|
1294
|
+
* logisticOrderId: "logisticOrder1",
|
|
1295
|
+
* idType: "DJUST_ID",
|
|
1296
|
+
* name: "This is a test thread",
|
|
1297
|
+
* message: "This is a message",
|
|
1298
|
+
* reasonCode: "REFUND"
|
|
1299
|
+
* });
|
|
1300
|
+
* ```
|
|
1301
|
+
*
|
|
1302
|
+
* @param {CreateLogisticOrderThreadParametersV2} params - The parameters for the request.
|
|
1303
|
+
* @throws {Error} If `logisticOrderId`, `reasonCode` is missing.
|
|
1304
|
+
* @returns {Promise<CreateLogisticOrderThreadResponseV2>} A promise resolving when the thread is created.
|
|
1305
|
+
*/
|
|
1306
|
+
async function createLogisticOrderThreadV2({ logisticOrderId, idType, message, reasonCode, }) {
|
|
1307
|
+
(0, parameters_validation_1.required)({ logisticOrderId, reasonCode });
|
|
1308
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1309
|
+
method: "POST",
|
|
1310
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/threads`,
|
|
1311
|
+
body: JSON.stringify({ name, message, reasonCode, idType }),
|
|
1312
|
+
});
|
|
1313
|
+
return data;
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* 🚚 Get order logistic threads.
|
|
1317
|
+
*
|
|
1318
|
+
* This function return the list of threads related to a specific logistic order.
|
|
1319
|
+
*
|
|
1320
|
+
* 🛠 **Endpoint**: `GET /v2/shop/logistic-orders/${logisticOrderId}/threads [ORDER-558]`
|
|
1321
|
+
*
|
|
1322
|
+
* | Parameter | Type | Required | Description |
|
|
1323
|
+
* |-------------------|-------------|----------|------------------------------------------------------------------------|
|
|
1324
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the review. |
|
|
1325
|
+
* | `pageable.page` | `number` | ❌ | The page number |
|
|
1326
|
+
* | `pageable.size` | `number` | ❌ | The number of items per page. |
|
|
1327
|
+
*
|
|
1328
|
+
* 📤 **Returns**:
|
|
1329
|
+
* A `Promise` resolving to a `GetLogisticOrderThreadsResponse`.
|
|
1330
|
+
*
|
|
1331
|
+
* 🛠 **Example usage**:
|
|
1332
|
+
* ```ts
|
|
1333
|
+
* const threads = await getLogisticOrderThreads({
|
|
1334
|
+
* logisticOrderId: "logisticOrder1",
|
|
1335
|
+
* pageable: { page: 1, size: 10 },
|
|
1336
|
+
* });
|
|
1337
|
+
* ```
|
|
1338
|
+
*
|
|
1339
|
+
* @param {GetLogisticOrderThreadsParams} params - The parameters for the request.
|
|
1340
|
+
* @throws {Error} If `logisticOrderId` is missing.
|
|
1341
|
+
* @returns {Promise<GetLogisticOrderThreadsResponse>} A promise resolving when the thread is created.
|
|
1342
|
+
*/
|
|
1343
|
+
async function getLogisticOrderThreads({ logisticOrderId, pageable, idType, }) {
|
|
1344
|
+
(0, parameters_validation_1.required)({ logisticOrderId });
|
|
1345
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1346
|
+
method: "GET",
|
|
1347
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/threads`,
|
|
1348
|
+
params: {
|
|
1349
|
+
page: pageable?.page,
|
|
1350
|
+
size: pageable?.size,
|
|
1351
|
+
idType,
|
|
1352
|
+
},
|
|
1353
|
+
});
|
|
1354
|
+
return data;
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* 🚚 Get a logistic order thread.
|
|
1358
|
+
*
|
|
1359
|
+
* This function retrieves a specific logistic order thread, identified by
|
|
1360
|
+
* the `logisticOrderId` and `threadId`. Both parameters are mandatory and validated
|
|
1361
|
+
* before the request is executed.
|
|
1362
|
+
*
|
|
1363
|
+
* 🛠 **Endpoint**: `GET /v2/shop/logistic-orders/${logisticOrderId}/threads/${threadId} [ORDER-509]`
|
|
1364
|
+
*
|
|
1365
|
+
* | Parameter | Type | Required | Description |
|
|
1366
|
+
* |-------------------|-------------|----------|------------------------------------------------------------------------|
|
|
1367
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the review. |
|
|
1368
|
+
* | `threadId` | `string` | ✅ | The ID of the thread of which you want to retrieve the review. |
|
|
1369
|
+
*
|
|
1370
|
+
* 📤 **Returns**:
|
|
1371
|
+
* A `Promise` resolving to a `GetLogisticOrderThreadResponse`.
|
|
1372
|
+
*
|
|
1373
|
+
* 🛠 **Example usage**:
|
|
1374
|
+
* ```ts
|
|
1375
|
+
* const threads = await getLogisticOrderThread({
|
|
1376
|
+
* logisticOrderId: "logisticOrder1",
|
|
1377
|
+
* threadId: "thread1",
|
|
1378
|
+
* });
|
|
1379
|
+
* ```
|
|
1380
|
+
*
|
|
1381
|
+
* @param {GetLogisticOrderThreadsParams} params - The parameters for the request.
|
|
1382
|
+
* @throws {Error} If `logisticOrderId` or `threadId` is missing.
|
|
1383
|
+
* @returns {Promise<GetLogisticOrderThreadResponse>} A promise resolving when the thread is found.
|
|
1384
|
+
*/
|
|
1385
|
+
async function getLogisticOrderThread({ logisticOrderId, threadId, idType, }) {
|
|
1386
|
+
(0, parameters_validation_1.required)({ logisticOrderId });
|
|
1387
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1388
|
+
method: "GET",
|
|
1389
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/threads/${threadId}`,
|
|
1390
|
+
params: {
|
|
1391
|
+
idType,
|
|
1392
|
+
},
|
|
1393
|
+
});
|
|
1394
|
+
return data;
|
|
1395
|
+
}
|
|
1396
|
+
/**
|
|
1397
|
+
* 🚚 Create messages for a specific logistic order thread.
|
|
1398
|
+
* This function retrieves a specific logistic order thread, identified by
|
|
1399
|
+
* the `logisticOrderId` and `threadId`. Both parameters are mandatory and validated
|
|
1400
|
+
* before the request is executed.
|
|
1401
|
+
*
|
|
1402
|
+
* 🛠 **Endpoint**: `GET /v2/shop/logistic-orders/${logisticOrderId}/threads/${threadId}/messages [ORDER-217]`
|
|
1403
|
+
*
|
|
1404
|
+
* | Parameter | Type | Required | Description |
|
|
1405
|
+
* |-------------------|---------------------------------------------------------|----------|------------------------------------------------------------------------|
|
|
1406
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the review. |
|
|
1407
|
+
* | `threadId` | `string` | ✅ | The ID of the thread of which you want to retrieve the review. |
|
|
1408
|
+
* | `body` | `string` | ❌ | The body of the message to be added to the thread. |
|
|
1409
|
+
* | `customField` | `logisticOrderIncidentThreadsCustomFieldValueRequest[]` | ❌ | The custom fields to add to the created incident threads messages |
|
|
1410
|
+
*
|
|
1411
|
+
* 📤 **Returns**:
|
|
1412
|
+
* A `Promise` resolving to a `CreateLogisticOrderThreadMessagesResponse`.
|
|
1413
|
+
*
|
|
1414
|
+
* 🛠 **Example usage**:
|
|
1415
|
+
* ```ts
|
|
1416
|
+
* const threads = await createOrderLogisticThreadMessages({
|
|
1417
|
+
* logisticOrderId: "logisticOrder1",
|
|
1418
|
+
* threadId: "thread1",
|
|
1419
|
+
* body: "This is a message",
|
|
1420
|
+
* customField: {
|
|
1421
|
+
* customFieldValues: [{ customFieldId: "cf1", customFieldValue: "value1" }],
|
|
1422
|
+
* idType: "EXTERNAL_ID",
|
|
1423
|
+
* },
|
|
1424
|
+
* });
|
|
1425
|
+
* ```
|
|
1426
|
+
*
|
|
1427
|
+
* @param {GetLogisticOrderThreadsParams} params - The parameters for the request.
|
|
1428
|
+
* @throws {Error} If `logisticOrderId` or `threadId` is missing.
|
|
1429
|
+
* @returns {Promise<CreateLogisticOrderThreadMessagesResponse>} A promise resolving when the thread is found.
|
|
1430
|
+
*/
|
|
1431
|
+
async function createOrderLogisticThreadMessages({ logisticOrderId, threadId, body, customField, idType, }) {
|
|
1432
|
+
(0, parameters_validation_1.required)({ logisticOrderId, threadId });
|
|
1433
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1434
|
+
method: "POST",
|
|
1435
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/threads/${threadId}/messages`,
|
|
1436
|
+
body: JSON.stringify({ body, customField, idType }),
|
|
1437
|
+
});
|
|
1438
|
+
return data;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* 🚚 Update messages for a specific logistic order thread.
|
|
1442
|
+
*
|
|
1443
|
+
* This function retrieves a specific logistic order thread, identified by
|
|
1444
|
+
* the `logisticOrderId` and `threadId`. Both parameters are mandatory and validated
|
|
1445
|
+
* before the request is executed.
|
|
1446
|
+
*
|
|
1447
|
+
* 🛠 **Endpoint**: `PATCH /v2/shop/logistic-orders/${logisticOrderId}/threads/${threadId}/messages/${messageId} [ORDER-216]`
|
|
1448
|
+
*
|
|
1449
|
+
* | Parameter | Type | Required | Description |
|
|
1450
|
+
* |---------------------|-----------------------------|----------|------------------------------------------------------------------------|
|
|
1451
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the review. |
|
|
1452
|
+
* | `threadId` | `string` | ✅ | The ID of the thread of which you want to retrieve the review. |
|
|
1453
|
+
* | `messageId` | `string` | ✅ | The ID of the message to be updated. |
|
|
1454
|
+
* | `customFieldValues` | `CustomFieldValueRequest[]` | ❌ | The custom fields to add to the created incident threads messages |
|
|
1455
|
+
* | `idType` | `IdType` | ❌ | The type of the id. |
|
|
1456
|
+
*
|
|
1457
|
+
* 📤 **Returns**:
|
|
1458
|
+
* A `Promise` resolving when the message is updated.
|
|
1459
|
+
|
|
1460
|
+
*
|
|
1461
|
+
* 🛠 **Example usage**:
|
|
1462
|
+
* ```ts
|
|
1463
|
+
* const threads = await updateOrderLogisticThreadMessage({
|
|
1464
|
+
* logisticOrderId: "logisticOrder1",
|
|
1465
|
+
* threadId: "thread1",
|
|
1466
|
+
* body: "This is a message",
|
|
1467
|
+
* customField: {
|
|
1468
|
+
* customFieldValues: [{ customFieldId: "cf1", customFieldValue: "value1" }],
|
|
1469
|
+
* idType: "EXTERNAL_ID",
|
|
1470
|
+
* },
|
|
1471
|
+
* });
|
|
1472
|
+
* ```
|
|
1473
|
+
*
|
|
1474
|
+
* @param {GetLogisticOrderThreadsParams} params - The parameters for the request.
|
|
1475
|
+
* @throws {Error} If `logisticOrderId`, `threadId`, `messageId` is missing.
|
|
1476
|
+
* @returns {Promise<void>} A promise resolving when the message updated.
|
|
1477
|
+
*/
|
|
1478
|
+
async function updateOrderLogisticThreadMessage({ logisticOrderId, threadId, messageId, customFieldValues, idType, }) {
|
|
1479
|
+
(0, parameters_validation_1.required)({ logisticOrderId, threadId, messageId });
|
|
1480
|
+
await (0, fetch_instance_1.enhancedFetch)({
|
|
1481
|
+
method: "PATCH",
|
|
1482
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/threads/${threadId}/messages/${messageId}`,
|
|
1483
|
+
body: JSON.stringify({ customFieldValues, idType }),
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* 🚚 Creates a thread on a specific incident on a specific logistic order.
|
|
1488
|
+
*
|
|
1489
|
+
* This function creates a thread on a specific incident on a specific logistic order, identified by ``
|
|
1490
|
+
* `logisticOrderId`, incidentId, reasonCode, the parameters required and validated before the request is executed.
|
|
1491
|
+
*
|
|
1492
|
+
* 🛠 **Endpoint**: `POST /v2/shop/logistic-orders/${logisticOrderId}/incidents/${incidentId}/threads [ORDER-106]`
|
|
1493
|
+
*
|
|
1494
|
+
* | Parameter | Type | Required | Description |
|
|
1495
|
+
* |-------------------|---------------------------------------------------------|----------------------------|----------------------------------------------------------|
|
|
1496
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order |
|
|
1497
|
+
* | `incidentId` | `string` | ✅ | The ID of the incident |
|
|
1498
|
+
* | `customField` | `logisticOrderIncidentThreadsCustomFieldValueRequest[]` | ❌ | The custom fields to add to the created incident threads |
|
|
1499
|
+
* | `message` | `string` | ❌ | A message to add comments on the thread. |
|
|
1500
|
+
* | `name` | `string` | ❌ | The name of the thread |
|
|
1501
|
+
* | `reasonCode` | `string` | ✅ | The code indentifying the type of thread. |
|
|
1502
|
+
* | `idType` | `IdType` | ❌ | The type of the id. |
|
|
1503
|
+
*
|
|
1504
|
+
* 📤 **Returns**:
|
|
1505
|
+
* A `Promise` resolving to a `CreateLogisticOrderIncidentThreadsResponse` object when the thread is created.
|
|
1506
|
+
*
|
|
1507
|
+
* 🛠 **Example usage**:
|
|
1508
|
+
* ```ts
|
|
1509
|
+
* await createLogisticOrderIncidentThreads({
|
|
1510
|
+
* logisticOrderId: "logisticOrder1",
|
|
1511
|
+
* incidentId: "logisticOrderLine1",
|
|
1512
|
+
* customField: [
|
|
1513
|
+
* {
|
|
1514
|
+
* customFieldValues: [
|
|
1515
|
+
* {
|
|
1516
|
+
* "customFieldId": "string",
|
|
1517
|
+
* "customFieldValue": "string",
|
|
1518
|
+
* }
|
|
1519
|
+
* ],
|
|
1520
|
+
* "idType": "DJUST_ID"
|
|
1521
|
+
* }
|
|
1522
|
+
* ],
|
|
1523
|
+
* message: "string",
|
|
1524
|
+
* name: "string",
|
|
1525
|
+
* reasonCode: "string"
|
|
1526
|
+
* });
|
|
1527
|
+
* ```
|
|
1528
|
+
*
|
|
1529
|
+
* @param {CreateLogisticOrderIncidentThreadsParams} params - The parameters for the request.
|
|
1530
|
+
* @throws {Error} If `logisticOrderId`, `incidentId`, `reasonCode` is missing.
|
|
1531
|
+
* @returns {Promise<CreateLogisticOrderIncidentThreadsResponse>} A promise resolving when the thread is created.
|
|
1532
|
+
*/
|
|
1533
|
+
async function createLogisticOrderIncidentThreads({ logisticOrderId, incidentId, customField, message, name, reasonCode, idType, }) {
|
|
1534
|
+
(0, parameters_validation_1.required)({ logisticOrderId, incidentId, reasonCode });
|
|
1535
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1536
|
+
method: "POST",
|
|
1537
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/incidents/${incidentId}/threads`,
|
|
1538
|
+
body: JSON.stringify({ customField, message, name, reasonCode, idType }),
|
|
1539
|
+
});
|
|
1540
|
+
return data;
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* 🚚 Gets a specific thread of specific incident of a specific logistic order.
|
|
1544
|
+
*
|
|
1545
|
+
* This function retrieves a specific logistic order line's review, identified by
|
|
1546
|
+
* The `orderId`, `incidentId` and `threadId` parameters are mandatory and validated
|
|
1547
|
+
* before the request is executed.
|
|
1548
|
+
*
|
|
1549
|
+
* 🛠 **Endpoint**: `GET /v2/shop/logistic-orders/${logisticOrderId}/incidents/${incidentId}/threads/${threadId} [ORDER-510]`
|
|
1550
|
+
*
|
|
1551
|
+
* | Parameter | Type | Required | Description |
|
|
1552
|
+
* |-------------------|---------------------------------|------------|------------------------------------------------------------------------|
|
|
1553
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the review. |
|
|
1554
|
+
* | `incidentId` | `string` | ✅ | The ID of the incident of which you want to retrieve the review. |
|
|
1555
|
+
* | `threadId` | `string` | ✅ | The ID of the thread of which you want to retrieve the review. |
|
|
1556
|
+
* | `idType` | `IdType` | ❌ | The type of the id. |
|
|
1557
|
+
*
|
|
1558
|
+
* 📤 **Returns**:
|
|
1559
|
+
* A `Promise` resolving to a single `GetLogisticOrderIncidentThreadResponse` object representing the review of the thread.
|
|
1560
|
+
*
|
|
1561
|
+
* 🛠 **Example usage**:
|
|
1562
|
+
* ```ts
|
|
1563
|
+
* const review = await getLogisticOrderIncidentThread({
|
|
1564
|
+
* orderId: "logisticOrder1",
|
|
1565
|
+
* incidentId: "logisticOrderLine1",
|
|
1566
|
+
* threadId: "thread1",
|
|
1567
|
+
* });
|
|
1568
|
+
* ```
|
|
1569
|
+
*
|
|
1570
|
+
* @param {GetLogisticOrderIncidentThreadParams} params - The parameters for the request.
|
|
1571
|
+
* @throws {Error} If `logisticOrderId`, or `incidentId`, or `threadId` is missing.
|
|
1572
|
+
* @returns {Promise<GetLogisticOrderIncidentThreadResponse>} A promise resolving to a response containing the review of the thread.
|
|
1573
|
+
*/
|
|
1574
|
+
async function getLogisticOrderIncidentThread({ logisticOrderId, incidentId, threadId, idType, }) {
|
|
1575
|
+
(0, parameters_validation_1.required)({ logisticOrderId, incidentId, threadId });
|
|
1576
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1577
|
+
method: "GET",
|
|
1578
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/incidents/${incidentId}/threads/${threadId}`,
|
|
1579
|
+
params: {
|
|
1580
|
+
idType,
|
|
1581
|
+
},
|
|
1582
|
+
});
|
|
1583
|
+
return data;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* 🚚 Creates messages for a specific incident thread of a specific logistic order.
|
|
1587
|
+
*
|
|
1588
|
+
* This function creates a thread on a specific incident on a specific logistic order, identified by
|
|
1589
|
+
* `logisticOrderId`, incidentId, threadId parameters are required and validated before the request is executed.
|
|
1590
|
+
*
|
|
1591
|
+
* 🛠 **Endpoint**: `POST /v2/shop/logistic-orders/${logisticOrderId}/incidents/${incidentId}/threads/messages [ORDER-103]`
|
|
1592
|
+
*
|
|
1593
|
+
* | Parameter | Type | Required | Description |
|
|
1594
|
+
* |-------------------|---------------------------------------------------------|------------|------------------------------------------------------------------------|
|
|
1595
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the review. |
|
|
1596
|
+
* | `incidentId` | `string` | ✅ | The ID of the incident of which you want to retrieve the review. |
|
|
1597
|
+
* | `threadId` | `string` | ✅ | The ID of the thread of which you want to retrieve the review. |
|
|
1598
|
+
* | `body` | `string` | ❌ | The body of the message to be added to the thread. |
|
|
1599
|
+
* | `customField` | `logisticOrderIncidentThreadsCustomFieldValueRequest[]` | ❌ | The custom fields to add to the created incident threads messages |
|
|
1600
|
+
* | `idType` | `IdType` | ❌ | The type of the id. |
|
|
1601
|
+
*
|
|
1602
|
+
* 📤 **Returns**:
|
|
1603
|
+
* A `Promise` resolving to a `CreateLogisticOrderIncidentThreadMessagesResponse` object when the message is created.
|
|
1604
|
+
*
|
|
1605
|
+
* 🛠 **Example usage**:
|
|
1606
|
+
* ```ts
|
|
1607
|
+
* await createLogisticOrderIncidentThreadMessages({
|
|
1608
|
+
* logisticOrderId: "logisticOrder1",
|
|
1609
|
+
* incidentId: "logisticOrderLine1",
|
|
1610
|
+
* threadId: "thread1",
|
|
1611
|
+
* body: "This is a message",
|
|
1612
|
+
* customField: {
|
|
1613
|
+
* customFieldValues: [
|
|
1614
|
+
* {
|
|
1615
|
+
* "customFieldId": "string",
|
|
1616
|
+
* "customFieldValue": "string"
|
|
1617
|
+
* }
|
|
1618
|
+
* ],
|
|
1619
|
+
* idType: "EXTERNAL_ID",
|
|
1620
|
+
* },
|
|
1621
|
+
* });
|
|
1622
|
+
* ```
|
|
1623
|
+
*
|
|
1624
|
+
* @param {CreateLogisticOrderIncidentThreadsParams} params - The parameters for the request.
|
|
1625
|
+
* @throws {Error} If `logisticOrderId`, or `incidentId`, or `threadId` is missing.
|
|
1626
|
+
* @returns {Promise<CreateLogisticOrderIncidentThreadsResponse>} A promise resolving when the message is created for the logistic order incident thread.
|
|
1627
|
+
*/
|
|
1628
|
+
async function createLogisticOrderIncidentThreadMessages({ logisticOrderId, incidentId, threadId, body, customField, idType, }) {
|
|
1629
|
+
(0, parameters_validation_1.required)({ logisticOrderId, incidentId, threadId });
|
|
1630
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1631
|
+
method: "POST",
|
|
1632
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/incidents/${incidentId}/threads/${threadId}/messages`,
|
|
1633
|
+
body: JSON.stringify({ customField, body, idType }),
|
|
1634
|
+
});
|
|
1635
|
+
return data;
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* 🚚 Updadate a message for a specific incident thread of a specific logistic order.
|
|
1639
|
+
*
|
|
1640
|
+
* This function allow to update a message of a thread on a specific incident on a specific logistic order
|
|
1641
|
+
* `logisticOrderId`, incidentId, threadId, messageId parameters are required and validated before the request is executed.
|
|
1642
|
+
*
|
|
1643
|
+
* 🛠 **Endpoint**: `POST /v2/shop/logistic-orders/${logisticOrderId}/incidents/${incidentId}/threads/${threadId}/messages/${messageId} [ORDER-221]`
|
|
1644
|
+
*
|
|
1645
|
+
* | Parameter | Type | Required | Description |
|
|
1646
|
+
* |-------------------|---------------------------------------------------------|------------|----------------------------------------------------------------------|
|
|
1647
|
+
* | `logisticOrderId` | `string` | ✅ | The ID of the logistic order of which you want to update |
|
|
1648
|
+
* | `incidentId` | `string` | ✅ | The ID of the incident of which you want to update |
|
|
1649
|
+
* | `threadId` | `string` | ✅ | The ID of the thread of which you want to update |
|
|
1650
|
+
* | `messageId` | `string` | ✅ | The ID of the message of the thread to update. |
|
|
1651
|
+
* | `body` | `string` | ❌ | The body of the message to update |
|
|
1652
|
+
* | `customField` | `logisticOrderIncidentThreadsCustomFieldValueRequest[]` | ❌ | The custom fields to update to the created incident threads messages |
|
|
1653
|
+
*
|
|
1654
|
+
* 📤 **Returns**:
|
|
1655
|
+
* A `Promise` resolving when the message is updated.
|
|
1656
|
+
*
|
|
1657
|
+
* 🛠 **Example usage**:
|
|
1658
|
+
* ```ts
|
|
1659
|
+
* await updateLogisticOrderIncidentThreadMessage({
|
|
1660
|
+
* logisticOrderId: "logisticOrder1",
|
|
1661
|
+
* incidentId: "logisticOrderLine1",
|
|
1662
|
+
* threadId: "thread1",
|
|
1663
|
+
* messageId: "message1",
|
|
1664
|
+
* body: "string",
|
|
1665
|
+
* customField: {
|
|
1666
|
+
* customFieldValues: [
|
|
1667
|
+
* {
|
|
1668
|
+
* "customFieldId": "string",
|
|
1669
|
+
* "customFieldValue": "string"
|
|
1670
|
+
* }
|
|
1671
|
+
* ],
|
|
1672
|
+
* idType: "EXTERNAL_ID",
|
|
1673
|
+
* }
|
|
1674
|
+
* });
|
|
1675
|
+
* ```
|
|
1676
|
+
*
|
|
1677
|
+
* @param {CreateLogisticOrderIncidentThreadsParams} params - The parameters for the request.
|
|
1678
|
+
* @throws {Error} If `logisticOrderId`, `incidentId`, `threadId`, `messageId` is missing.
|
|
1679
|
+
* @returns {Promise<void>} A promise resolving when the message is updated.
|
|
1680
|
+
*/
|
|
1681
|
+
async function updateLogisticOrderIncidentThreadMessage({ logisticOrderId, incidentId, threadId, messageId, customFieldValues, idType, }) {
|
|
1682
|
+
(0, parameters_validation_1.required)({ logisticOrderId, incidentId, threadId, messageId });
|
|
1683
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1684
|
+
method: "PATCH",
|
|
1685
|
+
path: `/v2/shop/logistic-orders/${logisticOrderId}/incidents/${incidentId}/threads/${threadId}/messages/${messageId}`,
|
|
1686
|
+
body: JSON.stringify({ customFieldValues, idType }),
|
|
1687
|
+
});
|
|
1688
|
+
return data;
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* 🚚 Gets a specific logistic order's review.
|
|
1692
|
+
*
|
|
1693
|
+
* This function retrieves a specific logistic order line's review, identified by
|
|
1694
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
1695
|
+
* before the request is executed.
|
|
1696
|
+
*
|
|
1697
|
+
* 🛠 **Endpoint**: `GET /v1/shop/rating-orders/${orderId} [ORDER-504]`
|
|
1698
|
+
*
|
|
1699
|
+
* | Parameter | Type | Required | Description |
|
|
1700
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1701
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the review. |
|
|
1702
|
+
*
|
|
1703
|
+
* 📤 **Returns**:
|
|
1704
|
+
* A `Promise` resolving to a single `GetLogisticOrderReviewResponse` object representing the review of the logistic order.
|
|
1705
|
+
*
|
|
1706
|
+
* 🛠 **Example usage**:
|
|
1707
|
+
* ```ts
|
|
1708
|
+
* const review = await getLogisticOrderReview({
|
|
1709
|
+
* orderId: "logisticOrder1",
|
|
1710
|
+
* });
|
|
1711
|
+
* ```
|
|
1712
|
+
*
|
|
1713
|
+
* @param {GetLogisticOrderReviewParameters} params - The parameters for the request.
|
|
1714
|
+
* @throws {Error} If `orderId` is missing.
|
|
1715
|
+
* @returns {Promise<GetLogisticOrderReviewResponse>} A promise resolving to a response containing the review of the logistic order.
|
|
1716
|
+
*/
|
|
1717
|
+
async function getLogisticOrderReview({ orderId, }) {
|
|
1718
|
+
(0, parameters_validation_1.required)({ orderId });
|
|
1719
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1720
|
+
method: "GET",
|
|
1721
|
+
path: `/v1/shop/rating-orders/${orderId}`,
|
|
1722
|
+
});
|
|
1723
|
+
return data;
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* 🚚 Adds a rewiew on a specific logistic order.
|
|
1727
|
+
*
|
|
1728
|
+
* This function adds a review on a specific logistic order, identified by
|
|
1729
|
+
* the `orderId`. This parameter, as well as the `comment` and `grade`, is mandatory and validated
|
|
1730
|
+
* before the request is executed.
|
|
1731
|
+
*
|
|
1732
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/rating-orders/${orderId} [ORDER-219]`
|
|
1733
|
+
*
|
|
1734
|
+
* | Parameter | Type | Required | Description |
|
|
1735
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1736
|
+
* | `orderId` | `string` | ✅ | The ID of the logistic order of which you want to retrieve the review. |
|
|
1737
|
+
* | `comment` | `string` | ✅ | A comment on how the logistic order as realized. |
|
|
1738
|
+
* | `grade` | `number` | ✅ | A grade to rate the logistic order. |
|
|
1739
|
+
*
|
|
1740
|
+
* 📤 **Returns**:
|
|
1741
|
+
* A `Promise` resolving to a single `AddLogisticOrderReviewResponse` object representing the review of the logistic order.
|
|
1742
|
+
*
|
|
1743
|
+
* 🛠 **Example usage**:
|
|
1744
|
+
* ```ts
|
|
1745
|
+
* const review = await addLogisticOrderReview({
|
|
1746
|
+
* orderId: "logisticOrder1",
|
|
1747
|
+
* comment: "This was a bad order",
|
|
1748
|
+
* grade: 0,
|
|
1749
|
+
* });
|
|
1750
|
+
* ```
|
|
1751
|
+
*
|
|
1752
|
+
* @param {AddLogisticOrderReviewParameters} params - The parameters for the request.
|
|
1753
|
+
* @throws {Error} If `orderId`, `comment` or `grade` is missing.
|
|
1754
|
+
* @returns {Promise<AddLogisticOrderReviewResponse>} A promise resolving to a response containing the review of the logistic order.
|
|
1755
|
+
*/
|
|
1756
|
+
async function addLogisticOrderReview({ orderId, comment, grade, }) {
|
|
1757
|
+
(0, parameters_validation_1.required)({ orderId, comment, grade });
|
|
1758
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1759
|
+
method: "PUT",
|
|
1760
|
+
path: `/v1/shop/rating-orders/${orderId}`,
|
|
1761
|
+
body: JSON.stringify({ comment, grade }),
|
|
1762
|
+
});
|
|
1763
|
+
return data;
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* 🚚 Gets thread reason types.
|
|
1767
|
+
*
|
|
1768
|
+
* This function retrieves all the thread reason types. No parameters for this request.
|
|
1769
|
+
*
|
|
1770
|
+
* 🛠 **Endpoint**: `GET /v1/shop/threads/reason-types [THREAD-550]`
|
|
1771
|
+
*
|
|
1772
|
+
* 📤 **Returns**:
|
|
1773
|
+
* A `Promise` resolving to a single `GetThreadReasonTypesResponse` object representing the array of reason types.
|
|
1774
|
+
*
|
|
1775
|
+
* 🛠 **Example usage**:
|
|
1776
|
+
* ```ts
|
|
1777
|
+
* const reasonTypes = await getThreadReasonTypes();
|
|
1778
|
+
* ```
|
|
1779
|
+
*
|
|
1780
|
+
* @returns {Promise<GetThreadReasonTypesResponse>} A promise resolving to a response containing the array of reason types.
|
|
1781
|
+
*/
|
|
1782
|
+
async function getThreadReasonTypes() {
|
|
1783
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1784
|
+
method: "GET",
|
|
1785
|
+
path: `/v1/shop/threads/reason-types`,
|
|
1786
|
+
});
|
|
1787
|
+
return data;
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* 🚚 Gets thread subreasons.
|
|
1791
|
+
*
|
|
1792
|
+
* This function retrieves all the subreasons under a reason type, identified by
|
|
1793
|
+
* the `reasonType`. This parameter is mandatory and validated
|
|
1794
|
+
* before the request is executed.
|
|
1795
|
+
*
|
|
1796
|
+
* 🛠 **Endpoint**: `GET /v1/shop/threads/reason-types/${reasonType}/sub-reasons [THREAD-551]`
|
|
1797
|
+
*
|
|
1798
|
+
* | Parameter | Type | Required | Description |
|
|
1799
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
1800
|
+
* | `reasonType` | `string` | ✅ | The type of thread reasons. |
|
|
1801
|
+
*
|
|
1802
|
+
* 📤 **Returns**:
|
|
1803
|
+
* A `Promise` resolving to a single `GetThreadSubReasonsResponse` object representing the array of subreasons.
|
|
1804
|
+
*
|
|
1805
|
+
* 🛠 **Example usage**:
|
|
1806
|
+
* ```ts
|
|
1807
|
+
* const subreasons = await getThreadSubReasons({
|
|
1808
|
+
* reasonType: "REFUND",
|
|
1809
|
+
* });
|
|
1810
|
+
* ```
|
|
1811
|
+
*
|
|
1812
|
+
* @param {GetThreadSubReasonsParameters} params - The parameters for the request.
|
|
1813
|
+
* @throws {Error} If `reasonType` is missing.
|
|
1814
|
+
* @returns {Promise<GetThreadSubReasonsResponse>} A promise resolving to a response containing the array of subreasons.
|
|
1815
|
+
*/
|
|
1816
|
+
async function getThreadSubReasons({ reasonType, }) {
|
|
1817
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1818
|
+
method: "GET",
|
|
1819
|
+
path: `/v1/shop/threads/reason-types/${reasonType}/sub-reasons`,
|
|
1820
|
+
});
|
|
1821
|
+
return data;
|
|
1822
|
+
}
|
|
1823
|
+
//# sourceMappingURL=index.js.map
|