@longvansoftware/service-js-client 1.3.4 → 1.3.5
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.
@@ -10,3 +10,4 @@ export declare const CPU_USAGE_DATE_RANGE: import("graphql").DocumentNode;
|
|
10
10
|
export declare const NETWORK_USAGE_DATE_RANGE: import("graphql").DocumentNode;
|
11
11
|
export declare const DISK_USAGE_DATE_RANGE: import("graphql").DocumentNode;
|
12
12
|
export declare const BACKUP_POINT: import("graphql").DocumentNode;
|
13
|
+
export declare const GET_COMPUTINGS: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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_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!) {
|
@@ -184,3 +184,27 @@ exports.BACKUP_POINT = (0, graphql_tag_1.gql) `
|
|
184
184
|
}
|
185
185
|
}
|
186
186
|
`;
|
187
|
+
exports.GET_COMPUTINGS = (0, graphql_tag_1.gql) `
|
188
|
+
query GetComputings($userId: String!) {
|
189
|
+
getComputings(userId: $userId) {
|
190
|
+
id
|
191
|
+
name
|
192
|
+
username
|
193
|
+
password
|
194
|
+
state
|
195
|
+
os
|
196
|
+
ips
|
197
|
+
province
|
198
|
+
console
|
199
|
+
consoleCookieName
|
200
|
+
consoleCookieValue
|
201
|
+
existPortNat
|
202
|
+
ipConnect
|
203
|
+
portConnect
|
204
|
+
protocolConnect
|
205
|
+
lastBackup
|
206
|
+
backupSequence
|
207
|
+
serviceId
|
208
|
+
}
|
209
|
+
}
|
210
|
+
`;
|
@@ -31,4 +31,5 @@ export declare class ComputingService extends Service {
|
|
31
31
|
diskUsageDateRange(computingId: string, type: string, fromDate: any, toDate: any): Promise<any>;
|
32
32
|
networkUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
|
33
33
|
diskUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
|
34
|
+
getComputings(userId: string): Promise<any>;
|
34
35
|
}
|
@@ -410,5 +410,21 @@ class ComputingService extends serviceSDK_1.Service {
|
|
410
410
|
}
|
411
411
|
});
|
412
412
|
}
|
413
|
+
getComputings(userId) {
|
414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
415
|
+
const query = queries_1.GET_COMPUTINGS;
|
416
|
+
const variables = {
|
417
|
+
userId,
|
418
|
+
};
|
419
|
+
try {
|
420
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
421
|
+
return response.getComputings;
|
422
|
+
}
|
423
|
+
catch (error) {
|
424
|
+
console.log(`Error fetching get getComputings method: ${error}`);
|
425
|
+
throw error;
|
426
|
+
}
|
427
|
+
});
|
428
|
+
}
|
413
429
|
}
|
414
430
|
exports.ComputingService = ComputingService;
|