@djust-b2b/djust-front-sdk 1.20.0 → 1.20.2

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<void>;
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 [ORDER-100]`
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<void>} A promise resolving when the thread is created.
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<void>;
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 [ORDER-100]`
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<void>} A promise resolving when the thread is created.
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.
@@ -18,7 +18,7 @@ export interface UpdateProductReviewParameters {
18
18
  message: string;
19
19
  rating: number;
20
20
  }
21
- declare enum AggregationType {
21
+ export declare enum AggregationType {
22
22
  PRODUCT = "PRODUCT",
23
23
  VARIANT = "VARIANT"
24
24
  }
@@ -142,4 +142,3 @@ export interface GetProductPaginatedOffersResponse {
142
142
  totalElements: number;
143
143
  totalPages: number;
144
144
  }
145
- export {};
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AggregationType = void 0;
3
4
  var AggregationType;
4
5
  (function (AggregationType) {
5
6
  AggregationType["PRODUCT"] = "PRODUCT";
6
7
  AggregationType["VARIANT"] = "VARIANT";
7
- })(AggregationType || (AggregationType = {}));
8
+ })(AggregationType || (exports.AggregationType = AggregationType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djust-b2b/djust-front-sdk",
3
- "version": "1.20.0",
3
+ "version": "1.20.2",
4
4
  "description": "DJUST Front SDK is a versatile JavaScript Software Development Kit (SDK) ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",