@longvansoftware/service-js-client 2.5.5 → 2.5.7
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 +13 -1
- package/dist/src/graphql/computing/mutations.d.ts +1 -0
- package/dist/src/graphql/computing/mutations.js +19 -1
- package/dist/src/graphql/computing/queries.js +4 -0
- package/dist/src/graphql/crm_camping/queries.d.ts +1 -0
- package/dist/src/graphql/crm_camping/queries.js +21 -1
- package/dist/src/graphql/product/mutations.d.ts +4 -0
- package/dist/src/graphql/product/mutations.js +59 -0
- package/dist/src/graphql/product/queries.d.ts +2 -0
- package/dist/src/graphql/product/queries.js +37 -1
- package/dist/src/lib/cloud/index.d.ts +1 -0
- package/dist/src/lib/cloud/index.js +16 -0
- package/dist/src/lib/computing/index.d.ts +1 -0
- package/dist/src/lib/computing/index.js +18 -0
- package/dist/src/lib/crm_camping/index.d.ts +1 -0
- package/dist/src/lib/crm_camping/index.js +18 -16
- package/dist/src/lib/product/index.d.ts +5 -0
- package/dist/src/lib/product/index.js +90 -0
- package/package.json +1 -1
|
@@ -20,3 +20,4 @@ export declare const CHECK_DOMAIN_EXIST: DocumentNode;
|
|
|
20
20
|
export declare const SEARCH_ACTIONS: DocumentNode;
|
|
21
21
|
export declare const GET_ELASTIC_CLOUD_RESOURCE: DocumentNode;
|
|
22
22
|
export declare const SEARCH_SERVICE_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
23
|
+
export declare const SEARCH_ACTIONS_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SEARCH_SERVICE_DYNAMIC = exports.GET_ELASTIC_CLOUD_RESOURCE = exports.SEARCH_ACTIONS = exports.CHECK_DOMAIN_EXIST = exports.GET_DOMAIN_SUPPLIER = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = 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_DYNAMIC = exports.SERVICE_DETAIL = exports.GET_WHOIS_DOMAIN_INFO = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = void 0;
|
|
3
|
+
exports.SEARCH_ACTIONS_DYNAMIC = exports.SEARCH_SERVICE_DYNAMIC = exports.GET_ELASTIC_CLOUD_RESOURCE = exports.SEARCH_ACTIONS = exports.CHECK_DOMAIN_EXIST = exports.GET_DOMAIN_SUPPLIER = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = 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_DYNAMIC = exports.SERVICE_DETAIL = exports.GET_WHOIS_DOMAIN_INFO = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.CHECK_DOMAIN_NAME_AVAILABLE = (0, graphql_tag_1.gql) `
|
|
6
6
|
query CheckDomainNameAvailable($domainName: String!) {
|
|
@@ -391,3 +391,15 @@ const SEARCH_SERVICE_DYNAMIC = (fields = []) => {
|
|
|
391
391
|
`;
|
|
392
392
|
};
|
|
393
393
|
exports.SEARCH_SERVICE_DYNAMIC = SEARCH_SERVICE_DYNAMIC;
|
|
394
|
+
const SEARCH_ACTIONS_DYNAMIC = (fields = []) => {
|
|
395
|
+
const fieldStr = fields.join('\n ');
|
|
396
|
+
const hasFields = fields.length > 0;
|
|
397
|
+
return (0, graphql_tag_1.gql) `
|
|
398
|
+
query SearchActions($parameter: ParameterSearchAction) {
|
|
399
|
+
searchActions(parameter: $parameter) {
|
|
400
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
`;
|
|
404
|
+
};
|
|
405
|
+
exports.SEARCH_ACTIONS_DYNAMIC = SEARCH_ACTIONS_DYNAMIC;
|
|
@@ -23,3 +23,4 @@ export declare const DELETE_COMPUTING: (fields?: string[]) => DocumentNode;
|
|
|
23
23
|
export declare const UPDATE_CPU: DocumentNode;
|
|
24
24
|
export declare const UPDATE_RAM: DocumentNode;
|
|
25
25
|
export declare const CREATE_COMPUTING_FOR_EC: DocumentNode;
|
|
26
|
+
export declare const UPDATE_CLIENT_GROUP_ID_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CREATE_COMPUTING_FOR_EC = exports.UPDATE_RAM = exports.UPDATE_CPU = exports.DELETE_COMPUTING = exports.RESTORE_COMPUTING_WAITING_REVOKE = exports.COMPUTING_WAITING_REVOKE = exports.UPDATE_NAME_COMPUTING = 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;
|
|
3
|
+
exports.UPDATE_CLIENT_GROUP_ID_DYNAMIC = exports.CREATE_COMPUTING_FOR_EC = exports.UPDATE_RAM = exports.UPDATE_CPU = exports.DELETE_COMPUTING = exports.RESTORE_COMPUTING_WAITING_REVOKE = exports.COMPUTING_WAITING_REVOKE = exports.UPDATE_NAME_COMPUTING = 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!, $serviceId: String!) {
|
|
@@ -358,3 +358,21 @@ exports.CREATE_COMPUTING_FOR_EC = (0, graphql_tag_1.gql) `
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
`;
|
|
361
|
+
const UPDATE_CLIENT_GROUP_ID_DYNAMIC = (fields = []) => {
|
|
362
|
+
const fieldStr = fields.join('\n ');
|
|
363
|
+
const hasFields = fields.length > 0;
|
|
364
|
+
return (0, graphql_tag_1.gql) `
|
|
365
|
+
mutation UpdateClientGroupId(
|
|
366
|
+
$computingIds: [String]
|
|
367
|
+
$groupId: String
|
|
368
|
+
$updateBy: String!
|
|
369
|
+
) {
|
|
370
|
+
updateClientGroupId(
|
|
371
|
+
computingIds: $computingIds
|
|
372
|
+
groupId: $groupId
|
|
373
|
+
updateBy: $updateBy
|
|
374
|
+
)
|
|
375
|
+
}
|
|
376
|
+
`;
|
|
377
|
+
};
|
|
378
|
+
exports.UPDATE_CLIENT_GROUP_ID_DYNAMIC = UPDATE_CLIENT_GROUP_ID_DYNAMIC;
|
|
@@ -47,6 +47,7 @@ exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
|
|
|
47
47
|
used
|
|
48
48
|
unit
|
|
49
49
|
}
|
|
50
|
+
clientGroupId
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
`;
|
|
@@ -265,6 +266,7 @@ exports.GET_COMPUTINGS = (0, graphql_tag_1.gql) `
|
|
|
265
266
|
used
|
|
266
267
|
unit
|
|
267
268
|
}
|
|
269
|
+
clientGroupId
|
|
268
270
|
}
|
|
269
271
|
}
|
|
270
272
|
`;
|
|
@@ -367,6 +369,7 @@ exports.GET_COMPUTING_BY_CLUSTER = (0, graphql_tag_1.gql) `
|
|
|
367
369
|
used
|
|
368
370
|
unit
|
|
369
371
|
}
|
|
372
|
+
clientGroupId
|
|
370
373
|
}
|
|
371
374
|
}
|
|
372
375
|
`;
|
|
@@ -415,6 +418,7 @@ exports.GET_COMPUTING_BY_SERVICE = (0, graphql_tag_1.gql) `
|
|
|
415
418
|
used
|
|
416
419
|
unit
|
|
417
420
|
}
|
|
421
|
+
clientGroupId
|
|
418
422
|
}
|
|
419
423
|
}
|
|
420
424
|
`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DocumentNode } from "graphql";
|
|
2
2
|
export declare const SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION: DocumentNode;
|
|
3
3
|
export declare const GET_CAMPAIGN_ACTION_BY_ID: DocumentNode;
|
|
4
|
+
export declare const GET_PRODUCT_DISCOUNT_BUY_WITH_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
4
5
|
export declare const SUGGEST_VOUCHER: DocumentNode;
|
|
5
6
|
export declare const GET_VOUCHERS: DocumentNode;
|
|
6
7
|
export declare const GET_AVERAGE_RATING: DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_VOUCHERS_FOR_USER = exports.GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS = exports.SEARCH_CAMPAIGN = exports.GET_VOUCHERS_V2 = exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = exports.GET_NUMBER_OF_TICKET_EVALUATION = exports.GET_URL_EVALUATION = exports.GET_AVERAGE_RATING = exports.GET_VOUCHERS = exports.SUGGEST_VOUCHER = exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = void 0;
|
|
3
|
+
exports.GET_VOUCHERS_FOR_USER = exports.GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS = exports.SEARCH_CAMPAIGN = exports.GET_VOUCHERS_V2 = exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = exports.GET_NUMBER_OF_TICKET_EVALUATION = exports.GET_URL_EVALUATION = exports.GET_AVERAGE_RATING = exports.GET_VOUCHERS = exports.SUGGEST_VOUCHER = exports.GET_PRODUCT_DISCOUNT_BUY_WITH_DYNAMIC = exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = (0, graphql_tag_1.gql) `
|
|
6
6
|
query SearchProductQuantityPromotionAction(
|
|
@@ -41,6 +41,26 @@ exports.GET_CAMPAIGN_ACTION_BY_ID = (0, graphql_tag_1.gql) `
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
`;
|
|
44
|
+
const GET_PRODUCT_DISCOUNT_BUY_WITH_DYNAMIC = (fields = []) => {
|
|
45
|
+
const fieldStr = fields.join('\n ');
|
|
46
|
+
const hasFields = fields.length > 0;
|
|
47
|
+
return (0, graphql_tag_1.gql) `
|
|
48
|
+
query GetProductDiscountBuyWith(
|
|
49
|
+
$partnerId: String!
|
|
50
|
+
$storeId: String!
|
|
51
|
+
$productId: String!
|
|
52
|
+
) {
|
|
53
|
+
getProductDiscountBuyWith(
|
|
54
|
+
partnerId: $partnerId
|
|
55
|
+
storeId: $storeId
|
|
56
|
+
productId: $productId
|
|
57
|
+
) {
|
|
58
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
};
|
|
63
|
+
exports.GET_PRODUCT_DISCOUNT_BUY_WITH_DYNAMIC = GET_PRODUCT_DISCOUNT_BUY_WITH_DYNAMIC;
|
|
44
64
|
// export const SUGGEST_VOUCHER = gql`
|
|
45
65
|
// query SuggestVoucher (
|
|
46
66
|
// searchVoucherRequest: { partyId: String, customerId: String }
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DocumentNode } from 'graphql';
|
|
2
|
+
export declare const CREATE_CLIENT_GROUP_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
3
|
+
export declare const UPDATE_CLIENT_GROUP_NAME_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
4
|
+
export declare const DELETE_CLIENT_GROUP_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
@@ -1 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DELETE_CLIENT_GROUP_DYNAMIC = exports.UPDATE_CLIENT_GROUP_NAME_DYNAMIC = exports.CREATE_CLIENT_GROUP_DYNAMIC = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
const CREATE_CLIENT_GROUP_DYNAMIC = (fields = []) => {
|
|
6
|
+
const fieldStr = fields.join('\n ');
|
|
7
|
+
const hasFields = fields.length > 0;
|
|
8
|
+
return (0, graphql_tag_1.gql) `
|
|
9
|
+
mutation CreateClientGroup(
|
|
10
|
+
$name: String!
|
|
11
|
+
$createdBy: String!
|
|
12
|
+
$resourceId: String!
|
|
13
|
+
$resourceType: String!
|
|
14
|
+
$scope: String!
|
|
15
|
+
) {
|
|
16
|
+
createClientGroup(
|
|
17
|
+
name: $name
|
|
18
|
+
createdBy: $createdBy
|
|
19
|
+
resourceId: $resourceId
|
|
20
|
+
resourceType: $resourceType
|
|
21
|
+
scope: $scope
|
|
22
|
+
) {
|
|
23
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
};
|
|
28
|
+
exports.CREATE_CLIENT_GROUP_DYNAMIC = CREATE_CLIENT_GROUP_DYNAMIC;
|
|
29
|
+
const UPDATE_CLIENT_GROUP_NAME_DYNAMIC = (fields = []) => {
|
|
30
|
+
const fieldStr = fields.join('\n ');
|
|
31
|
+
const hasFields = fields.length > 0;
|
|
32
|
+
return (0, graphql_tag_1.gql) `
|
|
33
|
+
mutation UpdateClientGroupName(
|
|
34
|
+
$groupId: String!
|
|
35
|
+
$name: String!
|
|
36
|
+
$updatedBy: String!
|
|
37
|
+
) {
|
|
38
|
+
updateClientGroupName(
|
|
39
|
+
groupId: $groupId
|
|
40
|
+
name: $name
|
|
41
|
+
updatedBy: $updatedBy
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
};
|
|
46
|
+
exports.UPDATE_CLIENT_GROUP_NAME_DYNAMIC = UPDATE_CLIENT_GROUP_NAME_DYNAMIC;
|
|
47
|
+
const DELETE_CLIENT_GROUP_DYNAMIC = (fields = []) => {
|
|
48
|
+
const fieldStr = fields.join('\n ');
|
|
49
|
+
const hasFields = fields.length > 0;
|
|
50
|
+
return (0, graphql_tag_1.gql) `
|
|
51
|
+
mutation DeleteClientGroup(
|
|
52
|
+
$groupId: String!
|
|
53
|
+
) {
|
|
54
|
+
deleteClientGroup(
|
|
55
|
+
groupId: $groupId
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
59
|
+
};
|
|
60
|
+
exports.DELETE_CLIENT_GROUP_DYNAMIC = DELETE_CLIENT_GROUP_DYNAMIC;
|
|
@@ -13,6 +13,7 @@ export declare const GET_BRAND_DETAIL_QUERY = "\n query GetBrandDetail($partner
|
|
|
13
13
|
export declare const GET_PRODUCT_OPTION: DocumentNode;
|
|
14
14
|
export declare const GET_POLICY: DocumentNode;
|
|
15
15
|
export declare const GET_PRODUCTS: DocumentNode;
|
|
16
|
+
export declare const GET_CLIENT_GROUPS_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
16
17
|
export declare const GET_PRODUCTS_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
17
18
|
export declare const GET_HANDLE_BY_SERVICETYPE: DocumentNode;
|
|
18
19
|
export declare const GET_RESOURCE_BY_PRODUCT: DocumentNode;
|
|
@@ -31,3 +32,4 @@ export declare const GET_PRODUCT_RELATED_TO_ARTICLE: (fields?: string[]) => Docu
|
|
|
31
32
|
export declare const GET_PRODUCTS_FEATURE_TYPE_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
32
33
|
export declare const GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
33
34
|
export declare const GET_PRODUCT_OPTION_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
35
|
+
export declare const GET_SEOS: (fields?: string[]) => DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_PRODUCT_OPTION_DYNAMIC = exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = exports.GET_PRODUCTS_FEATURE_TYPE_DYNAMIC = exports.GET_PRODUCT_RELATED_TO_ARTICLE = exports.GET_SIMPLE_PRODUCTS_DYNAMIC = exports.GET_PRICE_MENUS = exports.GET_CATEGORIES = exports.GET_LIST_PRODUCTS_CONFIG_DYNAMIC = 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_QUERY_DYNAMIC = 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_SIMPLE_PRODUCT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
|
|
3
|
+
exports.GET_SEOS = exports.GET_PRODUCT_OPTION_DYNAMIC = exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = exports.GET_PRODUCTS_FEATURE_TYPE_DYNAMIC = exports.GET_PRODUCT_RELATED_TO_ARTICLE = exports.GET_SIMPLE_PRODUCTS_DYNAMIC = exports.GET_PRICE_MENUS = exports.GET_CATEGORIES = exports.GET_LIST_PRODUCTS_CONFIG_DYNAMIC = 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_QUERY_DYNAMIC = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS_DYNAMIC = exports.GET_CLIENT_GROUPS_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_SIMPLE_PRODUCT_BY_ID_QUERY_DYNAMIC = 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(
|
|
@@ -713,6 +713,26 @@ exports.GET_PRODUCTS = (0, graphql_tag_1.gql) `
|
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
`;
|
|
716
|
+
const GET_CLIENT_GROUPS_DYNAMIC = (fields = []) => {
|
|
717
|
+
const fieldStr = fields.join("\n ");
|
|
718
|
+
const hasFields = fields.length > 0;
|
|
719
|
+
return (0, graphql_tag_1.gql) `
|
|
720
|
+
query GetClientGroups(
|
|
721
|
+
$resourceId: String!
|
|
722
|
+
$resourceType: String!
|
|
723
|
+
$scope: String!
|
|
724
|
+
) {
|
|
725
|
+
getClientGroups(
|
|
726
|
+
resourceId: $resourceId
|
|
727
|
+
resourceType: $resourceType
|
|
728
|
+
scope: $scope
|
|
729
|
+
) {
|
|
730
|
+
${hasFields ? `${fieldStr}` : ""}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
`;
|
|
734
|
+
};
|
|
735
|
+
exports.GET_CLIENT_GROUPS_DYNAMIC = GET_CLIENT_GROUPS_DYNAMIC;
|
|
716
736
|
const GET_PRODUCTS_DYNAMIC = (fields = []) => {
|
|
717
737
|
const fieldStr = fields.join("\n ");
|
|
718
738
|
const hasFields = fields.length > 0;
|
|
@@ -1271,3 +1291,19 @@ const GET_PRODUCT_OPTION_DYNAMIC = (fields = []) => {
|
|
|
1271
1291
|
`;
|
|
1272
1292
|
};
|
|
1273
1293
|
exports.GET_PRODUCT_OPTION_DYNAMIC = GET_PRODUCT_OPTION_DYNAMIC;
|
|
1294
|
+
const GET_SEOS = (fields = []) => {
|
|
1295
|
+
const fieldStr = fields.join("\n ");
|
|
1296
|
+
const hasFields = fields.length > 0;
|
|
1297
|
+
return (0, graphql_tag_1.gql) `
|
|
1298
|
+
query getSeos(
|
|
1299
|
+
$parentId: String!
|
|
1300
|
+
$parentType: String!
|
|
1301
|
+
) {
|
|
1302
|
+
getSeos(
|
|
1303
|
+
parentId: $parentId
|
|
1304
|
+
parentType: $parentType
|
|
1305
|
+
) ${hasFields ? `{ ${fieldStr} }` : ""}
|
|
1306
|
+
}
|
|
1307
|
+
`;
|
|
1308
|
+
};
|
|
1309
|
+
exports.GET_SEOS = GET_SEOS;
|
|
@@ -54,4 +54,5 @@ export declare class CloudService extends Service {
|
|
|
54
54
|
getElasticCloudResource(serviceId: string): Promise<any>;
|
|
55
55
|
searchServiceDynamic(filter: Filter, fields: string[]): Promise<any>;
|
|
56
56
|
convertProductResourceOutputsToProductJsonList(productResourceInput: any, fields: string[]): Promise<any>;
|
|
57
|
+
searchActionsDynamic(parameter: any, fields: string[]): Promise<any>;
|
|
57
58
|
}
|
|
@@ -785,5 +785,21 @@ class CloudService extends serviceSDK_1.Service {
|
|
|
785
785
|
}
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
|
+
searchActionsDynamic(parameter, fields) {
|
|
789
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
790
|
+
const query = (0, queries_1.SEARCH_ACTIONS_DYNAMIC)(fields);
|
|
791
|
+
const variables = {
|
|
792
|
+
parameter,
|
|
793
|
+
};
|
|
794
|
+
try {
|
|
795
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
|
796
|
+
return response.searchActions;
|
|
797
|
+
}
|
|
798
|
+
catch (error) {
|
|
799
|
+
console.log(`Error in searchActionsDynamic: ${error}`);
|
|
800
|
+
throw error;
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
}
|
|
788
804
|
}
|
|
789
805
|
exports.CloudService = CloudService;
|
|
@@ -61,6 +61,7 @@ export declare class ComputingService extends Service {
|
|
|
61
61
|
updateCPU(computingId: string, socket: number, corePerSocket: number, updateBy: string, serviceId: string): Promise<any>;
|
|
62
62
|
updateRAM(computingId: string, size: number, unit: string, updateBy: string, serviceId: string): Promise<any>;
|
|
63
63
|
getComputingsDynamic(userId: string, fields: string[]): Promise<any>;
|
|
64
|
+
updateClientGroupIdDynamic(computingIds: [string] | null, groupId: string, updateBy: string, fields: string[]): Promise<any>;
|
|
64
65
|
createComputingForEC(createComputingInputForEC: any, createBy: string): Promise<any>;
|
|
65
66
|
computingDetailDynamic(computingId: string, serviceId: string, fields: string[]): Promise<any>;
|
|
66
67
|
}
|
|
@@ -923,6 +923,24 @@ class ComputingService extends serviceSDK_1.Service {
|
|
|
923
923
|
}
|
|
924
924
|
});
|
|
925
925
|
}
|
|
926
|
+
updateClientGroupIdDynamic(computingIds, groupId, updateBy, fields) {
|
|
927
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
928
|
+
const query = (0, mutations_1.UPDATE_CLIENT_GROUP_ID_DYNAMIC)(fields);
|
|
929
|
+
const variables = {
|
|
930
|
+
computingIds,
|
|
931
|
+
groupId,
|
|
932
|
+
updateBy,
|
|
933
|
+
};
|
|
934
|
+
try {
|
|
935
|
+
const response = yield this.graphqlMutationV2(query, variables);
|
|
936
|
+
return response.updateClientGroupId;
|
|
937
|
+
}
|
|
938
|
+
catch (error) {
|
|
939
|
+
console.log(`Error in updateClientGroupIdDynamic: ${error}`);
|
|
940
|
+
throw error;
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
}
|
|
926
944
|
createComputingForEC(createComputingInputForEC, createBy) {
|
|
927
945
|
return __awaiter(this, void 0, void 0, function* () {
|
|
928
946
|
const mutation = mutations_1.CREATE_COMPUTING_FOR_EC;
|
|
@@ -6,6 +6,7 @@ export declare class CrmCampingService extends Service {
|
|
|
6
6
|
searchProductQuantityPromotionAction(productId: string): Promise<any>;
|
|
7
7
|
addCustomerToVoucher(userId: string, voucherCode: string): Promise<any>;
|
|
8
8
|
getCampaignActionById(campaignActionId: string): Promise<any>;
|
|
9
|
+
getProductDiscountBuyWithDynamic(productId: string, fields: string[]): Promise<any>;
|
|
9
10
|
suggestVoucher(customerId: string, scopeIgnore: string | null, scope: string | null, isNewCustomer: boolean, voucherCode: string | null): Promise<any>;
|
|
10
11
|
searchVouchers(campaignId: String, campaignActionId: String, campaignActionType: String, customerId: String, pageNumber: number, pageSize: number): Promise<any>;
|
|
11
12
|
getAverageRating(targetIds: [string], customerId: string, evaluationType: string): Promise<any>;
|
|
@@ -73,22 +73,24 @@ class CrmCampingService extends serviceSDK_1.Service {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
76
|
+
getProductDiscountBuyWithDynamic(productId, fields) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
const query = (0, queries_1.GET_PRODUCT_DISCOUNT_BUY_WITH_DYNAMIC)(fields);
|
|
79
|
+
const variables = {
|
|
80
|
+
partnerId: this.orgId,
|
|
81
|
+
storeId: this.storeId,
|
|
82
|
+
productId,
|
|
83
|
+
};
|
|
84
|
+
try {
|
|
85
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
|
86
|
+
return response.getProductDiscountBuyWith;
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
console.log(`Error in getProductDiscountBuyWithDynamic: ${error}`);
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
92
94
|
suggestVoucher(customerId, scopeIgnore, scope, isNewCustomer, voucherCode) {
|
|
93
95
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
96
|
const query = queries_1.SUGGEST_VOUCHER;
|
|
@@ -40,6 +40,10 @@ export declare class ProductService extends Service {
|
|
|
40
40
|
getProductOption(productId: string, store: string): Promise<any>;
|
|
41
41
|
getPolicy(groupId: string): Promise<any>;
|
|
42
42
|
getProducts(param: getProduct, store: string): Promise<any>;
|
|
43
|
+
getClientGroupsDynamic(resourceId: string, resourceType: string, scope: string, fields: string[]): Promise<any>;
|
|
44
|
+
createClientGroupDynamic(name: string, createdBy: string, resourceId: string, resourceType: string, scope: string, fields: string[]): Promise<any>;
|
|
45
|
+
updateClientGroupNameDynamic(groupId: string, name: string, updatedBy: string, fields: string[]): Promise<any>;
|
|
46
|
+
deleteClientGroupDynamic(groupId: string, fields: string[]): Promise<any>;
|
|
43
47
|
getProductsDynamic(param: getProduct, store: string, fields: string[]): Promise<any>;
|
|
44
48
|
getHandleByServiceTypes(serviceTypes: [string]): Promise<any>;
|
|
45
49
|
getResourceByProduct(productId: string): Promise<any>;
|
|
@@ -58,4 +62,5 @@ export declare class ProductService extends Service {
|
|
|
58
62
|
getProductFeatureTypesDynamic(productId: string, storeId: string, fields: string[]): Promise<any>;
|
|
59
63
|
getProductSimpleByHandle(handle: string, store: string, fields: string[]): Promise<any>;
|
|
60
64
|
getProductOptionDynamic(productId: string, store: string, fields: string[]): Promise<any>;
|
|
65
|
+
getSeos(parentId: string, parentType: string, fields: string[]): Promise<any>;
|
|
61
66
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProductService = void 0;
|
|
13
13
|
const serviceSDK_1 = require("../serviceSDK");
|
|
14
14
|
const queries_1 = require("../../graphql/product/queries");
|
|
15
|
+
const mutations_1 = require("../../graphql/product/mutations");
|
|
15
16
|
/**
|
|
16
17
|
* Service class for managing product-related operations.
|
|
17
18
|
*/
|
|
@@ -181,6 +182,78 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
181
182
|
}
|
|
182
183
|
});
|
|
183
184
|
}
|
|
185
|
+
getClientGroupsDynamic(resourceId, resourceType, scope, fields) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
const query = (0, queries_1.GET_CLIENT_GROUPS_DYNAMIC)(fields);
|
|
188
|
+
const variablesHandle = {
|
|
189
|
+
resourceId,
|
|
190
|
+
resourceType,
|
|
191
|
+
scope,
|
|
192
|
+
};
|
|
193
|
+
try {
|
|
194
|
+
const response = yield this.graphqlQueryV2(query, variablesHandle);
|
|
195
|
+
return response.getClientGroups;
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
console.log(`Error fetching getClientGroups: ${error}`);
|
|
199
|
+
throw error;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
createClientGroupDynamic(name, createdBy, resourceId, resourceType, scope, fields) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
const mutation = (0, mutations_1.CREATE_CLIENT_GROUP_DYNAMIC)(fields);
|
|
206
|
+
const variablesHandle = {
|
|
207
|
+
name,
|
|
208
|
+
createdBy,
|
|
209
|
+
resourceId,
|
|
210
|
+
resourceType,
|
|
211
|
+
scope,
|
|
212
|
+
};
|
|
213
|
+
try {
|
|
214
|
+
const response = yield this.graphqlMutationV2(mutation, variablesHandle);
|
|
215
|
+
return response.createClientGroup;
|
|
216
|
+
}
|
|
217
|
+
catch (error) {
|
|
218
|
+
console.log(`Error fetching createClientGroup: ${error}`);
|
|
219
|
+
throw error;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
updateClientGroupNameDynamic(groupId, name, updatedBy, fields) {
|
|
224
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
const mutation = (0, mutations_1.UPDATE_CLIENT_GROUP_NAME_DYNAMIC)(fields);
|
|
226
|
+
const variablesHandle = {
|
|
227
|
+
groupId,
|
|
228
|
+
name,
|
|
229
|
+
updatedBy
|
|
230
|
+
};
|
|
231
|
+
try {
|
|
232
|
+
const response = yield this.graphqlMutationV2(mutation, variablesHandle);
|
|
233
|
+
return response.updateClientGroupName;
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
console.log(`Error fetching updateClientGroupNameDynamic: ${error}`);
|
|
237
|
+
throw error;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
deleteClientGroupDynamic(groupId, fields) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
const mutation = (0, mutations_1.DELETE_CLIENT_GROUP_DYNAMIC)(fields);
|
|
244
|
+
const variablesHandle = {
|
|
245
|
+
groupId
|
|
246
|
+
};
|
|
247
|
+
try {
|
|
248
|
+
const response = yield this.graphqlMutationV2(mutation, variablesHandle);
|
|
249
|
+
return response.deleteClientGroup;
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
console.log(`Error fetching deleteClientGroupDynamic: ${error}`);
|
|
253
|
+
throw error;
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
184
257
|
getProductsDynamic(param, store, fields) {
|
|
185
258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
186
259
|
const query = (0, queries_1.GET_PRODUCTS_DYNAMIC)(fields);
|
|
@@ -491,5 +564,22 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
491
564
|
}
|
|
492
565
|
});
|
|
493
566
|
}
|
|
567
|
+
getSeos(parentId, parentType, fields) {
|
|
568
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
569
|
+
const query = (0, queries_1.GET_SEOS)(fields);
|
|
570
|
+
const variablesHandle = {
|
|
571
|
+
parentId,
|
|
572
|
+
parentType,
|
|
573
|
+
};
|
|
574
|
+
try {
|
|
575
|
+
const response = yield this.graphqlQuery(query, variablesHandle);
|
|
576
|
+
return response.getSeos;
|
|
577
|
+
}
|
|
578
|
+
catch (error) {
|
|
579
|
+
console.log(`Error fetching getSeos: ${error}`);
|
|
580
|
+
throw error;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
}
|
|
494
584
|
}
|
|
495
585
|
exports.ProductService = ProductService;
|