@longvansoftware/storefront-js-client 2.4.9 → 2.5.1

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,12 +493,18 @@ 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
498
+ $currentPage: Int
499
+ $maxResult: Int
497
500
  ) {
498
501
  getProducts(
499
502
  partnerId: $partnerId
500
503
  storeChannel: $storeChannel
504
+ keyword: $keyword
501
505
  category: $category
506
+ currentPage: $currentPage
507
+ maxResult: $maxResult
502
508
  ) {
503
509
  total
504
510
  currentPage
@@ -531,6 +537,22 @@ exports.GET_PRODUCT = (0, graphql_tag_1.gql) `
531
537
  compareAtPrice
532
538
  featuredImage
533
539
  images
540
+ categories {
541
+ id
542
+ title
543
+ image
544
+ icon
545
+ parentId
546
+ level
547
+ handle
548
+ description
549
+ }
550
+ groups {
551
+ id
552
+ name
553
+ policy
554
+ image
555
+ }
534
556
  }
535
557
  }
536
558
  }
@@ -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,16 @@ 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,
223
+ currentPage: dataQuery.currentPage,
224
+ maxResult: dataQuery.maxResult,
222
225
  };
223
226
  try {
224
227
  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.9",
3
+ "version": "2.5.1",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [