@longvansoftware/service-js-client 1.4.7 → 1.4.9

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.
@@ -245,6 +245,18 @@ exports.GET_LAB_INSTANCE = (0, graphql_tag_1.gql) `
245
245
  serviceId
246
246
  status
247
247
  statusDetail
248
+ groupType
249
+ colocationId
250
+ ip
251
+ region
252
+ site
253
+ rack
254
+ location
255
+ position
256
+ deviceType
257
+ url
258
+ baremetalId
259
+ platform
248
260
  }
249
261
  }
250
262
  `;
@@ -18,6 +18,7 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
18
18
  amount
19
19
  currencyCode
20
20
  }
21
+ createdStamp
21
22
  }
22
23
  lineItems {
23
24
  orderLineItem {
@@ -15,3 +15,4 @@ export declare const GET_RESOURCE_BY_PRODUCT: import("graphql").DocumentNode;
15
15
  export declare const GET_PRODUCT_VARIANT_BY_ID: import("graphql").DocumentNode;
16
16
  export declare const GET_RELATED_INFOR: import("graphql").DocumentNode;
17
17
  export declare const GET_DETAIL_STORES: import("graphql").DocumentNode;
18
+ export declare const GET_LIST_PRICE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_DETAIL_STORES = exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
3
+ exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  // export const GET_PRODUCT_BY_ID_QUERY = gql`
6
6
  // query GetProductById(
@@ -829,3 +829,16 @@ exports.GET_DETAIL_STORES = (0, graphql_tag_1.gql) `
829
829
  }
830
830
  }
831
831
  `;
832
+ exports.GET_LIST_PRICE = (0, graphql_tag_1.gql) `
833
+ query GetListPrice(
834
+ $partnerId: String!
835
+ $storeChannel: String!
836
+ $productIds: [String!]!
837
+ ) {
838
+ getListPrice(
839
+ partnerId: $partnerId
840
+ storeChannel: $storeChannel
841
+ productIds: $productIds
842
+ )
843
+ }
844
+ `;
@@ -43,4 +43,5 @@ export declare class ProductService extends Service {
43
43
  getProductVariantById(variantId: string): Promise<any>;
44
44
  getRelatedInfor(id: string): Promise<any>;
45
45
  getDetailStores(storeId: string): Promise<any>;
46
+ getListPrice(productIds: string[], storeId: string): Promise<any>;
46
47
  }
@@ -232,5 +232,23 @@ class ProductService extends serviceSDK_1.Service {
232
232
  }
233
233
  });
234
234
  }
235
+ getListPrice(productIds, storeId) {
236
+ return __awaiter(this, void 0, void 0, function* () {
237
+ const query = queries_1.GET_LIST_PRICE;
238
+ const variablesHandle = {
239
+ partnerId: this.orgId,
240
+ storeChannel: storeId ? storeId : this.storeId,
241
+ productIds,
242
+ };
243
+ try {
244
+ const response = yield this.graphqlQueryV2(query, variablesHandle);
245
+ return response.getListPrice;
246
+ }
247
+ catch (error) {
248
+ console.log(`Error fetching getDetailStores error : ${error}`);
249
+ throw error;
250
+ }
251
+ });
252
+ }
235
253
  }
236
254
  exports.ProductService = ProductService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [