@longvansoftware/service-js-client 1.10.9 → 1.11.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.
- package/dist/src/graphql/cloud/queries.d.ts +1 -0
- package/dist/src/graphql/cloud/queries.js +6 -1
- package/dist/src/graphql/computing/queries.d.ts +27 -25
- package/dist/src/graphql/computing/queries.js +12 -1
- package/dist/src/graphql/product/queries.d.ts +20 -17
- package/dist/src/graphql/product/queries.js +113 -1
- package/dist/src/lib/cloud/index.d.ts +1 -0
- package/dist/src/lib/cloud/index.js +14 -0
- package/dist/src/lib/computing/index.d.ts +1 -0
- package/dist/src/lib/computing/index.js +16 -0
- package/dist/src/lib/product/index.d.ts +2 -0
- package/dist/src/lib/product/index.js +32 -0
- package/package.json +1 -1
@@ -14,3 +14,4 @@ export declare const GET_OWNERS_BY_CUSTOMER_ID: import("graphql").DocumentNode;
|
|
14
14
|
export declare const GET_CONTACTS_BY_OWNER_ID: import("graphql").DocumentNode;
|
15
15
|
export declare const GET_WHOIS_DOMAIN_INFO: import("graphql").DocumentNode;
|
16
16
|
export declare const GET_DOMAIN_SUPPLIER: import("graphql").DocumentNode;
|
17
|
+
export declare const CHECK_DOMAIN_EXIST: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_DOMAIN_SUPPLIER = exports.GET_WHOIS_DOMAIN_INFO = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = exports.GET_SERVICES_BY_ORDER_ID = exports.GET_IPS_OF_SERVICE = exports.GET_PRODUCTS_OF_SERVICE = exports.SEARCH_SERVICE = exports.SERVICE_TYPE = exports.GET_USER_MAIL_HOSTING = exports.GET_MAIL_RESOURCE = exports.SERVICE_DETAIL = void 0;
|
3
|
+
exports.CHECK_DOMAIN_EXIST = exports.GET_DOMAIN_SUPPLIER = exports.GET_WHOIS_DOMAIN_INFO = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = exports.GET_SERVICES_BY_ORDER_ID = exports.GET_IPS_OF_SERVICE = exports.GET_PRODUCTS_OF_SERVICE = exports.SEARCH_SERVICE = exports.SERVICE_TYPE = exports.GET_USER_MAIL_HOSTING = exports.GET_MAIL_RESOURCE = exports.SERVICE_DETAIL = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.SERVICE_DETAIL = (0, graphql_tag_1.gql) `
|
6
6
|
query ServiceDetail($serviceId: String) {
|
@@ -286,3 +286,8 @@ exports.GET_DOMAIN_SUPPLIER = (0, graphql_tag_1.gql) `
|
|
286
286
|
getDomainSupplier(serviceId: $serviceId)
|
287
287
|
}
|
288
288
|
`;
|
289
|
+
exports.CHECK_DOMAIN_EXIST = (0, graphql_tag_1.gql) `
|
290
|
+
query CheckDomainExist($domainName: String!) {
|
291
|
+
checkDomainExist(domainName: $domainName)
|
292
|
+
}
|
293
|
+
`;
|
@@ -1,25 +1,27 @@
|
|
1
|
-
|
2
|
-
export declare const
|
3
|
-
export declare const
|
4
|
-
export declare const
|
5
|
-
export declare const
|
6
|
-
export declare const
|
7
|
-
export declare const
|
8
|
-
export declare const
|
9
|
-
export declare const
|
10
|
-
export declare const
|
11
|
-
export declare const
|
12
|
-
export declare const
|
13
|
-
export declare const
|
14
|
-
export declare const
|
15
|
-
export declare const
|
16
|
-
export declare const
|
17
|
-
export declare const
|
18
|
-
export declare const
|
19
|
-
export declare const
|
20
|
-
export declare const
|
21
|
-
export declare const
|
22
|
-
export declare const
|
23
|
-
export declare const
|
24
|
-
export declare const
|
25
|
-
export declare const
|
1
|
+
import { DocumentNode } from "graphql";
|
2
|
+
export declare const COMPUTING_DETAIL: DocumentNode;
|
3
|
+
export declare const PORTNATS: DocumentNode;
|
4
|
+
export declare const SNAP_SHOTS: DocumentNode;
|
5
|
+
export declare const RAM_USAGE_START_TIME: DocumentNode;
|
6
|
+
export declare const CPU_USAGE_START_TIME: DocumentNode;
|
7
|
+
export declare const NETWORK_USAGE_START_TIME: DocumentNode;
|
8
|
+
export declare const DISK_USAGE_START_TIME: DocumentNode;
|
9
|
+
export declare const RAM_USAGE_DATE_RANGE: DocumentNode;
|
10
|
+
export declare const CPU_USAGE_DATE_RANGE: DocumentNode;
|
11
|
+
export declare const NETWORK_USAGE_DATE_RANGE: DocumentNode;
|
12
|
+
export declare const DISK_USAGE_DATE_RANGE: DocumentNode;
|
13
|
+
export declare const BACKUP_POINT: DocumentNode;
|
14
|
+
export declare const GET_COMPUTINGS: DocumentNode;
|
15
|
+
export declare const GET_LAB_INSTANCE: DocumentNode;
|
16
|
+
export declare const GET_CLUSTERS: DocumentNode;
|
17
|
+
export declare const GET_CLUSTER: DocumentNode;
|
18
|
+
export declare const GET_COMPUTING_BY_CLUSTER: DocumentNode;
|
19
|
+
export declare const GET_COMPUTING_BY_SERVICE: DocumentNode;
|
20
|
+
export declare const GET_EDGES: DocumentNode;
|
21
|
+
export declare const GET_PORT_NATS_BY_SERVICE_ID: DocumentNode;
|
22
|
+
export declare const GET_TEMPLATE: DocumentNode;
|
23
|
+
export declare const GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID: DocumentNode;
|
24
|
+
export declare const GET_AVAILABLE_STORAGES_FOR_DC: DocumentNode;
|
25
|
+
export declare const GET_RESOUCE_POOL_BY_SERVICE: DocumentNode;
|
26
|
+
export declare const GET_CONSOLE: DocumentNode;
|
27
|
+
export declare const GET_COMPUTING_WAIT_REVOKE: (fields: string[]) => DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_CONSOLE = 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;
|
3
|
+
exports.GET_COMPUTING_WAIT_REVOKE = exports.GET_CONSOLE = 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!) {
|
@@ -530,3 +530,14 @@ exports.GET_CONSOLE = (0, graphql_tag_1.gql) `
|
|
530
530
|
}
|
531
531
|
}
|
532
532
|
`;
|
533
|
+
const GET_COMPUTING_WAIT_REVOKE = (fields) => {
|
534
|
+
const fieldStr = fields.join("\n ");
|
535
|
+
return (0, graphql_tag_1.gql) `
|
536
|
+
query GetComputingWaitRevoke($computingId: String!) {
|
537
|
+
getComputingWaitRevoke(computingId: $computingId) {
|
538
|
+
${fieldStr}
|
539
|
+
}
|
540
|
+
}
|
541
|
+
`;
|
542
|
+
};
|
543
|
+
exports.GET_COMPUTING_WAIT_REVOKE = GET_COMPUTING_WAIT_REVOKE;
|
@@ -1,20 +1,23 @@
|
|
1
|
-
|
2
|
-
export declare const
|
3
|
-
export declare const
|
4
|
-
export declare const
|
5
|
-
export declare const
|
6
|
-
export declare const
|
1
|
+
import { DocumentNode } from "graphql";
|
2
|
+
export declare const GET_PRODUCT_BY_ID_QUERY: DocumentNode;
|
3
|
+
export declare const GET_PRODUCT_BY_ID_QUERY_DYNAMIC: (fields: string[]) => DocumentNode;
|
4
|
+
export declare const GET_PRODUCT_BY_SLUG_QUERY: DocumentNode;
|
5
|
+
export declare const GET_SIMPLE_PRODUCTS_QUERY: DocumentNode;
|
6
|
+
export declare const GET_CATEGORIES_QUERY: DocumentNode;
|
7
|
+
export declare const GET_CATEGORY_BY_HANDLE_QUERY: DocumentNode;
|
8
|
+
export declare const GET_CATEGORY_BY_ID_QUERY: DocumentNode;
|
7
9
|
export declare const GET_BRANDS_QUERY = "\nquery GetBrands($partnerId: String!, $storeChannel: String!, $enable: Boolean) {\n\tgetBrands(partnerId: $partnerId, storeChannel: $storeChannel, enable: $enable) {\n\t\tid\n\t\tname\n\t\timage\n\t\timageIcon\n\t}\n}\n";
|
8
10
|
export declare const GET_BRANDS_BY_CATEGORY_QUERY = "\nquery GetBrandsByCategory($partnerId: String!, $storeChannel: String!, $categoryId: String!) {\n\tgetBrandsByCategory(partnerId: $partnerId, storeChannel: $storeChannel, categoryId: $categoryId) {\n\t\tid\n\t\tname\n\t\timage\n\t\timageIcon\n\t}\n}\n";
|
9
11
|
export declare const GET_BRAND_DETAIL_QUERY = "\n query GetBrandDetail($partnerId: String!, $brandId: String!, $storeChannel: String!) {\n getDetail(partnerId: $partnerId, brandId: $brandId, storeChannel: $storeChannel) {\n id\n name\n image\n imageIcon\n }\n }\n";
|
10
|
-
export declare const GET_PRODUCT_OPTION:
|
11
|
-
export declare const GET_POLICY:
|
12
|
-
export declare const GET_PRODUCTS:
|
13
|
-
export declare const
|
14
|
-
export declare const
|
15
|
-
export declare const
|
16
|
-
export declare const
|
17
|
-
export declare const
|
18
|
-
export declare const
|
19
|
-
export declare const
|
20
|
-
export declare const
|
12
|
+
export declare const GET_PRODUCT_OPTION: DocumentNode;
|
13
|
+
export declare const GET_POLICY: DocumentNode;
|
14
|
+
export declare const GET_PRODUCTS: DocumentNode;
|
15
|
+
export declare const GET_PRODUCTS_DYNAMIC: (fields: string[]) => DocumentNode;
|
16
|
+
export declare const GET_HANDLE_BY_SERVICETYPE: DocumentNode;
|
17
|
+
export declare const GET_RESOURCE_BY_PRODUCT: DocumentNode;
|
18
|
+
export declare const GET_PRODUCT_VARIANT_BY_ID: DocumentNode;
|
19
|
+
export declare const GET_RELATED_INFOR: DocumentNode;
|
20
|
+
export declare const GET_DETAIL_STORES: DocumentNode;
|
21
|
+
export declare const GET_LIST_PRICE: DocumentNode;
|
22
|
+
export declare const GET_TAGS: DocumentNode;
|
23
|
+
export declare const GET_TAGS_BY_CATEGORY: DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
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;
|
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_DYNAMIC = 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_DYNAMIC = 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(
|
@@ -192,6 +192,25 @@ exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
192
192
|
}
|
193
193
|
}
|
194
194
|
`;
|
195
|
+
const GET_PRODUCT_BY_ID_QUERY_DYNAMIC = (fields) => {
|
196
|
+
const fieldStr = fields.join("\n ");
|
197
|
+
return (0, graphql_tag_1.gql) `
|
198
|
+
query GetProductById(
|
199
|
+
$partnerId: String!
|
200
|
+
$storeChannel: String!
|
201
|
+
$productId: String!
|
202
|
+
) {
|
203
|
+
getProductById(
|
204
|
+
partnerId: $partnerId
|
205
|
+
storeChannel: $storeChannel
|
206
|
+
productId: $productId
|
207
|
+
) {
|
208
|
+
${fieldStr}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
`;
|
212
|
+
};
|
213
|
+
exports.GET_PRODUCT_BY_ID_QUERY_DYNAMIC = GET_PRODUCT_BY_ID_QUERY_DYNAMIC;
|
195
214
|
exports.GET_PRODUCT_BY_SLUG_QUERY = (0, graphql_tag_1.gql) `
|
196
215
|
query GetProductByHandle(
|
197
216
|
$partnerId: String!
|
@@ -668,6 +687,99 @@ exports.GET_PRODUCTS = (0, graphql_tag_1.gql) `
|
|
668
687
|
}
|
669
688
|
}
|
670
689
|
`;
|
690
|
+
const GET_PRODUCTS_DYNAMIC = (fields) => {
|
691
|
+
const fieldStr = fields.join("\n ");
|
692
|
+
return (0, graphql_tag_1.gql) `
|
693
|
+
query GetProducts(
|
694
|
+
$partnerId: String!
|
695
|
+
$storeChannel: String!
|
696
|
+
$hash: String
|
697
|
+
$publicOnStore: Boolean
|
698
|
+
$category: String
|
699
|
+
$product: String
|
700
|
+
$group: String
|
701
|
+
$sku: String
|
702
|
+
$priceFrom: BigDecimal
|
703
|
+
$priceTo: BigDecimal
|
704
|
+
$tag: String
|
705
|
+
$status: String
|
706
|
+
$ecommerceId: String
|
707
|
+
$productIgnoresIds: String
|
708
|
+
$toDate: Long
|
709
|
+
$fromDate: Long
|
710
|
+
$productType: String
|
711
|
+
$sortOrder: String
|
712
|
+
$sortBy: String
|
713
|
+
$option: String
|
714
|
+
$brandId: String
|
715
|
+
$feature: String
|
716
|
+
$keyword: String
|
717
|
+
$external: String
|
718
|
+
$userId: String
|
719
|
+
$onlyFavorite: Boolean
|
720
|
+
$buildPriceStore: Boolean
|
721
|
+
$buildType: String
|
722
|
+
$buildPromotion: Boolean
|
723
|
+
$variant: Boolean
|
724
|
+
$deleteChild: Boolean
|
725
|
+
$display: String
|
726
|
+
$subType: String
|
727
|
+
$currentPage: Int
|
728
|
+
$maxResult: Int
|
729
|
+
$isSync: Boolean
|
730
|
+
$isMapped: Boolean
|
731
|
+
) {
|
732
|
+
getProducts(
|
733
|
+
partnerId: $partnerId
|
734
|
+
storeChannel: $storeChannel
|
735
|
+
hash: $hash
|
736
|
+
publicOnStore: $publicOnStore
|
737
|
+
category: $category
|
738
|
+
product: $product
|
739
|
+
group: $group
|
740
|
+
sku: $sku
|
741
|
+
priceFrom: $priceFrom
|
742
|
+
priceTo: $priceTo
|
743
|
+
tag: $tag
|
744
|
+
status: $status
|
745
|
+
ecommerceId: $ecommerceId
|
746
|
+
productIgnoresIds: $productIgnoresIds
|
747
|
+
toDate: $toDate
|
748
|
+
fromDate: $fromDate
|
749
|
+
productType: $productType
|
750
|
+
sortOrder: $sortOrder
|
751
|
+
sortBy: $sortBy
|
752
|
+
option: $option
|
753
|
+
brandId: $brandId
|
754
|
+
feature: $feature
|
755
|
+
keyword: $keyword
|
756
|
+
external: $external
|
757
|
+
userId: $userId
|
758
|
+
onlyFavorite: $onlyFavorite
|
759
|
+
buildPriceStore: $buildPriceStore
|
760
|
+
buildType: $buildType
|
761
|
+
buildPromotion: $buildPromotion
|
762
|
+
variant: $variant
|
763
|
+
deleteChild: $deleteChild
|
764
|
+
display: $display
|
765
|
+
subType: $subType
|
766
|
+
currentPage: $currentPage
|
767
|
+
maxResult: $maxResult
|
768
|
+
isSync: $isSync
|
769
|
+
isMapped: $isMapped
|
770
|
+
) {
|
771
|
+
total
|
772
|
+
currentPage
|
773
|
+
maxResult
|
774
|
+
totalPage
|
775
|
+
data {
|
776
|
+
${fieldStr}
|
777
|
+
}
|
778
|
+
}
|
779
|
+
}
|
780
|
+
`;
|
781
|
+
};
|
782
|
+
exports.GET_PRODUCTS_DYNAMIC = GET_PRODUCTS_DYNAMIC;
|
671
783
|
exports.GET_HANDLE_BY_SERVICETYPE = (0, graphql_tag_1.gql) `
|
672
784
|
query GetHandleByServiceTypes(
|
673
785
|
$partnerId: String!
|
@@ -35,4 +35,5 @@ export declare class CloudService extends Service {
|
|
35
35
|
getContactsByOwnerId(ownerId: string): Promise<any>;
|
36
36
|
getWhoisDomainInfo(domainName: string): Promise<any>;
|
37
37
|
getDomainSupplier(serviceId: string): Promise<any>;
|
38
|
+
checkDomainExist(domainName: string): Promise<any>;
|
38
39
|
}
|
@@ -425,5 +425,19 @@ class CloudService extends serviceSDK_1.Service {
|
|
425
425
|
}
|
426
426
|
});
|
427
427
|
}
|
428
|
+
checkDomainExist(domainName) {
|
429
|
+
return __awaiter(this, void 0, void 0, function* () {
|
430
|
+
const query = queries_1.CHECK_DOMAIN_EXIST;
|
431
|
+
const variables = { domainName };
|
432
|
+
try {
|
433
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
434
|
+
return response.checkDomainExist;
|
435
|
+
}
|
436
|
+
catch (error) {
|
437
|
+
console.log(`Error in checkDomainExist: ${error}`);
|
438
|
+
throw error;
|
439
|
+
}
|
440
|
+
});
|
441
|
+
}
|
428
442
|
}
|
429
443
|
exports.CloudService = CloudService;
|
@@ -53,4 +53,5 @@ export declare class ComputingService extends Service {
|
|
53
53
|
createComputingForDC(data: any): Promise<any>;
|
54
54
|
updateNameComputing(computingId: string, name: string, updateBy: string): Promise<any>;
|
55
55
|
getConsole(computingId: string): Promise<any>;
|
56
|
+
getComputingWaitRevoke(serviceId: string, fields: string[]): Promise<any>;
|
56
57
|
}
|
@@ -768,5 +768,21 @@ class ComputingService extends serviceSDK_1.Service {
|
|
768
768
|
}
|
769
769
|
});
|
770
770
|
}
|
771
|
+
getComputingWaitRevoke(serviceId, fields) {
|
772
|
+
return __awaiter(this, void 0, void 0, function* () {
|
773
|
+
const query = (0, queries_1.GET_COMPUTING_WAIT_REVOKE)(fields);
|
774
|
+
const variables = {
|
775
|
+
serviceId,
|
776
|
+
};
|
777
|
+
try {
|
778
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
779
|
+
return response.getComputingWaitRevoke;
|
780
|
+
}
|
781
|
+
catch (error) {
|
782
|
+
console.log(`Error fetching get getComputingWaitRevoke method: ${error}`);
|
783
|
+
throw error;
|
784
|
+
}
|
785
|
+
});
|
786
|
+
}
|
771
787
|
}
|
772
788
|
exports.ComputingService = ComputingService;
|
@@ -21,6 +21,7 @@ export declare class ProductService extends Service {
|
|
21
21
|
* @throws If an error occurs while fetching the product.
|
22
22
|
*/
|
23
23
|
getProductById(productId: string, store: string): Promise<any>;
|
24
|
+
getProductByIdDynamic(productId: string, store: string, fields: string[]): Promise<any>;
|
24
25
|
/**
|
25
26
|
* Retrieves a product by its slug.
|
26
27
|
* @param slug - The slug of the product.
|
@@ -38,6 +39,7 @@ export declare class ProductService extends Service {
|
|
38
39
|
getProductOption(productId: string, store: string): Promise<any>;
|
39
40
|
getPolicy(groupId: string): Promise<any>;
|
40
41
|
getProducts(param: getProduct, store: string): Promise<any>;
|
42
|
+
getProductsDynamic(param: getProduct, store: string, fields: string[]): Promise<any>;
|
41
43
|
getHandleByServiceTypes(serviceTypes: [string]): Promise<any>;
|
42
44
|
getResourceByProduct(productId: string): Promise<any>;
|
43
45
|
getProductVariantById(variantId: string): Promise<any>;
|
@@ -52,6 +52,24 @@ class ProductService extends serviceSDK_1.Service {
|
|
52
52
|
}
|
53
53
|
});
|
54
54
|
}
|
55
|
+
getProductByIdDynamic(productId, store, fields) {
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
57
|
+
const query = (0, queries_1.GET_PRODUCT_BY_ID_QUERY_DYNAMIC)(fields);
|
58
|
+
const variables = {
|
59
|
+
partnerId: this.orgId,
|
60
|
+
storeChannel: store ? store : this.storeId,
|
61
|
+
productId,
|
62
|
+
};
|
63
|
+
try {
|
64
|
+
const response = yield this.graphqlQuery(query, variables);
|
65
|
+
return response.getProductById;
|
66
|
+
}
|
67
|
+
catch (error) {
|
68
|
+
console.log(`Error fetching product by ID: ${error}`);
|
69
|
+
throw error;
|
70
|
+
}
|
71
|
+
});
|
72
|
+
}
|
55
73
|
/**
|
56
74
|
* Retrieves a product by its slug.
|
57
75
|
* @param slug - The slug of the product.
|
@@ -145,6 +163,20 @@ class ProductService extends serviceSDK_1.Service {
|
|
145
163
|
}
|
146
164
|
});
|
147
165
|
}
|
166
|
+
getProductsDynamic(param, store, fields) {
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
168
|
+
const query = (0, queries_1.GET_PRODUCTS_DYNAMIC)(fields);
|
169
|
+
const variablesHandle = Object.assign({ partnerId: this.orgId, storeChannel: store ? store : this.storeId }, param);
|
170
|
+
try {
|
171
|
+
const response = yield this.graphqlQueryV2(query, variablesHandle);
|
172
|
+
return response.getProducts;
|
173
|
+
}
|
174
|
+
catch (error) {
|
175
|
+
console.log(`Error fetching getProducts : ${error}`);
|
176
|
+
throw error;
|
177
|
+
}
|
178
|
+
});
|
179
|
+
}
|
148
180
|
getHandleByServiceTypes(serviceTypes) {
|
149
181
|
return __awaiter(this, void 0, void 0, function* () {
|
150
182
|
const query = queries_1.GET_HANDLE_BY_SERVICETYPE;
|