@longvansoftware/storefront-js-client 2.4.8 → 2.5.0

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.
@@ -493,11 +493,13 @@ exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
493
493
  query GetProducts(
494
494
  $partnerId: String!
495
495
  $storeChannel: String!
496
+ $keyword: String
496
497
  $category: String
497
498
  ) {
498
499
  getProducts(
499
500
  partnerId: $partnerId
500
501
  storeChannel: $storeChannel
502
+ keyword: $keyword
501
503
  category: $category
502
504
  ) {
503
505
  total
@@ -531,6 +533,22 @@ exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
531
533
  compareAtPrice
532
534
  featuredImage
533
535
  images
536
+ categories {
537
+ id
538
+ title
539
+ image
540
+ icon
541
+ parentId
542
+ level
543
+ handle
544
+ description
545
+ }
546
+ groups {
547
+ id
548
+ name
549
+ policy
550
+ image
551
+ }
534
552
  }
535
553
  }
536
554
  }
@@ -460,4 +460,5 @@ export declare class OrderService extends Service {
460
460
  removeMemberDiscount(orderId: string): Promise<any>;
461
461
  getInfoChatApp(attributesName: string): Promise<any>;
462
462
  validatePhoneNumber(phoneNumer: string): boolean;
463
+ updateExchangeOrder(exchangeOrder: string, returnOrder: string, sellOrder: string): Promise<any>;
463
464
  }
@@ -1348,5 +1348,18 @@ class OrderService extends serviceSDK_1.Service {
1348
1348
  const res = (0, validatePhoneNumber_1.validatePhoneNumber)(phoneNumer);
1349
1349
  return res;
1350
1350
  }
1351
+ updateExchangeOrder(exchangeOrder, returnOrder, sellOrder) {
1352
+ return __awaiter(this, void 0, void 0, function* () {
1353
+ const endpoint = `/orders/${this.orgId}/${exchangeOrder}/${returnOrder}/${sellOrder}/updateExchangeOrder`;
1354
+ const method = "PUT";
1355
+ try {
1356
+ const response = yield this.restApiCallWithToken(endpoint, method);
1357
+ return response;
1358
+ }
1359
+ catch (error) {
1360
+ throw error;
1361
+ }
1362
+ });
1363
+ }
1351
1364
  }
1352
1365
  exports.OrderService = OrderService;
@@ -39,5 +39,5 @@ export declare class ProductService extends Service {
39
39
  getDetailStoresV2(storeId: string): Promise<any>;
40
40
  getProductImage: (productId: string) => Promise<any>;
41
41
  getCategory(typeBuild: string, level: number): Promise<any>;
42
- getProduct(category: string): Promise<any>;
42
+ getProduct(dataQuery: any): Promise<any>;
43
43
  }
@@ -212,13 +212,14 @@ class ProductService extends serviceSDK_1.Service {
212
212
  }
213
213
  });
214
214
  }
215
- getProduct(category) {
215
+ getProduct(dataQuery) {
216
216
  return __awaiter(this, void 0, void 0, function* () {
217
217
  const query = queries_1.GET_PRODUCT;
218
218
  const variables = {
219
219
  partnerId: this.orgId,
220
220
  storeChannel: this.storeId,
221
- category,
221
+ keyword: dataQuery.keyword,
222
+ category: dataQuery.category,
222
223
  };
223
224
  try {
224
225
  const response = yield this.graphqlQuery(query, variables);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.4.8",
3
+ "version": "2.5.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [