@longvansoftware/service-js-client 1.15.6 → 1.15.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/cloud/mutations.d.ts +4 -0
- package/dist/src/graphql/cloud/mutations.js +47 -1
- package/dist/src/graphql/cloud/queries.d.ts +1 -0
- package/dist/src/graphql/cloud/queries.js +26 -1
- package/dist/src/graphql/computing/mutations.d.ts +1 -0
- package/dist/src/graphql/computing/mutations.js +15 -1
- package/dist/src/lib/cloud/index.d.ts +5 -0
- package/dist/src/lib/cloud/index.js +85 -0
- package/dist/src/lib/computing/index.d.ts +1 -0
- package/dist/src/lib/computing/index.js +17 -0
- package/package.json +1 -1
@@ -14,3 +14,7 @@ export declare const GET_ORDER_CHANGE_RESOURCE_TERM: import("graphql").DocumentN
|
|
14
14
|
export declare const CREATE_ACTION_CHANGE_IP_OF_SERVICE: import("graphql").DocumentNode;
|
15
15
|
export declare const UPDATE_ACTION_STATUS: import("graphql").DocumentNode;
|
16
16
|
export declare const UPDATE_ACTION_CUSTOM_ATTRIBUTE: import("graphql").DocumentNode;
|
17
|
+
export declare const UPDATE_SERVICE_COMPLETED: import("graphql").DocumentNode;
|
18
|
+
export declare const UPDATE_SERVICE_NEW: import("graphql").DocumentNode;
|
19
|
+
export declare const UPDATE_SERVICE_READY_DEPLOY: import("graphql").DocumentNode;
|
20
|
+
export declare const UPDATE_URL_PUBLIC: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = exports.UPDATE_ACTION_STATUS = exports.CREATE_ACTION_CHANGE_IP_OF_SERVICE = exports.GET_ORDER_CHANGE_RESOURCE_TERM = exports.CREATE_DOMAIN_CONTACT = exports.UPDATE_DNS = exports.UPDATE_USER_PASSWORD = exports.UPDATE_PASSWORD = exports.UPDATE_USER_NAME = exports.UPDATE_DOMAIN_NAME = exports.DELETE_USER_MAIL_HOSTING = exports.CREATE_USER_MAIL_HOSTING = exports.CHANGE_SERVICE_NAME = exports.CHECK_DOMAIN_NAME = exports.CHECK_LIST_DOMAIN_NAME = exports.GET_DOMAIN_INFO = void 0;
|
3
|
+
exports.UPDATE_URL_PUBLIC = exports.UPDATE_SERVICE_READY_DEPLOY = exports.UPDATE_SERVICE_NEW = exports.UPDATE_SERVICE_COMPLETED = exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = exports.UPDATE_ACTION_STATUS = exports.CREATE_ACTION_CHANGE_IP_OF_SERVICE = exports.GET_ORDER_CHANGE_RESOURCE_TERM = exports.CREATE_DOMAIN_CONTACT = exports.UPDATE_DNS = exports.UPDATE_USER_PASSWORD = exports.UPDATE_PASSWORD = exports.UPDATE_USER_NAME = exports.UPDATE_DOMAIN_NAME = exports.DELETE_USER_MAIL_HOSTING = exports.CREATE_USER_MAIL_HOSTING = exports.CHANGE_SERVICE_NAME = exports.CHECK_DOMAIN_NAME = exports.CHECK_LIST_DOMAIN_NAME = exports.GET_DOMAIN_INFO = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.GET_DOMAIN_INFO = (0, graphql_tag_1.gql) `
|
6
6
|
mutation GetDomainInfo($domainName: String!) {
|
@@ -258,3 +258,49 @@ exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = (0, graphql_tag_1.gql) `
|
|
258
258
|
)
|
259
259
|
}
|
260
260
|
`;
|
261
|
+
exports.UPDATE_SERVICE_COMPLETED = (0, graphql_tag_1.gql) `
|
262
|
+
mutation UpdateServiceCompleted(
|
263
|
+
$serviceId: String!
|
264
|
+
$handleBy: String!
|
265
|
+
) {
|
266
|
+
updateServiceCompleted(
|
267
|
+
serviceId: $serviceId
|
268
|
+
handleBy: $handleBy
|
269
|
+
)
|
270
|
+
}
|
271
|
+
`;
|
272
|
+
exports.UPDATE_SERVICE_NEW = (0, graphql_tag_1.gql) `
|
273
|
+
mutation UpdateServiceNew(
|
274
|
+
$serviceId: String!
|
275
|
+
$handleBy: String!
|
276
|
+
) {
|
277
|
+
updateServiceNew(
|
278
|
+
serviceId: $serviceId
|
279
|
+
handleBy: $handleBy
|
280
|
+
)
|
281
|
+
}
|
282
|
+
`;
|
283
|
+
exports.UPDATE_SERVICE_READY_DEPLOY = (0, graphql_tag_1.gql) `
|
284
|
+
mutation UpdateServiceReadyDeploy(
|
285
|
+
$serviceId: String!
|
286
|
+
$handleBy: String!
|
287
|
+
) {
|
288
|
+
updateServiceReadyDeploy(
|
289
|
+
serviceId: $serviceId
|
290
|
+
handleBy: $handleBy
|
291
|
+
)
|
292
|
+
}
|
293
|
+
`;
|
294
|
+
exports.UPDATE_URL_PUBLIC = (0, graphql_tag_1.gql) `
|
295
|
+
mutation UpdateUrlPublic(
|
296
|
+
$serviceId: String!
|
297
|
+
$handleBy: String!
|
298
|
+
$urlPublic: String!
|
299
|
+
) {
|
300
|
+
updateUrlPublic(
|
301
|
+
serviceId: $serviceId
|
302
|
+
handleBy: $handleBy
|
303
|
+
urlPublic: $urlPublic
|
304
|
+
)
|
305
|
+
}
|
306
|
+
`;
|
@@ -16,3 +16,4 @@ export declare const GET_CONTACTS_BY_OWNER_ID: import("graphql").DocumentNode;
|
|
16
16
|
export declare const GET_DOMAIN_SUPPLIER: import("graphql").DocumentNode;
|
17
17
|
export declare const CHECK_DOMAIN_EXIST: import("graphql").DocumentNode;
|
18
18
|
export declare const SEARCH_ACTIONS: import("graphql").DocumentNode;
|
19
|
+
export declare const GET_ELASTIC_CLOUD_RESOURCE: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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 = exports.GET_WHOIS_DOMAIN_INFO = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = void 0;
|
3
|
+
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 = 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!) {
|
@@ -337,3 +337,28 @@ exports.SEARCH_ACTIONS = (0, graphql_tag_1.gql) `
|
|
337
337
|
}
|
338
338
|
}
|
339
339
|
`;
|
340
|
+
exports.GET_ELASTIC_CLOUD_RESOURCE = (0, graphql_tag_1.gql) `
|
341
|
+
query GetElasticCloudResource($serviceId: String!) {
|
342
|
+
getElasticCloudResource(serviceId: $serviceId) {
|
343
|
+
ram {
|
344
|
+
size
|
345
|
+
used
|
346
|
+
unit
|
347
|
+
}
|
348
|
+
cpu {
|
349
|
+
size
|
350
|
+
used
|
351
|
+
unit
|
352
|
+
}
|
353
|
+
disk {
|
354
|
+
size
|
355
|
+
used
|
356
|
+
unit
|
357
|
+
}
|
358
|
+
ip {
|
359
|
+
size
|
360
|
+
used
|
361
|
+
}
|
362
|
+
}
|
363
|
+
}
|
364
|
+
`;
|
@@ -22,3 +22,4 @@ export declare const RESTORE_COMPUTING_WAITING_REVOKE: (fields?: string[]) => Do
|
|
22
22
|
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
|
+
export declare const CREATE_COMPUTING_FOR_EC: DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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.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!) {
|
@@ -330,3 +330,17 @@ exports.UPDATE_RAM = (0, graphql_tag_1.gql) `
|
|
330
330
|
)
|
331
331
|
}
|
332
332
|
`;
|
333
|
+
exports.CREATE_COMPUTING_FOR_EC = (0, graphql_tag_1.gql) `
|
334
|
+
mutation CreateComputingForEC(
|
335
|
+
$createComputingInputForEC: CreateComputingInputForEC!
|
336
|
+
$createBy: String!
|
337
|
+
) {
|
338
|
+
createComputingForEC(
|
339
|
+
createComputingInputForEC: $createComputingInputForEC
|
340
|
+
createBy: $createBy
|
341
|
+
) {
|
342
|
+
computingId
|
343
|
+
message
|
344
|
+
}
|
345
|
+
}
|
346
|
+
`;
|
@@ -11,6 +11,10 @@ export declare class CloudService extends Service {
|
|
11
11
|
setToken(token: string): void;
|
12
12
|
setStoreId(storeId: string): void;
|
13
13
|
serviceDetail(serviceId: string): Promise<any>;
|
14
|
+
updateServiceCompleted(serviceId: string, handleBy: string): Promise<any>;
|
15
|
+
updateServiceNew(serviceId: string, handleBy: string): Promise<any>;
|
16
|
+
updateServiceReadyDeploy(serviceId: string, handleBy: string): Promise<any>;
|
17
|
+
updateUrlPublic(serviceId: string, handleBy: string, urlPublic: string): Promise<any>;
|
14
18
|
getMailResource(serviceId: string): Promise<any>;
|
15
19
|
changeServiceName(serviceId: string, updateBy: string, updateData: string): Promise<any>;
|
16
20
|
getUserMailHosting(serviceId: string): Promise<any>;
|
@@ -44,4 +48,5 @@ export declare class CloudService extends Service {
|
|
44
48
|
createActionChangeIpOfService(action: any, byUser: string): Promise<any>;
|
45
49
|
updateActionStatus(actionId: string, status: string, byUser: string): Promise<any>;
|
46
50
|
updateActionCustomAttribute(actionId: string, attrName: string, attrValue: string, byUser: string): Promise<any>;
|
51
|
+
getElasticCloudResource(serviceId: string): Promise<any>;
|
47
52
|
}
|
@@ -45,6 +45,75 @@ class CloudService extends serviceSDK_1.Service {
|
|
45
45
|
}
|
46
46
|
});
|
47
47
|
}
|
48
|
+
updateServiceCompleted(serviceId, handleBy) {
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
50
|
+
const mutation = mutations_1.UPDATE_SERVICE_COMPLETED;
|
51
|
+
const variables = {
|
52
|
+
serviceId,
|
53
|
+
handleBy,
|
54
|
+
};
|
55
|
+
try {
|
56
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
57
|
+
return response.updateServiceCompleted;
|
58
|
+
}
|
59
|
+
catch (error) {
|
60
|
+
console.log(`Error in updateServiceCompleted: ${error}`);
|
61
|
+
throw error;
|
62
|
+
}
|
63
|
+
});
|
64
|
+
}
|
65
|
+
updateServiceNew(serviceId, handleBy) {
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
67
|
+
const mutation = mutations_1.UPDATE_SERVICE_NEW;
|
68
|
+
const variables = {
|
69
|
+
serviceId,
|
70
|
+
handleBy,
|
71
|
+
};
|
72
|
+
try {
|
73
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
74
|
+
return response.updateServiceNew;
|
75
|
+
}
|
76
|
+
catch (error) {
|
77
|
+
console.log(`Error in updateServiceNew: ${error}`);
|
78
|
+
throw error;
|
79
|
+
}
|
80
|
+
});
|
81
|
+
}
|
82
|
+
updateServiceReadyDeploy(serviceId, handleBy) {
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
84
|
+
const mutation = mutations_1.UPDATE_SERVICE_READY_DEPLOY;
|
85
|
+
const variables = {
|
86
|
+
serviceId,
|
87
|
+
handleBy,
|
88
|
+
};
|
89
|
+
try {
|
90
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
91
|
+
return response.updateServiceReadyDeploy;
|
92
|
+
}
|
93
|
+
catch (error) {
|
94
|
+
console.log(`Error in updateServiceReadyDeploy: ${error}`);
|
95
|
+
throw error;
|
96
|
+
}
|
97
|
+
});
|
98
|
+
}
|
99
|
+
updateUrlPublic(serviceId, handleBy, urlPublic) {
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
101
|
+
const mutation = mutations_1.UPDATE_URL_PUBLIC;
|
102
|
+
const variables = {
|
103
|
+
serviceId,
|
104
|
+
handleBy,
|
105
|
+
urlPublic
|
106
|
+
};
|
107
|
+
try {
|
108
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
109
|
+
return response.updateUrlPublic;
|
110
|
+
}
|
111
|
+
catch (error) {
|
112
|
+
console.log(`Error in updateUrlPublic: ${error}`);
|
113
|
+
throw error;
|
114
|
+
}
|
115
|
+
});
|
116
|
+
}
|
48
117
|
getMailResource(serviceId) {
|
49
118
|
return __awaiter(this, void 0, void 0, function* () {
|
50
119
|
const query = queries_1.GET_MAIL_RESOURCE;
|
@@ -611,5 +680,21 @@ class CloudService extends serviceSDK_1.Service {
|
|
611
680
|
}
|
612
681
|
});
|
613
682
|
}
|
683
|
+
getElasticCloudResource(serviceId) {
|
684
|
+
return __awaiter(this, void 0, void 0, function* () {
|
685
|
+
const query = queries_1.GET_ELASTIC_CLOUD_RESOURCE;
|
686
|
+
const variables = {
|
687
|
+
serviceId,
|
688
|
+
};
|
689
|
+
try {
|
690
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
691
|
+
return response.getElasticCloudResource;
|
692
|
+
}
|
693
|
+
catch (error) {
|
694
|
+
console.log(`Error in getElasticCloudResource: ${error}`);
|
695
|
+
throw error;
|
696
|
+
}
|
697
|
+
});
|
698
|
+
}
|
614
699
|
}
|
615
700
|
exports.CloudService = CloudService;
|
@@ -61,4 +61,5 @@ export declare class ComputingService extends Service {
|
|
61
61
|
updateCPU(computingId: string, socket: number, corePerSocket: number, updateBy: string): Promise<any>;
|
62
62
|
updateRAM(computingId: string, size: number, unit: string, updateBy: string): Promise<any>;
|
63
63
|
getComputingsDynamic(userId: string, fields: string[]): Promise<any>;
|
64
|
+
createComputingForEC(createComputingInputForEC: any, createBy: string): Promise<any>;
|
64
65
|
}
|
@@ -906,5 +906,22 @@ class ComputingService extends serviceSDK_1.Service {
|
|
906
906
|
}
|
907
907
|
});
|
908
908
|
}
|
909
|
+
createComputingForEC(createComputingInputForEC, createBy) {
|
910
|
+
return __awaiter(this, void 0, void 0, function* () {
|
911
|
+
const mutation = mutations_1.CREATE_COMPUTING_FOR_EC;
|
912
|
+
const variables = {
|
913
|
+
createComputingInputForEC,
|
914
|
+
createBy,
|
915
|
+
};
|
916
|
+
try {
|
917
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
918
|
+
return response.createComputingForEC;
|
919
|
+
}
|
920
|
+
catch (error) {
|
921
|
+
console.log(`Error fetching get createComputingForEC method: ${error}`);
|
922
|
+
throw error;
|
923
|
+
}
|
924
|
+
});
|
925
|
+
}
|
909
926
|
}
|
910
927
|
exports.ComputingService = ComputingService;
|