@djust-b2b/djust-front-sdk 3.0.0-beta.9 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -30
- package/dist/.tsbuildinfo +1 -1
- package/dist/.tsbuildinfo-esm +1 -1
- package/dist/client/create-client.d.ts +18 -0
- package/dist/client/create-client.d.ts.map +1 -1
- package/dist/client/transport.d.ts +5 -0
- package/dist/client/transport.d.ts.map +1 -1
- package/dist/errors/classes/not-found.error.d.ts +1 -1
- package/dist/errors/classes/not-found.error.d.ts.map +1 -1
- package/dist/errors/factory.d.ts.map +1 -1
- package/dist/errors/helpers/djust-api-error.d.ts +29 -0
- package/dist/errors/helpers/djust-api-error.d.ts.map +1 -0
- package/dist/errors/types.d.ts +4 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/index.d.ts +42 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +269 -63
- package/dist/interfaces/index.d.ts +15 -3
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/services/base.service.d.ts +2 -0
- package/dist/services/base.service.d.ts.map +1 -1
- package/dist/services/commercial-order/commercial-order.service.d.ts +8 -5
- package/dist/services/commercial-order/commercial-order.service.d.ts.map +1 -1
- package/dist/services/commercial-order/definitions.d.ts +13 -0
- package/dist/services/commercial-order/definitions.d.ts.map +1 -1
- package/dist/services/commercial-order/index.d.ts +30 -19
- package/dist/services/commercial-order/index.d.ts.map +1 -1
- package/dist/services/commercial-order/module.d.ts +1 -1
- package/dist/services/commercial-order/module.d.ts.map +1 -1
- package/dist/services/commercial-order/types.d.ts +1 -0
- package/dist/services/commercial-order/types.d.ts.map +1 -1
- package/dist/services/logistic-order/definitions.d.ts +23 -1
- package/dist/services/logistic-order/definitions.d.ts.map +1 -1
- package/dist/services/logistic-order/endpoints.d.ts +1 -0
- package/dist/services/logistic-order/endpoints.d.ts.map +1 -1
- package/dist/services/logistic-order/index.d.ts +77 -1
- package/dist/services/logistic-order/index.d.ts.map +1 -1
- package/dist/services/logistic-order/logistic-order.service.d.ts +6 -1
- package/dist/services/logistic-order/logistic-order.service.d.ts.map +1 -1
- package/dist/services/logistic-order/module.d.ts +1 -1
- package/dist/services/logistic-order/module.d.ts.map +1 -1
- package/dist/services/logistic-order/types.d.ts +9 -0
- package/dist/services/logistic-order/types.d.ts.map +1 -1
- package/dist/services/operation/definitions.d.ts +1 -18
- package/dist/services/operation/definitions.d.ts.map +1 -1
- package/dist/services/payment/definitions.d.ts +0 -10
- package/dist/services/payment/definitions.d.ts.map +1 -1
- package/dist/services/product/definitions.d.ts +1 -0
- package/dist/services/product/definitions.d.ts.map +1 -1
- package/dist/services/product/index.d.ts +6 -5
- package/dist/services/product/index.d.ts.map +1 -1
- package/dist/services/product-variant/definitions.d.ts +3 -142
- package/dist/services/product-variant/definitions.d.ts.map +1 -1
- package/dist/services/quote/index.d.ts +1 -1
- package/dist/settings/fetch-instance.d.ts.map +1 -1
- package/dist/settings/sdk-version.d.ts +3 -0
- package/dist/settings/sdk-version.d.ts.map +1 -0
- package/lib/.tsbuildinfo +1 -0
- package/lib/client/create-client.d.ts +251 -0
- package/lib/client/create-client.d.ts.map +1 -0
- package/lib/client/create-client.js +233 -0
- package/lib/client/create-client.js.map +1 -0
- package/lib/client/index.d.ts +14 -0
- package/lib/client/index.d.ts.map +1 -0
- package/lib/client/index.js +91 -0
- package/lib/client/index.js.map +1 -0
- package/lib/client/performance.d.ts +203 -0
- package/lib/client/performance.d.ts.map +1 -0
- package/lib/client/performance.js +409 -0
- package/lib/client/performance.js.map +1 -0
- package/lib/client/transport.d.ts +372 -0
- package/lib/client/transport.d.ts.map +1 -0
- package/lib/client/transport.js +735 -0
- package/lib/client/transport.js.map +1 -0
- package/lib/errors/base.d.ts +101 -0
- package/lib/errors/base.d.ts.map +1 -0
- package/lib/errors/base.js +145 -0
- package/lib/errors/base.js.map +1 -0
- package/lib/errors/classes/auth.error.d.ts +64 -0
- package/lib/errors/classes/auth.error.d.ts.map +1 -0
- package/lib/errors/classes/auth.error.js +116 -0
- package/lib/errors/classes/auth.error.js.map +1 -0
- package/lib/errors/classes/forbidden.error.d.ts +52 -0
- package/lib/errors/classes/forbidden.error.d.ts.map +1 -0
- package/lib/errors/classes/forbidden.error.js +90 -0
- package/lib/errors/classes/forbidden.error.js.map +1 -0
- package/lib/errors/classes/index.d.ts +17 -0
- package/lib/errors/classes/index.d.ts.map +1 -0
- package/lib/errors/classes/index.js +29 -0
- package/lib/errors/classes/index.js.map +1 -0
- package/lib/errors/classes/network.error.d.ts +63 -0
- package/lib/errors/classes/network.error.d.ts.map +1 -0
- package/lib/errors/classes/network.error.js +122 -0
- package/lib/errors/classes/network.error.js.map +1 -0
- package/lib/errors/classes/not-found.error.d.ts +58 -0
- package/lib/errors/classes/not-found.error.d.ts.map +1 -0
- package/lib/errors/classes/not-found.error.js +120 -0
- package/lib/errors/classes/not-found.error.js.map +1 -0
- package/lib/errors/classes/rate-limit.error.d.ts +49 -0
- package/lib/errors/classes/rate-limit.error.d.ts.map +1 -0
- package/lib/errors/classes/rate-limit.error.js +107 -0
- package/lib/errors/classes/rate-limit.error.js.map +1 -0
- package/lib/errors/classes/server.error.d.ts +63 -0
- package/lib/errors/classes/server.error.d.ts.map +1 -0
- package/lib/errors/classes/server.error.js +156 -0
- package/lib/errors/classes/server.error.js.map +1 -0
- package/lib/errors/classes/timeout.error.d.ts +64 -0
- package/lib/errors/classes/timeout.error.d.ts.map +1 -0
- package/lib/errors/classes/timeout.error.js +90 -0
- package/lib/errors/classes/timeout.error.js.map +1 -0
- package/lib/errors/classes/unexpected.error.d.ts +70 -0
- package/lib/errors/classes/unexpected.error.d.ts.map +1 -0
- package/lib/errors/classes/unexpected.error.js +105 -0
- package/lib/errors/classes/unexpected.error.js.map +1 -0
- package/lib/errors/classes/validation.error.d.ts +68 -0
- package/lib/errors/classes/validation.error.d.ts.map +1 -0
- package/lib/errors/classes/validation.error.js +103 -0
- package/lib/errors/classes/validation.error.js.map +1 -0
- package/lib/errors/codes.d.ts +111 -0
- package/lib/errors/codes.d.ts.map +1 -0
- package/lib/errors/codes.js +143 -0
- package/lib/errors/codes.js.map +1 -0
- package/lib/errors/compat.d.ts +99 -0
- package/lib/errors/compat.d.ts.map +1 -0
- package/lib/errors/compat.js +280 -0
- package/lib/errors/compat.js.map +1 -0
- package/lib/errors/factory.d.ts +33 -0
- package/lib/errors/factory.d.ts.map +1 -0
- package/lib/errors/factory.js +298 -0
- package/lib/errors/factory.js.map +1 -0
- package/lib/errors/guards.d.ts +142 -0
- package/lib/errors/guards.d.ts.map +1 -0
- package/lib/errors/guards.js +281 -0
- package/lib/errors/guards.js.map +1 -0
- package/lib/errors/helpers/djust-api-error.d.ts +29 -0
- package/lib/errors/helpers/djust-api-error.d.ts.map +1 -0
- package/lib/errors/helpers/djust-api-error.js +49 -0
- package/lib/errors/helpers/djust-api-error.js.map +1 -0
- package/lib/errors/index.d.ts +25 -0
- package/lib/errors/index.d.ts.map +1 -0
- package/lib/errors/index.js +89 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/errors/types.d.ts +104 -0
- package/lib/errors/types.d.ts.map +1 -0
- package/lib/errors/types.js +10 -0
- package/lib/errors/types.js.map +1 -0
- package/lib/helpers/index.d.ts +42 -0
- package/lib/helpers/index.d.ts.map +1 -0
- package/lib/helpers/index.js +102 -0
- package/lib/helpers/index.js.map +1 -0
- package/lib/helpers/parameters-validation.d.ts +3 -0
- package/lib/helpers/parameters-validation.d.ts.map +1 -0
- package/lib/helpers/parameters-validation.js +22 -0
- package/lib/helpers/parameters-validation.js.map +1 -0
- package/lib/helpers/utils.d.ts +5 -0
- package/lib/helpers/utils.d.ts.map +1 -0
- package/lib/helpers/utils.js +30 -0
- package/lib/helpers/utils.js.map +1 -0
- package/lib/index.d.ts +267 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +182 -0
- package/lib/index.js.map +1 -0
- package/lib/interfaces/index.d.ts +43 -0
- package/lib/interfaces/index.d.ts.map +1 -0
- package/lib/interfaces/index.js +36 -0
- package/lib/interfaces/index.js.map +1 -0
- package/lib/interfaces/models/address.d.ts +61 -0
- package/lib/interfaces/models/address.d.ts.map +1 -0
- package/lib/interfaces/models/address.js +3 -0
- package/lib/interfaces/models/address.js.map +1 -0
- package/lib/interfaces/models/attribute.d.ts +31 -0
- package/lib/interfaces/models/attribute.d.ts.map +1 -0
- package/lib/interfaces/models/attribute.js +3 -0
- package/lib/interfaces/models/attribute.js.map +1 -0
- package/lib/interfaces/models/auth.d.ts +37 -0
- package/lib/interfaces/models/auth.d.ts.map +1 -0
- package/lib/interfaces/models/auth.js +3 -0
- package/lib/interfaces/models/auth.js.map +1 -0
- package/lib/interfaces/models/cart.d.ts +64 -0
- package/lib/interfaces/models/cart.d.ts.map +1 -0
- package/lib/interfaces/models/cart.js +3 -0
- package/lib/interfaces/models/cart.js.map +1 -0
- package/lib/interfaces/models/common.d.ts +68 -0
- package/lib/interfaces/models/common.d.ts.map +1 -0
- package/lib/interfaces/models/common.js +3 -0
- package/lib/interfaces/models/common.js.map +1 -0
- package/lib/interfaces/models/custom-field.d.ts +57 -0
- package/lib/interfaces/models/custom-field.d.ts.map +1 -0
- package/lib/interfaces/models/custom-field.js +3 -0
- package/lib/interfaces/models/custom-field.js.map +1 -0
- package/lib/interfaces/models/customer-account.d.ts +52 -0
- package/lib/interfaces/models/customer-account.d.ts.map +1 -0
- package/lib/interfaces/models/customer-account.js +3 -0
- package/lib/interfaces/models/customer-account.js.map +1 -0
- package/lib/interfaces/models/customer-organisation.d.ts +14 -0
- package/lib/interfaces/models/customer-organisation.d.ts.map +1 -0
- package/lib/interfaces/models/customer-organisation.js +3 -0
- package/lib/interfaces/models/customer-organisation.js.map +1 -0
- package/lib/interfaces/models/customer-user.d.ts +114 -0
- package/lib/interfaces/models/customer-user.d.ts.map +1 -0
- package/lib/interfaces/models/customer-user.js +3 -0
- package/lib/interfaces/models/customer-user.js.map +1 -0
- package/lib/interfaces/models/incident.d.ts +37 -0
- package/lib/interfaces/models/incident.d.ts.map +1 -0
- package/lib/interfaces/models/incident.js +3 -0
- package/lib/interfaces/models/incident.js.map +1 -0
- package/lib/interfaces/models/navigation-category.d.ts +22 -0
- package/lib/interfaces/models/navigation-category.d.ts.map +1 -0
- package/lib/interfaces/models/navigation-category.js +3 -0
- package/lib/interfaces/models/navigation-category.js.map +1 -0
- package/lib/interfaces/models/offer.d.ts +151 -0
- package/lib/interfaces/models/offer.d.ts.map +1 -0
- package/lib/interfaces/models/offer.js +3 -0
- package/lib/interfaces/models/offer.js.map +1 -0
- package/lib/interfaces/models/order.d.ts +701 -0
- package/lib/interfaces/models/order.d.ts.map +1 -0
- package/lib/interfaces/models/order.js +3 -0
- package/lib/interfaces/models/order.js.map +1 -0
- package/lib/interfaces/models/payment.d.ts +20 -0
- package/lib/interfaces/models/payment.d.ts.map +1 -0
- package/lib/interfaces/models/payment.js +3 -0
- package/lib/interfaces/models/payment.js.map +1 -0
- package/lib/interfaces/models/price.d.ts +6 -0
- package/lib/interfaces/models/price.d.ts.map +1 -0
- package/lib/interfaces/models/price.js +3 -0
- package/lib/interfaces/models/price.js.map +1 -0
- package/lib/interfaces/models/product.d.ts +243 -0
- package/lib/interfaces/models/product.d.ts.map +1 -0
- package/lib/interfaces/models/product.js +3 -0
- package/lib/interfaces/models/product.js.map +1 -0
- package/lib/interfaces/models/quote.d.ts +77 -0
- package/lib/interfaces/models/quote.d.ts.map +1 -0
- package/lib/interfaces/models/quote.js +3 -0
- package/lib/interfaces/models/quote.js.map +1 -0
- package/lib/interfaces/models/searchProduct.d.ts +128 -0
- package/lib/interfaces/models/searchProduct.d.ts.map +1 -0
- package/lib/interfaces/models/searchProduct.js +3 -0
- package/lib/interfaces/models/searchProduct.js.map +1 -0
- package/lib/interfaces/models/supplier.d.ts +72 -0
- package/lib/interfaces/models/supplier.d.ts.map +1 -0
- package/lib/interfaces/models/supplier.js +3 -0
- package/lib/interfaces/models/supplier.js.map +1 -0
- package/lib/services/attributes/attributes.service.d.ts +18 -0
- package/lib/services/attributes/attributes.service.d.ts.map +1 -0
- package/lib/services/attributes/attributes.service.js +37 -0
- package/lib/services/attributes/attributes.service.js.map +1 -0
- package/lib/services/attributes/definitions.d.ts +28 -0
- package/lib/services/attributes/definitions.d.ts.map +1 -0
- package/lib/services/attributes/definitions.js +3 -0
- package/lib/services/attributes/definitions.js.map +1 -0
- package/lib/services/attributes/endpoints.d.ts +12 -0
- package/lib/services/attributes/endpoints.d.ts.map +1 -0
- package/lib/services/attributes/endpoints.js +14 -0
- package/lib/services/attributes/endpoints.js.map +1 -0
- package/lib/services/attributes/index.d.ts +33 -0
- package/lib/services/attributes/index.d.ts.map +1 -0
- package/lib/services/attributes/index.js +50 -0
- package/lib/services/attributes/index.js.map +1 -0
- package/lib/services/attributes/module.d.ts +11 -0
- package/lib/services/attributes/module.d.ts.map +1 -0
- package/lib/services/attributes/module.js +15 -0
- package/lib/services/attributes/module.js.map +1 -0
- package/lib/services/attributes/types.d.ts +35 -0
- package/lib/services/attributes/types.d.ts.map +1 -0
- package/lib/services/attributes/types.js +10 -0
- package/lib/services/attributes/types.js.map +1 -0
- package/lib/services/auth/__mocks__/auth.mocks.d.ts +249 -0
- package/lib/services/auth/__mocks__/auth.mocks.d.ts.map +1 -0
- package/lib/services/auth/__mocks__/auth.mocks.js +221 -0
- package/lib/services/auth/__mocks__/auth.mocks.js.map +1 -0
- package/lib/services/auth/auth.service.d.ts +286 -0
- package/lib/services/auth/auth.service.d.ts.map +1 -0
- package/lib/services/auth/auth.service.js +423 -0
- package/lib/services/auth/auth.service.js.map +1 -0
- package/lib/services/auth/definitions.d.ts +69 -0
- package/lib/services/auth/definitions.d.ts.map +1 -0
- package/lib/services/auth/definitions.js +3 -0
- package/lib/services/auth/definitions.js.map +1 -0
- package/lib/services/auth/definitions.requests.d.ts +25 -0
- package/lib/services/auth/definitions.requests.d.ts.map +1 -0
- package/lib/services/auth/definitions.requests.js +6 -0
- package/lib/services/auth/definitions.requests.js.map +1 -0
- package/lib/services/auth/endpoints.d.ts +30 -0
- package/lib/services/auth/endpoints.d.ts.map +1 -0
- package/lib/services/auth/endpoints.js +32 -0
- package/lib/services/auth/endpoints.js.map +1 -0
- package/lib/services/auth/index.d.ts +232 -0
- package/lib/services/auth/index.d.ts.map +1 -0
- package/lib/services/auth/index.js +310 -0
- package/lib/services/auth/index.js.map +1 -0
- package/lib/services/auth/module.d.ts +11 -0
- package/lib/services/auth/module.d.ts.map +1 -0
- package/lib/services/auth/module.js +17 -0
- package/lib/services/auth/module.js.map +1 -0
- package/lib/services/auth/types.d.ts +124 -0
- package/lib/services/auth/types.d.ts.map +1 -0
- package/lib/services/auth/types.js +10 -0
- package/lib/services/auth/types.js.map +1 -0
- package/lib/services/base.service.d.ts +83 -0
- package/lib/services/base.service.d.ts.map +1 -0
- package/lib/services/base.service.js +121 -0
- package/lib/services/base.service.js.map +1 -0
- package/lib/services/cart/cart.service.d.ts +443 -0
- package/lib/services/cart/cart.service.d.ts.map +1 -0
- package/lib/services/cart/cart.service.js +551 -0
- package/lib/services/cart/cart.service.js.map +1 -0
- package/lib/services/cart/definitions.d.ts +84 -0
- package/lib/services/cart/definitions.d.ts.map +1 -0
- package/lib/services/cart/definitions.js +3 -0
- package/lib/services/cart/definitions.js.map +1 -0
- package/lib/services/cart/endpoints.d.ts +24 -0
- package/lib/services/cart/endpoints.d.ts.map +1 -0
- package/lib/services/cart/endpoints.js +26 -0
- package/lib/services/cart/endpoints.js.map +1 -0
- package/lib/services/cart/index.d.ts +330 -0
- package/lib/services/cart/index.d.ts.map +1 -0
- package/lib/services/cart/index.js +464 -0
- package/lib/services/cart/index.js.map +1 -0
- package/lib/services/cart/module.d.ts +11 -0
- package/lib/services/cart/module.d.ts.map +1 -0
- package/lib/services/cart/module.js +17 -0
- package/lib/services/cart/module.js.map +1 -0
- package/lib/services/cart/types.d.ts +236 -0
- package/lib/services/cart/types.d.ts.map +1 -0
- package/lib/services/cart/types.js +10 -0
- package/lib/services/cart/types.js.map +1 -0
- package/lib/services/commercial-order/commercial-order.service.d.ts +435 -0
- package/lib/services/commercial-order/commercial-order.service.d.ts.map +1 -0
- package/lib/services/commercial-order/commercial-order.service.js +690 -0
- package/lib/services/commercial-order/commercial-order.service.js.map +1 -0
- package/lib/services/commercial-order/definitions.d.ts +182 -0
- package/lib/services/commercial-order/definitions.d.ts.map +1 -0
- package/lib/services/commercial-order/definitions.js +3 -0
- package/lib/services/commercial-order/definitions.js.map +1 -0
- package/lib/services/commercial-order/endpoints.d.ts +28 -0
- package/lib/services/commercial-order/endpoints.d.ts.map +1 -0
- package/lib/services/commercial-order/endpoints.js +33 -0
- package/lib/services/commercial-order/endpoints.js.map +1 -0
- package/lib/services/commercial-order/index.d.ts +721 -0
- package/lib/services/commercial-order/index.d.ts.map +1 -0
- package/lib/services/commercial-order/index.js +986 -0
- package/lib/services/commercial-order/index.js.map +1 -0
- package/lib/services/commercial-order/module.d.ts +11 -0
- package/lib/services/commercial-order/module.d.ts.map +1 -0
- package/lib/services/commercial-order/module.js +15 -0
- package/lib/services/commercial-order/module.js.map +1 -0
- package/lib/services/commercial-order/types.d.ts +244 -0
- package/lib/services/commercial-order/types.d.ts.map +1 -0
- package/lib/services/commercial-order/types.js +10 -0
- package/lib/services/commercial-order/types.js.map +1 -0
- package/lib/services/custom-field/custom-field.service.d.ts +23 -0
- package/lib/services/custom-field/custom-field.service.d.ts.map +1 -0
- package/lib/services/custom-field/custom-field.service.js +64 -0
- package/lib/services/custom-field/custom-field.service.js.map +1 -0
- package/lib/services/custom-field/definitions.d.ts +107 -0
- package/lib/services/custom-field/definitions.d.ts.map +1 -0
- package/lib/services/custom-field/definitions.js +61 -0
- package/lib/services/custom-field/definitions.js.map +1 -0
- package/lib/services/custom-field/endpoints.d.ts +13 -0
- package/lib/services/custom-field/endpoints.d.ts.map +1 -0
- package/lib/services/custom-field/endpoints.js +15 -0
- package/lib/services/custom-field/endpoints.js.map +1 -0
- package/lib/services/custom-field/index.d.ts +115 -0
- package/lib/services/custom-field/index.d.ts.map +1 -0
- package/lib/services/custom-field/index.js +144 -0
- package/lib/services/custom-field/index.js.map +1 -0
- package/lib/services/custom-field/module.d.ts +11 -0
- package/lib/services/custom-field/module.d.ts.map +1 -0
- package/lib/services/custom-field/module.js +15 -0
- package/lib/services/custom-field/module.js.map +1 -0
- package/lib/services/custom-field/types.d.ts +51 -0
- package/lib/services/custom-field/types.d.ts.map +1 -0
- package/lib/services/custom-field/types.js +10 -0
- package/lib/services/custom-field/types.js.map +1 -0
- package/lib/services/customer-account/customer-account.service.d.ts +387 -0
- package/lib/services/customer-account/customer-account.service.d.ts.map +1 -0
- package/lib/services/customer-account/customer-account.service.js +579 -0
- package/lib/services/customer-account/customer-account.service.js.map +1 -0
- package/lib/services/customer-account/definitions.d.ts +164 -0
- package/lib/services/customer-account/definitions.d.ts.map +1 -0
- package/lib/services/customer-account/definitions.js +3 -0
- package/lib/services/customer-account/definitions.js.map +1 -0
- package/lib/services/customer-account/endpoints.d.ts +25 -0
- package/lib/services/customer-account/endpoints.d.ts.map +1 -0
- package/lib/services/customer-account/endpoints.js +33 -0
- package/lib/services/customer-account/endpoints.js.map +1 -0
- package/lib/services/customer-account/index.d.ts +656 -0
- package/lib/services/customer-account/index.d.ts.map +1 -0
- package/lib/services/customer-account/index.js +929 -0
- package/lib/services/customer-account/index.js.map +1 -0
- package/lib/services/customer-account/module.d.ts +11 -0
- package/lib/services/customer-account/module.d.ts.map +1 -0
- package/lib/services/customer-account/module.js +15 -0
- package/lib/services/customer-account/module.js.map +1 -0
- package/lib/services/customer-account/types.d.ts +253 -0
- package/lib/services/customer-account/types.d.ts.map +1 -0
- package/lib/services/customer-account/types.js +10 -0
- package/lib/services/customer-account/types.js.map +1 -0
- package/lib/services/customer-user/customer-user.service.d.ts +280 -0
- package/lib/services/customer-user/customer-user.service.d.ts.map +1 -0
- package/lib/services/customer-user/customer-user.service.js +402 -0
- package/lib/services/customer-user/customer-user.service.js.map +1 -0
- package/lib/services/customer-user/definitions.d.ts +84 -0
- package/lib/services/customer-user/definitions.d.ts.map +1 -0
- package/lib/services/customer-user/definitions.js +3 -0
- package/lib/services/customer-user/definitions.js.map +1 -0
- package/lib/services/customer-user/endpoints.d.ts +19 -0
- package/lib/services/customer-user/endpoints.d.ts.map +1 -0
- package/lib/services/customer-user/endpoints.js +21 -0
- package/lib/services/customer-user/endpoints.js.map +1 -0
- package/lib/services/customer-user/index.d.ts +394 -0
- package/lib/services/customer-user/index.d.ts.map +1 -0
- package/lib/services/customer-user/index.js +528 -0
- package/lib/services/customer-user/index.js.map +1 -0
- package/lib/services/customer-user/module.d.ts +11 -0
- package/lib/services/customer-user/module.d.ts.map +1 -0
- package/lib/services/customer-user/module.js +15 -0
- package/lib/services/customer-user/module.js.map +1 -0
- package/lib/services/customer-user/types.d.ts +118 -0
- package/lib/services/customer-user/types.d.ts.map +1 -0
- package/lib/services/customer-user/types.js +10 -0
- package/lib/services/customer-user/types.js.map +1 -0
- package/lib/services/factory.d.ts +104 -0
- package/lib/services/factory.d.ts.map +1 -0
- package/lib/services/factory.js +89 -0
- package/lib/services/factory.js.map +1 -0
- package/lib/services/incident/definitions.d.ts +85 -0
- package/lib/services/incident/definitions.d.ts.map +1 -0
- package/lib/services/incident/definitions.js +3 -0
- package/lib/services/incident/definitions.js.map +1 -0
- package/lib/services/incident/endpoints.d.ts +17 -0
- package/lib/services/incident/endpoints.d.ts.map +1 -0
- package/lib/services/incident/endpoints.js +19 -0
- package/lib/services/incident/endpoints.js.map +1 -0
- package/lib/services/incident/incident.service.d.ts +24 -0
- package/lib/services/incident/incident.service.d.ts.map +1 -0
- package/lib/services/incident/incident.service.js +141 -0
- package/lib/services/incident/incident.service.js.map +1 -0
- package/lib/services/incident/index.d.ts +270 -0
- package/lib/services/incident/index.d.ts.map +1 -0
- package/lib/services/incident/index.js +389 -0
- package/lib/services/incident/index.js.map +1 -0
- package/lib/services/incident/module.d.ts +11 -0
- package/lib/services/incident/module.d.ts.map +1 -0
- package/lib/services/incident/module.js +15 -0
- package/lib/services/incident/module.js.map +1 -0
- package/lib/services/incident/types.d.ts +116 -0
- package/lib/services/incident/types.d.ts.map +1 -0
- package/lib/services/incident/types.js +10 -0
- package/lib/services/incident/types.js.map +1 -0
- package/lib/services/logistic-order/definitions.d.ts +315 -0
- package/lib/services/logistic-order/definitions.d.ts.map +1 -0
- package/lib/services/logistic-order/definitions.js +3 -0
- package/lib/services/logistic-order/definitions.js.map +1 -0
- package/lib/services/logistic-order/endpoints.d.ts +44 -0
- package/lib/services/logistic-order/endpoints.d.ts.map +1 -0
- package/lib/services/logistic-order/endpoints.js +57 -0
- package/lib/services/logistic-order/endpoints.js.map +1 -0
- package/lib/services/logistic-order/index.d.ts +1376 -0
- package/lib/services/logistic-order/index.d.ts.map +1 -0
- package/lib/services/logistic-order/index.js +1823 -0
- package/lib/services/logistic-order/index.js.map +1 -0
- package/lib/services/logistic-order/logistic-order.service.d.ts +62 -0
- package/lib/services/logistic-order/logistic-order.service.d.ts.map +1 -0
- package/lib/services/logistic-order/logistic-order.service.js +499 -0
- package/lib/services/logistic-order/logistic-order.service.js.map +1 -0
- package/lib/services/logistic-order/module.d.ts +11 -0
- package/lib/services/logistic-order/module.d.ts.map +1 -0
- package/lib/services/logistic-order/module.js +15 -0
- package/lib/services/logistic-order/module.js.map +1 -0
- package/lib/services/logistic-order/types.d.ts +411 -0
- package/lib/services/logistic-order/types.d.ts.map +1 -0
- package/lib/services/logistic-order/types.js +10 -0
- package/lib/services/logistic-order/types.js.map +1 -0
- package/lib/services/module.d.ts +64 -0
- package/lib/services/module.d.ts.map +1 -0
- package/lib/services/module.js +147 -0
- package/lib/services/module.js.map +1 -0
- package/lib/services/navigation-category/definitions.d.ts +31 -0
- package/lib/services/navigation-category/definitions.d.ts.map +1 -0
- package/lib/services/navigation-category/definitions.js +3 -0
- package/lib/services/navigation-category/definitions.js.map +1 -0
- package/lib/services/navigation-category/endpoints.d.ts +15 -0
- package/lib/services/navigation-category/endpoints.d.ts.map +1 -0
- package/lib/services/navigation-category/endpoints.js +17 -0
- package/lib/services/navigation-category/endpoints.js.map +1 -0
- package/lib/services/navigation-category/index.d.ts +114 -0
- package/lib/services/navigation-category/index.d.ts.map +1 -0
- package/lib/services/navigation-category/index.js +160 -0
- package/lib/services/navigation-category/index.js.map +1 -0
- package/lib/services/navigation-category/module.d.ts +11 -0
- package/lib/services/navigation-category/module.d.ts.map +1 -0
- package/lib/services/navigation-category/module.js +15 -0
- package/lib/services/navigation-category/module.js.map +1 -0
- package/lib/services/navigation-category/navigation-category.service.d.ts +148 -0
- package/lib/services/navigation-category/navigation-category.service.d.ts.map +1 -0
- package/lib/services/navigation-category/navigation-category.service.js +191 -0
- package/lib/services/navigation-category/navigation-category.service.js.map +1 -0
- package/lib/services/navigation-category/types.d.ts +51 -0
- package/lib/services/navigation-category/types.d.ts.map +1 -0
- package/lib/services/navigation-category/types.js +10 -0
- package/lib/services/navigation-category/types.js.map +1 -0
- package/lib/services/offer-inventories/definitions.d.ts +73 -0
- package/lib/services/offer-inventories/definitions.d.ts.map +1 -0
- package/lib/services/offer-inventories/definitions.js +3 -0
- package/lib/services/offer-inventories/definitions.js.map +1 -0
- package/lib/services/offer-inventories/endpoints.d.ts +16 -0
- package/lib/services/offer-inventories/endpoints.d.ts.map +1 -0
- package/lib/services/offer-inventories/endpoints.js +18 -0
- package/lib/services/offer-inventories/endpoints.js.map +1 -0
- package/lib/services/offer-inventories/index.d.ts +120 -0
- package/lib/services/offer-inventories/index.d.ts.map +1 -0
- package/lib/services/offer-inventories/index.js +175 -0
- package/lib/services/offer-inventories/index.js.map +1 -0
- package/lib/services/offer-inventories/module.d.ts +11 -0
- package/lib/services/offer-inventories/module.d.ts.map +1 -0
- package/lib/services/offer-inventories/module.js +15 -0
- package/lib/services/offer-inventories/module.js.map +1 -0
- package/lib/services/offer-inventories/offer-inventories.service.d.ts +26 -0
- package/lib/services/offer-inventories/offer-inventories.service.d.ts.map +1 -0
- package/lib/services/offer-inventories/offer-inventories.service.js +80 -0
- package/lib/services/offer-inventories/offer-inventories.service.js.map +1 -0
- package/lib/services/offer-inventories/types.d.ts +85 -0
- package/lib/services/offer-inventories/types.d.ts.map +1 -0
- package/lib/services/offer-inventories/types.js +10 -0
- package/lib/services/offer-inventories/types.js.map +1 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts +109 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.d.ts.map +1 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js +201 -0
- package/lib/services/offer-prices/__mocks__/offer-prices.mocks.js.map +1 -0
- package/lib/services/offer-prices/definitions.d.ts +24 -0
- package/lib/services/offer-prices/definitions.d.ts.map +1 -0
- package/lib/services/offer-prices/definitions.js +3 -0
- package/lib/services/offer-prices/definitions.js.map +1 -0
- package/lib/services/offer-prices/endpoints.d.ts +12 -0
- package/lib/services/offer-prices/endpoints.d.ts.map +1 -0
- package/lib/services/offer-prices/endpoints.js +14 -0
- package/lib/services/offer-prices/endpoints.js.map +1 -0
- package/lib/services/offer-prices/index.d.ts +36 -0
- package/lib/services/offer-prices/index.d.ts.map +1 -0
- package/lib/services/offer-prices/index.js +53 -0
- package/lib/services/offer-prices/index.js.map +1 -0
- package/lib/services/offer-prices/module.d.ts +11 -0
- package/lib/services/offer-prices/module.d.ts.map +1 -0
- package/lib/services/offer-prices/module.js +15 -0
- package/lib/services/offer-prices/module.js.map +1 -0
- package/lib/services/offer-prices/offer-prices.service.d.ts +18 -0
- package/lib/services/offer-prices/offer-prices.service.d.ts.map +1 -0
- package/lib/services/offer-prices/offer-prices.service.js +36 -0
- package/lib/services/offer-prices/offer-prices.service.js.map +1 -0
- package/lib/services/offer-prices/types.d.ts +33 -0
- package/lib/services/offer-prices/types.d.ts.map +1 -0
- package/lib/services/offer-prices/types.js +10 -0
- package/lib/services/offer-prices/types.js.map +1 -0
- package/lib/services/operation/definitions.d.ts +263 -0
- package/lib/services/operation/definitions.d.ts.map +1 -0
- package/lib/services/operation/definitions.js +18 -0
- package/lib/services/operation/definitions.js.map +1 -0
- package/lib/services/operation/endpoints.d.ts +18 -0
- package/lib/services/operation/endpoints.d.ts.map +1 -0
- package/lib/services/operation/endpoints.js +22 -0
- package/lib/services/operation/endpoints.js.map +1 -0
- package/lib/services/operation/index.d.ts +520 -0
- package/lib/services/operation/index.d.ts.map +1 -0
- package/lib/services/operation/index.js +704 -0
- package/lib/services/operation/index.js.map +1 -0
- package/lib/services/operation/module.d.ts +11 -0
- package/lib/services/operation/module.d.ts.map +1 -0
- package/lib/services/operation/module.js +15 -0
- package/lib/services/operation/module.js.map +1 -0
- package/lib/services/operation/operation.service.d.ts +32 -0
- package/lib/services/operation/operation.service.d.ts.map +1 -0
- package/lib/services/operation/operation.service.js +206 -0
- package/lib/services/operation/operation.service.js.map +1 -0
- package/lib/services/operation/types.d.ts +174 -0
- package/lib/services/operation/types.d.ts.map +1 -0
- package/lib/services/operation/types.js +10 -0
- package/lib/services/operation/types.js.map +1 -0
- package/lib/services/payment/definitions.d.ts +69 -0
- package/lib/services/payment/definitions.d.ts.map +1 -0
- package/lib/services/payment/definitions.js +3 -0
- package/lib/services/payment/definitions.js.map +1 -0
- package/lib/services/payment/endpoints.d.ts +16 -0
- package/lib/services/payment/endpoints.d.ts.map +1 -0
- package/lib/services/payment/endpoints.js +18 -0
- package/lib/services/payment/endpoints.js.map +1 -0
- package/lib/services/payment/index.d.ts +150 -0
- package/lib/services/payment/index.d.ts.map +1 -0
- package/lib/services/payment/index.js +220 -0
- package/lib/services/payment/index.js.map +1 -0
- package/lib/services/payment/module.d.ts +11 -0
- package/lib/services/payment/module.d.ts.map +1 -0
- package/lib/services/payment/module.js +15 -0
- package/lib/services/payment/module.js.map +1 -0
- package/lib/services/payment/payment.service.d.ts +224 -0
- package/lib/services/payment/payment.service.d.ts.map +1 -0
- package/lib/services/payment/payment.service.js +288 -0
- package/lib/services/payment/payment.service.js.map +1 -0
- package/lib/services/payment/types.d.ts +93 -0
- package/lib/services/payment/types.d.ts.map +1 -0
- package/lib/services/payment/types.js +10 -0
- package/lib/services/payment/types.js.map +1 -0
- package/lib/services/product/definitions.d.ts +150 -0
- package/lib/services/product/definitions.d.ts.map +1 -0
- package/lib/services/product/definitions.js +9 -0
- package/lib/services/product/definitions.js.map +1 -0
- package/lib/services/product/endpoints.d.ts +40 -0
- package/lib/services/product/endpoints.d.ts.map +1 -0
- package/lib/services/product/endpoints.js +42 -0
- package/lib/services/product/endpoints.js.map +1 -0
- package/lib/services/product/index.d.ts +388 -0
- package/lib/services/product/index.d.ts.map +1 -0
- package/lib/services/product/index.js +564 -0
- package/lib/services/product/index.js.map +1 -0
- package/lib/services/product/module.d.ts +11 -0
- package/lib/services/product/module.d.ts.map +1 -0
- package/lib/services/product/module.js +17 -0
- package/lib/services/product/module.js.map +1 -0
- package/lib/services/product/product.service.d.ts +452 -0
- package/lib/services/product/product.service.d.ts.map +1 -0
- package/lib/services/product/product.service.js +624 -0
- package/lib/services/product/product.service.js.map +1 -0
- package/lib/services/product/types.d.ts +344 -0
- package/lib/services/product/types.d.ts.map +1 -0
- package/lib/services/product/types.js +10 -0
- package/lib/services/product/types.js.map +1 -0
- package/lib/services/product-variant/definitions.d.ts +33 -0
- package/lib/services/product-variant/definitions.d.ts.map +1 -0
- package/lib/services/product-variant/definitions.js +7 -0
- package/lib/services/product-variant/definitions.js.map +1 -0
- package/lib/services/product-variant/endpoints.d.ts +15 -0
- package/lib/services/product-variant/endpoints.d.ts.map +1 -0
- package/lib/services/product-variant/endpoints.js +17 -0
- package/lib/services/product-variant/endpoints.js.map +1 -0
- package/lib/services/product-variant/index.d.ts +123 -0
- package/lib/services/product-variant/index.d.ts.map +1 -0
- package/lib/services/product-variant/index.js +172 -0
- package/lib/services/product-variant/index.js.map +1 -0
- package/lib/services/product-variant/module.d.ts +11 -0
- package/lib/services/product-variant/module.d.ts.map +1 -0
- package/lib/services/product-variant/module.js +15 -0
- package/lib/services/product-variant/module.js.map +1 -0
- package/lib/services/product-variant/product-variant.service.d.ts +21 -0
- package/lib/services/product-variant/product-variant.service.d.ts.map +1 -0
- package/lib/services/product-variant/product-variant.service.js +69 -0
- package/lib/services/product-variant/product-variant.service.js.map +1 -0
- package/lib/services/product-variant/types.d.ts +73 -0
- package/lib/services/product-variant/types.d.ts.map +1 -0
- package/lib/services/product-variant/types.js +10 -0
- package/lib/services/product-variant/types.js.map +1 -0
- package/lib/services/quote/definitions.d.ts +102 -0
- package/lib/services/quote/definitions.d.ts.map +1 -0
- package/lib/services/quote/definitions.js +3 -0
- package/lib/services/quote/definitions.js.map +1 -0
- package/lib/services/quote/endpoints.d.ts +20 -0
- package/lib/services/quote/endpoints.d.ts.map +1 -0
- package/lib/services/quote/endpoints.js +24 -0
- package/lib/services/quote/endpoints.js.map +1 -0
- package/lib/services/quote/index.d.ts +378 -0
- package/lib/services/quote/index.d.ts.map +1 -0
- package/lib/services/quote/index.js +506 -0
- package/lib/services/quote/index.js.map +1 -0
- package/lib/services/quote/module.d.ts +11 -0
- package/lib/services/quote/module.d.ts.map +1 -0
- package/lib/services/quote/module.js +15 -0
- package/lib/services/quote/module.js.map +1 -0
- package/lib/services/quote/quote.service.d.ts +346 -0
- package/lib/services/quote/quote.service.d.ts.map +1 -0
- package/lib/services/quote/quote.service.js +479 -0
- package/lib/services/quote/quote.service.js.map +1 -0
- package/lib/services/quote/types.d.ts +160 -0
- package/lib/services/quote/types.d.ts.map +1 -0
- package/lib/services/quote/types.js +10 -0
- package/lib/services/quote/types.js.map +1 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.d.ts +49 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.d.ts.map +1 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.js +168 -0
- package/lib/services/supplier/__mocks__/supplier-mocks.js.map +1 -0
- package/lib/services/supplier/definitions.d.ts +30 -0
- package/lib/services/supplier/definitions.d.ts.map +1 -0
- package/lib/services/supplier/definitions.js +3 -0
- package/lib/services/supplier/definitions.js.map +1 -0
- package/lib/services/supplier/endpoints.d.ts +14 -0
- package/lib/services/supplier/endpoints.d.ts.map +1 -0
- package/lib/services/supplier/endpoints.js +16 -0
- package/lib/services/supplier/endpoints.js.map +1 -0
- package/lib/services/supplier/index.d.ts +102 -0
- package/lib/services/supplier/index.d.ts.map +1 -0
- package/lib/services/supplier/index.js +146 -0
- package/lib/services/supplier/index.js.map +1 -0
- package/lib/services/supplier/module.d.ts +11 -0
- package/lib/services/supplier/module.d.ts.map +1 -0
- package/lib/services/supplier/module.js +15 -0
- package/lib/services/supplier/module.js.map +1 -0
- package/lib/services/supplier/supplier.service.d.ts +20 -0
- package/lib/services/supplier/supplier.service.d.ts.map +1 -0
- package/lib/services/supplier/supplier.service.js +63 -0
- package/lib/services/supplier/supplier.service.js.map +1 -0
- package/lib/services/supplier/types.d.ts +58 -0
- package/lib/services/supplier/types.d.ts.map +1 -0
- package/lib/services/supplier/types.js +10 -0
- package/lib/services/supplier/types.js.map +1 -0
- package/lib/services/types.d.ts +81 -0
- package/lib/services/types.d.ts.map +1 -0
- package/lib/services/types.js +10 -0
- package/lib/services/types.js.map +1 -0
- package/lib/settings/fetch-instance.d.ts +30 -0
- package/lib/settings/fetch-instance.d.ts.map +1 -0
- package/lib/settings/fetch-instance.js +223 -0
- package/lib/settings/fetch-instance.js.map +1 -0
- package/lib/settings/sdk-version.d.ts +3 -0
- package/lib/settings/sdk-version.d.ts.map +1 -0
- package/lib/settings/sdk-version.js +6 -0
- package/lib/settings/sdk-version.js.map +1 -0
- package/package.json +27 -8
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DJUST SDK Cart Service - Types
|
|
3
|
+
* Type definitions for cart operations.
|
|
4
|
+
*
|
|
5
|
+
* @module services/cart/types
|
|
6
|
+
* @since 2.17.0
|
|
7
|
+
*/
|
|
8
|
+
import type { Pageable, PaginatedResponse } from "../types";
|
|
9
|
+
/**
|
|
10
|
+
* Cart status values.
|
|
11
|
+
*/
|
|
12
|
+
export type CartStatus = "ACTIVE" | "ORDERED" | "ARCHIVED" | "DELETED";
|
|
13
|
+
/**
|
|
14
|
+
* Cart type values.
|
|
15
|
+
*/
|
|
16
|
+
export type CartType = "CART" | "BUYING_LIST";
|
|
17
|
+
/**
|
|
18
|
+
* Line update action.
|
|
19
|
+
*/
|
|
20
|
+
export type UpdateAction = "add" | "update" | "delete";
|
|
21
|
+
/**
|
|
22
|
+
* Parameters for getting all carts.
|
|
23
|
+
*/
|
|
24
|
+
export interface GetCartsParams {
|
|
25
|
+
/** Currency for price display */
|
|
26
|
+
currency: string;
|
|
27
|
+
/** Pagination options */
|
|
28
|
+
pageable: Pageable;
|
|
29
|
+
/** Filter by cart status */
|
|
30
|
+
status?: CartStatus[];
|
|
31
|
+
/** Filter by cart type */
|
|
32
|
+
type?: CartType[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Parameters for creating a cart.
|
|
36
|
+
*/
|
|
37
|
+
export interface CreateCartParams {
|
|
38
|
+
/** Cart name */
|
|
39
|
+
name: string;
|
|
40
|
+
/** Cart type (default: CART) */
|
|
41
|
+
type?: CartType;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Parameters for deleting a cart.
|
|
45
|
+
*/
|
|
46
|
+
export interface DeleteCartParams {
|
|
47
|
+
/** Cart ID to delete */
|
|
48
|
+
cartId: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Parameters for getting a cart.
|
|
52
|
+
*/
|
|
53
|
+
export interface GetCartParams {
|
|
54
|
+
/** Cart ID */
|
|
55
|
+
cartId: string;
|
|
56
|
+
/** Currency for price display */
|
|
57
|
+
currency: string;
|
|
58
|
+
/** Number of first lines to retrieve */
|
|
59
|
+
nbFirstLines?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Parameters for updating a cart.
|
|
63
|
+
*/
|
|
64
|
+
export interface UpdateCartParams {
|
|
65
|
+
/** Cart ID */
|
|
66
|
+
cartId: string;
|
|
67
|
+
/** New cart name */
|
|
68
|
+
name: string;
|
|
69
|
+
/** Cart type */
|
|
70
|
+
type?: CartType;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Parameters for initializing orders from cart.
|
|
74
|
+
*/
|
|
75
|
+
export interface InitializeOrdersParams {
|
|
76
|
+
/** Cart ID */
|
|
77
|
+
cartId: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Parameters for getting cart lines.
|
|
81
|
+
*/
|
|
82
|
+
export interface GetCartLinesParams {
|
|
83
|
+
/** Cart ID */
|
|
84
|
+
cartId: string;
|
|
85
|
+
/** Currency for price display */
|
|
86
|
+
currency: string;
|
|
87
|
+
/** Pagination options */
|
|
88
|
+
pageable: Pageable;
|
|
89
|
+
/** Filter by supplier IDs */
|
|
90
|
+
supplierId?: string[];
|
|
91
|
+
/** Filter by product variant IDs */
|
|
92
|
+
productVariantId?: string[];
|
|
93
|
+
/** Filter by offer price IDs */
|
|
94
|
+
offerPriceId?: string[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Line to add or update.
|
|
98
|
+
*/
|
|
99
|
+
export interface CartLineToAdd {
|
|
100
|
+
/** Offer price ID */
|
|
101
|
+
offerPriceId: string;
|
|
102
|
+
/** Quantity */
|
|
103
|
+
quantity: number;
|
|
104
|
+
/** Update action */
|
|
105
|
+
updateAction?: UpdateAction;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Line to add by variant.
|
|
109
|
+
*/
|
|
110
|
+
export interface CartLineToAddByVariant {
|
|
111
|
+
/** Product variant ID */
|
|
112
|
+
productVariantId: string;
|
|
113
|
+
/** Quantity */
|
|
114
|
+
quantity: number;
|
|
115
|
+
/** Update action */
|
|
116
|
+
updateAction?: UpdateAction;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Parameters for updating cart lines.
|
|
120
|
+
*/
|
|
121
|
+
export interface UpdateCartLinesParams {
|
|
122
|
+
/** Cart ID */
|
|
123
|
+
cartId: string;
|
|
124
|
+
/** Lines to update */
|
|
125
|
+
linesToUpdate: CartLineToAdd[];
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Parameters for updating cart lines by variant.
|
|
129
|
+
*/
|
|
130
|
+
export interface UpdateCartLinesByVariantParams {
|
|
131
|
+
/** Cart ID */
|
|
132
|
+
cartId: string;
|
|
133
|
+
/** Lines to update */
|
|
134
|
+
linesToUpdate: CartLineToAddByVariant[];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Offer to delete.
|
|
138
|
+
*/
|
|
139
|
+
export interface OfferToDelete {
|
|
140
|
+
/** Offer price ID */
|
|
141
|
+
offerPriceId: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Parameters for deleting cart lines.
|
|
145
|
+
*/
|
|
146
|
+
export interface DeleteCartLinesParams {
|
|
147
|
+
/** Cart ID */
|
|
148
|
+
cartId: string;
|
|
149
|
+
/** Line IDs to delete */
|
|
150
|
+
lineIdsToDelete: string[];
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Cart line item.
|
|
154
|
+
*/
|
|
155
|
+
export interface CartLine {
|
|
156
|
+
id: string;
|
|
157
|
+
offerPriceId: string;
|
|
158
|
+
productVariantId: string;
|
|
159
|
+
quantity: number;
|
|
160
|
+
unitPrice: number;
|
|
161
|
+
totalPrice: number;
|
|
162
|
+
productName: string;
|
|
163
|
+
sku: string;
|
|
164
|
+
supplierId: string;
|
|
165
|
+
supplierName: string;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Cart summary.
|
|
169
|
+
*/
|
|
170
|
+
export interface CartSummary {
|
|
171
|
+
id: string;
|
|
172
|
+
name: string;
|
|
173
|
+
type: CartType;
|
|
174
|
+
status: CartStatus;
|
|
175
|
+
totalItems: number;
|
|
176
|
+
totalPrice: number;
|
|
177
|
+
currency: string;
|
|
178
|
+
createdAt: string;
|
|
179
|
+
updatedAt: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Full cart details.
|
|
183
|
+
*/
|
|
184
|
+
export interface Cart extends CartSummary {
|
|
185
|
+
lines: CartLine[];
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Response for getting multiple carts.
|
|
189
|
+
*/
|
|
190
|
+
export interface GetCartsResponse extends PaginatedResponse<CartSummary> {
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Response for creating a cart.
|
|
194
|
+
*/
|
|
195
|
+
export interface CreateCartResponse extends Cart {
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Response for getting a cart.
|
|
199
|
+
*/
|
|
200
|
+
export interface GetCartResponse extends Cart {
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Response for deleting carts.
|
|
204
|
+
*/
|
|
205
|
+
export interface DeleteCartsResponse {
|
|
206
|
+
deletedCount: number;
|
|
207
|
+
deletedIds: string[];
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Response for getting cart lines.
|
|
211
|
+
*/
|
|
212
|
+
export interface GetCartLinesResponse extends PaginatedResponse<CartLine> {
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Response for updating cart lines.
|
|
216
|
+
*/
|
|
217
|
+
export interface UpdateCartLinesResponse {
|
|
218
|
+
updatedLines: CartLine[];
|
|
219
|
+
errors?: Array<{
|
|
220
|
+
offerPriceId: string;
|
|
221
|
+
error: string;
|
|
222
|
+
}>;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Response for updating cart lines by variant.
|
|
226
|
+
*/
|
|
227
|
+
export interface UpdateCartLinesByVariantResponse extends UpdateCartLinesResponse {
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Response for deleting cart lines.
|
|
231
|
+
*/
|
|
232
|
+
export interface DeleteCartLinesResponse {
|
|
233
|
+
deletedCount: number;
|
|
234
|
+
deletedIds: string[];
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/cart/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/cart/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* # Commercial Order Service
|
|
3
|
+
*
|
|
4
|
+
* Complete order management for B2B commerce workflows.
|
|
5
|
+
*
|
|
6
|
+
* ## Features
|
|
7
|
+
* - Order creation and lifecycle management
|
|
8
|
+
* - Payment processing and card registration
|
|
9
|
+
* - Shipping and billing configuration
|
|
10
|
+
* - Order line management
|
|
11
|
+
* - Punchout/OCI integration
|
|
12
|
+
*
|
|
13
|
+
* @module services/commercial-order
|
|
14
|
+
* @since 2.17.0
|
|
15
|
+
*/
|
|
16
|
+
import { BaseService } from "../base.service";
|
|
17
|
+
import type { RequestContext } from "../../client/transport";
|
|
18
|
+
import type { GetCommercialOrdersParams, GetCommercialOrdersV2Params, CreateCommercialOrderParams, CreateCommercialOrderV2Params, GetCommercialOrderParams, UpdateCommercialOrderParams, CreateCardRegistrationParams, UpdateBillingInformationParams, SetStatusAsCreatedParams, SetStatusAsOnHoldParams, SyncCommercialOrderParams, GetPaymentPageUrlParams, CreatePreauthorizationParams, UpdateShippingAddressParams, UpdateShippingInformationParams, UpdateShippingTypeParams, DeleteCommercialOrderParams, GetCommercialOrderLinesParams, UpdateCommercialOrderLinesParams, DeleteCommercialOrderLinesParams, PunchoutOciParams, GetCommercialOrdersResponse, GetCommercialOrdersV2Response, CreateCommercialOrderResponse, CreateCommercialOrderV2Response, GetCommercialOrderResponse, CreateCardRegistrationResponse, CreatePreauthorizationResponse, GetCommercialOrderLinesResponse, UpdateCommercialOrderLinesResponse, DeleteCommercialOrderLinesResponse, SyncCommercialOrderResponse } from "./types";
|
|
19
|
+
/**
|
|
20
|
+
* Service for commercial order management.
|
|
21
|
+
*
|
|
22
|
+
* Handles the complete order lifecycle from creation to fulfillment:
|
|
23
|
+
* - Order creation from carts or quotes
|
|
24
|
+
* - Payment processing
|
|
25
|
+
* - Shipping and billing configuration
|
|
26
|
+
* - Order status management
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* import { createDjustClient } from '@djust-b2b/djust-front-sdk';
|
|
31
|
+
*
|
|
32
|
+
* const client = createDjustClient({ baseUrl, clientId, apiKey });
|
|
33
|
+
*
|
|
34
|
+
* // Get orders
|
|
35
|
+
* const { content: orders } = await client.commercialOrder.getCommercialOrdersV2({
|
|
36
|
+
* locale: 'en-US',
|
|
37
|
+
* page: 0,
|
|
38
|
+
* size: 10,
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* // Get single order details
|
|
42
|
+
* const order = await client.commercialOrder.getCommercialOrder({
|
|
43
|
+
* orderId: 'ORD-12345',
|
|
44
|
+
* locale: 'en-US',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare class CommercialOrderService extends BaseService {
|
|
49
|
+
readonly serviceName = "commercial-order";
|
|
50
|
+
/**
|
|
51
|
+
* Get paginated list of commercial orders (v1).
|
|
52
|
+
*
|
|
53
|
+
* **Endpoint**: `GET /v1/shop/commercial-orders [ORD-100]`
|
|
54
|
+
*
|
|
55
|
+
* | Parameter | Type | Required | Description |
|
|
56
|
+
* |----------------------|------------|----------|--------------------------------|
|
|
57
|
+
* | `locale` | `string` | Yes | Locale for translations |
|
|
58
|
+
* | `page` | `number` | No | Page number (0-based) |
|
|
59
|
+
* | `size` | `number` | No | Items per page |
|
|
60
|
+
* | `sort` | `string` | No | Sort criteria |
|
|
61
|
+
* | `connectedUserOnly` | `boolean` | No | Filter to current user's orders|
|
|
62
|
+
* | `customerAccountIds` | `string[]` | No | Filter by customer accounts |
|
|
63
|
+
* | `sourceTypes` | `string[]` | No | Filter by order source |
|
|
64
|
+
* | `isValidated` | `boolean` | No | Filter by validation status |
|
|
65
|
+
*
|
|
66
|
+
* @param params - Query parameters
|
|
67
|
+
* @param context - Optional SSR request context
|
|
68
|
+
* @throws {ValidationError} If locale is missing
|
|
69
|
+
* @returns Paginated order list
|
|
70
|
+
*/
|
|
71
|
+
getCommercialOrders(params: GetCommercialOrdersParams, context?: RequestContext): Promise<GetCommercialOrdersResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* Get paginated list of commercial orders (v2).
|
|
74
|
+
*
|
|
75
|
+
* Enhanced version with additional filtering capabilities.
|
|
76
|
+
*
|
|
77
|
+
* **Endpoint**: `GET /v2/shop/commercial-orders [ORD-101]`
|
|
78
|
+
*
|
|
79
|
+
* | Parameter | Type | Required | Description |
|
|
80
|
+
* |----------------------|------------|----------|--------------------------------|
|
|
81
|
+
* | `locale` | `string` | Yes | Locale for translations |
|
|
82
|
+
* | `page` | `number` | No | Page number (0-based) |
|
|
83
|
+
* | `size` | `number` | No | Items per page |
|
|
84
|
+
* | `sort` | `string` | No | Sort criteria |
|
|
85
|
+
* | `sourceIds` | `string[]` | No | Filter by source IDs |
|
|
86
|
+
* | `sourceTypes` | `string[]` | No | Filter by source types |
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```typescript
|
|
90
|
+
* const { content: orders, totalElements } = await client.commercialOrder.getCommercialOrdersV2({
|
|
91
|
+
* locale: 'fr-FR',
|
|
92
|
+
* page: 0,
|
|
93
|
+
* size: 20,
|
|
94
|
+
* sort: 'createdAt,desc',
|
|
95
|
+
* });
|
|
96
|
+
*
|
|
97
|
+
* orders.forEach(order => {
|
|
98
|
+
* console.log(`${order.businessId}: ${order.status} - ${order.total}`);
|
|
99
|
+
* });
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @param params - Query parameters
|
|
103
|
+
* @param context - Optional SSR request context
|
|
104
|
+
* @throws {ValidationError} If locale is missing
|
|
105
|
+
* @returns Paginated order list
|
|
106
|
+
*/
|
|
107
|
+
getCommercialOrdersV2(params: GetCommercialOrdersV2Params, context?: RequestContext): Promise<GetCommercialOrdersV2Response>;
|
|
108
|
+
/**
|
|
109
|
+
* Create a new commercial order from a cart or quote.
|
|
110
|
+
*
|
|
111
|
+
* **Endpoint**: `POST /v1/shop/commercial-orders [ORD-102]`
|
|
112
|
+
*
|
|
113
|
+
* | Parameter | Type | Required | Description |
|
|
114
|
+
* |----------------|----------|----------|--------------------------------|
|
|
115
|
+
* | `locale` | `string` | Yes | Locale for the order |
|
|
116
|
+
* | `origin` | `string` | Yes | Origin type (CART, QUOTE) |
|
|
117
|
+
* | `originId` | `string` | Yes | ID of the cart or quote |
|
|
118
|
+
* | `channel` | `string` | No | Sales channel |
|
|
119
|
+
* | `customFields` | `object` | No | Custom field values |
|
|
120
|
+
* | `paymentInfo` | `object` | No | Payment configuration |
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* const order = await client.commercialOrder.createCommercialOrder({
|
|
125
|
+
* locale: 'en-US',
|
|
126
|
+
* origin: 'CART',
|
|
127
|
+
* originId: 'cart-123',
|
|
128
|
+
* paymentInfo: { method: 'INVOICE' },
|
|
129
|
+
* });
|
|
130
|
+
*
|
|
131
|
+
* console.log(`Order created: ${order.businessId}`);
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* @param params - Order creation parameters
|
|
135
|
+
* @param context - Optional SSR request context
|
|
136
|
+
* @throws {ValidationError} If required parameters are missing
|
|
137
|
+
* @returns Created order details
|
|
138
|
+
*/
|
|
139
|
+
createCommercialOrder(params: CreateCommercialOrderParams, context?: RequestContext): Promise<CreateCommercialOrderResponse>;
|
|
140
|
+
/**
|
|
141
|
+
* Create a commercial order (v2).
|
|
142
|
+
*
|
|
143
|
+
* Enhanced creation endpoint with more flexibility.
|
|
144
|
+
*
|
|
145
|
+
* **Endpoint**: `POST /v2/shop/commercial-orders [ORD-103]`
|
|
146
|
+
*
|
|
147
|
+
* | Parameter | Type | Required | Description |
|
|
148
|
+
* |---------------------|----------|----------|--------------------------------|
|
|
149
|
+
* | `sourceType` | `string` | No | Source type (CART, QUOTE) |
|
|
150
|
+
* | `sourceId` | `string` | No | Source ID |
|
|
151
|
+
* | `customFields` | `object` | No | Custom field values |
|
|
152
|
+
* | `customFieldIdType` | `string` | No | ID type for custom fields |
|
|
153
|
+
* | `isFull` | `boolean`| No | Include full order details |
|
|
154
|
+
*
|
|
155
|
+
* @param params - Order creation parameters
|
|
156
|
+
* @param context - Optional SSR request context
|
|
157
|
+
* @returns Created order details
|
|
158
|
+
*/
|
|
159
|
+
createCommercialOrderV2(params: CreateCommercialOrderV2Params, context?: RequestContext): Promise<CreateCommercialOrderV2Response>;
|
|
160
|
+
/**
|
|
161
|
+
* Get detailed information about a specific order.
|
|
162
|
+
*
|
|
163
|
+
* **Endpoint**: `GET /v1/shop/commercial-orders/{orderId} [ORD-104]`
|
|
164
|
+
*
|
|
165
|
+
* | Parameter | Type | Required | Description |
|
|
166
|
+
* |------------|----------|----------|--------------------------------|
|
|
167
|
+
* | `orderId` | `string` | Yes | Order ID or business ID |
|
|
168
|
+
* | `locale` | `string` | Yes | Locale for translations |
|
|
169
|
+
* | `idType` | `string` | No | ID type (id, businessId) |
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* const order = await client.commercialOrder.getCommercialOrder({
|
|
174
|
+
* orderId: 'ORD-2024-001234',
|
|
175
|
+
* locale: 'en-US',
|
|
176
|
+
* idType: 'businessId',
|
|
177
|
+
* });
|
|
178
|
+
*
|
|
179
|
+
* console.log(`Order: ${order.businessId}`);
|
|
180
|
+
* console.log(`Status: ${order.status}`);
|
|
181
|
+
* console.log(`Total: ${order.totalAmount} ${order.currency}`);
|
|
182
|
+
* ```
|
|
183
|
+
*
|
|
184
|
+
* @param params - Order identification parameters
|
|
185
|
+
* @param context - Optional SSR request context
|
|
186
|
+
* @throws {ValidationError} If required parameters are missing
|
|
187
|
+
* @throws {NotFoundError} If order doesn't exist
|
|
188
|
+
* @returns Full order details
|
|
189
|
+
*/
|
|
190
|
+
getCommercialOrder(params: GetCommercialOrderParams, context?: RequestContext): Promise<GetCommercialOrderResponse>;
|
|
191
|
+
/**
|
|
192
|
+
* Update commercial order custom fields.
|
|
193
|
+
*
|
|
194
|
+
* **Endpoint**: `PUT /v2/shop/commercial-orders/{orderId} [ORD-105]`
|
|
195
|
+
*
|
|
196
|
+
* @param params - Update parameters
|
|
197
|
+
* @param context - Optional SSR request context
|
|
198
|
+
* @throws {ValidationError} If commercialOrderId is missing
|
|
199
|
+
*/
|
|
200
|
+
updateCommercialOrder(params: UpdateCommercialOrderParams, context?: RequestContext): Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* Create a card registration for payment.
|
|
203
|
+
*
|
|
204
|
+
* Initiates the card registration process with the payment provider.
|
|
205
|
+
*
|
|
206
|
+
* **Endpoint**: `POST /v1/shop/commercial-orders/{orderId}/card-registration [PAY-100]`
|
|
207
|
+
*
|
|
208
|
+
* | Parameter | Type | Required | Description |
|
|
209
|
+
* |-------------------|----------|----------|--------------------------|
|
|
210
|
+
* | `orderId` | `string` | Yes | Order ID |
|
|
211
|
+
* | `paymentProvider` | `string` | Yes | Provider (MANGOPAY, etc) |
|
|
212
|
+
* | `currency` | `string` | Yes | Currency code |
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* const registration = await client.commercialOrder.createCardRegistration({
|
|
217
|
+
* orderId: 'order-123',
|
|
218
|
+
* paymentProvider: 'MANGOPAY',
|
|
219
|
+
* currency: 'EUR',
|
|
220
|
+
* });
|
|
221
|
+
*
|
|
222
|
+
* // Use registration data to tokenize card
|
|
223
|
+
* console.log(registration.cardRegistrationUrl);
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* @param params - Card registration parameters
|
|
227
|
+
* @param context - Optional SSR request context
|
|
228
|
+
* @throws {ValidationError} If required parameters are missing
|
|
229
|
+
* @returns Card registration details
|
|
230
|
+
*/
|
|
231
|
+
createCardRegistration(params: CreateCardRegistrationParams, context?: RequestContext): Promise<CreateCardRegistrationResponse>;
|
|
232
|
+
/**
|
|
233
|
+
* Update billing information for an order.
|
|
234
|
+
*
|
|
235
|
+
* **Endpoint**: `PUT /v1/shop/commercial-orders/{orderId}/billing-information [ORD-106]`
|
|
236
|
+
*
|
|
237
|
+
* | Parameter | Type | Required | Description |
|
|
238
|
+
* |--------------------|----------|----------|--------------------------|
|
|
239
|
+
* | `orderId` | `string` | Yes | Order ID |
|
|
240
|
+
* | `billingAddressId` | `string` | Yes | Billing address ID |
|
|
241
|
+
*
|
|
242
|
+
* @param params - Billing update parameters
|
|
243
|
+
* @param context - Optional SSR request context
|
|
244
|
+
* @throws {ValidationError} If required parameters are missing
|
|
245
|
+
*/
|
|
246
|
+
updateBillingInformation(params: UpdateBillingInformationParams, context?: RequestContext): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Set order status to CREATED (finalize order).
|
|
249
|
+
*
|
|
250
|
+
* **Endpoint**: `PUT /v1/shop/commercial-orders/{orderId}/set-status-as-created [ORD-107]`
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```typescript
|
|
254
|
+
* await client.commercialOrder.setStatusAsCreated({
|
|
255
|
+
* orderId: 'order-123',
|
|
256
|
+
* paymentInfo: { method: 'CARD', transactionId: 'txn-456' },
|
|
257
|
+
* });
|
|
258
|
+
* ```
|
|
259
|
+
*
|
|
260
|
+
* @param params - Status update parameters
|
|
261
|
+
* @param context - Optional SSR request context
|
|
262
|
+
* @throws {ValidationError} If orderId is missing
|
|
263
|
+
*/
|
|
264
|
+
setStatusAsCreated(params: SetStatusAsCreatedParams, context?: RequestContext): Promise<void>;
|
|
265
|
+
/**
|
|
266
|
+
* Set order status to ON_HOLD.
|
|
267
|
+
*
|
|
268
|
+
* **Endpoint**: `PUT /v1/shop/commercial-orders/{orderId}/set-status-as-hold [ORD-108]`
|
|
269
|
+
*
|
|
270
|
+
* @param params - Order identification
|
|
271
|
+
* @param context - Optional SSR request context
|
|
272
|
+
* @throws {ValidationError} If orderId is missing
|
|
273
|
+
*/
|
|
274
|
+
setStatusAsOnHold(params: SetStatusAsOnHoldParams, context?: RequestContext): Promise<void>;
|
|
275
|
+
/**
|
|
276
|
+
* Synchronize order with external systems (ORDER-223).
|
|
277
|
+
*
|
|
278
|
+
* **Endpoint**: `PUT /v1/shop/commercial-orders/{orderId}/sync`
|
|
279
|
+
*
|
|
280
|
+
* Returns the set of synchronisation warnings. Empty array if no warning.
|
|
281
|
+
*
|
|
282
|
+
* @param params - Order identification (REFERENCE only; business/external IDs not supported)
|
|
283
|
+
* @param context - Optional SSR request context
|
|
284
|
+
* @returns Synchronisation warnings; empty array if none
|
|
285
|
+
* @throws {ValidationError} If orderId is missing
|
|
286
|
+
*/
|
|
287
|
+
syncCommercialOrder(params: SyncCommercialOrderParams, context?: RequestContext): Promise<SyncCommercialOrderResponse>;
|
|
288
|
+
/**
|
|
289
|
+
* Get payment page URL for online payment.
|
|
290
|
+
*
|
|
291
|
+
* **Endpoint**: `GET /v1/shop/commercial-orders/{orderId}/payment-page [PAY-101]`
|
|
292
|
+
*
|
|
293
|
+
* | Parameter | Type | Required | Description |
|
|
294
|
+
* |-------------------|----------|----------|--------------------------|
|
|
295
|
+
* | `orderId` | `string` | Yes | Order ID |
|
|
296
|
+
* | `paymentOption` | `string` | Yes | Payment option selected |
|
|
297
|
+
* | `paymentProvider` | `string` | No | Specific provider |
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```typescript
|
|
301
|
+
* const paymentUrl = await client.commercialOrder.getPaymentPageUrl({
|
|
302
|
+
* orderId: 'order-123',
|
|
303
|
+
* paymentOption: 'CARD',
|
|
304
|
+
* });
|
|
305
|
+
*
|
|
306
|
+
* // Redirect user to payment page
|
|
307
|
+
* window.location.href = paymentUrl;
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* @param params - Payment page parameters
|
|
311
|
+
* @param context - Optional SSR request context
|
|
312
|
+
* @throws {ValidationError} If required parameters are missing
|
|
313
|
+
* @returns Payment page URL
|
|
314
|
+
*/
|
|
315
|
+
getPaymentPageUrl(params: GetPaymentPageUrlParams, context?: RequestContext): Promise<string>;
|
|
316
|
+
/**
|
|
317
|
+
* Create a payment preauthorization.
|
|
318
|
+
*
|
|
319
|
+
* **Endpoint**: `POST /v1/shop/commercial-orders/{orderId}/preauthorization [PAY-102]`
|
|
320
|
+
*
|
|
321
|
+
* @param params - Preauthorization parameters
|
|
322
|
+
* @param context - Optional SSR request context
|
|
323
|
+
* @throws {ValidationError} If required parameters are missing
|
|
324
|
+
* @returns Preauthorization result
|
|
325
|
+
*/
|
|
326
|
+
createPreauthorization(params: CreatePreauthorizationParams, context?: RequestContext): Promise<CreatePreauthorizationResponse>;
|
|
327
|
+
/**
|
|
328
|
+
* Update shipping address for an order.
|
|
329
|
+
*
|
|
330
|
+
* **Endpoint**: `PUT /v1/shop/commercial-orders/{orderId}/shipping-address [ORD-110]`
|
|
331
|
+
*
|
|
332
|
+
* @param params - Shipping address update parameters
|
|
333
|
+
* @param context - Optional SSR request context
|
|
334
|
+
* @throws {ValidationError} If required parameters are missing
|
|
335
|
+
*/
|
|
336
|
+
updateShippingAddress(params: UpdateShippingAddressParams, context?: RequestContext): Promise<void>;
|
|
337
|
+
/**
|
|
338
|
+
* Update complete shipping information.
|
|
339
|
+
*
|
|
340
|
+
* **Endpoint**: `PUT /v1/shop/commercial-orders/{orderId}/shipping-information [ORD-111]`
|
|
341
|
+
*
|
|
342
|
+
* @param params - Shipping information parameters
|
|
343
|
+
* @param context - Optional SSR request context
|
|
344
|
+
* @throws {ValidationError} If required parameters are missing
|
|
345
|
+
*/
|
|
346
|
+
updateShippingInformation(params: UpdateShippingInformationParams, context?: RequestContext): Promise<void>;
|
|
347
|
+
/**
|
|
348
|
+
* Update shipping type only.
|
|
349
|
+
*
|
|
350
|
+
* **Endpoint**: `PUT /v1/shop/commercial-orders/{orderId}/shipping-type [ORD-112]`
|
|
351
|
+
*
|
|
352
|
+
* @param params - Shipping type parameters
|
|
353
|
+
* @param context - Optional SSR request context
|
|
354
|
+
* @throws {ValidationError} If required parameters are missing
|
|
355
|
+
*/
|
|
356
|
+
updateShippingType(params: UpdateShippingTypeParams, context?: RequestContext): Promise<void>;
|
|
357
|
+
/**
|
|
358
|
+
* Delete a commercial order.
|
|
359
|
+
*
|
|
360
|
+
* **Endpoint**: `DELETE /v2/shop/commercial-orders/{orderId} [ORD-113]`
|
|
361
|
+
*
|
|
362
|
+
* @param params - Order identification
|
|
363
|
+
* @param context - Optional SSR request context
|
|
364
|
+
* @throws {ValidationError} If commercialOrderId is missing
|
|
365
|
+
* @throws {NotFoundError} If order doesn't exist
|
|
366
|
+
*/
|
|
367
|
+
deleteCommercialOrder(params: DeleteCommercialOrderParams, context?: RequestContext): Promise<void>;
|
|
368
|
+
/**
|
|
369
|
+
* Get order lines with pagination.
|
|
370
|
+
*
|
|
371
|
+
* **Endpoint**: `GET /v1/shop/commercial-orders/{orderId}/lines [ORD-114]`
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```typescript
|
|
375
|
+
* const { content: lines } = await client.commercialOrder.getCommercialOrderLines({
|
|
376
|
+
* commercialOrderId: 'order-123',
|
|
377
|
+
* page: 0,
|
|
378
|
+
* size: 50,
|
|
379
|
+
* locale: 'en-US',
|
|
380
|
+
* });
|
|
381
|
+
*
|
|
382
|
+
* lines.forEach(line => {
|
|
383
|
+
* console.log(`${line.productName}: ${line.quantity} x ${line.unitPrice}`);
|
|
384
|
+
* });
|
|
385
|
+
* ```
|
|
386
|
+
*
|
|
387
|
+
* @param params - Query parameters
|
|
388
|
+
* @param context - Optional SSR request context
|
|
389
|
+
* @throws {ValidationError} If commercialOrderId is missing
|
|
390
|
+
* @returns Paginated order lines
|
|
391
|
+
*/
|
|
392
|
+
getCommercialOrderLines(params: GetCommercialOrderLinesParams, context?: RequestContext): Promise<GetCommercialOrderLinesResponse>;
|
|
393
|
+
/**
|
|
394
|
+
* Update order lines (quantities, custom fields).
|
|
395
|
+
*
|
|
396
|
+
* **Endpoint**: `PUT /v2/shop/commercial-orders/{orderId}/lines [ORD-115]`
|
|
397
|
+
*
|
|
398
|
+
* @param params - Update parameters
|
|
399
|
+
* @param context - Optional SSR request context
|
|
400
|
+
* @throws {ValidationError} If commercialOrderId is missing
|
|
401
|
+
* @returns Updated lines information
|
|
402
|
+
*/
|
|
403
|
+
updateCommercialOrderLines(params: UpdateCommercialOrderLinesParams, context?: RequestContext): Promise<UpdateCommercialOrderLinesResponse>;
|
|
404
|
+
/**
|
|
405
|
+
* Delete order lines.
|
|
406
|
+
*
|
|
407
|
+
* **Endpoint**: `DELETE /v2/shop/commercial-orders/{orderId}/lines [ORD-116]`
|
|
408
|
+
*
|
|
409
|
+
* @param params - Deletion parameters
|
|
410
|
+
* @param context - Optional SSR request context
|
|
411
|
+
* @throws {ValidationError} If commercialOrderId is missing
|
|
412
|
+
* @returns Deletion result
|
|
413
|
+
*/
|
|
414
|
+
deleteCommercialOrderLines(params: DeleteCommercialOrderLinesParams, context?: RequestContext): Promise<DeleteCommercialOrderLinesResponse>;
|
|
415
|
+
/**
|
|
416
|
+
* Get OCI punchout data for procurement integration.
|
|
417
|
+
*
|
|
418
|
+
* Returns order data in OCI format for SAP Ariba, Coupa, etc.
|
|
419
|
+
*
|
|
420
|
+
* **Endpoint**: `GET /cxml/punchout/oci/{configKey}/commercial-orders/{orderId} [PUNCHOUT-100]`
|
|
421
|
+
*
|
|
422
|
+
* | Parameter | Type | Required | Description |
|
|
423
|
+
* |---------------------------|----------|----------|--------------------------|
|
|
424
|
+
* | `commercialOrderId` | `string` | Yes | Order ID |
|
|
425
|
+
* | `tenantConfigurationKey` | `string` | Yes | OCI configuration key |
|
|
426
|
+
* | `locale` | `string` | No | Locale for data |
|
|
427
|
+
*
|
|
428
|
+
* @param params - Punchout parameters
|
|
429
|
+
* @param context - Optional SSR request context
|
|
430
|
+
* @throws {ValidationError} If required parameters are missing
|
|
431
|
+
* @returns OCI field mapping for the order
|
|
432
|
+
*/
|
|
433
|
+
punchoutOci(params: PunchoutOciParams, context?: RequestContext): Promise<Record<string, string>>;
|
|
434
|
+
}
|
|
435
|
+
//# sourceMappingURL=commercial-order.service.d.ts.map
|