@longvansoftware/service-js-client 1.4.7 → 1.4.8
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.
- package/dist/src/graphql/computing/queries.js +14 -2
- package/dist/src/graphql/orderGraphQL/queries.js +1 -0
- package/dist/src/graphql/product/queries.d.ts +1 -0
- package/dist/src/graphql/product/queries.js +14 -1
- package/dist/src/lib/computing/index.d.ts +1 -1
- package/dist/src/lib/computing/index.js +1 -2
- package/dist/src/lib/product/index.d.ts +1 -0
- package/dist/src/lib/product/index.js +18 -0
- package/package.json +1 -1
@@ -223,8 +223,8 @@ exports.GET_COMPUTINGS = (0, graphql_tag_1.gql) `
|
|
223
223
|
}
|
224
224
|
`;
|
225
225
|
exports.GET_LAB_INSTANCE = (0, graphql_tag_1.gql) `
|
226
|
-
query GetLabInstance($
|
227
|
-
getLabInstance(
|
226
|
+
query GetLabInstance($labId: String!, $userId: String!) {
|
227
|
+
getLabInstance(labId: $labId, userId: $userId) {
|
228
228
|
id
|
229
229
|
name
|
230
230
|
username
|
@@ -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
|
`;
|
@@ -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
|
+
`;
|
@@ -33,7 +33,7 @@ export declare class ComputingService extends Service {
|
|
33
33
|
networkUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
|
34
34
|
diskUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
|
35
35
|
getComputings(userId: string): Promise<any>;
|
36
|
-
getLabInstance(
|
36
|
+
getLabInstance(labId: string, userId: string): Promise<any>;
|
37
37
|
createCluster(ownerId: string, name: string): Promise<any>;
|
38
38
|
addComputingInCluster(clusterId: string, computingId: string, userId: string): Promise<any>;
|
39
39
|
removeComputingInCluster(clusterId: string, computingId: string, userId: string): Promise<any>;
|
@@ -431,11 +431,10 @@ class ComputingService extends serviceSDK_1.Service {
|
|
431
431
|
}
|
432
432
|
});
|
433
433
|
}
|
434
|
-
getLabInstance(
|
434
|
+
getLabInstance(labId, userId) {
|
435
435
|
return __awaiter(this, void 0, void 0, function* () {
|
436
436
|
const query = queries_1.GET_LAB_INSTANCE;
|
437
437
|
const variables = {
|
438
|
-
articleId,
|
439
438
|
labId,
|
440
439
|
userId,
|
441
440
|
};
|
@@ -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;
|