@longvansoftware/storefront-js-client 2.4.9 → 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
|
}
|
|
@@ -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(
|
|
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(
|
|
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
|
-
|
|
221
|
+
keyword: dataQuery.keyword,
|
|
222
|
+
category: dataQuery.category,
|
|
222
223
|
};
|
|
223
224
|
try {
|
|
224
225
|
const response = yield this.graphqlQuery(query, variables);
|