@longvansoftware/service-js-client 1.9.7 → 1.9.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.
- package/dist/src/graphql/computing/mutations.d.ts +1 -0
- package/dist/src/graphql/computing/mutations.js +31 -1
- package/dist/src/graphql/computing/queries.d.ts +4 -0
- package/dist/src/graphql/computing/queries.js +55 -1
- package/dist/src/graphql/orderGraphQL/queries.js +49 -0
- package/dist/src/graphql/product/queries.d.ts +2 -0
- package/dist/src/graphql/product/queries.js +35 -1
- package/dist/src/lib/computing/index.d.ts +5 -0
- package/dist/src/lib/computing/index.js +87 -0
- package/dist/src/lib/product/index.d.ts +2 -0
- package/dist/src/lib/product/index.js +35 -0
- package/package.json +1 -1
@@ -14,3 +14,4 @@ export declare const REMOVE_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode
|
|
14
14
|
export declare const STOP_USE_COMPUTING: import("graphql").DocumentNode;
|
15
15
|
export declare const ADD_PORT_NAT: import("graphql").DocumentNode;
|
16
16
|
export declare const UPDATE_DESCRIPTION_COMPUTING: import("graphql").DocumentNode;
|
17
|
+
export declare const CREATE_COMPUTING_FOR_DC: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.UPDATE_DESCRIPTION_COMPUTING = exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
|
3
|
+
exports.CREATE_COMPUTING_FOR_DC = exports.UPDATE_DESCRIPTION_COMPUTING = exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.RESTARTVM = (0, graphql_tag_1.gql) `
|
6
6
|
mutation Restart($computingId: String!, $actor: String!) {
|
@@ -221,3 +221,33 @@ exports.UPDATE_DESCRIPTION_COMPUTING = (0, graphql_tag_1.gql) `
|
|
221
221
|
)
|
222
222
|
}
|
223
223
|
`;
|
224
|
+
exports.CREATE_COMPUTING_FOR_DC = (0, graphql_tag_1.gql) `
|
225
|
+
mutation CreateComputingForDC(
|
226
|
+
$name: String!
|
227
|
+
$username: String!
|
228
|
+
$password: String!
|
229
|
+
$description: String!
|
230
|
+
$templateId: String!
|
231
|
+
$interfaces: [InterfacesInput]!
|
232
|
+
$cpu: CpuInput!
|
233
|
+
$ram: RamInput!
|
234
|
+
$resourcePoolId: String!
|
235
|
+
$disks: [DiskInput!]!
|
236
|
+
) {
|
237
|
+
createComputingForDC(
|
238
|
+
name: $name
|
239
|
+
username: $username
|
240
|
+
password: $password
|
241
|
+
description: $description
|
242
|
+
templateId: $templateId
|
243
|
+
interfaces: $interfaces
|
244
|
+
cpu: $cpu
|
245
|
+
ram: $ram
|
246
|
+
resourcePoolId: $resourcePoolId
|
247
|
+
disks: $disks
|
248
|
+
) {
|
249
|
+
computingId
|
250
|
+
message
|
251
|
+
}
|
252
|
+
}
|
253
|
+
`;
|
@@ -18,3 +18,7 @@ export declare const GET_COMPUTING_BY_CLUSTER: import("graphql").DocumentNode;
|
|
18
18
|
export declare const GET_COMPUTING_BY_SERVICE: import("graphql").DocumentNode;
|
19
19
|
export declare const GET_EDGES: import("graphql").DocumentNode;
|
20
20
|
export declare const GET_PORT_NATS_BY_SERVICE_ID: import("graphql").DocumentNode;
|
21
|
+
export declare const GET_TEMPLATE: import("graphql").DocumentNode;
|
22
|
+
export declare const GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID: import("graphql").DocumentNode;
|
23
|
+
export declare const GET_AVAILABLE_STORAGES_FOR_DC: import("graphql").DocumentNode;
|
24
|
+
export declare const GET_RESOUCE_POOL_BY_SERVICE: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_PORT_NATS_BY_SERVICE_ID = exports.GET_EDGES = exports.GET_COMPUTING_BY_SERVICE = exports.GET_COMPUTING_BY_CLUSTER = exports.GET_CLUSTER = exports.GET_CLUSTERS = exports.GET_LAB_INSTANCE = exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
|
3
|
+
exports.GET_RESOUCE_POOL_BY_SERVICE = exports.GET_AVAILABLE_STORAGES_FOR_DC = exports.GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID = exports.GET_TEMPLATE = exports.GET_PORT_NATS_BY_SERVICE_ID = exports.GET_EDGES = exports.GET_COMPUTING_BY_SERVICE = exports.GET_COMPUTING_BY_CLUSTER = exports.GET_CLUSTER = exports.GET_CLUSTERS = exports.GET_LAB_INSTANCE = exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
|
6
6
|
query ComputingDetail($computingId: String!) {
|
@@ -54,6 +54,7 @@ exports.PORTNATS = (0, graphql_tag_1.gql) `
|
|
54
54
|
description
|
55
55
|
status
|
56
56
|
domain
|
57
|
+
computingId
|
57
58
|
}
|
58
59
|
}
|
59
60
|
`;
|
@@ -408,6 +409,59 @@ exports.GET_PORT_NATS_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
|
408
409
|
description
|
409
410
|
status
|
410
411
|
domain
|
412
|
+
computingId
|
413
|
+
}
|
414
|
+
}
|
415
|
+
`;
|
416
|
+
exports.GET_TEMPLATE = (0, graphql_tag_1.gql) `
|
417
|
+
query {
|
418
|
+
getTemplates {
|
419
|
+
id
|
420
|
+
name
|
421
|
+
status
|
422
|
+
osType
|
423
|
+
username
|
424
|
+
createdStamp
|
425
|
+
updatedStamp
|
426
|
+
}
|
427
|
+
}
|
428
|
+
`;
|
429
|
+
exports.GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID = (0, graphql_tag_1.gql) `
|
430
|
+
query GetAvailableSubnetIPsByResourcePoolId($resourcePoolId: String!) {
|
431
|
+
getAvailableSubnetIPsByResourcePoolId(resourcePoolId: $resourcePoolId) {
|
432
|
+
parentSubnetId
|
433
|
+
address
|
434
|
+
description
|
435
|
+
status
|
436
|
+
rangeIpType
|
437
|
+
createTime
|
438
|
+
updateTime
|
439
|
+
}
|
440
|
+
}
|
441
|
+
`;
|
442
|
+
exports.GET_AVAILABLE_STORAGES_FOR_DC = (0, graphql_tag_1.gql) `
|
443
|
+
query GetAvailableStoragesForDC($resourcePoolId: String!) {
|
444
|
+
getAvailableStoragesForDC(resourcePoolId: $resourcePoolId) {
|
445
|
+
id
|
446
|
+
partnerId
|
447
|
+
configId
|
448
|
+
virtualId
|
449
|
+
name
|
450
|
+
status
|
451
|
+
platform
|
452
|
+
description
|
453
|
+
createdStamp
|
454
|
+
updatedStamp
|
455
|
+
}
|
456
|
+
}
|
457
|
+
`;
|
458
|
+
exports.GET_RESOUCE_POOL_BY_SERVICE = (0, graphql_tag_1.gql) `
|
459
|
+
query GetResourcePoolsByService($serviceId: String!) {
|
460
|
+
getResourcePoolsByService(serviceId: $serviceId) {
|
461
|
+
id
|
462
|
+
name
|
463
|
+
status
|
464
|
+
platform
|
411
465
|
}
|
412
466
|
}
|
413
467
|
`;
|
@@ -6,18 +6,51 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
|
6
6
|
query getOrderDetail($orderId: String!) {
|
7
7
|
orderDetail(orderId: $orderId) {
|
8
8
|
order {
|
9
|
+
cancelReason
|
10
|
+
currencyCode
|
11
|
+
orderStatus
|
12
|
+
totalPrice {
|
13
|
+
amount
|
14
|
+
}
|
15
|
+
discountTotalPrice {
|
16
|
+
amount
|
17
|
+
}
|
18
|
+
totalVAT {
|
19
|
+
amount
|
20
|
+
}
|
21
|
+
currentTotalPrice {
|
22
|
+
amount
|
23
|
+
}
|
9
24
|
currentSubtotalPrice {
|
10
25
|
amount
|
11
26
|
currencyCode
|
12
27
|
}
|
28
|
+
createdStamp
|
29
|
+
edited
|
13
30
|
financialStatus
|
31
|
+
fulfillmentStatus
|
14
32
|
orderStatus
|
33
|
+
id
|
34
|
+
partnerId
|
15
35
|
ownerName
|
16
36
|
ownerEmail
|
17
37
|
ownerPhone
|
18
38
|
ownerPartyId
|
39
|
+
orderNumber
|
40
|
+
rawData
|
19
41
|
orderId
|
20
42
|
id
|
43
|
+
note
|
44
|
+
pending
|
45
|
+
checkCommodities
|
46
|
+
shipmentNote
|
47
|
+
shopId
|
48
|
+
facilityId
|
49
|
+
orderType
|
50
|
+
shippingServiceId
|
51
|
+
carrierId
|
52
|
+
fromOrderId
|
53
|
+
externalCode
|
21
54
|
createdAt
|
22
55
|
currentTotalPrice {
|
23
56
|
amount
|
@@ -25,10 +58,26 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
|
25
58
|
}
|
26
59
|
createdStamp
|
27
60
|
customAttribute
|
61
|
+
canceledAt
|
62
|
+
updatedAt
|
63
|
+
approvedAt
|
64
|
+
processedAt
|
65
|
+
completedAt
|
66
|
+
createdBy
|
67
|
+
saleName
|
68
|
+
salePartyId
|
69
|
+
ownerPartyId
|
70
|
+
customerLocale
|
71
|
+
orderParentId
|
72
|
+
shopName
|
73
|
+
version
|
28
74
|
description
|
29
75
|
}
|
30
76
|
lineItems {
|
31
77
|
orderLineItem {
|
78
|
+
originalTotalPrice {
|
79
|
+
amount
|
80
|
+
}
|
32
81
|
description
|
33
82
|
unitType
|
34
83
|
customAttributes {
|
@@ -16,3 +16,5 @@ 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
18
|
export declare const GET_LIST_PRICE: import("graphql").DocumentNode;
|
19
|
+
export declare const GET_TAGS: import("graphql").DocumentNode;
|
20
|
+
export declare const GET_TAGS_BY_CATEGORY: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
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;
|
3
|
+
exports.GET_TAGS_BY_CATEGORY = exports.GET_TAGS = 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(
|
@@ -851,3 +851,37 @@ exports.GET_LIST_PRICE = (0, graphql_tag_1.gql) `
|
|
851
851
|
)
|
852
852
|
}
|
853
853
|
`;
|
854
|
+
exports.GET_TAGS = (0, graphql_tag_1.gql) `
|
855
|
+
query GetTags($partnerId: String!, $storeChannel: String!) {
|
856
|
+
getTags(partnerId: $partnerId, storeChannel: $storeChannel) {
|
857
|
+
id
|
858
|
+
name
|
859
|
+
slug
|
860
|
+
type
|
861
|
+
scope
|
862
|
+
storeIds
|
863
|
+
selected
|
864
|
+
}
|
865
|
+
}
|
866
|
+
`;
|
867
|
+
exports.GET_TAGS_BY_CATEGORY = (0, graphql_tag_1.gql) `
|
868
|
+
query GetTagsByCategory(
|
869
|
+
$partnerId: String!
|
870
|
+
$storeChannel: String!
|
871
|
+
$categoryId: String!
|
872
|
+
) {
|
873
|
+
getTagsByCategory(
|
874
|
+
partnerId: $partnerId
|
875
|
+
storeChannel: $storeChannel
|
876
|
+
categoryId: $categoryId
|
877
|
+
) {
|
878
|
+
id
|
879
|
+
name
|
880
|
+
slug
|
881
|
+
type
|
882
|
+
scope
|
883
|
+
storeIds
|
884
|
+
selected
|
885
|
+
}
|
886
|
+
}
|
887
|
+
`;
|
@@ -46,4 +46,9 @@ export declare class ComputingService extends Service {
|
|
46
46
|
addPortNat(data: any): Promise<any>;
|
47
47
|
getPortNatsByServiceId(serviceId: any): Promise<any>;
|
48
48
|
updateDescriptionComputing(computingId: string, description: string, updateBy: string): Promise<any>;
|
49
|
+
getTemplates(): Promise<any>;
|
50
|
+
getAvailableSubnetIPsByResourcePoolId(resourcePoolId: string): Promise<any>;
|
51
|
+
getAvailableStoragesForDC(resourcePoolId: string): Promise<any>;
|
52
|
+
getResourcePoolsByService(serviceId: string): Promise<any>;
|
53
|
+
createComputingForDC(data: any): Promise<any>;
|
49
54
|
}
|
@@ -647,5 +647,92 @@ class ComputingService extends serviceSDK_1.Service {
|
|
647
647
|
}
|
648
648
|
});
|
649
649
|
}
|
650
|
+
getTemplates() {
|
651
|
+
return __awaiter(this, void 0, void 0, function* () {
|
652
|
+
const query = queries_1.GET_TEMPLATE;
|
653
|
+
const variables = {};
|
654
|
+
try {
|
655
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
656
|
+
return response.getTemplates;
|
657
|
+
}
|
658
|
+
catch (error) {
|
659
|
+
console.log(`Error fetching get getTemplates method: ${error}`);
|
660
|
+
throw error;
|
661
|
+
}
|
662
|
+
});
|
663
|
+
}
|
664
|
+
getAvailableSubnetIPsByResourcePoolId(resourcePoolId) {
|
665
|
+
return __awaiter(this, void 0, void 0, function* () {
|
666
|
+
const query = queries_1.GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID;
|
667
|
+
const variables = {
|
668
|
+
resourcePoolId,
|
669
|
+
};
|
670
|
+
try {
|
671
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
672
|
+
return response.getAvailableSubnetIPsByResourcePoolId;
|
673
|
+
}
|
674
|
+
catch (error) {
|
675
|
+
console.log(`Error fetching get getAvailableSubnetIPsByResourcePoolId method: ${error}`);
|
676
|
+
throw error;
|
677
|
+
}
|
678
|
+
});
|
679
|
+
}
|
680
|
+
getAvailableStoragesForDC(resourcePoolId) {
|
681
|
+
return __awaiter(this, void 0, void 0, function* () {
|
682
|
+
const query = queries_1.GET_AVAILABLE_STORAGES_FOR_DC;
|
683
|
+
const variables = {
|
684
|
+
resourcePoolId,
|
685
|
+
};
|
686
|
+
try {
|
687
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
688
|
+
return response.getAvailableStoragesForDC;
|
689
|
+
}
|
690
|
+
catch (error) {
|
691
|
+
console.log(`Error fetching get getAvailableStoragesForDC method: ${error}`);
|
692
|
+
throw error;
|
693
|
+
}
|
694
|
+
});
|
695
|
+
}
|
696
|
+
getResourcePoolsByService(serviceId) {
|
697
|
+
return __awaiter(this, void 0, void 0, function* () {
|
698
|
+
const query = queries_1.GET_RESOUCE_POOL_BY_SERVICE;
|
699
|
+
const variables = {
|
700
|
+
serviceId,
|
701
|
+
};
|
702
|
+
try {
|
703
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
704
|
+
return response.getResourcePoolsByService;
|
705
|
+
}
|
706
|
+
catch (error) {
|
707
|
+
console.log(`Error fetching get getResourcePoolsByService method: ${error}`);
|
708
|
+
throw error;
|
709
|
+
}
|
710
|
+
});
|
711
|
+
}
|
712
|
+
createComputingForDC(data) {
|
713
|
+
return __awaiter(this, void 0, void 0, function* () {
|
714
|
+
const mutation = mutations_1.CREATE_COMPUTING_FOR_DC;
|
715
|
+
const variables = {
|
716
|
+
name: data === null || data === void 0 ? void 0 : data.name,
|
717
|
+
username: data === null || data === void 0 ? void 0 : data.username,
|
718
|
+
password: data === null || data === void 0 ? void 0 : data.password,
|
719
|
+
description: data === null || data === void 0 ? void 0 : data.description,
|
720
|
+
templateId: data === null || data === void 0 ? void 0 : data.templateId,
|
721
|
+
interfaces: data === null || data === void 0 ? void 0 : data.interfaces,
|
722
|
+
cpu: data === null || data === void 0 ? void 0 : data.cpu,
|
723
|
+
ram: data === null || data === void 0 ? void 0 : data.ram,
|
724
|
+
resourcePoolId: data === null || data === void 0 ? void 0 : data.resourcePoolId,
|
725
|
+
disks: data === null || data === void 0 ? void 0 : data.disks,
|
726
|
+
};
|
727
|
+
try {
|
728
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
729
|
+
return response.createComputingForDC;
|
730
|
+
}
|
731
|
+
catch (error) {
|
732
|
+
console.log(`Error fetching get createComputingForDC method: ${error}`);
|
733
|
+
throw error;
|
734
|
+
}
|
735
|
+
});
|
736
|
+
}
|
650
737
|
}
|
651
738
|
exports.ComputingService = ComputingService;
|
@@ -44,4 +44,6 @@ export declare class ProductService extends Service {
|
|
44
44
|
getRelatedInfor(id: string): Promise<any>;
|
45
45
|
getDetailStores(storeId: string): Promise<any>;
|
46
46
|
getListPrice(productIds: string[], storeId: string): Promise<any>;
|
47
|
+
getTags(storeId: string): Promise<any>;
|
48
|
+
getTagsByCategory(categoryId: string, storeId: string): Promise<any>;
|
47
49
|
}
|
@@ -250,5 +250,40 @@ class ProductService extends serviceSDK_1.Service {
|
|
250
250
|
}
|
251
251
|
});
|
252
252
|
}
|
253
|
+
getTags(storeId) {
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
255
|
+
const query = queries_1.GET_TAGS;
|
256
|
+
const variablesHandle = {
|
257
|
+
partnerId: this.orgId,
|
258
|
+
storeChannel: storeId ? storeId : this.storeId,
|
259
|
+
};
|
260
|
+
try {
|
261
|
+
const response = yield this.graphqlQueryV2(query, variablesHandle);
|
262
|
+
return response.getTags;
|
263
|
+
}
|
264
|
+
catch (error) {
|
265
|
+
console.log(`Error fetching getTags error : ${error}`);
|
266
|
+
throw error;
|
267
|
+
}
|
268
|
+
});
|
269
|
+
}
|
270
|
+
getTagsByCategory(categoryId, storeId) {
|
271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
272
|
+
const query = queries_1.GET_TAGS_BY_CATEGORY;
|
273
|
+
const variablesHandle = {
|
274
|
+
partnerId: this.orgId,
|
275
|
+
storeChannel: storeId ? storeId : this.storeId,
|
276
|
+
categoryId,
|
277
|
+
};
|
278
|
+
try {
|
279
|
+
const response = yield this.graphqlQueryV2(query, variablesHandle);
|
280
|
+
return response.getTagsByCategory;
|
281
|
+
}
|
282
|
+
catch (error) {
|
283
|
+
console.log(`Error fetching getTagsByCategory error : ${error}`);
|
284
|
+
throw error;
|
285
|
+
}
|
286
|
+
});
|
287
|
+
}
|
253
288
|
}
|
254
289
|
exports.ProductService = ProductService;
|