@longvansoftware/service-js-client 1.3.6 → 1.3.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.
@@ -15,3 +15,4 @@ export declare const GET_LAB_INSTANCE: import("graphql").DocumentNode;
15
15
  export declare const GET_CLUSTERS: import("graphql").DocumentNode;
16
16
  export declare const GET_CLUSTER: import("graphql").DocumentNode;
17
17
  export declare const GET_COMPUTING_BY_CLUSTER: import("graphql").DocumentNode;
18
+ export declare const GET_COMPUTING_BY_SERVICE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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_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!) {
@@ -280,3 +280,29 @@ exports.GET_COMPUTING_BY_CLUSTER = (0, graphql_tag_1.gql) `
280
280
  }
281
281
  }
282
282
  `;
283
+ exports.GET_COMPUTING_BY_SERVICE = (0, graphql_tag_1.gql) `
284
+ query GetComputingByService($serviceId: String!) {
285
+ getComputingByService(serviceId: $serviceId) {
286
+ id
287
+ name
288
+ username
289
+ password
290
+ state
291
+ os
292
+ ips
293
+ province
294
+ console
295
+ consoleCookieName
296
+ consoleCookieValue
297
+ existPortNat
298
+ ipConnect
299
+ portConnect
300
+ protocolConnect
301
+ lastBackup
302
+ backupSequence
303
+ serviceId
304
+ status
305
+ statusDetail
306
+ }
307
+ }
308
+ `;
@@ -39,4 +39,5 @@ export declare class ComputingService extends Service {
39
39
  getClusters(ownerId: string): Promise<any>;
40
40
  getCluster(clusterId: string): Promise<any>;
41
41
  getComputingByCluster(clusterId: string): Promise<any>;
42
+ getComputingByService(serviceId: string): Promise<any>;
42
43
  }
@@ -544,5 +544,21 @@ class ComputingService extends serviceSDK_1.Service {
544
544
  }
545
545
  });
546
546
  }
547
+ getComputingByService(serviceId) {
548
+ return __awaiter(this, void 0, void 0, function* () {
549
+ const query = queries_1.GET_COMPUTING_BY_SERVICE;
550
+ const variables = {
551
+ serviceId,
552
+ };
553
+ try {
554
+ const response = yield this.graphqlQueryV2(query, variables);
555
+ return response.getComputingByService;
556
+ }
557
+ catch (error) {
558
+ console.log(`Error fetching get getComputingByService method: ${error}`);
559
+ throw error;
560
+ }
561
+ });
562
+ }
547
563
  }
548
564
  exports.ComputingService = ComputingService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [