@djust-b2b/djust-front-sdk 3.0.0-beta.2 → 3.0.0-beta.20
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 +51 -7
- package/dist/.tsbuildinfo +1 -0
- package/dist/.tsbuildinfo-esm +1 -0
- package/dist/client/create-client.d.ts +248 -0
- package/dist/client/create-client.d.ts.map +1 -0
- package/dist/client/index.d.ts +14 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/performance.d.ts +203 -0
- package/dist/client/performance.d.ts.map +1 -0
- package/dist/client/transport.d.ts +372 -0
- package/dist/client/transport.d.ts.map +1 -0
- package/dist/errors/base.d.ts +101 -0
- package/dist/errors/base.d.ts.map +1 -0
- package/dist/errors/classes/auth.error.d.ts +64 -0
- package/dist/errors/classes/auth.error.d.ts.map +1 -0
- package/dist/errors/classes/forbidden.error.d.ts +52 -0
- package/dist/errors/classes/forbidden.error.d.ts.map +1 -0
- package/dist/errors/classes/index.d.ts +17 -0
- package/dist/errors/classes/index.d.ts.map +1 -0
- package/dist/errors/classes/network.error.d.ts +63 -0
- package/dist/errors/classes/network.error.d.ts.map +1 -0
- package/dist/errors/classes/not-found.error.d.ts +58 -0
- package/dist/errors/classes/not-found.error.d.ts.map +1 -0
- package/dist/errors/classes/rate-limit.error.d.ts +49 -0
- package/dist/errors/classes/rate-limit.error.d.ts.map +1 -0
- package/dist/errors/classes/server.error.d.ts +63 -0
- package/dist/errors/classes/server.error.d.ts.map +1 -0
- package/dist/errors/classes/timeout.error.d.ts +64 -0
- package/dist/errors/classes/timeout.error.d.ts.map +1 -0
- package/dist/errors/classes/unexpected.error.d.ts +70 -0
- package/dist/errors/classes/unexpected.error.d.ts.map +1 -0
- package/dist/errors/classes/validation.error.d.ts +68 -0
- package/dist/errors/classes/validation.error.d.ts.map +1 -0
- package/dist/errors/codes.d.ts +111 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/compat.d.ts +99 -0
- package/dist/errors/compat.d.ts.map +1 -0
- package/dist/errors/factory.d.ts +33 -0
- package/dist/errors/factory.d.ts.map +1 -0
- package/dist/errors/guards.d.ts +142 -0
- package/dist/errors/guards.d.ts.map +1 -0
- package/dist/errors/index.d.ts +25 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/types.d.ts +100 -0
- package/dist/errors/types.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +42 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/parameters-validation.d.ts +3 -0
- package/dist/helpers/parameters-validation.d.ts.map +1 -0
- package/dist/helpers/utils.d.ts +5 -0
- package/dist/helpers/utils.d.ts.map +1 -0
- package/dist/index.cjs +182 -0
- package/dist/index.d.ts +266 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +11611 -0
- package/dist/interfaces/index.d.ts +31 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/models/address.d.ts +61 -0
- package/dist/interfaces/models/address.d.ts.map +1 -0
- package/dist/interfaces/models/attribute.d.ts +31 -0
- package/dist/interfaces/models/attribute.d.ts.map +1 -0
- package/dist/interfaces/models/auth.d.ts +37 -0
- package/dist/interfaces/models/auth.d.ts.map +1 -0
- package/dist/interfaces/models/cart.d.ts +64 -0
- package/dist/interfaces/models/cart.d.ts.map +1 -0
- package/dist/interfaces/models/common.d.ts +68 -0
- package/dist/interfaces/models/common.d.ts.map +1 -0
- package/dist/interfaces/models/custom-field.d.ts +57 -0
- package/dist/interfaces/models/custom-field.d.ts.map +1 -0
- package/dist/interfaces/models/customer-account.d.ts +52 -0
- package/dist/interfaces/models/customer-account.d.ts.map +1 -0
- package/dist/interfaces/models/customer-organisation.d.ts +14 -0
- package/dist/interfaces/models/customer-organisation.d.ts.map +1 -0
- package/dist/interfaces/models/customer-user.d.ts +114 -0
- package/dist/interfaces/models/customer-user.d.ts.map +1 -0
- package/dist/interfaces/models/incident.d.ts +37 -0
- package/dist/interfaces/models/incident.d.ts.map +1 -0
- package/dist/interfaces/models/navigation-category.d.ts +22 -0
- package/dist/interfaces/models/navigation-category.d.ts.map +1 -0
- package/dist/interfaces/models/offer.d.ts +151 -0
- package/dist/interfaces/models/offer.d.ts.map +1 -0
- package/dist/interfaces/models/order.d.ts +701 -0
- package/dist/interfaces/models/order.d.ts.map +1 -0
- package/dist/interfaces/models/payment.d.ts +20 -0
- package/dist/interfaces/models/payment.d.ts.map +1 -0
- package/dist/interfaces/models/price.d.ts +6 -0
- package/dist/interfaces/models/price.d.ts.map +1 -0
- package/dist/interfaces/models/product.d.ts +243 -0
- package/dist/interfaces/models/product.d.ts.map +1 -0
- package/dist/interfaces/models/quote.d.ts +77 -0
- package/dist/interfaces/models/quote.d.ts.map +1 -0
- package/dist/interfaces/models/searchProduct.d.ts +128 -0
- package/dist/interfaces/models/searchProduct.d.ts.map +1 -0
- package/dist/interfaces/models/supplier.d.ts +72 -0
- package/dist/interfaces/models/supplier.d.ts.map +1 -0
- package/dist/services/attributes/attributes.service.d.ts +18 -0
- package/dist/services/attributes/attributes.service.d.ts.map +1 -0
- package/dist/services/attributes/definitions.d.ts +28 -0
- package/dist/services/attributes/definitions.d.ts.map +1 -0
- package/dist/services/attributes/endpoints.d.ts +12 -0
- package/dist/services/attributes/endpoints.d.ts.map +1 -0
- package/dist/services/attributes/index.d.ts +33 -0
- package/dist/services/attributes/index.d.ts.map +1 -0
- package/dist/services/attributes/module.d.ts +11 -0
- package/dist/services/attributes/module.d.ts.map +1 -0
- package/dist/services/attributes/types.d.ts +35 -0
- package/dist/services/attributes/types.d.ts.map +1 -0
- package/dist/services/auth/__mocks__/auth.mocks.d.ts +249 -0
- package/dist/services/auth/__mocks__/auth.mocks.d.ts.map +1 -0
- package/dist/services/auth/auth.service.d.ts +286 -0
- package/dist/services/auth/auth.service.d.ts.map +1 -0
- package/dist/services/auth/definitions.d.ts +69 -0
- package/dist/services/auth/definitions.d.ts.map +1 -0
- package/dist/services/auth/definitions.requests.d.ts +25 -0
- package/dist/services/auth/definitions.requests.d.ts.map +1 -0
- package/dist/services/auth/endpoints.d.ts +30 -0
- package/dist/services/auth/endpoints.d.ts.map +1 -0
- package/dist/services/auth/index.d.ts +232 -0
- package/dist/services/auth/index.d.ts.map +1 -0
- package/dist/services/auth/module.d.ts +11 -0
- package/dist/services/auth/module.d.ts.map +1 -0
- package/dist/services/auth/types.d.ts +124 -0
- package/dist/services/auth/types.d.ts.map +1 -0
- package/dist/services/base.service.d.ts +83 -0
- package/dist/services/base.service.d.ts.map +1 -0
- package/dist/services/cart/cart.service.d.ts +443 -0
- package/dist/services/cart/cart.service.d.ts.map +1 -0
- package/dist/services/cart/definitions.d.ts +84 -0
- package/dist/services/cart/definitions.d.ts.map +1 -0
- package/dist/services/cart/endpoints.d.ts +24 -0
- package/dist/services/cart/endpoints.d.ts.map +1 -0
- package/dist/services/cart/index.d.ts +330 -0
- package/dist/services/cart/index.d.ts.map +1 -0
- package/dist/services/cart/module.d.ts +11 -0
- package/dist/services/cart/module.d.ts.map +1 -0
- package/dist/services/cart/types.d.ts +236 -0
- package/dist/services/cart/types.d.ts.map +1 -0
- package/dist/services/commercial-order/commercial-order.service.d.ts +435 -0
- package/dist/services/commercial-order/commercial-order.service.d.ts.map +1 -0
- package/dist/services/commercial-order/definitions.d.ts +181 -0
- package/dist/services/commercial-order/definitions.d.ts.map +1 -0
- package/dist/services/commercial-order/endpoints.d.ts +28 -0
- package/dist/services/commercial-order/endpoints.d.ts.map +1 -0
- package/dist/services/commercial-order/index.d.ts +712 -0
- package/dist/services/commercial-order/index.d.ts.map +1 -0
- package/dist/services/commercial-order/module.d.ts +11 -0
- package/dist/services/commercial-order/module.d.ts.map +1 -0
- package/dist/services/commercial-order/types.d.ts +244 -0
- package/dist/services/commercial-order/types.d.ts.map +1 -0
- package/dist/services/custom-field/custom-field.service.d.ts +23 -0
- package/dist/services/custom-field/custom-field.service.d.ts.map +1 -0
- package/dist/services/custom-field/definitions.d.ts +107 -0
- package/dist/services/custom-field/definitions.d.ts.map +1 -0
- package/dist/services/custom-field/endpoints.d.ts +13 -0
- package/dist/services/custom-field/endpoints.d.ts.map +1 -0
- package/dist/services/custom-field/index.d.ts +115 -0
- package/dist/services/custom-field/index.d.ts.map +1 -0
- package/dist/services/custom-field/module.d.ts +11 -0
- package/dist/services/custom-field/module.d.ts.map +1 -0
- package/dist/services/custom-field/types.d.ts +51 -0
- package/dist/services/custom-field/types.d.ts.map +1 -0
- package/dist/services/customer-account/customer-account.service.d.ts +387 -0
- package/dist/services/customer-account/customer-account.service.d.ts.map +1 -0
- package/dist/services/customer-account/definitions.d.ts +164 -0
- package/dist/services/customer-account/definitions.d.ts.map +1 -0
- package/dist/services/customer-account/endpoints.d.ts +25 -0
- package/dist/services/customer-account/endpoints.d.ts.map +1 -0
- package/dist/services/customer-account/index.d.ts +656 -0
- package/dist/services/customer-account/index.d.ts.map +1 -0
- package/dist/services/customer-account/module.d.ts +11 -0
- package/dist/services/customer-account/module.d.ts.map +1 -0
- package/dist/services/customer-account/types.d.ts +253 -0
- package/dist/services/customer-account/types.d.ts.map +1 -0
- package/dist/services/customer-user/customer-user.service.d.ts +280 -0
- package/dist/services/customer-user/customer-user.service.d.ts.map +1 -0
- package/dist/services/customer-user/definitions.d.ts +84 -0
- package/dist/services/customer-user/definitions.d.ts.map +1 -0
- package/dist/services/customer-user/endpoints.d.ts +19 -0
- package/dist/services/customer-user/endpoints.d.ts.map +1 -0
- package/dist/services/customer-user/index.d.ts +394 -0
- package/dist/services/customer-user/index.d.ts.map +1 -0
- package/dist/services/customer-user/module.d.ts +11 -0
- package/dist/services/customer-user/module.d.ts.map +1 -0
- package/dist/services/customer-user/types.d.ts +118 -0
- package/dist/services/customer-user/types.d.ts.map +1 -0
- package/dist/services/factory.d.ts +104 -0
- package/dist/services/factory.d.ts.map +1 -0
- package/dist/services/incident/definitions.d.ts +85 -0
- package/dist/services/incident/definitions.d.ts.map +1 -0
- package/dist/services/incident/endpoints.d.ts +17 -0
- package/dist/services/incident/endpoints.d.ts.map +1 -0
- package/dist/services/incident/incident.service.d.ts +24 -0
- package/dist/services/incident/incident.service.d.ts.map +1 -0
- package/dist/services/incident/index.d.ts +270 -0
- package/dist/services/incident/index.d.ts.map +1 -0
- package/dist/services/incident/module.d.ts +11 -0
- package/dist/services/incident/module.d.ts.map +1 -0
- package/dist/services/incident/types.d.ts +116 -0
- package/dist/services/incident/types.d.ts.map +1 -0
- package/dist/services/logistic-order/definitions.d.ts +296 -0
- package/dist/services/logistic-order/definitions.d.ts.map +1 -0
- package/dist/services/logistic-order/endpoints.d.ts +44 -0
- package/dist/services/logistic-order/endpoints.d.ts.map +1 -0
- package/dist/services/logistic-order/index.d.ts +1338 -0
- package/dist/services/logistic-order/index.d.ts.map +1 -0
- package/dist/services/logistic-order/logistic-order.service.d.ts +62 -0
- package/dist/services/logistic-order/logistic-order.service.d.ts.map +1 -0
- package/dist/services/logistic-order/module.d.ts +11 -0
- package/dist/services/logistic-order/module.d.ts.map +1 -0
- package/dist/services/logistic-order/types.d.ts +411 -0
- package/dist/services/logistic-order/types.d.ts.map +1 -0
- package/dist/services/module.d.ts +64 -0
- package/dist/services/module.d.ts.map +1 -0
- package/dist/services/navigation-category/definitions.d.ts +31 -0
- package/dist/services/navigation-category/definitions.d.ts.map +1 -0
- package/dist/services/navigation-category/endpoints.d.ts +15 -0
- package/dist/services/navigation-category/endpoints.d.ts.map +1 -0
- package/dist/services/navigation-category/index.d.ts +114 -0
- package/dist/services/navigation-category/index.d.ts.map +1 -0
- package/dist/services/navigation-category/module.d.ts +11 -0
- package/dist/services/navigation-category/module.d.ts.map +1 -0
- package/dist/services/navigation-category/navigation-category.service.d.ts +148 -0
- package/dist/services/navigation-category/navigation-category.service.d.ts.map +1 -0
- package/dist/services/navigation-category/types.d.ts +51 -0
- package/dist/services/navigation-category/types.d.ts.map +1 -0
- package/dist/services/offer-inventories/definitions.d.ts +73 -0
- package/dist/services/offer-inventories/definitions.d.ts.map +1 -0
- package/dist/services/offer-inventories/endpoints.d.ts +16 -0
- package/dist/services/offer-inventories/endpoints.d.ts.map +1 -0
- package/dist/services/offer-inventories/index.d.ts +120 -0
- package/dist/services/offer-inventories/index.d.ts.map +1 -0
- package/dist/services/offer-inventories/module.d.ts +11 -0
- package/dist/services/offer-inventories/module.d.ts.map +1 -0
- package/dist/services/offer-inventories/offer-inventories.service.d.ts +26 -0
- package/dist/services/offer-inventories/offer-inventories.service.d.ts.map +1 -0
- package/dist/services/offer-inventories/types.d.ts +85 -0
- package/dist/services/offer-inventories/types.d.ts.map +1 -0
- package/dist/services/offer-prices/__mocks__/offer-prices.mocks.d.ts +109 -0
- package/dist/services/offer-prices/__mocks__/offer-prices.mocks.d.ts.map +1 -0
- package/dist/services/offer-prices/definitions.d.ts +24 -0
- package/dist/services/offer-prices/definitions.d.ts.map +1 -0
- package/dist/services/offer-prices/endpoints.d.ts +12 -0
- package/dist/services/offer-prices/endpoints.d.ts.map +1 -0
- package/dist/services/offer-prices/index.d.ts +36 -0
- package/dist/services/offer-prices/index.d.ts.map +1 -0
- package/dist/services/offer-prices/module.d.ts +11 -0
- package/dist/services/offer-prices/module.d.ts.map +1 -0
- package/dist/services/offer-prices/offer-prices.service.d.ts +18 -0
- package/dist/services/offer-prices/offer-prices.service.d.ts.map +1 -0
- package/dist/services/offer-prices/types.d.ts +33 -0
- package/dist/services/offer-prices/types.d.ts.map +1 -0
- package/dist/services/operation/definitions.d.ts +280 -0
- package/dist/services/operation/definitions.d.ts.map +1 -0
- package/dist/services/operation/endpoints.d.ts +18 -0
- package/dist/services/operation/endpoints.d.ts.map +1 -0
- package/dist/services/operation/index.d.ts +520 -0
- package/dist/services/operation/index.d.ts.map +1 -0
- package/dist/services/operation/module.d.ts +11 -0
- package/dist/services/operation/module.d.ts.map +1 -0
- package/dist/services/operation/operation.service.d.ts +32 -0
- package/dist/services/operation/operation.service.d.ts.map +1 -0
- package/dist/services/operation/types.d.ts +174 -0
- package/dist/services/operation/types.d.ts.map +1 -0
- package/dist/services/payment/definitions.d.ts +79 -0
- package/dist/services/payment/definitions.d.ts.map +1 -0
- package/dist/services/payment/endpoints.d.ts +16 -0
- package/dist/services/payment/endpoints.d.ts.map +1 -0
- package/dist/services/payment/index.d.ts +150 -0
- package/dist/services/payment/index.d.ts.map +1 -0
- package/dist/services/payment/module.d.ts +11 -0
- package/dist/services/payment/module.d.ts.map +1 -0
- package/dist/services/payment/payment.service.d.ts +224 -0
- package/dist/services/payment/payment.service.d.ts.map +1 -0
- package/dist/services/payment/types.d.ts +93 -0
- package/dist/services/payment/types.d.ts.map +1 -0
- package/dist/services/product/definitions.d.ts +150 -0
- package/dist/services/product/definitions.d.ts.map +1 -0
- package/dist/services/product/endpoints.d.ts +40 -0
- package/dist/services/product/endpoints.d.ts.map +1 -0
- package/dist/services/product/index.d.ts +388 -0
- package/dist/services/product/index.d.ts.map +1 -0
- package/dist/services/product/module.d.ts +11 -0
- package/dist/services/product/module.d.ts.map +1 -0
- package/dist/services/product/product.service.d.ts +452 -0
- package/dist/services/product/product.service.d.ts.map +1 -0
- package/dist/services/product/types.d.ts +344 -0
- package/dist/services/product/types.d.ts.map +1 -0
- package/dist/services/product-variant/definitions.d.ts +172 -0
- package/dist/services/product-variant/definitions.d.ts.map +1 -0
- package/dist/services/product-variant/endpoints.d.ts +15 -0
- package/dist/services/product-variant/endpoints.d.ts.map +1 -0
- package/dist/services/product-variant/index.d.ts +123 -0
- package/dist/services/product-variant/index.d.ts.map +1 -0
- package/dist/services/product-variant/module.d.ts +11 -0
- package/dist/services/product-variant/module.d.ts.map +1 -0
- package/dist/services/product-variant/product-variant.service.d.ts +21 -0
- package/dist/services/product-variant/product-variant.service.d.ts.map +1 -0
- package/dist/services/product-variant/types.d.ts +73 -0
- package/dist/services/product-variant/types.d.ts.map +1 -0
- package/dist/services/quote/definitions.d.ts +102 -0
- package/dist/services/quote/definitions.d.ts.map +1 -0
- package/dist/services/quote/endpoints.d.ts +20 -0
- package/dist/services/quote/endpoints.d.ts.map +1 -0
- package/dist/services/quote/index.d.ts +378 -0
- package/dist/services/quote/index.d.ts.map +1 -0
- package/dist/services/quote/module.d.ts +11 -0
- package/dist/services/quote/module.d.ts.map +1 -0
- package/dist/services/quote/quote.service.d.ts +346 -0
- package/dist/services/quote/quote.service.d.ts.map +1 -0
- package/dist/services/quote/types.d.ts +160 -0
- package/dist/services/quote/types.d.ts.map +1 -0
- package/dist/services/supplier/__mocks__/supplier-mocks.d.ts +49 -0
- package/dist/services/supplier/__mocks__/supplier-mocks.d.ts.map +1 -0
- package/dist/services/supplier/definitions.d.ts +30 -0
- package/dist/services/supplier/definitions.d.ts.map +1 -0
- package/dist/services/supplier/endpoints.d.ts +14 -0
- package/dist/services/supplier/endpoints.d.ts.map +1 -0
- package/dist/services/supplier/index.d.ts +102 -0
- package/dist/services/supplier/index.d.ts.map +1 -0
- package/dist/services/supplier/module.d.ts +11 -0
- package/dist/services/supplier/module.d.ts.map +1 -0
- package/dist/services/supplier/supplier.service.d.ts +20 -0
- package/dist/services/supplier/supplier.service.d.ts.map +1 -0
- package/dist/services/supplier/types.d.ts +58 -0
- package/dist/services/supplier/types.d.ts.map +1 -0
- package/dist/services/types.d.ts +81 -0
- package/dist/services/types.d.ts.map +1 -0
- package/dist/settings/fetch-instance.d.ts +30 -0
- package/dist/settings/fetch-instance.d.ts.map +1 -0
- package/package.json +12 -10
- package/dist/djust-b2b-djust-front-sdk-3.0.0-beta.2.tgz +0 -0
|
@@ -0,0 +1,712 @@
|
|
|
1
|
+
import { CreateCommercialOrderCardRegistrationParameters, CreateCommercialOrderCardRegistrationResponse, CreateCommercialOrderParameters, CreateCommercialOrderResponse, CreateCommercialOrderV2Parameters, CreateCommercialOrderV2Response, UpdateCommercialOrderParameters, DeleteCommercialOrderLinesParameters, DeleteCommercialOrderLinesResponse, UpdateCommercialOrderLinesParameters, UpdateCommercialOrderLinesResponse, CreateCommercialOrderPreauthorizationParameters, CreateCommercialOrderPreauthorizationResponse, GetCommercialOrderParameters, GetCommercialOrdersV2Parameters, GetCommercialOrderPaymentPageUrlParameters, GetCommercialOrderResponse, GetCommercialOrdersParameters, GetCommercialOrdersResponse, GetCommercialOrdersV2Response, SetCommercialOrderStatusAsCreatedParameters, SetCommercialOrderStatusAsOnHoldParameters, SyncCommercialOrderResponse, UpdateCommercialOrderBillingInformationParameters, UpdateCommercialOrderShippingAddressParameters, UpdateCommercialOrderShippingInformationParameters, UpdateCommercialOrderShippingTypeParameters, GetOrderCommercialLinesParameters, GetOrderCommercialLinesResponse, PunchoutOciCommercialOrderParameters } from "./definitions";
|
|
2
|
+
/**
|
|
3
|
+
* COMMERCIAL ORDER ENDPOINT
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 🚚 Gets commercial orders.
|
|
7
|
+
*
|
|
8
|
+
* This function retrieves all commercial orders. The parameter locale is mandatory and validated
|
|
9
|
+
* before the request is executed.
|
|
10
|
+
*
|
|
11
|
+
* 🛠 **Endpoint**: `GET /v1/shop/commercial-orders [ORDER-560-v1]`
|
|
12
|
+
*
|
|
13
|
+
* | Parameter | Type | Required | Description |
|
|
14
|
+
* |------------------------|---------------------|----------|------------------------------------------|
|
|
15
|
+
* | `locale` | `string` | ✅ | The locale in which to return the commercial order. |
|
|
16
|
+
* | `nbPreviewLines` | `number` | ❌ | The number of lines to display in the commercial order. |
|
|
17
|
+
* | `page` | `number` | ❌ | The page number to retrieve. |
|
|
18
|
+
* | `size` | `number` | ❌ | The number of items per page. |
|
|
19
|
+
* | `sort` | `string[]` | ❌ | The sort to apply to the results. |
|
|
20
|
+
* | `connectedUserOnly` | `boolean` | ❌ | Filter to show only orders for the connected user. |
|
|
21
|
+
* | `customerAccountIds` | `string[]` | ❌ | Filter by customer account IDs. |
|
|
22
|
+
* | `sourceTypes` | `string[]` | ❌ | Filter by source types. |
|
|
23
|
+
* | `isValidated` | `boolean` | ❌ | Filter by validation status. |
|
|
24
|
+
*
|
|
25
|
+
* 📤 **Returns**:
|
|
26
|
+
* A `Promise` resolving to a single `GetCommercialOrdersResponse` object representing the page of commercial orders.
|
|
27
|
+
*
|
|
28
|
+
* 🛠 **Example usage**:
|
|
29
|
+
* ```ts
|
|
30
|
+
* const orders = await getCommercialOrders({
|
|
31
|
+
* locale: "fr",
|
|
32
|
+
* page: 0,
|
|
33
|
+
* size: 20,
|
|
34
|
+
* sort: ["createdAt,desc"],
|
|
35
|
+
* connectedUserOnly: true
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @param {GetCommercialOrdersParameters} params - The parameters for the request.
|
|
40
|
+
* @throws {Error} If `locale` is missing.
|
|
41
|
+
* @returns {Promise<GetCommercialOrdersResponse>} A promise resolving to the response containing page object.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getCommercialOrders({ locale, nbPreviewLines, page, size, sort, connectedUserOnly, customerAccountIds, sourceTypes, isValidated, }: GetCommercialOrdersParameters): Promise<GetCommercialOrdersResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* 🚚 Gets commercial orders V2.
|
|
46
|
+
*
|
|
47
|
+
* This function retrieves all commercial orders (Version 2). The parameter locale is mandatory and validated
|
|
48
|
+
* before the request is executed.
|
|
49
|
+
*
|
|
50
|
+
* 🛠 **Endpoint**: `GET /v2/shop/commercial-orders [ORDER-560-v2]`
|
|
51
|
+
*
|
|
52
|
+
* | Parameter | Type | Required | Description |
|
|
53
|
+
* |------------------------|---------------------|----------|------------------------------------------|
|
|
54
|
+
* | `page` | `number` | ❌ | The page number to retrieve. |
|
|
55
|
+
* | `size` | `number` | ❌ | The number of items per page. |
|
|
56
|
+
* | `sort` | `string[]` | ❌ | The sort to apply to the results. |
|
|
57
|
+
* | `locale` | `string` | ✅ | The locale in which to return the commercial order. |
|
|
58
|
+
* | `connectedUserOnly` | `boolean` | ❌ | Filter to show only orders for the connected user. |
|
|
59
|
+
* | `customerAccountIds` | `string[]` | ❌ | Filter by customer account IDs. |
|
|
60
|
+
* | `sourceTypes` | `string[]` | ❌ | Filter by source types. |
|
|
61
|
+
* | `sourceIds` | `string[]` | ❌ | Filter by source IDs. |
|
|
62
|
+
* | `isValidated` | `boolean` | ❌ | Filter by validation status. |
|
|
63
|
+
* | `nbPreviewLines` | `number` | ❌ | The number of lines to display in the commercial order. |
|
|
64
|
+
*
|
|
65
|
+
* 📤 **Returns**:
|
|
66
|
+
* A `Promise` resolving to a single `GetCommercialOrdersV2Response` object representing the page of commercial orders.
|
|
67
|
+
*
|
|
68
|
+
* 🛠 **Example usage**:
|
|
69
|
+
* ```ts
|
|
70
|
+
* const orders = await getCommercialOrdersV2({
|
|
71
|
+
* locale: "fr",
|
|
72
|
+
* page: 0,
|
|
73
|
+
* size: 20,
|
|
74
|
+
* sort: ["createdAt,desc"],
|
|
75
|
+
* connectedUserOnly: true
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @param {GetCommercialOrdersV2Parameters} params - The parameters for the request.
|
|
80
|
+
* @throws {Error} If `locale` is missing.
|
|
81
|
+
* @returns {Promise<GetCommercialOrdersV2Response>} A promise resolving to the response containing page object.
|
|
82
|
+
*/
|
|
83
|
+
export declare function getCommercialOrdersV2({ page, size, sort, locale, connectedUserOnly, customerAccountIds, sourceTypes, sourceIds, isValidated, nbPreviewLines, }: GetCommercialOrdersV2Parameters): Promise<GetCommercialOrdersV2Response>;
|
|
84
|
+
/**
|
|
85
|
+
* 🚚 Creates commercial orders.
|
|
86
|
+
*
|
|
87
|
+
* This function creates a commercial order. The parameters `locale`, `origin` and `originId` is mandatory and validated
|
|
88
|
+
* before the request is executed.
|
|
89
|
+
*
|
|
90
|
+
* 🛠 **Endpoint**: `POST /v1/shop/commercial-orders [ORDER-100]`
|
|
91
|
+
*
|
|
92
|
+
* | Parameter | Type | Required | Description |
|
|
93
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
94
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the logistic order. |
|
|
95
|
+
* | `customFields` | `CustomFieldValueRequest[]` | ❌ | The custom fields to add to the created commercial order. |
|
|
96
|
+
* | `locale` | `string` | ✅ | The locale in which to return the logistic order. |
|
|
97
|
+
* | `origin` | `OrderOrigin` | ✅ | The type of object from which the commercial order is created (e.g., `CART`, `SUPPLIER_QUOTE`). |
|
|
98
|
+
* | `originId` | `string` | ✅ | The ID of the object from which the commercial order is created. |
|
|
99
|
+
* | `paymentInfo` | `string` | ❌ | The payment information for the order |
|
|
100
|
+
*
|
|
101
|
+
* 📤 **Returns**:
|
|
102
|
+
* A `Promise` resolving to a single `CreateCommercialOrderResponse` object representing the created commercial orders.
|
|
103
|
+
*
|
|
104
|
+
* 🛠 **Example usage**:
|
|
105
|
+
* ```ts
|
|
106
|
+
* const orders = await createCommercialOrder({
|
|
107
|
+
* locale: "fr",
|
|
108
|
+
* origin: "CART",
|
|
109
|
+
* originId: "cart1"
|
|
110
|
+
* });
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* @param {CreateCommercialOrderParameters} params - The parameters for the request.
|
|
114
|
+
* @throws {Error} If `locale` or òrigin`or òriginId` is missing.
|
|
115
|
+
* @returns {Promise<CreateCommercialOrderResponse>} A promise resolving to the response containing the commercial orders.
|
|
116
|
+
*/
|
|
117
|
+
export declare function createCommercialOrder({ nbPreviewLines, channel, customFields, locale, origin, originId, paymentInfo, }: CreateCommercialOrderParameters): Promise<CreateCommercialOrderResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* 🚚 Creates commercial orders V2.
|
|
120
|
+
*
|
|
121
|
+
* This function creates a commercial order (Version 2).
|
|
122
|
+
*
|
|
123
|
+
* 🛠 **Endpoint**: `POST /v2/shop/commercial-orders [ORDER-108]`
|
|
124
|
+
*
|
|
125
|
+
* | Parameter | Type | Required | Description |
|
|
126
|
+
* |----------------------|--------------------------------------|-----------------------------------------------------------------------|
|
|
127
|
+
* | `customFieldIdType` | `IdType` | ❌ | The custom field id type to use. |
|
|
128
|
+
* | `customFields` | `CustomFieldValueRequest[]` | ❌ | The custom fields to add to the created commercial order. |
|
|
129
|
+
* | `isFull` | `boolean` | ❌ | Whether the order is full or not. |
|
|
130
|
+
* | `sourceId` | `string` | ❌ | The source ID for the order. |
|
|
131
|
+
* | `sourceType` | `string` | ❌ | The type of source (e.g., "OPERATION"). |
|
|
132
|
+
*
|
|
133
|
+
* 📤 **Returns**:
|
|
134
|
+
* A `Promise` resolving to a single `CreateCommercialOrderV2Response` object representing the created commercial orders [ORDER-108].
|
|
135
|
+
*
|
|
136
|
+
* 🛠 **Example usage**:
|
|
137
|
+
* ```ts
|
|
138
|
+
* const orders = await createCommercialOrderV2({
|
|
139
|
+
* customFieldIdType: "EXTERNAL_ID",
|
|
140
|
+
* customFields: [
|
|
141
|
+
* {
|
|
142
|
+
* "customFieldId": "string",
|
|
143
|
+
* "customFieldValue": "string"
|
|
144
|
+
* }
|
|
145
|
+
* ],
|
|
146
|
+
* isFull: true,
|
|
147
|
+
* sourceId: "OPE-UK-SUMMER-2025",
|
|
148
|
+
* sourceType: "OPERATION"
|
|
149
|
+
* });
|
|
150
|
+
* ```
|
|
151
|
+
*
|
|
152
|
+
* @param {CreateCommercialOrderV2Parameters} params - The body of the request.
|
|
153
|
+
* @returns {Promise<CreateCommercialOrderV2Response>} A promise resolving to the response containing the created commercial orders.
|
|
154
|
+
*/
|
|
155
|
+
export declare function createCommercialOrderV2({ customFieldIdType, customFields, isFull, sourceId, sourceType, }: CreateCommercialOrderV2Parameters): Promise<CreateCommercialOrderV2Response>;
|
|
156
|
+
/**
|
|
157
|
+
* 🚚 Gets a specific commercial order.
|
|
158
|
+
*
|
|
159
|
+
* This function retrieves a specific commercial order, identified by
|
|
160
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
161
|
+
* before the request is executed.
|
|
162
|
+
*
|
|
163
|
+
* 🛠 **Endpoint**: `GET /v1/shop/commercial-orders/${orderId} [ORDER-500]`
|
|
164
|
+
*
|
|
165
|
+
* | Parameter | Type | Required | Description |
|
|
166
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
167
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order you want to retrieve. |
|
|
168
|
+
* | `locale` | `string` | ✅ | The locale in which to return the commercial order. |
|
|
169
|
+
* | `idType` | `OrderIdType` | ❌ | The type of order ID (e.g., `BUSINESS_ID`, `CART_ID`, `REFERENCE`). |
|
|
170
|
+
* | `nbPreviewLines` | `integer` | ❌ | The number of lines to display in the commercial order. |
|
|
171
|
+
*
|
|
172
|
+
* 📤 **Returns**:
|
|
173
|
+
* A `Promise` resolving to a single `GetCommercialOrderResponse` object representing the commercial order.
|
|
174
|
+
*
|
|
175
|
+
* 🛠 **Example usage**:
|
|
176
|
+
* ```ts
|
|
177
|
+
* const order = await getCommercialOrder({
|
|
178
|
+
* orderId: "commercialOrder1",
|
|
179
|
+
* locale: "fr",
|
|
180
|
+
* });
|
|
181
|
+
* ```
|
|
182
|
+
*
|
|
183
|
+
* @param {GetCommercialOrderParameters} params - The parameters for the request.
|
|
184
|
+
* @throws {Error} If `orderId` or `locale` is missing.
|
|
185
|
+
* @returns {Promise<GetCommercialOrderResponse>} A promise resolving to the response containing the commercial order.
|
|
186
|
+
*/
|
|
187
|
+
export declare function getCommercialOrder({ orderId, idType, locale, nbPreviewLines, }: GetCommercialOrderParameters): Promise<GetCommercialOrderResponse>;
|
|
188
|
+
/**
|
|
189
|
+
* 🚚 Update commercial orders.
|
|
190
|
+
*
|
|
191
|
+
* This function update a commercial order.
|
|
192
|
+
*
|
|
193
|
+
* 🛠 **Endpoint**: `POST /v2/shop/commercial-orders/${commercialOrderId} [ORDER-222]`
|
|
194
|
+
*
|
|
195
|
+
* | Parameter | Type | Required | Description |
|
|
196
|
+
* |----------------------|--------------------------------------|----------------------------------------------------------------------|
|
|
197
|
+
* | `commercialOrderId` | `string` | ✅ | The commercial order Id. |
|
|
198
|
+
* | `customFieldIdType` | `IdType` | ❌ | The custom field id type to use. |
|
|
199
|
+
* | `customFields` | `CustomFieldValueRequest[]` | ❌ | The custom fields to add to the created commercial order. |
|
|
200
|
+
*
|
|
201
|
+
* 📤 **Returns**:
|
|
202
|
+
* A `Promise<void>` when the commercialOrder is successfully updated. No additional data is returned.
|
|
203
|
+
*
|
|
204
|
+
* 🛠 **Example usage**:
|
|
205
|
+
* ```ts
|
|
206
|
+
* const orders = await updateCommercialOrder({
|
|
207
|
+
* customFieldIdType: "EXTERNAL_ID",
|
|
208
|
+
* customFields: [
|
|
209
|
+
* {
|
|
210
|
+
* "customFieldId": "string",
|
|
211
|
+
* "customFieldValue": "string"
|
|
212
|
+
* }
|
|
213
|
+
* ],
|
|
214
|
+
* });
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* @param {UpdateCommercialOrderParameters} params - The params of the request.
|
|
218
|
+
* @returns {Promise<void>}
|
|
219
|
+
*/
|
|
220
|
+
export declare function updateCommercialOrder({ commercialOrderId, customFieldIdType, customFields, }: UpdateCommercialOrderParameters): Promise<void>;
|
|
221
|
+
/**
|
|
222
|
+
* 🚚 Creates a specific commercial order's card registration.
|
|
223
|
+
*
|
|
224
|
+
* This function registered a card for a specific commercial order, identified by
|
|
225
|
+
* the `orderId`. Both parameters are mandatory and validated
|
|
226
|
+
* before the request is executed.
|
|
227
|
+
*
|
|
228
|
+
* 🛠 **Endpoint**: `POST /v1/shop/commercial-orders/${orderId}/card-registration [ORDER-104]`
|
|
229
|
+
*
|
|
230
|
+
* | Parameter | Type | Required | Description |
|
|
231
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
232
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order for which you want to register a card. |
|
|
233
|
+
* | `paymentProvider `| `paymentProvider` | ✅ | Specifies whether the card payments uses (`MANGOPAY`), (`THUNES`) or (`LEMONWAY`). |
|
|
234
|
+
* | `currency` | `Currency` | ✅ | The currency of the registered card. |
|
|
235
|
+
*
|
|
236
|
+
* 📤 **Returns**:
|
|
237
|
+
* A `Promise` resolving to a single `CreateCommercialOrderCardRegistrationResponse` object representing the card registered.
|
|
238
|
+
*
|
|
239
|
+
* 🛠 **Example usage**:
|
|
240
|
+
* ```ts
|
|
241
|
+
* const card = await createCommercialOrderCardRegistration({
|
|
242
|
+
* orderId: "commercialOrder1",
|
|
243
|
+
* paymentProvider: "MANGOPAY",
|
|
244
|
+
* currency: "EUR",
|
|
245
|
+
* });
|
|
246
|
+
* ```
|
|
247
|
+
*
|
|
248
|
+
* @param {CreateCommercialOrderCardRegistrationParameters} params - The parameters for the request.
|
|
249
|
+
* @throws {Error} If `orderId` or `billingAddressId` is missing.
|
|
250
|
+
* @returns {Promise<CreateCommercialOrderCardRegistrationResponse>} A promise resolving to a response containing the card registered.
|
|
251
|
+
*/
|
|
252
|
+
export declare function createCommercialOrderCardRegistration({ orderId, paymentProvider, currency, }: CreateCommercialOrderCardRegistrationParameters): Promise<CreateCommercialOrderCardRegistrationResponse>;
|
|
253
|
+
/**
|
|
254
|
+
* 🚚 Updates a specific commercial order's billing information.
|
|
255
|
+
*
|
|
256
|
+
* This function updates the billing information of a specific commercial order, identified by
|
|
257
|
+
* the `orderId` and the `billingAddressId`. Both parameters are mandatory and validated
|
|
258
|
+
* before the request is executed.
|
|
259
|
+
*
|
|
260
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/commercial-orders/${orderId}/billing-information [ORDER-213]`
|
|
261
|
+
*
|
|
262
|
+
* | Parameter | Type | Required | Description |
|
|
263
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
264
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order of which you want to update the address. |
|
|
265
|
+
* | `billingAddressId`| `string` | ✅ | The ID of the billing address to add. |
|
|
266
|
+
*
|
|
267
|
+
* 📤 **Returns**:
|
|
268
|
+
* A `Promise` resolving when the billing address of the commercial order is updated.
|
|
269
|
+
*
|
|
270
|
+
* 🛠 **Example usage**:
|
|
271
|
+
* ```ts
|
|
272
|
+
* await updateCommercialOrderBillingInformation({
|
|
273
|
+
* orderId: "commercialOrder1",
|
|
274
|
+
* billingAddressId: "billingAddress1",
|
|
275
|
+
* });
|
|
276
|
+
* ```
|
|
277
|
+
*
|
|
278
|
+
* @param {UpdateCommercialOrderBillingInformationParameters} params - The parameters for the request.
|
|
279
|
+
* @throws {Error} If `orderId` or `billingAddressId` is missing.
|
|
280
|
+
* @returns {Promise<void>} A promise resolving when shipping information of the commercial order is updated.
|
|
281
|
+
*/
|
|
282
|
+
export declare function updateCommercialOrderBillingInformation({ orderId, billingAddressId, }: UpdateCommercialOrderBillingInformationParameters): Promise<void>;
|
|
283
|
+
/**
|
|
284
|
+
* 🚚 Sets commercial order status as CREATED.
|
|
285
|
+
*
|
|
286
|
+
* This function changes a specific order status to CREATED, identified by
|
|
287
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
288
|
+
* before the request is executed.
|
|
289
|
+
*
|
|
290
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/commercial-orders/${orderId}/created [ORDER-212]`
|
|
291
|
+
*
|
|
292
|
+
* | Parameter | Type | Required | Description |
|
|
293
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
294
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order of which you want to set the status to CREATED. |
|
|
295
|
+
* | `paymentInfo` | `string` | ❌ | The payment information for the order |
|
|
296
|
+
*
|
|
297
|
+
* 📤 **Returns**:
|
|
298
|
+
* A `Promise` resolving when the commerical order is set to CREATED.
|
|
299
|
+
*
|
|
300
|
+
* 🛠 **Example usage**:
|
|
301
|
+
* ```ts
|
|
302
|
+
* await setCommercialOrderStatusAsCreated({
|
|
303
|
+
* orderId: "commercialOrder1",
|
|
304
|
+
* });
|
|
305
|
+
* ```
|
|
306
|
+
*
|
|
307
|
+
* ```json
|
|
308
|
+
* {
|
|
309
|
+
* "message": "Commercial order successfully set to created"
|
|
310
|
+
* }
|
|
311
|
+
* ```
|
|
312
|
+
*
|
|
313
|
+
* @param {SetCommercialOrderStatusAsCreatedParameters} params - The parameters for the request.
|
|
314
|
+
* @throws {Error} If `orderId` is missing.
|
|
315
|
+
* @returns {Promise<void>} A promise resolving when the commercial order is set to CREATED.
|
|
316
|
+
*/
|
|
317
|
+
export declare function setCommercialOrderStatusAsCreated({ orderId, paymentInfo, }: SetCommercialOrderStatusAsCreatedParameters): Promise<void>;
|
|
318
|
+
/**
|
|
319
|
+
* 🚚 Sets commercial order status as ON HOLD.
|
|
320
|
+
*
|
|
321
|
+
* This function changes a specific order status to ON HOLD, identified by
|
|
322
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
323
|
+
* before the request is executed.
|
|
324
|
+
*
|
|
325
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/commercial-orders/${orderId}/hold [ORDER-207]`
|
|
326
|
+
*
|
|
327
|
+
* | Parameter | Type | Required | Description |
|
|
328
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
329
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order of which you want to set the status to ON HOLD. |
|
|
330
|
+
* | `paymentInfo` | `string` | ❌ | The payment information for the order |
|
|
331
|
+
*
|
|
332
|
+
* 📤 **Returns**:
|
|
333
|
+
* A `Promise` resolving when the commercial order is set to ON HOLD.
|
|
334
|
+
*
|
|
335
|
+
* 🛠 **Example usage**:
|
|
336
|
+
* ```ts
|
|
337
|
+
* await setCommercialOrderStatusAsOnHold({
|
|
338
|
+
* orderId: "commercialOrder1",
|
|
339
|
+
* });
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* ```json
|
|
343
|
+
* {
|
|
344
|
+
* "message": "Commercial order successfully set to on-hold"
|
|
345
|
+
* }
|
|
346
|
+
* ```
|
|
347
|
+
*
|
|
348
|
+
* @param {SetCommercialOrderStatusAsOnHoldParameters} params - The parameters for the request.
|
|
349
|
+
* @throws {Error} If `orderId` is missing.
|
|
350
|
+
* @returns {Promise<void>} A promise resolving when the commercial order is set to ON HOLD.
|
|
351
|
+
*/
|
|
352
|
+
export declare function setCommercialOrderStatusAsOnHold({ orderId, }: SetCommercialOrderStatusAsOnHoldParameters): Promise<void>;
|
|
353
|
+
/**
|
|
354
|
+
* 🚚 Sync commercial order (ORDER-223).
|
|
355
|
+
*
|
|
356
|
+
* Synchronises a commercial order so it remains consistent with the current
|
|
357
|
+
* pricing, availability and configuration rules applied to its order lines.
|
|
358
|
+
* Supports RTP (Real Time Pricing) and standard mode depending on tenant config.
|
|
359
|
+
*
|
|
360
|
+
* 🛠 Endpoint: `PUT /v1/shop/commercial-orders/{orderCommercialReference}/sync`
|
|
361
|
+
*
|
|
362
|
+
* | Parameter | Type | Required | Description |
|
|
363
|
+
* |-----------|----------|----------|-----------------------------------------------------------------------------|
|
|
364
|
+
* | `orderId` | `string` | ✅ | Commercial order ID (REFERENCE only; business/external IDs not supported) |
|
|
365
|
+
*
|
|
366
|
+
* 📤 Returns:
|
|
367
|
+
* Array of synchronisation warnings (`id`, `code`, `blocked`, `detail`). Empty array if no warning.
|
|
368
|
+
*
|
|
369
|
+
* 🛠 Example usage:
|
|
370
|
+
* ```ts
|
|
371
|
+
* const warnings = await syncCommercialOrder("CO-2026-000123");
|
|
372
|
+
* if (warnings.some((w) => w.blocked)) { ... }
|
|
373
|
+
* ```
|
|
374
|
+
*
|
|
375
|
+
* @param {string} orderId - Commercial order reference to synchronize
|
|
376
|
+
* @returns {Promise<SyncCommercialOrderResponse>} Synchronisation warnings; empty array if none
|
|
377
|
+
*/
|
|
378
|
+
export declare function syncCommercialOrder(orderId: string): Promise<SyncCommercialOrderResponse>;
|
|
379
|
+
/**
|
|
380
|
+
* 🚚 Gets payment page url for a specific order.
|
|
381
|
+
*
|
|
382
|
+
* This function retrieves the url of a payment page for a commercial order, identified by
|
|
383
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
384
|
+
* before the request is executed.
|
|
385
|
+
*
|
|
386
|
+
* 🛠 **Endpoint**: `GET /v1/shop/commercial-orders/${orderId}/payment-page [ORDER-507]`
|
|
387
|
+
*
|
|
388
|
+
* | Parameter | Type | Required | Description |
|
|
389
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
390
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order associated with the payment page. |
|
|
391
|
+
* | `paymentOption` | `PaymentOption` | ✅ | Specifies whether the payment is done with (`BANK_WIRE`), (`BANK_WIRE_ON_DUE_DATE`), (`CREDIT_CARD`), (`DIRECT_PAYMENT`), (`BANK_WIRE_ON_ACCEPTANCE`). |
|
|
392
|
+
* | `paymentProvider` | `PaymentProvider` | ❌ | Specifies whether the payment uses (`MANGOPAY`), (`THUNES`) or (`LEMONWAY`). |
|
|
393
|
+
*
|
|
394
|
+
* 📤 **Returns**:
|
|
395
|
+
* A `Promise` resolving to a string containig the payment page url.
|
|
396
|
+
*
|
|
397
|
+
* 🛠 **Example usage**:
|
|
398
|
+
* ```ts
|
|
399
|
+
* await getCommercialOrderPaymentPageUrl({
|
|
400
|
+
* orderId: "commercialOrder1",
|
|
401
|
+
* paymentOption: "BANK_WIRE",
|
|
402
|
+
* });
|
|
403
|
+
* ```
|
|
404
|
+
*
|
|
405
|
+
* @param {GetCommercialOrderPaymentPageUrlParameters} params - The parameters for the request.
|
|
406
|
+
* @throws {Error} If `orderId` is missing.
|
|
407
|
+
* @returns {Promise<string>} A promise resolving to a string containig the payment page url.
|
|
408
|
+
*/
|
|
409
|
+
export declare function getCommercialOrderPaymentPageUrl({ orderId, paymentOption, paymentProvider, }: GetCommercialOrderPaymentPageUrlParameters): Promise<string>;
|
|
410
|
+
/**
|
|
411
|
+
* 🚚 Creates a specific commercial order's card registration.
|
|
412
|
+
*
|
|
413
|
+
* This function registered a card for a specific commercial order, identified by
|
|
414
|
+
* the `orderId`. Both parameters are mandatory and validated
|
|
415
|
+
* before the request is executed.
|
|
416
|
+
*
|
|
417
|
+
* 🛠 **Endpoint**: `POST /v1/shop/commercial-orders/${orderId}/preauthorization [ORDER-105]`
|
|
418
|
+
*
|
|
419
|
+
* | Parameter | Type | Required | Description |
|
|
420
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
421
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order for which you want to register a card. |
|
|
422
|
+
* | `paymentProvider` | `paymentProvider` | ✅ | Specifies whether the card payments uses (`MANGOPAY`), (`THUNES`) or (`LEMONWAY`). |
|
|
423
|
+
* | `authorId` | `string` | ❌ | The ID of the author of the preauthorization. |
|
|
424
|
+
* | `browserInfo` | `browserInfo` | ❌ | The information of the browser used to make the preauthorization. |
|
|
425
|
+
* | `ipAddress` | `string` | ❌ | The IP Address of the machine used to make the preauthorization. |
|
|
426
|
+
* | `paymentCardInfo` | `paymentCardInfo` | ✅ | The information of the card used to make the preauthorization. |
|
|
427
|
+
*
|
|
428
|
+
* 📤 **Returns**:
|
|
429
|
+
* A `Promise` resolving to a single `CreateCommercialOrderPreauthorizationResponse` object representing the preauthorization.
|
|
430
|
+
*
|
|
431
|
+
* 🛠 **Example usage**:
|
|
432
|
+
* ```ts
|
|
433
|
+
* const preauthorization = await createCommercialOrderPreauthorization({
|
|
434
|
+
* orderId: "commercialOrder1",
|
|
435
|
+
* paymentProvider: "MANGOPAY",
|
|
436
|
+
* paymentCardInfo: {
|
|
437
|
+
"amount": 0,
|
|
438
|
+
"cardId": "card1",
|
|
439
|
+
"currency": "EUR"
|
|
440
|
+
}
|
|
441
|
+
* });
|
|
442
|
+
* ```
|
|
443
|
+
*
|
|
444
|
+
* @param {CreateCommercialOrderPreauthorizationParameters} params - The parameters for the request.
|
|
445
|
+
* @throws {Error} If `orderId`, `paymentProvider` or `paymentCardInfo` is missing.
|
|
446
|
+
* @returns {Promise<CreateCommercialOrderPreauthorizationResponse>} A promise resolving to a response containing the preauthorization.
|
|
447
|
+
*/
|
|
448
|
+
export declare function createCommercialOrderPreauthorization({ orderId, paymentProvider, authorId, browserInfo, ipAddress, paymentCardInfo, }: CreateCommercialOrderPreauthorizationParameters): Promise<CreateCommercialOrderPreauthorizationResponse>;
|
|
449
|
+
/**
|
|
450
|
+
* 🚚 Updates a specific commercial order's shipping address.
|
|
451
|
+
*
|
|
452
|
+
* This function updates the shipping address of a specific commercial order, identified by
|
|
453
|
+
* the `orderId` and the `shippingAddressId`. Both parameters are mandatory and validated
|
|
454
|
+
* before the request is executed.
|
|
455
|
+
*
|
|
456
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/commercial-orders/${orderId}/shipping-address [ORDER-202]`
|
|
457
|
+
*
|
|
458
|
+
* | Parameter | Type | Required | Description |
|
|
459
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
460
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order of which you want to update the address. |
|
|
461
|
+
* | `shippingAddressId`| `string` | ✅ | The ID of the shipping address to update. |
|
|
462
|
+
*
|
|
463
|
+
* 📤 **Returns**:
|
|
464
|
+
* A `Promise` resolving when the shipping address of the commercial order is updated.
|
|
465
|
+
*
|
|
466
|
+
* 🛠 **Example usage**:
|
|
467
|
+
* ```ts
|
|
468
|
+
* await updateCommercialOrderShippingAddress({
|
|
469
|
+
* orderId: "commercialOrder1",
|
|
470
|
+
* shippingAddressId: "shippingAddress1",
|
|
471
|
+
* });
|
|
472
|
+
* ```
|
|
473
|
+
*
|
|
474
|
+
* @param {UpdateCommercialOrderShippingAddressParameters} params - The parameters for the request.
|
|
475
|
+
* @throws {Error} If `orderId` or `shippingAddressId` is missing.
|
|
476
|
+
* @returns {Promise<void>} A promise resolving when shipping address of the commercial order is updated.
|
|
477
|
+
*/
|
|
478
|
+
export declare function updateCommercialOrderShippingAddress({ orderId, shippingAddressId, }: UpdateCommercialOrderShippingAddressParameters): Promise<void>;
|
|
479
|
+
/**
|
|
480
|
+
* 🚚 Updates a specific commercial order's shipping information.
|
|
481
|
+
*
|
|
482
|
+
* This function updates the shipping information of a specific commercial order, identified by
|
|
483
|
+
* the `orderId` and the `shippingAddressId`. Both parameters are mandatory and validated
|
|
484
|
+
* before the request is executed.
|
|
485
|
+
*
|
|
486
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/commercial-orders/${orderId}/shipping-information [ORDER-215]`
|
|
487
|
+
*
|
|
488
|
+
* | Parameter | Type | Required | Description |
|
|
489
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
490
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order of which you want to update the address. |
|
|
491
|
+
* | `shippingAddressId`| `string` | ✅ | The ID of the shipping address to update. |
|
|
492
|
+
* | `shippingType `| `string` | ✅ | The shipping type to set to the commercial order. |
|
|
493
|
+
*
|
|
494
|
+
* 📤 **Returns**:
|
|
495
|
+
* A `Promise` resolving when the shipping address of the commercial order is updated.
|
|
496
|
+
*
|
|
497
|
+
* 🛠 **Example usage**:
|
|
498
|
+
* ```ts
|
|
499
|
+
* await updateCommercialOrderShippingInformation({
|
|
500
|
+
* orderId: "commercialOrder1",
|
|
501
|
+
* shippingAddressId: "shippingAddress1",
|
|
502
|
+
* });
|
|
503
|
+
* ```
|
|
504
|
+
*
|
|
505
|
+
* @param {UpdateCommercialOrderShippingInformationParameters} params - The parameters for the request.
|
|
506
|
+
* @throws {Error} If `orderId` or `shippingAddressId` is missing.
|
|
507
|
+
* @returns {Promise<void>} A promise resolving when shipping information of the commercial order is updated.
|
|
508
|
+
*/
|
|
509
|
+
export declare function updateCommercialOrderShippingInformation({ orderId, shippingAddressId, shippingType, }: UpdateCommercialOrderShippingInformationParameters): Promise<void>;
|
|
510
|
+
/**
|
|
511
|
+
* 🚚 Updates a specific commercial order's shipping type.
|
|
512
|
+
*
|
|
513
|
+
* This function updates the shipping type of a specific commercial order, identified by
|
|
514
|
+
* the `orderId`. This parameter is mandatory and validated
|
|
515
|
+
* before the request is executed.
|
|
516
|
+
*
|
|
517
|
+
* 🛠 **Endpoint**: `PUT /v1/shop/commercial-orders/${orderId}/shipping-information [ORDER-215]`
|
|
518
|
+
*
|
|
519
|
+
* | Parameter | Type | Required | Description |
|
|
520
|
+
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
521
|
+
* | `orderId` | `string` | ✅ | The ID of the commercial order of which you want to update the address. |
|
|
522
|
+
* | `shippingType `| `string` | ✅ | The shipping type to set to the commercial order. |
|
|
523
|
+
*
|
|
524
|
+
* 📤 **Returns**:
|
|
525
|
+
* A `Promise` resolving when the shipping type of the commercial order is updated.
|
|
526
|
+
*
|
|
527
|
+
* 🛠 **Example usage**:
|
|
528
|
+
* ```ts
|
|
529
|
+
* await updateCommercialOrderShippingType({
|
|
530
|
+
* orderId: "commercialOrder1",
|
|
531
|
+
* shippingAddressId: "shippingAddress1",
|
|
532
|
+
* });
|
|
533
|
+
* ```
|
|
534
|
+
*
|
|
535
|
+
* @param {UpdateCommercialOrderShippingTypeParameters} params - The parameters for the request.
|
|
536
|
+
* @throws {Error} If `orderId` or `shippingType` is missing.
|
|
537
|
+
* @returns {Promise<void>} A promise resolving when shipping type of the commercial order is updated.
|
|
538
|
+
*/
|
|
539
|
+
export declare function updateCommercialOrderShippingType({ orderId, shippingType, }: UpdateCommercialOrderShippingTypeParameters): Promise<void>;
|
|
540
|
+
/**
|
|
541
|
+
* ❌ Deletes a specific commercial order.
|
|
542
|
+
*
|
|
543
|
+
* This function deletes a commercial order identified by the `commercialOrderId`.
|
|
544
|
+
* The `commercialOrderId` parameter is required and validated before the request is executed.
|
|
545
|
+
*
|
|
546
|
+
* 🛠 **Endpoint**: `DELETE /v2/shop/commercial-orders/${commercialOrderId}` [ORDER-300]
|
|
547
|
+
*
|
|
548
|
+
* | Parameter | Type | Required | Description |
|
|
549
|
+
* |----------------------|--------- |----------|-----------------------------------------------|
|
|
550
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order to be deleted. |
|
|
551
|
+
*
|
|
552
|
+
* 📤 **Returns**:
|
|
553
|
+
* A `Promise` resolving with an empty response (`204 No Content`) when the commercial order is successfully deleted.
|
|
554
|
+
*
|
|
555
|
+
* 🛠 **Example usage**:
|
|
556
|
+
* ```ts
|
|
557
|
+
* await deleteCommercialOrder("commercialOrder123");
|
|
558
|
+
* ```
|
|
559
|
+
*
|
|
560
|
+
* @param {string} commercialOrderId - The ID of the commercial order to be deleted.
|
|
561
|
+
* @throws {Error} If `commercialOrderId` is missing.
|
|
562
|
+
* @returns {Promise<void>} A promise resolving when the commercial order is successfully deleted.
|
|
563
|
+
*/
|
|
564
|
+
export declare function deleteCommercialOrder(commercialOrderId: string): Promise<void>;
|
|
565
|
+
/**
|
|
566
|
+
* 🚚 Gets commercial order lines.
|
|
567
|
+
*
|
|
568
|
+
* This function retrieves the lines of a commercial order identified by the `commercialOrderId`.
|
|
569
|
+
* The `commercialOrderId` parameter is mandatory and validated before the request is executed.
|
|
570
|
+
*
|
|
571
|
+
* 🛠 **Endpoint**: `GET /v1/shop/commercial-orders/${commercialOrderId}/lines` [ORDER-561]
|
|
572
|
+
*
|
|
573
|
+
* | Parameter | Type | Required | Description |
|
|
574
|
+
* |---------------------|--------------------|-----------|----------------------------------------------------------------|
|
|
575
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order whose lines are to be retrieved |
|
|
576
|
+
* | `page` | `number` | ❌ | The page number to retrieve |
|
|
577
|
+
* | `size` | `number` | ❌ | The number of items per page |
|
|
578
|
+
* | `sort` | `string` | ❌ | The sort to apply to the results |
|
|
579
|
+
* | `supplierIds` | `string[]` | ❌ | Filter by supplier IDs |
|
|
580
|
+
* | `productVariantIds` | `string[]` | ❌ | Filter by product variant IDs |
|
|
581
|
+
* | `offerPriceIds` | `string[]` | ❌ | Filter by offer price IDs |
|
|
582
|
+
* | `idType` | `string` | ❌ | The ID type to use |
|
|
583
|
+
* | `locale` | `string` | ❌ | The locale for the response data |
|
|
584
|
+
*
|
|
585
|
+
* 📤 **Returns**:
|
|
586
|
+
* A `Promise` resolving to a `GetOrderCommercialLinesResponse` object containing the commercial order lines.
|
|
587
|
+
*
|
|
588
|
+
* 🛠 **Example usage**:
|
|
589
|
+
* ```ts
|
|
590
|
+
* const response = await getCommercialOrderLines({
|
|
591
|
+
* commercialOrderId: "commercialOrder123",
|
|
592
|
+
* page: 0,
|
|
593
|
+
* size: 20,
|
|
594
|
+
* sort: "createdAt,desc",
|
|
595
|
+
* locale: "fr"
|
|
596
|
+
* });
|
|
597
|
+
* ```
|
|
598
|
+
*
|
|
599
|
+
* @param {GetOrderCommercialLinesParameters} params - The parameters for the request
|
|
600
|
+
* @throws {Error} If `commercialOrderId` is missing
|
|
601
|
+
* @returns {Promise<GetOrderCommercialLinesResponse>} A promise resolving to the response containing the commercial order lines
|
|
602
|
+
*/
|
|
603
|
+
export declare function getCommercialOrderLines({ commercialOrderId, page, size, sort, supplierIds, productVariantIds, offerPriceIds, idType, locale, }: GetOrderCommercialLinesParameters): Promise<GetOrderCommercialLinesResponse>;
|
|
604
|
+
/**
|
|
605
|
+
* 🚚 Update specific commercial order lines.
|
|
606
|
+
*
|
|
607
|
+
* This function update commercial order lines identified by the `commercialOrderId`.
|
|
608
|
+
* This `commercialOrderId` parameter is required and validated before the request is executed.
|
|
609
|
+
*
|
|
610
|
+
* 🛠 **Endpoint**: `PUT /v2/shop/commercial-orders/${commercialOrderId}/lines` [ORDER-150]
|
|
611
|
+
*
|
|
612
|
+
* | Parameter | Type | Required | Description |
|
|
613
|
+
* |------------------------------------|--------------------------------------|-----------------|----------------------------------------------------------------|
|
|
614
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order whose lines are to be deleted |
|
|
615
|
+
* | `customFieldIdType` | `IdType` | ❌ | The custom field id type to use. |
|
|
616
|
+
* | `lineIdType` | `string` | ❌ | The line id type to use. |
|
|
617
|
+
* | `lineType` | `string` | ❌ | The line type to use. |
|
|
618
|
+
* | `updateOrderCommercialLines` | `OrderLogisticLineUpdate[]` | ❌ | Attributes to update. Can be empty object. |
|
|
619
|
+
* | `metadata` | `{ [key: string]: any }` | ❌ | Metadata to update. Can be empty object. |
|
|
620
|
+
*
|
|
621
|
+
* 📤 **Returns**:
|
|
622
|
+
* A `Promise` resolving when the commercial order lines are successfully updated.
|
|
623
|
+
*
|
|
624
|
+
* 🛠 **Example usage**:
|
|
625
|
+
* ```ts
|
|
626
|
+
* const response = await updateCommercialOrderLines("commercialOrder123", {
|
|
627
|
+
* customFieldType: "DJUST_ID",
|
|
628
|
+
* lineIdType: "string",
|
|
629
|
+
* lineType: "string",
|
|
630
|
+
* updateOrderCommercialLines: [
|
|
631
|
+
* {
|
|
632
|
+
* customFields: [
|
|
633
|
+
* {
|
|
634
|
+
* customFieldId: "string",
|
|
635
|
+
* value: "string"
|
|
636
|
+
* }
|
|
637
|
+
* ],
|
|
638
|
+
* id: "string",
|
|
639
|
+
* quantity: 0,
|
|
640
|
+
* updateAction: "ADD_QUANTITY"
|
|
641
|
+
* }
|
|
642
|
+
* ],
|
|
643
|
+
* metadata: {
|
|
644
|
+
* "key": "value"
|
|
645
|
+
* }
|
|
646
|
+
* });
|
|
647
|
+
* ```
|
|
648
|
+
*
|
|
649
|
+
* @param {UpdateCommercialOrderLinesParameters} params - The parameters for the request.
|
|
650
|
+
* @throws {Error} If `commercialOrderId` is missing.
|
|
651
|
+
* @returns {Promise<UpdateCommercialOrderLinesResponse>} A promise resolving when the commercial order lines are successfully updated.
|
|
652
|
+
*/
|
|
653
|
+
export declare function updateCommercialOrderLines({ commercialOrderId, customFieldIdType, lineIdType, lineType, updateOrderCommercialLines, metadata, }: UpdateCommercialOrderLinesParameters): Promise<UpdateCommercialOrderLinesResponse>;
|
|
654
|
+
/**
|
|
655
|
+
* ❌ Deletes specific commercial order lines.
|
|
656
|
+
*
|
|
657
|
+
* This function deletes commercial order lines identified by the `commercialOrderId`.
|
|
658
|
+
* The `commercialOrderId` parameter is mandatory and validated before the request is executed.
|
|
659
|
+
*
|
|
660
|
+
* 🛠 **Endpoint**: `DELETE /v2/shop/commercial-orders/${commercialOrderId}/lines` [ORDER-350]
|
|
661
|
+
*
|
|
662
|
+
* | Parameter | Type | Required | Description |
|
|
663
|
+
* |----------------------|------------------- |----------|---------------------------------------------------------------|
|
|
664
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order whose lines are to be deleted |
|
|
665
|
+
* | `body` | `OfferToDelete[]` | ❌ | The list of offers to delete. Can be empty. |
|
|
666
|
+
*
|
|
667
|
+
* 📤 **Returns**:
|
|
668
|
+
* A `Promise` resolving when the commercial order lines are successfully deleted.
|
|
669
|
+
*
|
|
670
|
+
* 🛠 **Example usage**:
|
|
671
|
+
* ```ts
|
|
672
|
+
* const response = await deleteCommercialOrderLines("commercialOrder123", [{ offerPriceId: "price456" }]);
|
|
673
|
+
* ```
|
|
674
|
+
*
|
|
675
|
+
* @param {DeleteCommercialOrderLinesParameters} params - The parameters for the request.
|
|
676
|
+
* @throws {Error} If `commercialOrderId` is missing.
|
|
677
|
+
* @returns {Promise<DeleteCommercialOrderLinesResponse>} A promise resolving when the commercial order lines are successfully deleted.
|
|
678
|
+
*/
|
|
679
|
+
export declare function deleteCommercialOrderLines({ commercialOrderId, body, }: DeleteCommercialOrderLinesParameters): Promise<DeleteCommercialOrderLinesResponse>;
|
|
680
|
+
/**
|
|
681
|
+
* 🚚 Punchout for specific commercial order.
|
|
682
|
+
*
|
|
683
|
+
* This function retrieves commercial order's data needed for the punchout, with order identified by the `commercialOrderId`.
|
|
684
|
+
* This `commercialOrderId` parameter is required and validated before the request is executed.
|
|
685
|
+
*
|
|
686
|
+
* 🛠 **Endpoint**: `GET /punchout/oci/${tenantConfigurationKey}/commercial-orders/${commercialOrderId}`
|
|
687
|
+
*
|
|
688
|
+
* | Parameter | Type | Required | Description |
|
|
689
|
+
* |------------------------------------|--------------------------------------|-----------------|----------------------------------------------------------------|
|
|
690
|
+
* | `tenantConfigurationKey` | `string` | ✅ | The combination of tenant id and tenant OCI |
|
|
691
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order whose lines are to be deleted |
|
|
692
|
+
* | `locale` | `string` | ✅ | The locale in which to return the commercial order. |
|
|
693
|
+
|
|
694
|
+
*
|
|
695
|
+
* 📤 **Returns**:
|
|
696
|
+
* A `Promise` resolving when the punchout data are successfully retrieved
|
|
697
|
+
*
|
|
698
|
+
* 🛠 **Example usage**:
|
|
699
|
+
* ```ts
|
|
700
|
+
* const response = await punchoutOciCommercialOrder({
|
|
701
|
+
* tenantConfigurationKey: "0000000300-0000000001",
|
|
702
|
+
* commercialOrderId: "commercialOrder123",
|
|
703
|
+
* locale: "EN",
|
|
704
|
+
* });
|
|
705
|
+
* ```
|
|
706
|
+
*
|
|
707
|
+
* @param {PunchoutOciCommercialOrderParameters} params - The parameters for the request.
|
|
708
|
+
* @throws {Error} If `commercialOrderId` or `tenantConfigurationKey` is missing.
|
|
709
|
+
* @returns {Promise<Map(<string,string>)>} A promise resolving when the punchout data are successfully retrieved.
|
|
710
|
+
*/
|
|
711
|
+
export declare function punchoutOciCommercialOrder({ tenantConfigurationKey, commercialOrderId, locale, }: PunchoutOciCommercialOrderParameters): Promise<any>;
|
|
712
|
+
//# sourceMappingURL=index.d.ts.map
|