@longvansoftware/storefront-js-client 3.9.2 → 3.9.4

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.
@@ -10,7 +10,7 @@ export declare class OrderService extends Service {
10
10
  * @param orgId - The organization ID.
11
11
  * @param storeId - The store ID.
12
12
  */
13
- constructor(endpoint: string, orgId: string, storeId: string, environment: "dev" | "live");
13
+ constructor(endpoint: string, orgId: string, storeId: string, environment?: "dev" | "live");
14
14
  setToken(token: string): void;
15
15
  /**
16
16
  * Override restApiCallWithToken to use default token if no token is set
@@ -75,17 +75,6 @@ export declare class OrderService extends Service {
75
75
  * @throws If an error occurs while updating the customer and shipping address.
76
76
  */
77
77
  updateCustomerAndShippingAddress(orderId: string, customerId: string, shippingAddress: string): Promise<any>;
78
- updateShippingAddressWithoutLogin(orderId: string, shippingData: {
79
- name: string;
80
- phone: string;
81
- address: string;
82
- province: string;
83
- district: string;
84
- ward: string;
85
- province_code: string;
86
- district_code: string;
87
- ward_code: string;
88
- }): Promise<any>;
89
78
  /**
90
79
  * Retrieves the order line items for a specific order.
91
80
  * @param partnerId - The partner ID.
@@ -27,7 +27,7 @@ class OrderService extends serviceSDK_1.Service {
27
27
  * @param orgId - The organization ID.
28
28
  * @param storeId - The store ID.
29
29
  */
30
- constructor(endpoint, orgId, storeId, environment) {
30
+ constructor(endpoint, orgId, storeId, environment = "dev") {
31
31
  super(endpoint, orgId, storeId, environment);
32
32
  }
33
33
  setToken(token) {
@@ -208,23 +208,6 @@ class OrderService extends serviceSDK_1.Service {
208
208
  }
209
209
  });
210
210
  }
211
- updateShippingAddressWithoutLogin(orderId, shippingData) {
212
- return __awaiter(this, void 0, void 0, function* () {
213
- const endpoint = `/front/orders/express/${this.orgId}/${this.storeId}/${orderId}/shipping-address`;
214
- const method = "PUT";
215
- try {
216
- const response = yield this.restApiCallWithNoToken(endpoint, method, shippingData);
217
- console.log("RESPONSE:", response);
218
- return response;
219
- }
220
- catch (error) {
221
- if (error.response && error.response.data) {
222
- console.error("Backend Error Detail:", JSON.stringify(error.response.data, null, 2));
223
- }
224
- throw error;
225
- }
226
- });
227
- }
228
211
  /**
229
212
  * Retrieves the order line items for a specific order.
230
213
  * @param partnerId - The partner ID.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.9.2",
3
+ "version": "3.9.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [