@longvansoftware/service-js-client 1.17.7 → 1.17.8

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.
@@ -176,6 +176,7 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
176
176
  totalResource
177
177
  unitGift
178
178
  giftDuration
179
+ giftDurationUnit
179
180
  }
180
181
  itemType
181
182
  }
@@ -471,6 +471,6 @@ export declare class OrderService extends Service {
471
471
  addProductInOrderWithoutLogin(orderId: string, updated_by: string, data: any, store: string): Promise<any>;
472
472
  findCampaignActionGiftVoucher(): Promise<any>;
473
473
  addProductGiftPromotion(orderId: string, updatedBy: string, data: any): Promise<any>;
474
- removeProductGiftPromotion(orderId: string, orderLineItemId: string): Promise<any>;
474
+ removeProductGiftPromotion(orderId: string, orderLineItemId: string, productGiftId: string): Promise<any>;
475
475
  checkNewCustomer(orderId: string, customer_id: string): Promise<any>;
476
476
  }
@@ -1296,11 +1296,11 @@ class OrderService extends serviceSDK_1.Service {
1296
1296
  });
1297
1297
  }
1298
1298
  // https://storefront.dev.longvan.vn/swagger-ui/index.html#/Order%20API/removeGiftQuantity
1299
- removeProductGiftPromotion(orderId, orderLineItemId) {
1299
+ removeProductGiftPromotion(orderId, orderLineItemId, productGiftId) {
1300
1300
  return __awaiter(this, void 0, void 0, function* () {
1301
1301
  console.log("🚀 ~ OrderService ~ removeProductGiftPromotion ~ orderLineItemId:", orderLineItemId);
1302
1302
  console.log("🚀 ~ OrderService ~ removeProductGiftPromotion ~ orderId:", orderId);
1303
- const endpoint = `/orders/${this.orgId}/${orderId}/${orderLineItemId}/giftQuantity`;
1303
+ const endpoint = `/orders/${this.orgId}/${orderId}/${orderLineItemId}/giftQuantity${productGiftId ? `?productGiftId=${productGiftId}` : ""}`;
1304
1304
  const method = "PUT";
1305
1305
  try {
1306
1306
  const response = yield this.restApiCallWithToken(endpoint, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.17.7",
3
+ "version": "1.17.8",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [