@djust-b2b/djust-front-sdk 1.20.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare const DjustSDK: {
|
|
|
64
64
|
getLogisticOrderShippingInformation({ orderId, }: import("./interfaces").GetLogisticOrderShippingAddressParameters): Promise<import("./interfaces").GetLogisticOrderShippingAddressResponse>;
|
|
65
65
|
updateLogisticOrderShippingInformation({ orderId, shippingAddressId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingInformationParameters): Promise<void>;
|
|
66
66
|
updateLogisticOrderShippingType({ orderId, shippingType, }: import("./interfaces").UpdateLogisticOrderShippingTypeParameters): Promise<void>;
|
|
67
|
-
createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParameters): Promise<
|
|
67
|
+
createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: import("./interfaces").CreateLogisticOrderThreadParameters): Promise<import("./interfaces").CreateLogisticOrderThreadResponse>;
|
|
68
68
|
getLogisticOrderReview({ orderId, }: import("./interfaces").GetLogisticOrderReviewParameters): Promise<import("./interfaces").GetLogisticOrderReviewResponse>;
|
|
69
69
|
addLogisticOrderReview({ orderId, comment, grade, }: import("./interfaces").AddLogisticOrderReviewParameters): Promise<import("./interfaces").AddLogisticOrderReviewResponse>;
|
|
70
70
|
getThreadReasonTypes(): Promise<import("./interfaces").GetThreadReasonTypesResponse>;
|
|
@@ -174,6 +174,12 @@ export interface UpdateLogisticOrderLineCustomFieldsResponse extends OrderLogist
|
|
|
174
174
|
}
|
|
175
175
|
export interface GetLogisticOrderShippingAddressResponse extends Array<ShippingTypeInformationDto> {
|
|
176
176
|
}
|
|
177
|
+
export interface CreateLogisticOrderThreadResponse {
|
|
178
|
+
messageExternalId: string;
|
|
179
|
+
messageId: string;
|
|
180
|
+
threadExternalId: string;
|
|
181
|
+
threadId: string;
|
|
182
|
+
}
|
|
177
183
|
export interface GetLogisticOrderReviewResponse extends OrderRatingResponse {
|
|
178
184
|
}
|
|
179
185
|
export interface AddLogisticOrderReviewResponse extends OrderRatingResponse {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddLogisticOrderReviewParameters, AddLogisticOrderReviewResponse, ApproveLogisticOrderParameters, ApproveLogisticOrderResponse, CancelLogisticOrderParameters, CancelLogisticOrderResponse, ConfirmLogisticOrderReceptionParameters, ConfirmLogisticOrderReceptionResponse, CreateLogisticOrderParameters, CreateLogisticOrderThreadParameters, DisapproveLogisticOrderParameters, DisapproveLogisticOrderResponse, GetLogisticOrderAccountingDocumentsParameters, GetLogisticOrderAccountingDocumentsResponse, GetLogisticOrderAccountingDocumentUrlParameters, GetLogisticOrderApproversParameters, GetLogisticOrderApproversResponse, GetLogisticOrderCustomFieldsParameters, GetLogisticOrderCustomFieldsResponse, GetLogisticOrderDocumentsParameters, GetLogisticOrderDocumentsResponse, GetLogisticOrderDocumentUrlParameters, GetLogisticOrderLineCustomFieldsParameters, GetLogisticOrderLineCustomFieldsResponse, GetLogisticOrderLinesParameters, GetLogisticOrderLinesResponse, GetLogisticOrderParameters, GetLogisticOrderResponse, GetLogisticOrderReviewParameters, GetLogisticOrderReviewResponse, GetLogisticOrderShippingAddressParameters, GetLogisticOrderShippingAddressResponse, GetLogisticOrdersParameters, GetLogisticOrdersResponse, GetThreadReasonTypesResponse, GetThreadSubReasonsParameters, GetThreadSubReasonsResponse, UpdateLogisticOrderBillingInformationParameters, UpdateLogisticOrderCustomFieldsParameters, UpdateLogisticOrderCustomFieldsResponse, UpdateLogisticOrderLineCustomFieldsParameters, UpdateLogisticOrderLineCustomFieldsResponse, UpdateLogisticOrderShippingAddressParameters, UpdateLogisticOrderShippingInformationParameters, UpdateLogisticOrderShippingTypeParameters, UpdateOnHoldLogisticOrderLineParameters, UpdateOnHoldLogisticOrderLinesParameters, UpdateOnHoldLogisticOrderLinesResponse } from "./definitions";
|
|
1
|
+
import { AddLogisticOrderReviewParameters, AddLogisticOrderReviewResponse, ApproveLogisticOrderParameters, ApproveLogisticOrderResponse, CancelLogisticOrderParameters, CancelLogisticOrderResponse, ConfirmLogisticOrderReceptionParameters, ConfirmLogisticOrderReceptionResponse, CreateLogisticOrderParameters, CreateLogisticOrderThreadParameters, CreateLogisticOrderThreadResponse, DisapproveLogisticOrderParameters, DisapproveLogisticOrderResponse, GetLogisticOrderAccountingDocumentsParameters, GetLogisticOrderAccountingDocumentsResponse, GetLogisticOrderAccountingDocumentUrlParameters, GetLogisticOrderApproversParameters, GetLogisticOrderApproversResponse, GetLogisticOrderCustomFieldsParameters, GetLogisticOrderCustomFieldsResponse, GetLogisticOrderDocumentsParameters, GetLogisticOrderDocumentsResponse, GetLogisticOrderDocumentUrlParameters, GetLogisticOrderLineCustomFieldsParameters, GetLogisticOrderLineCustomFieldsResponse, GetLogisticOrderLinesParameters, GetLogisticOrderLinesResponse, GetLogisticOrderParameters, GetLogisticOrderResponse, GetLogisticOrderReviewParameters, GetLogisticOrderReviewResponse, GetLogisticOrderShippingAddressParameters, GetLogisticOrderShippingAddressResponse, GetLogisticOrdersParameters, GetLogisticOrdersResponse, GetThreadReasonTypesResponse, GetThreadSubReasonsParameters, GetThreadSubReasonsResponse, UpdateLogisticOrderBillingInformationParameters, UpdateLogisticOrderCustomFieldsParameters, UpdateLogisticOrderCustomFieldsResponse, UpdateLogisticOrderLineCustomFieldsParameters, UpdateLogisticOrderLineCustomFieldsResponse, UpdateLogisticOrderShippingAddressParameters, UpdateLogisticOrderShippingInformationParameters, UpdateLogisticOrderShippingTypeParameters, UpdateOnHoldLogisticOrderLineParameters, UpdateOnHoldLogisticOrderLinesParameters, UpdateOnHoldLogisticOrderLinesResponse } from "./definitions";
|
|
2
2
|
/**
|
|
3
3
|
* 🚚 Gets logistic orders.
|
|
4
4
|
*
|
|
@@ -741,7 +741,7 @@ export declare function updateLogisticOrderShippingType({ orderId, shippingType,
|
|
|
741
741
|
* the `orderId`. This parameter, as well as the `lineId`, the `message` and the `reasonCode`, is mandatory and validated
|
|
742
742
|
* before the request is executed.
|
|
743
743
|
*
|
|
744
|
-
* 🛠 **Endpoint**: `POST /v1/shop/logistic-orders/${orderId}/threads [
|
|
744
|
+
* 🛠 **Endpoint**: `POST /v1/shop/logistic-orders/${orderId}/threads [THREAD-101]`
|
|
745
745
|
*
|
|
746
746
|
* | Parameter | Type | Required | Description |
|
|
747
747
|
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
@@ -751,7 +751,7 @@ export declare function updateLogisticOrderShippingType({ orderId, shippingType,
|
|
|
751
751
|
* | `reasonCode` | `string` | ✅ | The code indentifying the type of thread. |
|
|
752
752
|
*
|
|
753
753
|
* 📤 **Returns**:
|
|
754
|
-
* A `Promise` resolving when the thread is created.
|
|
754
|
+
* A `Promise` resolving to a `CreateLogisticOrderThreadResponse` object when the thread is created.
|
|
755
755
|
*
|
|
756
756
|
* 🛠 **Example usage**:
|
|
757
757
|
* ```ts
|
|
@@ -765,9 +765,9 @@ export declare function updateLogisticOrderShippingType({ orderId, shippingType,
|
|
|
765
765
|
*
|
|
766
766
|
* @param {CreateLogisticOrderThreadParameters} params - The parameters for the request.
|
|
767
767
|
* @throws {Error} If `orderId`, `lineId`, `message` or `reasonCode` is missing.
|
|
768
|
-
* @returns {Promise<
|
|
768
|
+
* @returns {Promise<CreateLogisticOrderThreadResponse>} A promise resolving when the thread is created.
|
|
769
769
|
*/
|
|
770
|
-
export declare function createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: CreateLogisticOrderThreadParameters): Promise<
|
|
770
|
+
export declare function createLogisticOrderThread({ orderId, lineId, message, reasonCode, }: CreateLogisticOrderThreadParameters): Promise<CreateLogisticOrderThreadResponse>;
|
|
771
771
|
/**
|
|
772
772
|
* 🚚 Gets a specific logistic order's review.
|
|
773
773
|
*
|
|
@@ -1000,7 +1000,7 @@ async function updateLogisticOrderShippingType({ orderId, shippingType, }) {
|
|
|
1000
1000
|
* the `orderId`. This parameter, as well as the `lineId`, the `message` and the `reasonCode`, is mandatory and validated
|
|
1001
1001
|
* before the request is executed.
|
|
1002
1002
|
*
|
|
1003
|
-
* 🛠 **Endpoint**: `POST /v1/shop/logistic-orders/${orderId}/threads [
|
|
1003
|
+
* 🛠 **Endpoint**: `POST /v1/shop/logistic-orders/${orderId}/threads [THREAD-101]`
|
|
1004
1004
|
*
|
|
1005
1005
|
* | Parameter | Type | Required | Description |
|
|
1006
1006
|
* |-------------------|---------------------------------|------------|------------------------------------------|
|
|
@@ -1010,7 +1010,7 @@ async function updateLogisticOrderShippingType({ orderId, shippingType, }) {
|
|
|
1010
1010
|
* | `reasonCode` | `string` | ✅ | The code indentifying the type of thread. |
|
|
1011
1011
|
*
|
|
1012
1012
|
* 📤 **Returns**:
|
|
1013
|
-
* A `Promise` resolving when the thread is created.
|
|
1013
|
+
* A `Promise` resolving to a `CreateLogisticOrderThreadResponse` object when the thread is created.
|
|
1014
1014
|
*
|
|
1015
1015
|
* 🛠 **Example usage**:
|
|
1016
1016
|
* ```ts
|
|
@@ -1024,15 +1024,16 @@ async function updateLogisticOrderShippingType({ orderId, shippingType, }) {
|
|
|
1024
1024
|
*
|
|
1025
1025
|
* @param {CreateLogisticOrderThreadParameters} params - The parameters for the request.
|
|
1026
1026
|
* @throws {Error} If `orderId`, `lineId`, `message` or `reasonCode` is missing.
|
|
1027
|
-
* @returns {Promise<
|
|
1027
|
+
* @returns {Promise<CreateLogisticOrderThreadResponse>} A promise resolving when the thread is created.
|
|
1028
1028
|
*/
|
|
1029
1029
|
async function createLogisticOrderThread({ orderId, lineId, message, reasonCode, }) {
|
|
1030
1030
|
(0, parameters_validation_1.required)({ orderId, lineId, message, reasonCode });
|
|
1031
|
-
(0, fetch_instance_1.enhancedFetch)({
|
|
1031
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
1032
1032
|
method: "POST",
|
|
1033
1033
|
path: `/v1/shop/logistic-orders/${orderId}/threads`,
|
|
1034
1034
|
body: JSON.stringify({ lineId, message, reasonCode }),
|
|
1035
1035
|
});
|
|
1036
|
+
return data;
|
|
1036
1037
|
}
|
|
1037
1038
|
/**
|
|
1038
1039
|
* 🚚 Gets a specific logistic order's review.
|