@longvansoftware/storefront-js-client 3.9.4 → 3.9.5

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.
@@ -539,4 +539,15 @@ export declare class OrderService extends Service {
539
539
  tooglePaymentMethod(methodCode: string, status: boolean): Promise<any>;
540
540
  choosePaymentGatewayForPaymentMethod(methodCode: string, gatewayId: string): Promise<any>;
541
541
  addCustomerToOder(orderId: string, customerData: any): Promise<any>;
542
+ updateShippingAddressWithoutLogin(orderId: string, shippingData: {
543
+ name: string;
544
+ phone: string;
545
+ address: string;
546
+ province: string;
547
+ district: string;
548
+ ward: string;
549
+ province_code: string;
550
+ district_code: string;
551
+ ward_code: string;
552
+ }): Promise<any>;
542
553
  }
@@ -1709,5 +1709,22 @@ class OrderService extends serviceSDK_1.Service {
1709
1709
  }
1710
1710
  });
1711
1711
  }
1712
+ updateShippingAddressWithoutLogin(orderId, shippingData) {
1713
+ return __awaiter(this, void 0, void 0, function* () {
1714
+ const endpoint = `/front/orders/express/${this.orgId}/${this.storeId}/${orderId}/shipping-address`;
1715
+ const method = "PUT";
1716
+ try {
1717
+ const response = yield this.restApiCallWithNoToken(endpoint, method, shippingData);
1718
+ console.log("RESPONSE:", response);
1719
+ return response;
1720
+ }
1721
+ catch (error) {
1722
+ if (error.response && error.response.data) {
1723
+ console.error("Backend Error Detail:", JSON.stringify(error.response.data, null, 2));
1724
+ }
1725
+ throw error;
1726
+ }
1727
+ });
1728
+ }
1712
1729
  }
1713
1730
  exports.OrderService = OrderService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.9.4",
3
+ "version": "3.9.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [