@longvansoftware/service-js-client 2.5.7 → 2.5.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.
@@ -21,3 +21,4 @@ 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
23
  export declare const SEARCH_ACTIONS_DYNAMIC: (fields?: string[]) => DocumentNode;
24
+ export declare const ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING = 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!) {
@@ -403,3 +403,8 @@ const SEARCH_ACTIONS_DYNAMIC = (fields = []) => {
403
403
  `;
404
404
  };
405
405
  exports.SEARCH_ACTIONS_DYNAMIC = SEARCH_ACTIONS_DYNAMIC;
406
+ exports.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING = (0, graphql_tag_1.gql) `
407
+ mutation AddLetsEncryptSSLForMailHosting($serviceId: String!, $actorId: String!) {
408
+ addLetsEncryptSSLForMailHosting(serviceId: $serviceId, actorId: $actorId)
409
+ }
410
+ `;
@@ -24,3 +24,4 @@ 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
26
  export declare const UPDATE_CLIENT_GROUP_ID_DYNAMIC: (fields?: string[]) => DocumentNode;
27
+ export declare const SHUTDOWN: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.SHUTDOWN = 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!) {
@@ -102,13 +102,13 @@ exports.ROLLBACK_SNAPSHOT = (0, graphql_tag_1.gql) `
102
102
  exports.DELETE_SNAPSHOT = (0, graphql_tag_1.gql) `
103
103
  mutation DeleteSnapshot(
104
104
  $computingId: String!
105
- $snapshotId: String!
105
+ $id: String!
106
106
  $serviceId: String!
107
107
  $updateBy: String
108
108
  ) {
109
109
  deleteSnapshot(
110
110
  computingId: $computingId
111
- snapshotId: $snapshotId
111
+ id: $id
112
112
  serviceId: $serviceId
113
113
  updateBy: $updateBy
114
114
  )
@@ -376,3 +376,18 @@ const UPDATE_CLIENT_GROUP_ID_DYNAMIC = (fields = []) => {
376
376
  `;
377
377
  };
378
378
  exports.UPDATE_CLIENT_GROUP_ID_DYNAMIC = UPDATE_CLIENT_GROUP_ID_DYNAMIC;
379
+ exports.SHUTDOWN = (0, graphql_tag_1.gql) `
380
+ mutation shutdown(
381
+ $computingId: String!
382
+ $isForceShutdown: Boolean!
383
+ $actor: String!
384
+ $serviceId: String!
385
+ ) {
386
+ shutdown(
387
+ computingId: $computingId
388
+ isForceShutdown: $isForceShutdown
389
+ actor: $actor
390
+ serviceId: $serviceId
391
+ )
392
+ }
393
+ `;
@@ -55,4 +55,5 @@ export declare class CloudService extends Service {
55
55
  searchServiceDynamic(filter: Filter, fields: string[]): Promise<any>;
56
56
  convertProductResourceOutputsToProductJsonList(productResourceInput: any, fields: string[]): Promise<any>;
57
57
  searchActionsDynamic(parameter: any, fields: string[]): Promise<any>;
58
+ addLetsEncryptSSLForMailHosting(serviceId: string, actorId: string): Promise<any>;
58
59
  }
@@ -801,5 +801,22 @@ class CloudService extends serviceSDK_1.Service {
801
801
  }
802
802
  });
803
803
  }
804
+ addLetsEncryptSSLForMailHosting(serviceId, actorId) {
805
+ return __awaiter(this, void 0, void 0, function* () {
806
+ const query = queries_1.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING;
807
+ const variables = {
808
+ serviceId,
809
+ actorId,
810
+ };
811
+ try {
812
+ const response = yield this.graphqlQueryV2(query, variables);
813
+ return response.addLetsEncryptSSLForMailHosting;
814
+ }
815
+ catch (error) {
816
+ console.log(`Error in addLetsEncryptSSLForMailHosting: ${error}`);
817
+ throw error;
818
+ }
819
+ });
820
+ }
804
821
  }
805
822
  exports.CloudService = CloudService;
@@ -64,4 +64,5 @@ export declare class ComputingService extends Service {
64
64
  updateClientGroupIdDynamic(computingIds: [string] | null, groupId: string, updateBy: string, fields: string[]): Promise<any>;
65
65
  createComputingForEC(createComputingInputForEC: any, createBy: string): Promise<any>;
66
66
  computingDetailDynamic(computingId: string, serviceId: string, fields: string[]): Promise<any>;
67
+ shutdown(computingId: string, isForceShutdown: boolean, actor: string, serviceId: string): Promise<any>;
67
68
  }
@@ -248,7 +248,7 @@ class ComputingService extends serviceSDK_1.Service {
248
248
  const mutation = mutations_1.DELETE_SNAPSHOT;
249
249
  const variables = {
250
250
  computingId: payload.computingId,
251
- snapshotId: payload.snapshotId,
251
+ id: payload.id,
252
252
  serviceId: payload.serviceId,
253
253
  updateBy,
254
254
  };
@@ -975,5 +975,24 @@ class ComputingService extends serviceSDK_1.Service {
975
975
  }
976
976
  });
977
977
  }
978
+ shutdown(computingId, isForceShutdown, actor, serviceId) {
979
+ return __awaiter(this, void 0, void 0, function* () {
980
+ const mutation = mutations_1.SHUTDOWN;
981
+ const variables = {
982
+ computingId,
983
+ isForceShutdown,
984
+ actor,
985
+ serviceId
986
+ };
987
+ try {
988
+ const response = yield this.graphqlMutationV2(mutation, variables);
989
+ return response.shutdown;
990
+ }
991
+ catch (error) {
992
+ console.log(`Error fetching get shutdown method: ${error}`);
993
+ throw error;
994
+ }
995
+ });
996
+ }
978
997
  }
979
998
  exports.ComputingService = ComputingService;
@@ -13,6 +13,7 @@ export interface CreateSnapShot {
13
13
  }
14
14
  export interface RollBackSnapShot {
15
15
  computingId: string;
16
+ id: string;
16
17
  snapshotId: string;
17
18
  serviceId: string;
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "2.5.7",
3
+ "version": "2.5.9",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [