@djust-b2b/djust-front-sdk 1.22.2 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -10
- package/lib/{src/helpers → helpers}/parameters-validation.js +2 -2
- package/lib/{src/index.d.ts → index.d.ts} +18 -31
- package/lib/{src/index.js → index.js} +1 -2
- package/lib/{src/interfaces → interfaces}/models/common.d.ts +2 -2
- package/lib/{src/interfaces → interfaces}/models/customer-user.d.ts +1 -1
- package/lib/{src/interfaces → interfaces}/models/order.d.ts +90 -3
- package/lib/{src/services → services}/auth/definitions.requests.js +3 -0
- package/lib/{src/services → services}/cart/index.d.ts +2 -2
- package/lib/{src/services → services}/cart/index.js +2 -2
- package/lib/{src/services → services}/commercial-order/definitions.d.ts +33 -2
- package/lib/{src/services → services}/commercial-order/index.d.ts +167 -1
- package/lib/{src/services → services}/commercial-order/index.js +225 -4
- package/lib/{src/services → services}/customer-account/definitions.d.ts +14 -1
- package/lib/{src/services → services}/customer-account/index.d.ts +28 -2
- package/lib/{src/services → services}/customer-account/index.js +38 -0
- package/lib/{src/services → services}/customer-user/definitions.d.ts +1 -1
- package/lib/{src/services → services}/logistic-order/definitions.d.ts +94 -4
- package/lib/{src/services → services}/logistic-order/index.d.ts +423 -9
- package/lib/{src/services → services}/logistic-order/index.js +534 -8
- package/lib/{src/services → services}/navigation-category/definitions.d.ts +0 -3
- package/lib/{src/services → services}/product/definitions.d.ts +1 -2
- package/lib/{src/services → services}/product-variant/definitions.d.ts +1 -2
- package/lib/{src/settings → settings}/fetch-instance.d.ts +2 -3
- package/lib/{src/settings → settings}/fetch-instance.js +67 -30
- package/package.json +5 -6
- package/lib/instrument.d.ts +0 -2
- package/lib/instrument.js +0 -33
- /package/lib/{src/helpers → helpers}/parameters-validation.d.ts +0 -0
- /package/lib/{src/helpers → helpers}/utils.d.ts +0 -0
- /package/lib/{src/helpers → helpers}/utils.js +0 -0
- /package/lib/{src/interfaces → interfaces}/index.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/index.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/address.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/address.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/attribute.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/attribute.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/auth.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/auth.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/buying-list.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/buying-list.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/cart.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/cart.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/common.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/custom-field.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/custom-field.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/customer-account.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/customer-account.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/customer-organisation.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/customer-organisation.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/customer-user.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/incident.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/incident.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/navigation-category.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/navigation-category.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/offer.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/offer.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/order.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/payment.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/payment.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/price.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/price.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/product.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/product.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/quote.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/quote.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/searchProduct.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/searchProduct.js +0 -0
- /package/lib/{src/interfaces → interfaces}/models/supplier.d.ts +0 -0
- /package/lib/{src/interfaces → interfaces}/models/supplier.js +0 -0
- /package/lib/{src/services → services}/auth/definitions.d.ts +0 -0
- /package/lib/{src/services → services}/auth/definitions.js +0 -0
- /package/lib/{src/services → services}/auth/definitions.requests.d.ts +0 -0
- /package/lib/{src/services → services}/auth/index.d.ts +0 -0
- /package/lib/{src/services → services}/auth/index.js +0 -0
- /package/lib/{src/services → services}/buying-list/definitions.d.ts +0 -0
- /package/lib/{src/services → services}/buying-list/definitions.js +0 -0
- /package/lib/{src/services → services}/buying-list/index.d.ts +0 -0
- /package/lib/{src/services → services}/buying-list/index.js +0 -0
- /package/lib/{src/services → services}/cart/definitions.d.ts +0 -0
- /package/lib/{src/services → services}/cart/definitions.js +0 -0
- /package/lib/{src/services → services}/commercial-order/definitions.js +0 -0
- /package/lib/{src/services → services}/custom-field/definitions.d.ts +0 -0
- /package/lib/{src/services → services}/custom-field/definitions.js +0 -0
- /package/lib/{src/services → services}/custom-field/index.d.ts +0 -0
- /package/lib/{src/services → services}/custom-field/index.js +0 -0
- /package/lib/{src/services → services}/customer-account/definitions.js +0 -0
- /package/lib/{src/services → services}/customer-user/definitions.js +0 -0
- /package/lib/{src/services → services}/customer-user/index.d.ts +0 -0
- /package/lib/{src/services → services}/customer-user/index.js +0 -0
- /package/lib/{src/services → services}/incident/definitions.d.ts +0 -0
- /package/lib/{src/services → services}/incident/definitions.js +0 -0
- /package/lib/{src/services → services}/incident/index.d.ts +0 -0
- /package/lib/{src/services → services}/incident/index.js +0 -0
- /package/lib/{src/services → services}/logistic-order/definitions.js +0 -0
- /package/lib/{src/services → services}/navigation-category/definitions.js +0 -0
- /package/lib/{src/services → services}/navigation-category/index.d.ts +0 -0
- /package/lib/{src/services → services}/navigation-category/index.js +0 -0
- /package/lib/{src/services → services}/product/definitions.js +0 -0
- /package/lib/{src/services → services}/product/index.d.ts +0 -0
- /package/lib/{src/services → services}/product/index.js +0 -0
- /package/lib/{src/services → services}/product-variant/definitions.js +0 -0
- /package/lib/{src/services → services}/product-variant/index.d.ts +0 -0
- /package/lib/{src/services → services}/product-variant/index.js +0 -0
- /package/lib/{src/services → services}/quote/definitions.d.ts +0 -0
- /package/lib/{src/services → services}/quote/definitions.js +0 -0
- /package/lib/{src/services → services}/quote/index.d.ts +0 -0
- /package/lib/{src/services → services}/quote/index.js +0 -0
- /package/lib/{src/services → services}/supplier/definitions.d.ts +0 -0
- /package/lib/{src/services → services}/supplier/definitions.js +0 -0
- /package/lib/{src/services → services}/supplier/index.d.ts +0 -0
- /package/lib/{src/services → services}/supplier/index.js +0 -0
package/README.md
CHANGED
|
@@ -1,19 +1,50 @@
|
|
|
1
|
+
# Introduction
|
|
1
2
|
|
|
2
|
-
DJUST Front SDK
|
|
3
|
+
**DJUST Front SDK** is a JavaScript development kit designed to simplify and optimize API calls to the DJUST backend. It offers a secure, high-performance, and ready-to-use solution for integration partners, thus facilitating the implementation of robust e-commerce solutions for your clients.
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
## 🚀 **Why use DJUST Front SDK ?**
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
### **🔒 Secure API Calls**
|
|
10
|
+
Ensure secure communications between your frontend applications and the DJUST backend through integrated mechanisms for managing requests and responses.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
### **⚡ Performance Optimization**
|
|
13
|
+
DJUST Front SDK is designed to:
|
|
14
|
+
- Minimize response times through optimized methods.
|
|
15
|
+
- Efficiently manage API calls by avoiding redundancies.
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
### **🧩 A Simplified Integration**
|
|
18
|
+
- **Easy to configure** : A clear and documented API for a quick start.
|
|
19
|
+
- **Universal** : Compatible with all JavaScript environments (Vue.js, React, Nuxt, Angular, etc.).
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
### **🔧 Flexibility and Modularity**
|
|
22
|
+
Use only the methods you need for your projects. The SDK is modular, allowing you to tailor the integration according to your clients' requirements.
|
|
16
23
|
|
|
24
|
+
---
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
## 🛡️ **Security and Compliance**
|
|
27
|
+
|
|
28
|
+
The SDK incorporates best practices to ensure :
|
|
29
|
+
- A **secure management of authentication tokens**.
|
|
30
|
+
- Compliance with security standards to protect data exchanges.
|
|
31
|
+
- A **reliability** in requests through centralized error handling.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 📈 **Benefits for Partners**
|
|
36
|
+
|
|
37
|
+
- **Accelerate your integrations** : Save time by using a ready-to-use SDK.
|
|
38
|
+
- **Secure your projects** : Assure your clients with robust and secure backend calls.
|
|
39
|
+
- **Maximize performance** : Provide smooth experiences with fast and optimized interactions.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 📄 **Licence**
|
|
44
|
+
|
|
45
|
+
DJUST Front SDK is distributed under the **MIT license**, providing you with complete freedom to use it in your projects.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
With **DJUST Front SDK**, simplify your backend integrations, ensure exceptional performance, and provide reliable and secure e-commerce solutions for your clients.
|
|
@@ -4,7 +4,7 @@ exports.oneOfRequired = exports.required = void 0;
|
|
|
4
4
|
const required = (parameters) => {
|
|
5
5
|
Object.keys(parameters).forEach((parameter) => {
|
|
6
6
|
if (!parameters[parameter]) {
|
|
7
|
-
throw new Error(`
|
|
7
|
+
throw new Error(`'${parameter}' parameter is required`);
|
|
8
8
|
}
|
|
9
9
|
});
|
|
10
10
|
};
|
|
@@ -13,7 +13,7 @@ const oneOfRequired = (parameters) => {
|
|
|
13
13
|
const parametersNames = Object.keys(parameters);
|
|
14
14
|
const matchingParameters = parametersNames.filter((parameter) => parameters[parameter]);
|
|
15
15
|
if (matchingParameters.length !== 1) {
|
|
16
|
-
throw new Error(`
|
|
16
|
+
throw new Error(`Only one of ${parametersNames
|
|
17
17
|
.map((parameter) => `'${parameter}'`)
|
|
18
18
|
.join(", ")} parameters is required`);
|
|
19
19
|
}
|
|
@@ -1,35 +1,6 @@
|
|
|
1
|
-
import "../instrument";
|
|
2
1
|
export declare const DjustSDK: {
|
|
3
|
-
initialize: (initConfig:
|
|
4
|
-
|
|
5
|
-
clientId: string;
|
|
6
|
-
apiKey: string;
|
|
7
|
-
timeout?: number;
|
|
8
|
-
locale?: string;
|
|
9
|
-
headers?: Headers;
|
|
10
|
-
accessToken?: string;
|
|
11
|
-
storeId?: string;
|
|
12
|
-
storeViewId?: string;
|
|
13
|
-
customerAccountId?: string;
|
|
14
|
-
clientName?: string;
|
|
15
|
-
dsn?: string;
|
|
16
|
-
env?: string;
|
|
17
|
-
}) => void;
|
|
18
|
-
updateConfiguration: (newConfig: Partial<{
|
|
19
|
-
baseUrl: string;
|
|
20
|
-
clientId: string;
|
|
21
|
-
apiKey: string;
|
|
22
|
-
timeout?: number;
|
|
23
|
-
locale?: string;
|
|
24
|
-
headers?: Headers;
|
|
25
|
-
accessToken?: string;
|
|
26
|
-
storeId?: string;
|
|
27
|
-
storeViewId?: string;
|
|
28
|
-
customerAccountId?: string;
|
|
29
|
-
clientName?: string;
|
|
30
|
-
dsn?: string;
|
|
31
|
-
env?: string;
|
|
32
|
-
}>) => void;
|
|
2
|
+
initialize: (initConfig: import("./settings/fetch-instance").ClientConfig) => void;
|
|
3
|
+
updateConfiguration: (newConfig: Partial<import("./settings/fetch-instance").ClientConfig>) => void;
|
|
33
4
|
getIncidents({ customerAccountIds, linkedType, ids, status, idType, page, size, sort, }: import("./services/incident/definitions").getIncidentsParameters): Promise<import("./services/incident/definitions").getIncidentsResponse>;
|
|
34
5
|
getIncident({ incidentId, idType, }: import("./services/incident/definitions").getIncidentParameters): Promise<import("./services/incident/definitions").getIncidentResponse>;
|
|
35
6
|
createOrderLogisticIncident({ logisticOrderId, idType, customField, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentResponse>;
|
|
@@ -37,7 +8,9 @@ export declare const DjustSDK: {
|
|
|
37
8
|
createOrderLogisticIncidentThread({ logisticOrderId, incidentId, idType, customField, message, name, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentThreadParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentThreadResponse>;
|
|
38
9
|
getCommercialOrders({ locale, nbPreviewLines, }: import("./interfaces").GetCommercialOrdersParameters): Promise<import("./interfaces").GetCommercialOrdersResponse>;
|
|
39
10
|
createCommercialOrder({ nbPreviewLines, channel, customFields, locale, origin, originId, paymentInfo, }: import("./interfaces").CreateCommercialOrderParameters): Promise<import("./interfaces").CreateCommercialOrderResponse>;
|
|
11
|
+
createCommercialOrderV2({ customFieldIdType, customFields, }: import("./interfaces").CreateCommercialOrderV2Parameters): Promise<import("./interfaces").CreateCommercialOrderV2Response>;
|
|
40
12
|
getCommercialOrder({ orderId, idType, locale, nbPreviewLines, }: import("./interfaces").GetCommercialOrderParameters): Promise<import("./interfaces").GetCommercialOrderResponse>;
|
|
13
|
+
updateCommercialOrder({ commercialOrderId, customFieldIdType, customFields, }: import("./interfaces").UpdateCommercialOrderParameters): Promise<void>;
|
|
41
14
|
createCommercialOrderCardRegistration({ orderId, paymentProvider, currency, }: import("./interfaces").CreateCommercialOrderCardRegistrationParameters): Promise<import("./interfaces").CreateCommercialOrderCardRegistrationResponse>;
|
|
42
15
|
updateCommercialOrderBillingInformation({ orderId, billingAddressId, }: import("./interfaces").UpdateCommercialOrderBillingInformationParameters): Promise<void>;
|
|
43
16
|
setCommercialOrderStatusAsCreated({ orderId, paymentInfo, }: import("./interfaces").SetCommercialOrderStatusAsCreatedParameters): Promise<void>;
|
|
@@ -47,7 +20,11 @@ export declare const DjustSDK: {
|
|
|
47
20
|
updateCommercialOrderShippingAddress({ orderId, shippingAddressId, }: import("./interfaces").UpdateCommercialOrderShippingAddressParameters): Promise<void>;
|
|
48
21
|
updateCommercialOrderShippingInformation({ orderId, shippingAddressId, shippingType, }: import("./interfaces").UpdateCommercialOrderShippingInformationParameters): Promise<void>;
|
|
49
22
|
updateCommercialOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateCommercialOrderShippingTypeParameters): Promise<void>;
|
|
23
|
+
deleteCommercialOrder(commercialOrderId: string): Promise<void>;
|
|
24
|
+
updateCommercialOrderLines({ commercialOrderId, customFieldIdType, lineIdType, lineType, updateOrderCommercialLines, updateOrderLineIdType, updateOrderLineType, }: import("./interfaces").UpdateCommercialOrderLinesParameters): Promise<import("./interfaces").UpdateCommercialOrderLinesResponse>;
|
|
25
|
+
deleteCommercialOrderLines({ commercialOrderId, body, }: import("./interfaces").DeleteCommercialOrderLinesParameters): Promise<import("./interfaces").DeleteCommercialOrderLinesResponse>;
|
|
50
26
|
getLogisticOrders({ approvalIds, locale, logisticStatus, incident, paymentOptions, nbPreviewLines, page, size, sort, }: import("./interfaces").GetLogisticOrdersParameters): Promise<import("./interfaces").GetLogisticOrdersResponse>;
|
|
27
|
+
logisticOrdersPaginatedList({ page, size, sort, nbPreviewLines, accountCustomFieldValueCriteria, approvalIds, connectedUserOnly, creationDateFrom, creationDateTo, customerAccountIds, incident, locale, logisticStatus, offerCustomFieldValueCriteria, orderLogisticCustomFieldValueCriteria, paymentOptions, supplierIds, updateDateFrom, updateDateTo, }: import("./interfaces").GetPaginatedLogisticOrdersParameters): Promise<import("./interfaces").GetPaginatedLogisticOrdersResponse>;
|
|
51
28
|
getLogisticOrderCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderCustomFieldsResponse>;
|
|
52
29
|
getLogisticOrderLineCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderLineCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderLineCustomFieldsResponse>;
|
|
53
30
|
getLogisticOrder({ orderId, locale, nbPreviewLines, }: import("./interfaces").GetLogisticOrderParameters): Promise<import("./interfaces").GetLogisticOrderResponse>;
|
|
@@ -72,6 +49,15 @@ export declare const DjustSDK: {
|
|
|
72
49
|
updateLogisticOrderShippingInformation({ orderId, shippingAddressId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingInformationParameters): Promise<void>;
|
|
73
50
|
updateLogisticOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingTypeParameters): Promise<void>;
|
|
74
51
|
createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParameters): Promise<import("./interfaces").CreateLogisticOrderThreadResponse>;
|
|
52
|
+
createLogisticOrderThreadV2({ logisticOrderId, idType, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParametersV2): Promise<import("./interfaces").CreateLogisticOrderThreadResponseV2>;
|
|
53
|
+
getLogisticOrderThreads({ logisticOrderId, pageable, }: import("./interfaces").GetLogisticOrderThreadsParams): Promise<import("./interfaces").GetLogisticOrderThreadsResponse>;
|
|
54
|
+
getLogisticOrderThread({ logisticOrderId, threadId, }: import("./interfaces").GetLogisticOrderThreadParams): Promise<import("./interfaces").GetLogisticOrderThreadResponse>;
|
|
55
|
+
createOrderLogisticThreadMessages({ logisticOrderId, threadId, body, customField, }: import("./interfaces").CreateLogisticOrderThreadMessagesParams): Promise<import("./interfaces").CreateLogisticOrderThreadMessagesResponse>;
|
|
56
|
+
updateOrderLogisticThreadMessage({ logisticOrderId, threadId, messageId, customFieldValues, idType, }: import("./interfaces").UpdateLogisticOrderThreadMessageParams): Promise<void>;
|
|
57
|
+
createLogisticOrderIncidentThreads({ logisticOrderId, incidentId, customField, message, name, reasonCode, }: import("./interfaces").CreateLogisticOrderIncidentThreadsParams): Promise<import("./interfaces").CreateLogisticOrderIncidentThreadsResponse>;
|
|
58
|
+
getLogisticOrderIncidentThread({ logisticOrderId, incidentId, threadId, }: import("./interfaces").GetLogisticOrderIncidentThreadParams): Promise<import("./interfaces").GetLogisticOrderIncidentThreadResponse>;
|
|
59
|
+
createLogisticOrderIncidentThreadMessages({ logisticOrderId, incidentId, threadId, body, customField, }: import("./interfaces").CreateLogisticOrderIncidentThreadMessagesParams): Promise<import("./interfaces").CreateLogisticOrderIncidentThreadMessagesResponse>;
|
|
60
|
+
updateLogisticOrderIncidentThreadMessage({ logisticOrderId, incidentId, threadId, messageId, customFieldValues, idType, }: import("./interfaces").UpdateLogisticOrderIncidentThreadMessageParams): Promise<void>;
|
|
75
61
|
getLogisticOrderReview({ orderId, }: import("./interfaces").GetLogisticOrderReviewParameters): Promise<import("./interfaces").GetLogisticOrderReviewResponse>;
|
|
76
62
|
addLogisticOrderReview({ orderId, comment, grade, }: import("./interfaces").AddLogisticOrderReviewParameters): Promise<import("./interfaces").AddLogisticOrderReviewResponse>;
|
|
77
63
|
getThreadReasonTypes(): Promise<import("./interfaces").GetThreadReasonTypesResponse>;
|
|
@@ -116,6 +102,7 @@ export declare const DjustSDK: {
|
|
|
116
102
|
getCustomerUserOrganisations(): Promise<import("./interfaces").GetCustomerUserOrganisationsResponse>;
|
|
117
103
|
sendCustomerUserActivationRequest({ redirectUrl, token, }: import("./interfaces").SendCustomerUserActivationRequestParameters): Promise<void>;
|
|
118
104
|
getCustomerAccount(config?: import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountResponse>;
|
|
105
|
+
getCustomerAccountV2(pageable: import("./interfaces/models/common").PageableParameters): Promise<import("./interfaces").GetCustomerAccountResponseV2>;
|
|
119
106
|
createCustomerAccount({ createAddressRequests, createCustomerUserRequest, createObjectCustomerAccountRequest, customFieldValues, customerTagList, fromFO, legalUser, ...config }: import("./interfaces").CreateCustomerAccountParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").CreateCustomerAccountResponse>;
|
|
120
107
|
updateCustomerAccount({ accountManager, businessRegistrationNumber, companyRegistrationName, customFieldValues, customerTagList, legalUser, name, vatNumber, website, ...config }: import("./interfaces").UpdateCustomerAccountParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").UpdateCustomerAccountResponse>;
|
|
121
108
|
getCustomerAccountAddresses(params: import("./interfaces").GetCustomerAccountAddressesParameters & import("./interfaces/models/common").DjustConfig): Promise<import("./interfaces").GetCustomerAccountAddressesResponse>;
|
|
@@ -37,7 +37,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.DjustSDK = void 0;
|
|
40
|
-
require("../instrument");
|
|
41
40
|
const AuthServices = __importStar(require("./services/auth"));
|
|
42
41
|
const BuyingListServices = __importStar(require("./services/buying-list"));
|
|
43
42
|
const CartServices = __importStar(require("./services/cart"));
|
|
@@ -47,8 +46,8 @@ const NavigationCategoryServices = __importStar(require("./services/navigation-c
|
|
|
47
46
|
const ProductServices = __importStar(require("./services/product"));
|
|
48
47
|
const QuoteServices = __importStar(require("./services/quote"));
|
|
49
48
|
const SupplierServices = __importStar(require("./services/supplier"));
|
|
50
|
-
const LogisticOrderServices = __importStar(require("./services/logistic-order"));
|
|
51
49
|
const CommercialOrderServices = __importStar(require("./services/commercial-order"));
|
|
50
|
+
const LogisticOrderServices = __importStar(require("./services/logistic-order"));
|
|
52
51
|
const IncidentServices = __importStar(require("./services/incident"));
|
|
53
52
|
const fetch_instance_1 = require("./settings/fetch-instance");
|
|
54
53
|
exports.DjustSDK = {
|
|
@@ -5,6 +5,7 @@ export type SortDirection = "ASC" | "DESC";
|
|
|
5
5
|
export type NullHandling = "NATIVE" | "NULLS_FIRST" | "NULLS_LAST";
|
|
6
6
|
export type ExternalSource = "MIRAKL" | "CLIENT" | "NOT_DEFINED" | "EXTERN" | "SYSTEM";
|
|
7
7
|
export type Channel = "DESKTOP" | "MOBILE" | "TABLET" | "CALL_CENTER" | "UNKNOWN";
|
|
8
|
+
export type IdType = "DJUST_ID" | "EXTERNAL_ID";
|
|
8
9
|
export type PageableParameters = {
|
|
9
10
|
page?: number;
|
|
10
11
|
size?: number;
|
|
@@ -18,7 +19,7 @@ export interface PageableObject {
|
|
|
18
19
|
sort: Order[];
|
|
19
20
|
unpaged: boolean;
|
|
20
21
|
}
|
|
21
|
-
interface SingleWarningReportDto {
|
|
22
|
+
export interface SingleWarningReportDto {
|
|
22
23
|
detail: string;
|
|
23
24
|
id: string;
|
|
24
25
|
}
|
|
@@ -53,4 +54,3 @@ export interface DjustConfig {
|
|
|
53
54
|
storeId?: string;
|
|
54
55
|
storeViewId?: string;
|
|
55
56
|
}
|
|
56
|
-
export {};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { CustomFieldValueObject } from "./custom-field";
|
|
1
|
+
import { CustomFieldValueObject, CustomFieldValueRequest } from "./custom-field";
|
|
2
2
|
import { OfferPriceType, PackingType } from "./offer";
|
|
3
3
|
import { ProductMediaInfoDTO, ProductSpecification } from "./product";
|
|
4
4
|
import { SupplierSnapshot } from "./supplier";
|
|
5
5
|
import { AddressSnapshot } from "./address";
|
|
6
|
-
import { Channel, Currency, ExternalSource, Lang, Order, PageableObject } from "./common";
|
|
6
|
+
import { Channel, Country, Currency, ExternalSource, IdType, Lang, Order, PageableObject } from "./common";
|
|
7
7
|
import { CustomerUserDto, CustomerUserSnapshot } from "./customer-user";
|
|
8
8
|
import { PaymentOption, PaymentStatus } from "./payment";
|
|
9
|
+
import { UpdateCartLineType } from "./cart";
|
|
9
10
|
type OrderLogisticLinePaymentStatus = "WAITING_REFUND" | "WAITING_PARTIAL_REFUND" | "PARTIALLY_REFUNDED" | "REFUNDED";
|
|
10
11
|
type OrderLineStatus = "CANCELED" | "PARTIALLY_CANCELED" | "DECLINED_BY_SUPPLIER" | "OTHER" | "DELETED";
|
|
11
12
|
export type OrderLogisticStatusType = "CREATING" | "DRAFT_ORDER" | "DRAFT_ORDER_ON_HOLD" | "ORDER_CREATED" | "WAITING_CUSTOMER_APPROVAL" | "WAITING_SUPPLIER_APPROVAL" | "DECLINED_BY_CUSTOMER" | "DECLINED_BY_SUPPLIER" | "ACCEPTED_BY_SUPPLIER" | "WAITING_SHIPMENT" | "PARTIALLY_SHIPPED" | "SHIPPED" | "COMPLETED" | "PARTIALLY_CANCELED" | "CANCELED";
|
|
13
|
+
export type OrderLineType = "PRODUCT_VARIANT" | "OFFER_PRICE";
|
|
12
14
|
export type OrderOrigin = "CART" | "SUPPLIER_QUOTE";
|
|
13
15
|
export type OrderIdType = "BUSINESS_ID" | "CART_ID";
|
|
14
16
|
export type ApprovalStatus = "APPROVED" | "REFUSED" | "WAITING_APPROVAL";
|
|
@@ -81,7 +83,15 @@ export interface OrderLogisticLineUpdate {
|
|
|
81
83
|
customFieldValues: CustomFieldValueObject[];
|
|
82
84
|
id: string;
|
|
83
85
|
quantity: number;
|
|
84
|
-
updateAction:
|
|
86
|
+
updateAction: UpdateCartLineType;
|
|
87
|
+
}
|
|
88
|
+
export interface updateCommercialOrderLinesRequest {
|
|
89
|
+
customFieldIdType?: IdType;
|
|
90
|
+
lineIdType?: IdType;
|
|
91
|
+
lineType?: string;
|
|
92
|
+
updateOrderCommercialLines?: OrderLogisticLineUpdate[];
|
|
93
|
+
updateOrderLineIdType?: IdType;
|
|
94
|
+
updateOrderLineType?: string;
|
|
85
95
|
}
|
|
86
96
|
interface OfferCustomFieldSnapshot {
|
|
87
97
|
externalId: string;
|
|
@@ -289,6 +299,17 @@ export interface OrderRatingResponse {
|
|
|
289
299
|
comment: string;
|
|
290
300
|
grade: number;
|
|
291
301
|
}
|
|
302
|
+
export interface OrderLogisticThreadResponse {
|
|
303
|
+
createdAt: string;
|
|
304
|
+
externalId: string;
|
|
305
|
+
id: string;
|
|
306
|
+
messages: ThreadMessageDto;
|
|
307
|
+
name: string;
|
|
308
|
+
reasons: string[];
|
|
309
|
+
status: string;
|
|
310
|
+
type: string;
|
|
311
|
+
updatedAt: string;
|
|
312
|
+
}
|
|
292
313
|
export interface ThreadReasonTypeDto {
|
|
293
314
|
claimReasonType: ThreadReasonType;
|
|
294
315
|
label: string;
|
|
@@ -301,6 +322,59 @@ export interface ThreadReasonDto {
|
|
|
301
322
|
label: string;
|
|
302
323
|
type: ThreadReasonTypeDto;
|
|
303
324
|
}
|
|
325
|
+
export interface ThreadMessageDto {
|
|
326
|
+
body: string;
|
|
327
|
+
createdAt: string;
|
|
328
|
+
customFieldValues: ThreadCustomFiedValuesDto[];
|
|
329
|
+
externalId: string;
|
|
330
|
+
from: ThreadMessageFromToDto;
|
|
331
|
+
id: string;
|
|
332
|
+
to: ThreadMessageFromToDto;
|
|
333
|
+
updatedAt: string;
|
|
334
|
+
}
|
|
335
|
+
export interface ThreadMessageFromToDto {
|
|
336
|
+
account: ThreadMessageAccountDto;
|
|
337
|
+
accounts: ThreadMessageAccountDto[];
|
|
338
|
+
user: ThreadMessageFromUserDto;
|
|
339
|
+
}
|
|
340
|
+
export interface ThreadMessageAccountDto {
|
|
341
|
+
externalId: string;
|
|
342
|
+
id: string;
|
|
343
|
+
name: string;
|
|
344
|
+
}
|
|
345
|
+
export interface ThreadMessageFromUserDto {
|
|
346
|
+
civility: string;
|
|
347
|
+
createdAt: string;
|
|
348
|
+
customFieldValues: ThreadCustomFiedValuesDto[];
|
|
349
|
+
email: string;
|
|
350
|
+
externalId: string;
|
|
351
|
+
firstName: string;
|
|
352
|
+
groups: string[];
|
|
353
|
+
id: string;
|
|
354
|
+
lastName: string;
|
|
355
|
+
locale: Country;
|
|
356
|
+
password: string;
|
|
357
|
+
phone: string;
|
|
358
|
+
status: string;
|
|
359
|
+
updatedAt: string;
|
|
360
|
+
}
|
|
361
|
+
export interface ThreadCustomFiedValuesDto {
|
|
362
|
+
customField: {
|
|
363
|
+
externalId: string;
|
|
364
|
+
externalSource: ExternalSource;
|
|
365
|
+
faceted: boolean;
|
|
366
|
+
id: string;
|
|
367
|
+
indexable: boolean;
|
|
368
|
+
mandatory: boolean;
|
|
369
|
+
name: object;
|
|
370
|
+
role: string;
|
|
371
|
+
sealedTarget: string;
|
|
372
|
+
searchable: boolean;
|
|
373
|
+
sortable: boolean;
|
|
374
|
+
status: string;
|
|
375
|
+
};
|
|
376
|
+
value: unknown;
|
|
377
|
+
}
|
|
304
378
|
export interface RequestGetAccountingDocumentLinkbyID {
|
|
305
379
|
orderLogisticId: string;
|
|
306
380
|
docId: string;
|
|
@@ -399,4 +473,17 @@ export interface PreauthorizationDto {
|
|
|
399
473
|
Status: string;
|
|
400
474
|
Tag: string;
|
|
401
475
|
}
|
|
476
|
+
export interface OfferToDelete {
|
|
477
|
+
offerPriceId: string;
|
|
478
|
+
}
|
|
479
|
+
export interface logisticOrderIncidentThreadsCustomFieldValueRequest {
|
|
480
|
+
customFieldValues: CustomFieldValueRequest[];
|
|
481
|
+
idType: IdType;
|
|
482
|
+
}
|
|
483
|
+
export interface logisticOrderIncidentThreadsRequest {
|
|
484
|
+
customField?: logisticOrderIncidentThreadsCustomFieldValueRequest;
|
|
485
|
+
message?: string;
|
|
486
|
+
name?: string;
|
|
487
|
+
reasonCode: string;
|
|
488
|
+
}
|
|
402
489
|
export {};
|
|
@@ -31,8 +31,8 @@ export declare function deleteCarts(): Promise<DeleteCartsResponse>;
|
|
|
31
31
|
* |------------------|----------------------|------------|------------------------------------------------------------|
|
|
32
32
|
* | `currency` | `string` | ✅ | The currency in which to display the carts. |
|
|
33
33
|
* | `pageable` | `object` | ✅ | The pagination parameters. |
|
|
34
|
-
* | `status` | `
|
|
35
|
-
* | `type` | `
|
|
34
|
+
* | `status` | `CartStatusDto[]` | ❌ | The status of the carts to retrieve. |
|
|
35
|
+
* | `type` | `CartTypeDto[]` | ❌ | The type of carts to retrieve (e.g. `CART`, `BUYING_LIST`). |
|
|
36
36
|
*
|
|
37
37
|
* 📤 **Returns**:
|
|
38
38
|
* A `Promise` resolving to a `GetCartsResponse` object, containing the list of carts and pagination information.
|
|
@@ -51,8 +51,8 @@ async function deleteCarts() {
|
|
|
51
51
|
* |------------------|----------------------|------------|------------------------------------------------------------|
|
|
52
52
|
* | `currency` | `string` | ✅ | The currency in which to display the carts. |
|
|
53
53
|
* | `pageable` | `object` | ✅ | The pagination parameters. |
|
|
54
|
-
* | `status` | `
|
|
55
|
-
* | `type` | `
|
|
54
|
+
* | `status` | `CartStatusDto[]` | ❌ | The status of the carts to retrieve. |
|
|
55
|
+
* | `type` | `CartTypeDto[]` | ❌ | The type of carts to retrieve (e.g. `CART`, `BUYING_LIST`). |
|
|
56
56
|
*
|
|
57
57
|
* 📤 **Returns**:
|
|
58
58
|
* A `Promise` resolving to a `GetCartsResponse` object, containing the list of carts and pagination information.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Channel, Currency } from "../../interfaces/models/common";
|
|
1
|
+
import { Channel, Currency, IdType } from "../../interfaces/models/common";
|
|
2
2
|
import { CustomFieldValueRequest } from "../../interfaces/models/custom-field";
|
|
3
|
-
import { BrowserInfo, CardInformationDto, OrderCommercialDto, OrderIdType, OrderLogisticDto, OrderOrigin, PageOrderCommercialDto, PaymentCardInfo, PreauthorizationDto } from "../../interfaces/models/order";
|
|
3
|
+
import { BrowserInfo, CardInformationDto, OrderCommercialDto, OrderIdType, OrderLogisticDto, OrderOrigin, PageOrderCommercialDto, PaymentCardInfo, PreauthorizationDto, OfferToDelete, OrderLogisticLineUpdate, OrderLineType } from "../../interfaces/models/order";
|
|
4
|
+
import { SingleWarningReportDto } from "../../interfaces/models/common";
|
|
4
5
|
import { PaymentInfoRequest, PaymentOption, PaymentProvider } from "../../interfaces/models/payment";
|
|
5
6
|
/**
|
|
6
7
|
* Request parameters type definitions
|
|
@@ -18,6 +19,17 @@ export interface CreateCommercialOrderParameters {
|
|
|
18
19
|
originId: string;
|
|
19
20
|
paymentInfo?: PaymentInfoRequest;
|
|
20
21
|
}
|
|
22
|
+
export interface CreateCommercialOrderV2Parameters {
|
|
23
|
+
customFieldIdType?: IdType;
|
|
24
|
+
customFields?: CustomFieldValueRequest[];
|
|
25
|
+
}
|
|
26
|
+
export interface UpdateCommercialOrderParameters extends CreateCommercialOrderV2Parameters {
|
|
27
|
+
commercialOrderId: string;
|
|
28
|
+
}
|
|
29
|
+
export interface DeleteCommercialOrderLinesParameters {
|
|
30
|
+
commercialOrderId: string;
|
|
31
|
+
body: OfferToDelete[];
|
|
32
|
+
}
|
|
21
33
|
export interface GetCommercialOrderParameters {
|
|
22
34
|
orderId: string;
|
|
23
35
|
locale: string;
|
|
@@ -77,6 +89,19 @@ export interface GetCommercialOrdersResponse extends PageOrderCommercialDto {
|
|
|
77
89
|
}
|
|
78
90
|
export interface CreateCommercialOrderResponse extends OrderCommercialDto {
|
|
79
91
|
}
|
|
92
|
+
export interface CreateCommercialOrderV2Response {
|
|
93
|
+
id: string;
|
|
94
|
+
reference: string;
|
|
95
|
+
}
|
|
96
|
+
export interface UpdateCommercialOrderLinesParameters {
|
|
97
|
+
commercialOrderId: string;
|
|
98
|
+
customFieldIdType?: IdType;
|
|
99
|
+
lineIdType?: IdType;
|
|
100
|
+
lineType?: string;
|
|
101
|
+
updateOrderCommercialLines?: OrderLogisticLineUpdate[];
|
|
102
|
+
updateOrderLineIdType?: IdType;
|
|
103
|
+
updateOrderLineType?: OrderLineType;
|
|
104
|
+
}
|
|
80
105
|
export interface GetCommercialOrderResponse extends OrderCommercialDto {
|
|
81
106
|
}
|
|
82
107
|
export interface CreateCommercialOrderCardRegistrationResponse extends CardInformationDto {
|
|
@@ -85,3 +110,9 @@ export interface CreateCommercialOrderPreauthorizationResponse extends Preauthor
|
|
|
85
110
|
}
|
|
86
111
|
export interface UpdateOrderLogisticCustomFieldResponse extends OrderLogisticDto {
|
|
87
112
|
}
|
|
113
|
+
export interface DeleteCommercialOrderLinesResponse {
|
|
114
|
+
singleWarningReportDtos: SingleWarningReportDto[];
|
|
115
|
+
}
|
|
116
|
+
export interface UpdateCommercialOrderLinesResponse {
|
|
117
|
+
singleWarningReportDtos: SingleWarningReportDto[];
|
|
118
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateCommercialOrderCardRegistrationParameters, CreateCommercialOrderCardRegistrationResponse, CreateCommercialOrderParameters, CreateCommercialOrderPreauthorizationParameters, CreateCommercialOrderPreauthorizationResponse,
|
|
1
|
+
import { CreateCommercialOrderCardRegistrationParameters, CreateCommercialOrderCardRegistrationResponse, CreateCommercialOrderParameters, CreateCommercialOrderResponse, CreateCommercialOrderV2Parameters, CreateCommercialOrderV2Response, UpdateCommercialOrderParameters, DeleteCommercialOrderLinesParameters, DeleteCommercialOrderLinesResponse, UpdateCommercialOrderLinesParameters, UpdateCommercialOrderLinesResponse, CreateCommercialOrderPreauthorizationParameters, CreateCommercialOrderPreauthorizationResponse, GetCommercialOrderParameters, GetCommercialOrderPaymentPageUrlParameters, GetCommercialOrderResponse, GetCommercialOrdersParameters, GetCommercialOrdersResponse, SetCommercialOrderStatusAsCreatedParameters, SetCommercialOrderStatusAsOnHoldParameters, UpdateCommercialOrderBillingInformationParameters, UpdateCommercialOrderShippingAddressParameters, UpdateCommercialOrderShippingInformationParameters, UpdateCommercialOrderShippingTypeParameters } from "./definitions";
|
|
2
2
|
/**
|
|
3
3
|
* COMMERCIAL ORDER ENDPOINT
|
|
4
4
|
*/
|
|
@@ -64,6 +64,38 @@ export declare function getCommercialOrders({ locale, nbPreviewLines, }: GetComm
|
|
|
64
64
|
* @returns {Promise<CreateCommercialOrderResponse>} A promise resolving to the response containing the commercial orders.
|
|
65
65
|
*/
|
|
66
66
|
export declare function createCommercialOrder({ nbPreviewLines, channel, customFields, locale, origin, originId, paymentInfo, }: CreateCommercialOrderParameters): Promise<CreateCommercialOrderResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* 🚚 Creates commercial orders V2.
|
|
69
|
+
*
|
|
70
|
+
* This function creates a commercial order (Version 2).
|
|
71
|
+
*
|
|
72
|
+
* 🛠 **Endpoint**: `POST /v2/shop/commercial-orders [ORDER-108]`
|
|
73
|
+
*
|
|
74
|
+
* | Parameter | Type | Required | Description |
|
|
75
|
+
* |----------------------|--------------------------------------|-----------------------------------------------------------------------|
|
|
76
|
+
* | `customFieldIdType` | `IdType` | ❌ | The custom field id type to use. |
|
|
77
|
+
* | `customFields` | `CustomFieldValueRequest[]` | ❌ | The custom fields to add to the created commercial order. |
|
|
78
|
+
*
|
|
79
|
+
* 📤 **Returns**:
|
|
80
|
+
* A `Promise` resolving to a single `CreateCommercialOrderV2Response` object representing the created commercial orders [ORDER-108].
|
|
81
|
+
*
|
|
82
|
+
* 🛠 **Example usage**:
|
|
83
|
+
* ```ts
|
|
84
|
+
* const orders = await createCommercialOrderV2({
|
|
85
|
+
* customFieldIdType: "DJUST_ID",
|
|
86
|
+
* customFields: [
|
|
87
|
+
* {
|
|
88
|
+
* "customFieldId": "string",
|
|
89
|
+
* "customFieldValue": "string"
|
|
90
|
+
* }
|
|
91
|
+
* ],
|
|
92
|
+
* });
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* @param {CreateCommercialOrderV2Parameters} params - The body of the request.
|
|
96
|
+
* @returns {Promise<CreateCommercialOrderV2Response>} A promise resolving to the response containing the created commercial orders.
|
|
97
|
+
*/
|
|
98
|
+
export declare function createCommercialOrderV2({ customFieldIdType, customFields, }: CreateCommercialOrderV2Parameters): Promise<CreateCommercialOrderV2Response>;
|
|
67
99
|
/**
|
|
68
100
|
* 🚚 Gets a specific commercial order.
|
|
69
101
|
*
|
|
@@ -96,6 +128,39 @@ export declare function createCommercialOrder({ nbPreviewLines, channel, customF
|
|
|
96
128
|
* @returns {Promise<GetCommercialOrderResponse>} A promise resolving to the response containing the commercial order.
|
|
97
129
|
*/
|
|
98
130
|
export declare function getCommercialOrder({ orderId, idType, locale, nbPreviewLines, }: GetCommercialOrderParameters): Promise<GetCommercialOrderResponse>;
|
|
131
|
+
/**
|
|
132
|
+
* 🚚 Update commercial orders.
|
|
133
|
+
*
|
|
134
|
+
* This function update a commercial order.
|
|
135
|
+
*
|
|
136
|
+
* 🛠 **Endpoint**: `POST /v2/shop/commercial-orders/${commercialOrderId} [ORDER-222]`
|
|
137
|
+
*
|
|
138
|
+
* | Parameter | Type | Required | Description |
|
|
139
|
+
* |----------------------|--------------------------------------|----------------------------------------------------------------------|
|
|
140
|
+
* | `commercialOrderId` | `string` | ✅ | The commercial order Id. |
|
|
141
|
+
* | `customFieldIdType` | `IdType` | ❌ | The custom field id type to use. |
|
|
142
|
+
* | `customFields` | `CustomFieldValueRequest[]` | ❌ | The custom fields to add to the created commercial order. |
|
|
143
|
+
*
|
|
144
|
+
* 📤 **Returns**:
|
|
145
|
+
* A `Promise<void>` when the commercialOrder is successfully updated. No additional data is returned.
|
|
146
|
+
*
|
|
147
|
+
* 🛠 **Example usage**:
|
|
148
|
+
* ```ts
|
|
149
|
+
* const orders = await updateCommercialOrder({
|
|
150
|
+
* customFieldIdType: "EXTERNAL_ID",
|
|
151
|
+
* customFields: [
|
|
152
|
+
* {
|
|
153
|
+
* "customFieldId": "string",
|
|
154
|
+
* "customFieldValue": "string"
|
|
155
|
+
* }
|
|
156
|
+
* ],
|
|
157
|
+
* });
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
160
|
+
* @param {UpdateCommercialOrderParameters} params - The params of the request.
|
|
161
|
+
* @returns {Promise<void>}
|
|
162
|
+
*/
|
|
163
|
+
export declare function updateCommercialOrder({ commercialOrderId, customFieldIdType, customFields, }: UpdateCommercialOrderParameters): Promise<void>;
|
|
99
164
|
/**
|
|
100
165
|
* 🚚 Creates a specific commercial order's card registration.
|
|
101
166
|
*
|
|
@@ -389,3 +454,104 @@ export declare function updateCommercialOrderShippingInformation({ orderId, ship
|
|
|
389
454
|
* @returns {Promise<void>} A promise resolving when shipping type of the commercial order is updated.
|
|
390
455
|
*/
|
|
391
456
|
export declare function updateCommercialOrderShippingType({ orderId, shippingType, }: UpdateCommercialOrderShippingTypeParameters): Promise<void>;
|
|
457
|
+
/**
|
|
458
|
+
* ❌ Deletes a specific commercial order.
|
|
459
|
+
*
|
|
460
|
+
* This function deletes a commercial order identified by the `commercialOrderId`.
|
|
461
|
+
* The `commercialOrderId` parameter is required and validated before the request is executed.
|
|
462
|
+
*
|
|
463
|
+
* 🛠 **Endpoint**: `DELETE /v2/shop/commercial-orders/${commercialOrderId}` [ORDER-300]
|
|
464
|
+
*
|
|
465
|
+
* | Parameter | Type | Required | Description |
|
|
466
|
+
* |----------------------|--------- |----------|-----------------------------------------------|
|
|
467
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order to be deleted. |
|
|
468
|
+
*
|
|
469
|
+
* 📤 **Returns**:
|
|
470
|
+
* A `Promise` resolving with an empty response (`204 No Content`) when the commercial order is successfully deleted.
|
|
471
|
+
*
|
|
472
|
+
* 🛠 **Example usage**:
|
|
473
|
+
* ```ts
|
|
474
|
+
* await deleteCommercialOrder("commercialOrder123");
|
|
475
|
+
* ```
|
|
476
|
+
*
|
|
477
|
+
* @param {string} commercialOrderId - The ID of the commercial order to be deleted.
|
|
478
|
+
* @throws {Error} If `commercialOrderId` is missing.
|
|
479
|
+
* @returns {Promise<void>} A promise resolving when the commercial order is successfully deleted.
|
|
480
|
+
*/
|
|
481
|
+
export declare function deleteCommercialOrder(commercialOrderId: string): Promise<void>;
|
|
482
|
+
/**
|
|
483
|
+
* 🚚 Update specific commercial order lines.
|
|
484
|
+
*
|
|
485
|
+
* This function update commercial order lines identified by the `commercialOrderId`.
|
|
486
|
+
* This `commercialOrderId` parameter is required and validated before the request is executed.
|
|
487
|
+
*
|
|
488
|
+
* 🛠 **Endpoint**: `PUT /v2/shop/commercial-orders/${commercialOrderId}/lines` [ORDER-150]
|
|
489
|
+
*
|
|
490
|
+
* | Parameter | Type | Required | Description |
|
|
491
|
+
* |------------------------------------|--------------------------------------|-----------------|----------------------------------------------------------------|
|
|
492
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order whose lines are to be deleted |
|
|
493
|
+
* | `customFieldIdType` | `IdType` | ❌ | The custom field id type to use. |
|
|
494
|
+
* | `lineIdType` | `string` | ❌ | The line id type to use. |
|
|
495
|
+
* | `lineType` | `string` | ❌ | The line type to use. |
|
|
496
|
+
* | `updateOrderCommercialLines` | `OrderLogisticLineUpdate[]` | ❌ | Attributes to update. Can be empty object. |
|
|
497
|
+
* | `updateOrderLineIdType` | `IdType` | ❌ | The line id type to use. |
|
|
498
|
+
* | `updateOrderLineType` | `OrderLineType` | ❌ | The line type to use. |
|
|
499
|
+
*
|
|
500
|
+
* 📤 **Returns**:
|
|
501
|
+
* A `Promise` resolving when the commercial order lines are successfully updated.
|
|
502
|
+
*
|
|
503
|
+
* 🛠 **Example usage**:
|
|
504
|
+
* ```ts
|
|
505
|
+
* const response = await updateCommercialOrderLines("commercialOrder123", {
|
|
506
|
+
* customFieldType: "DJUST_ID",
|
|
507
|
+
* lineIdType: "string",
|
|
508
|
+
* lineType: "string",
|
|
509
|
+
* updateOrderCommercialLines: [
|
|
510
|
+
* {
|
|
511
|
+
* customFields: [
|
|
512
|
+
* {
|
|
513
|
+
* customFieldId: "string",
|
|
514
|
+
* value: "string"
|
|
515
|
+
* }
|
|
516
|
+
* ],
|
|
517
|
+
* id: "string",
|
|
518
|
+
* quantity: 0,
|
|
519
|
+
* updateAction: "ADD_QUANTITY"
|
|
520
|
+
* }
|
|
521
|
+
* ],
|
|
522
|
+
* updateOrderLineIdType: "EXTERNAL_ID",
|
|
523
|
+
* updateOrderLineType: "PRODUCT_VARIANT"
|
|
524
|
+
* });
|
|
525
|
+
* ```
|
|
526
|
+
*
|
|
527
|
+
* @param {UpdateCommercialOrderLinesParameters} params - The parameters for the request.
|
|
528
|
+
* @throws {Error} If `commercialOrderId` is missing.
|
|
529
|
+
* @returns {Promise<UpdateCommercialOrderLinesResponse>} A promise resolving when the commercial order lines are successfully updated.
|
|
530
|
+
*/
|
|
531
|
+
export declare function updateCommercialOrderLines({ commercialOrderId, customFieldIdType, lineIdType, lineType, updateOrderCommercialLines, updateOrderLineIdType, updateOrderLineType, }: UpdateCommercialOrderLinesParameters): Promise<UpdateCommercialOrderLinesResponse>;
|
|
532
|
+
/**
|
|
533
|
+
* ❌ Deletes specific commercial order lines.
|
|
534
|
+
*
|
|
535
|
+
* This function deletes commercial order lines identified by the `commercialOrderId`.
|
|
536
|
+
* The `commercialOrderId` parameter is mandatory and validated before the request is executed.
|
|
537
|
+
*
|
|
538
|
+
* 🛠 **Endpoint**: `DELETE /v2/shop/commercial-orders/${commercialOrderId}/lines` [ORDER-350]
|
|
539
|
+
*
|
|
540
|
+
* | Parameter | Type | Required | Description |
|
|
541
|
+
* |----------------------|------------------- |----------|---------------------------------------------------------------|
|
|
542
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order whose lines are to be deleted |
|
|
543
|
+
* | `body` | `OfferToDelete[]` | ❌ | The list of offers to delete. Can be empty. |
|
|
544
|
+
*
|
|
545
|
+
* 📤 **Returns**:
|
|
546
|
+
* A `Promise` resolving when the commercial order lines are successfully deleted.
|
|
547
|
+
*
|
|
548
|
+
* 🛠 **Example usage**:
|
|
549
|
+
* ```ts
|
|
550
|
+
* const response = await deleteCommercialOrderLines("commercialOrder123", [{ offerPriceId: "price456" }]);
|
|
551
|
+
* ```
|
|
552
|
+
*
|
|
553
|
+
* @param {DeleteCommercialOrderLinesParameters} params - The parameters for the request.
|
|
554
|
+
* @throws {Error} If `commercialOrderId` is missing.
|
|
555
|
+
* @returns {Promise<DeleteCommercialOrderLinesResponse>} A promise resolving when the commercial order lines are successfully deleted.
|
|
556
|
+
*/
|
|
557
|
+
export declare function deleteCommercialOrderLines({ commercialOrderId, body, }: DeleteCommercialOrderLinesParameters): Promise<DeleteCommercialOrderLinesResponse>;
|