@longvansoftware/storefront-js-client 2.2.8 → 2.3.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.
|
@@ -36,6 +36,7 @@ export declare class ProductService extends Service {
|
|
|
36
36
|
getPolicy(groupId: string): Promise<any>;
|
|
37
37
|
getStores(type: string): Promise<any>;
|
|
38
38
|
getDetailStores(): Promise<any>;
|
|
39
|
+
getDetailStoresV2(storeId: string): Promise<any>;
|
|
39
40
|
getProductImage: (productId: string) => Promise<any>;
|
|
40
41
|
getCategory(typeBuild: string, level: number): Promise<any>;
|
|
41
42
|
getProduct(category: string): Promise<any>;
|
|
@@ -24,6 +24,7 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
24
24
|
*/
|
|
25
25
|
constructor(endpoint, orgId, storeId) {
|
|
26
26
|
super(endpoint, orgId, storeId);
|
|
27
|
+
//
|
|
27
28
|
this.getProductImage = (productId) => __awaiter(this, void 0, void 0, function* () {
|
|
28
29
|
const query = queries_1.GET_PRODUCT_IMAGE;
|
|
29
30
|
const variables = {
|
|
@@ -176,6 +177,23 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
176
177
|
}
|
|
177
178
|
});
|
|
178
179
|
}
|
|
180
|
+
//
|
|
181
|
+
getDetailStoresV2(storeId) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
const query = queries_1.GET_DETAIL_STORES;
|
|
184
|
+
const variablesHandle = {
|
|
185
|
+
partnerId: this.orgId,
|
|
186
|
+
storeId,
|
|
187
|
+
};
|
|
188
|
+
try {
|
|
189
|
+
const response = yield this.graphqlQuery(query, variablesHandle);
|
|
190
|
+
return response.getDetailStores;
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
throw error;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
179
197
|
getCategory(typeBuild, level) {
|
|
180
198
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
199
|
const query = queries_1.GET_CATEGORIES_QUERY;
|
|
@@ -200,7 +218,7 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
200
218
|
const variables = {
|
|
201
219
|
partnerId: this.orgId,
|
|
202
220
|
storeChannel: this.storeId,
|
|
203
|
-
category
|
|
221
|
+
category,
|
|
204
222
|
};
|
|
205
223
|
try {
|
|
206
224
|
const response = yield this.graphqlQuery(query, variables);
|