@hpcc-js/comms 2.99.5 → 2.101.1
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/index.es6.js +110 -12
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +110 -12
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.node.js +110 -12
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.min.js +1 -1
- package/dist/index.node.min.js.map +1 -1
- package/lib-es6/__package__.js +2 -2
- package/lib-es6/__package__.js.map +1 -1
- package/lib-es6/services/wsCloud.js +55 -3
- package/lib-es6/services/wsCloud.js.map +1 -1
- package/lib-es6/services/wsDali.js +30 -1
- package/lib-es6/services/wsDali.js.map +1 -1
- package/lib-es6/services/wsLogaccess.js +1 -1
- package/lib-es6/services/wsWorkunits.js +1 -1
- package/lib-es6/services/wsWorkunits.js.map +1 -1
- package/lib-es6/services/wsdl/WsCloud/v1.02/WsCloud.js +20 -0
- package/lib-es6/services/wsdl/WsCloud/v1.02/WsCloud.js.map +1 -0
- package/lib-es6/services/wsdl/WsWorkunits/v2.02/WsWorkunits.js +376 -0
- package/lib-es6/services/wsdl/WsWorkunits/v2.02/WsWorkunits.js.map +1 -0
- package/lib-es6/services/wsdl/ws_logaccess/v1.08/ws_logaccess.js +104 -0
- package/lib-es6/services/wsdl/ws_logaccess/v1.08/ws_logaccess.js.map +1 -0
- package/package.json +4 -3
- package/src/__package__.ts +2 -2
- package/src/services/wsCloud.ts +59 -6
- package/src/services/wsDali.ts +32 -0
- package/src/services/wsLogaccess.ts +1 -1
- package/src/services/wsWorkunits.ts +1 -1
- package/src/services/wsdl/WsCloud/v1.02/WsCloud.ts +77 -0
- package/src/services/wsdl/WsWorkunits/v2.02/WsWorkunits.ts +3157 -0
- package/src/services/wsdl/ws_logaccess/v1.08/ws_logaccess.ts +267 -0
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types/services/wsCloud.d.ts +3 -3
- package/types/services/wsCloud.d.ts.map +1 -1
- package/types/services/wsDali.d.ts +9 -0
- package/types/services/wsDali.d.ts.map +1 -1
- package/types/services/wsLogaccess.d.ts +1 -1
- package/types/services/wsWorkunits.d.ts +1 -1
- package/types/services/wsWorkunits.d.ts.map +1 -1
- package/types/services/wsdl/WsCloud/v1.02/WsCloud.d.ts +47 -0
- package/types/services/wsdl/WsCloud/v1.02/WsCloud.d.ts.map +1 -0
- package/types/services/wsdl/WsWorkunits/v2.02/WsWorkunits.d.ts +2553 -0
- package/types/services/wsdl/WsWorkunits/v2.02/WsWorkunits.d.ts.map +1 -0
- package/types/services/wsdl/ws_logaccess/v1.08/ws_logaccess.d.ts +211 -0
- package/types/services/wsdl/ws_logaccess/v1.08/ws_logaccess.d.ts.map +1 -0
- package/types-3.4/__package__.d.ts +2 -2
- package/types-3.4/services/wsCloud.d.ts +2 -2
- package/types-3.4/services/wsDali.d.ts +9 -0
- package/types-3.4/services/wsLogaccess.d.ts +1 -1
- package/types-3.4/services/wsWorkunits.d.ts +1 -1
- package/types-3.4/services/wsdl/WsCloud/v1.02/WsCloud.d.ts +47 -0
- package/types-3.4/services/wsdl/WsWorkunits/v2.02/WsWorkunits.d.ts +2553 -0
- package/types-3.4/services/wsdl/ws_logaccess/v1.08/ws_logaccess.d.ts +211 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { Service } from "../../../../espConnection";
|
|
3
|
+
export var WsLogaccess;
|
|
4
|
+
(function (WsLogaccess) {
|
|
5
|
+
var LogColumnType;
|
|
6
|
+
(function (LogColumnType) {
|
|
7
|
+
LogColumnType["global"] = "global";
|
|
8
|
+
LogColumnType["workunits"] = "workunits";
|
|
9
|
+
LogColumnType["components"] = "components";
|
|
10
|
+
LogColumnType["audience"] = "audience";
|
|
11
|
+
LogColumnType["class"] = "class";
|
|
12
|
+
LogColumnType["instance"] = "instance";
|
|
13
|
+
LogColumnType["node"] = "node";
|
|
14
|
+
LogColumnType["message"] = "message";
|
|
15
|
+
LogColumnType["logid"] = "logid";
|
|
16
|
+
LogColumnType["processid"] = "processid";
|
|
17
|
+
LogColumnType["threadid"] = "threadid";
|
|
18
|
+
LogColumnType["timestamp"] = "timestamp";
|
|
19
|
+
LogColumnType["pod"] = "pod";
|
|
20
|
+
LogColumnType["traceid"] = "traceid";
|
|
21
|
+
LogColumnType["spanid"] = "spanid";
|
|
22
|
+
})(LogColumnType = WsLogaccess.LogColumnType || (WsLogaccess.LogColumnType = {}));
|
|
23
|
+
var LogColumnValueType;
|
|
24
|
+
(function (LogColumnValueType) {
|
|
25
|
+
LogColumnValueType["string"] = "string";
|
|
26
|
+
LogColumnValueType["numeric"] = "numeric";
|
|
27
|
+
LogColumnValueType["datetime"] = "datetime";
|
|
28
|
+
LogColumnValueType["enum"] = "enum";
|
|
29
|
+
LogColumnValueType["epoch"] = "epoch";
|
|
30
|
+
})(LogColumnValueType = WsLogaccess.LogColumnValueType || (WsLogaccess.LogColumnValueType = {}));
|
|
31
|
+
var LogAccessType;
|
|
32
|
+
(function (LogAccessType) {
|
|
33
|
+
LogAccessType[LogAccessType["All"] = 0] = "All";
|
|
34
|
+
LogAccessType[LogAccessType["ByJobID"] = 1] = "ByJobID";
|
|
35
|
+
LogAccessType[LogAccessType["ByComponent"] = 2] = "ByComponent";
|
|
36
|
+
LogAccessType[LogAccessType["ByLogType"] = 3] = "ByLogType";
|
|
37
|
+
LogAccessType[LogAccessType["ByTargetAudience"] = 4] = "ByTargetAudience";
|
|
38
|
+
LogAccessType[LogAccessType["BySourceInstance"] = 5] = "BySourceInstance";
|
|
39
|
+
LogAccessType[LogAccessType["BySourceNode"] = 6] = "BySourceNode";
|
|
40
|
+
LogAccessType[LogAccessType["ByFieldName"] = 7] = "ByFieldName";
|
|
41
|
+
LogAccessType[LogAccessType["ByPod"] = 8] = "ByPod";
|
|
42
|
+
LogAccessType[LogAccessType["ByTraceID"] = 9] = "ByTraceID";
|
|
43
|
+
LogAccessType[LogAccessType["BySpanID"] = 10] = "BySpanID";
|
|
44
|
+
})(LogAccessType = WsLogaccess.LogAccessType || (WsLogaccess.LogAccessType = {}));
|
|
45
|
+
var LogAccessStatusCode;
|
|
46
|
+
(function (LogAccessStatusCode) {
|
|
47
|
+
LogAccessStatusCode[LogAccessStatusCode["Success"] = 0] = "Success";
|
|
48
|
+
LogAccessStatusCode[LogAccessStatusCode["Warning"] = 1] = "Warning";
|
|
49
|
+
LogAccessStatusCode[LogAccessStatusCode["Fail"] = 2] = "Fail";
|
|
50
|
+
})(LogAccessStatusCode = WsLogaccess.LogAccessStatusCode || (WsLogaccess.LogAccessStatusCode = {}));
|
|
51
|
+
var LogAccessFilterOperator;
|
|
52
|
+
(function (LogAccessFilterOperator) {
|
|
53
|
+
LogAccessFilterOperator[LogAccessFilterOperator["NONE"] = 0] = "NONE";
|
|
54
|
+
LogAccessFilterOperator[LogAccessFilterOperator["AND"] = 1] = "AND";
|
|
55
|
+
LogAccessFilterOperator[LogAccessFilterOperator["OR"] = 2] = "OR";
|
|
56
|
+
})(LogAccessFilterOperator = WsLogaccess.LogAccessFilterOperator || (WsLogaccess.LogAccessFilterOperator = {}));
|
|
57
|
+
var LogSelectColumnMode;
|
|
58
|
+
(function (LogSelectColumnMode) {
|
|
59
|
+
LogSelectColumnMode[LogSelectColumnMode["MIN"] = 0] = "MIN";
|
|
60
|
+
LogSelectColumnMode[LogSelectColumnMode["DEFAULT"] = 1] = "DEFAULT";
|
|
61
|
+
LogSelectColumnMode[LogSelectColumnMode["ALL"] = 2] = "ALL";
|
|
62
|
+
LogSelectColumnMode[LogSelectColumnMode["CUSTOM"] = 3] = "CUSTOM";
|
|
63
|
+
})(LogSelectColumnMode = WsLogaccess.LogSelectColumnMode || (WsLogaccess.LogSelectColumnMode = {}));
|
|
64
|
+
var SortColumType;
|
|
65
|
+
(function (SortColumType) {
|
|
66
|
+
SortColumType[SortColumType["ByDate"] = 0] = "ByDate";
|
|
67
|
+
SortColumType[SortColumType["ByJobID"] = 1] = "ByJobID";
|
|
68
|
+
SortColumType[SortColumType["ByComponent"] = 2] = "ByComponent";
|
|
69
|
+
SortColumType[SortColumType["ByLogType"] = 3] = "ByLogType";
|
|
70
|
+
SortColumType[SortColumType["ByTargetAudience"] = 4] = "ByTargetAudience";
|
|
71
|
+
SortColumType[SortColumType["BySourceInstance"] = 5] = "BySourceInstance";
|
|
72
|
+
SortColumType[SortColumType["BySourceNode"] = 6] = "BySourceNode";
|
|
73
|
+
SortColumType[SortColumType["ByFieldName"] = 7] = "ByFieldName";
|
|
74
|
+
SortColumType[SortColumType["ByPod"] = 8] = "ByPod";
|
|
75
|
+
SortColumType[SortColumType["ByTraceID"] = 9] = "ByTraceID";
|
|
76
|
+
SortColumType[SortColumType["BySpanID"] = 10] = "BySpanID";
|
|
77
|
+
})(SortColumType = WsLogaccess.SortColumType || (WsLogaccess.SortColumType = {}));
|
|
78
|
+
var SortDirection;
|
|
79
|
+
(function (SortDirection) {
|
|
80
|
+
SortDirection[SortDirection["ASC"] = 0] = "ASC";
|
|
81
|
+
SortDirection[SortDirection["DSC"] = 1] = "DSC";
|
|
82
|
+
})(SortDirection = WsLogaccess.SortDirection || (WsLogaccess.SortDirection = {}));
|
|
83
|
+
})(WsLogaccess || (WsLogaccess = {}));
|
|
84
|
+
var LogaccessServiceBase = /** @class */ (function (_super) {
|
|
85
|
+
__extends(LogaccessServiceBase, _super);
|
|
86
|
+
function LogaccessServiceBase(optsConnection) {
|
|
87
|
+
return _super.call(this, optsConnection, "ws_logaccess", "1.08") || this;
|
|
88
|
+
}
|
|
89
|
+
LogaccessServiceBase.prototype.GetHealthReport = function (request) {
|
|
90
|
+
return this._connection.send("GetHealthReport", request, "json", false, undefined, "GetHealthReportResponse");
|
|
91
|
+
};
|
|
92
|
+
LogaccessServiceBase.prototype.GetLogAccessInfo = function (request) {
|
|
93
|
+
return this._connection.send("GetLogAccessInfo", request, "json", false, undefined, "GetLogAccessInfoResponse");
|
|
94
|
+
};
|
|
95
|
+
LogaccessServiceBase.prototype.GetLogs = function (request) {
|
|
96
|
+
return this._connection.send("GetLogs", request, "json", false, undefined, "GetLogsResponse");
|
|
97
|
+
};
|
|
98
|
+
LogaccessServiceBase.prototype.Ping = function (request) {
|
|
99
|
+
return this._connection.send("Ping", request, "json", false, undefined, "ws_logaccessPingResponse");
|
|
100
|
+
};
|
|
101
|
+
return LogaccessServiceBase;
|
|
102
|
+
}(Service));
|
|
103
|
+
export { LogaccessServiceBase };
|
|
104
|
+
//# sourceMappingURL=ws_logaccess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws_logaccess.js","sourceRoot":"","sources":["../../../../../src/services/wsdl/ws_logaccess/v1.08/ws_logaccess.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/comms",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.101.1",
|
|
4
4
|
"description": "hpcc-js - Communications",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"module": "dist/index.es6",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@hpcc-js/ddl-shim": "^2.22.0",
|
|
66
|
-
"@hpcc-js/util": "^2.53.
|
|
66
|
+
"@hpcc-js/util": "^2.53.1",
|
|
67
67
|
"@xmldom/xmldom": "0.9.8",
|
|
68
68
|
"abort-controller": "3.0.0",
|
|
69
69
|
"node-fetch": "2.7.0",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@hpcc-js/bundle": "^2.12.0",
|
|
76
|
+
"@kubernetes/client-node": "1.0.0",
|
|
76
77
|
"@types/d3-request": "1.0.9",
|
|
77
78
|
"@types/d3-time-format": "2.3.4",
|
|
78
79
|
"@types/node": "^18",
|
|
@@ -95,5 +96,5 @@
|
|
|
95
96
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
96
97
|
},
|
|
97
98
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
98
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "9f7febd34d32c62d1785e7863334773e1967d738"
|
|
99
100
|
}
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const PKG_NAME = "@hpcc-js/comms";
|
|
2
|
-
export const PKG_VERSION = "2.
|
|
3
|
-
export const BUILD_VERSION = "2.
|
|
2
|
+
export const PKG_VERSION = "2.101.1";
|
|
3
|
+
export const BUILD_VERSION = "2.108.2";
|
package/src/services/wsCloud.ts
CHANGED
|
@@ -1,18 +1,71 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { scopedLogger } from "@hpcc-js/util";
|
|
2
|
+
import type { WsCloud as WsCloudV1 } from "./wsdl/WsCloud/v1/WsCloud";
|
|
3
|
+
import { CloudServiceBase, WsCloud } from "./wsdl/WsCloud/v1.02/WsCloud";
|
|
4
|
+
import type { V1Pod } from "@kubernetes/client-node";
|
|
5
|
+
|
|
6
|
+
const logger = scopedLogger("@hpcc-js/comms/services/wsCloud.ts");
|
|
2
7
|
|
|
3
8
|
export {
|
|
4
|
-
WsCloud
|
|
9
|
+
type WsCloud
|
|
5
10
|
};
|
|
6
11
|
|
|
12
|
+
function isGetPODsResponse_v1_02(response: any): response is WsCloud.GetPODsResponse {
|
|
13
|
+
return response?.Pods !== undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function mapPorts(pod: V1Pod): WsCloud.Port[] {
|
|
17
|
+
return pod.spec?.containers?.reduce((prev, curr) => {
|
|
18
|
+
curr.ports?.forEach(p => {
|
|
19
|
+
prev.push({
|
|
20
|
+
ContainerPort: p.containerPort,
|
|
21
|
+
Name: p.name,
|
|
22
|
+
Protocol: p.protocol
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
return prev;
|
|
26
|
+
}, [] as WsCloud.Port[]) ?? [];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function mapPods(pods: V1Pod[]): WsCloud.Pod[] {
|
|
30
|
+
return pods
|
|
31
|
+
.filter(pod => {
|
|
32
|
+
const labels = pod?.metadata?.labels ?? {};
|
|
33
|
+
return labels.hasOwnProperty("app.kubernetes.io/part-of") && labels["app.kubernetes.io/part-of"] === "HPCC-Platform";
|
|
34
|
+
})
|
|
35
|
+
.map((pod: V1Pod): WsCloud.Pod => {
|
|
36
|
+
const started = new Date(pod.metadata?.creationTimestamp);
|
|
37
|
+
return {
|
|
38
|
+
Name: pod.metadata.name,
|
|
39
|
+
Status: pod.status?.phase,
|
|
40
|
+
CreationTimestamp: started.toISOString(),
|
|
41
|
+
ContainerName: pod.status?.containerStatuses?.reduce((prev, curr) => {
|
|
42
|
+
if (curr.name) {
|
|
43
|
+
prev.push(curr.name);
|
|
44
|
+
} return prev;
|
|
45
|
+
}, [] as string[]).join(", ") ?? "",
|
|
46
|
+
ContainerCount: pod.spec?.containers?.length ?? 0,
|
|
47
|
+
ContainerReadyCount: pod.status?.containerStatuses?.reduce((prev, curr) => prev + (curr.ready ? 1 : 0), 0),
|
|
48
|
+
ContainerRestartCount: pod.status?.containerStatuses?.reduce((prev, curr) => prev + curr.restartCount, 0),
|
|
49
|
+
Ports: {
|
|
50
|
+
Port: mapPorts(pod)
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
})
|
|
54
|
+
;
|
|
55
|
+
}
|
|
56
|
+
|
|
7
57
|
export class CloudService extends CloudServiceBase {
|
|
8
58
|
|
|
9
|
-
getPODs(): Promise<
|
|
10
|
-
return super.GetPODs({}).then((response) => {
|
|
59
|
+
getPODs(): Promise<WsCloud.Pod[]> {
|
|
60
|
+
return super.GetPODs({}).then((response: WsCloud.GetPODsResponse | WsCloudV1.GetPODsResponse) => {
|
|
61
|
+
if (isGetPODsResponse_v1_02(response)) {
|
|
62
|
+
return response.Pods?.Pod ?? [];
|
|
63
|
+
}
|
|
11
64
|
try {
|
|
12
65
|
const obj = typeof response.Result === "string" ? JSON.parse(response.Result) : response.Result;
|
|
13
|
-
return obj?.items ?? [];
|
|
14
|
-
|
|
66
|
+
return mapPods(obj?.items ?? []);
|
|
15
67
|
} catch (error) {
|
|
68
|
+
logger.error(`Error parsing V1Pods json '${error.message}'`);
|
|
16
69
|
return [];
|
|
17
70
|
}
|
|
18
71
|
});
|
package/src/services/wsDali.ts
CHANGED
|
@@ -4,5 +4,37 @@ export {
|
|
|
4
4
|
WsDali
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
+
export interface ExportRequest {
|
|
8
|
+
Path: string;
|
|
9
|
+
Safe: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ExportResponse {
|
|
13
|
+
filename: string;
|
|
14
|
+
content: Blob;
|
|
15
|
+
}
|
|
16
|
+
|
|
7
17
|
export class DaliService extends DaliServiceBase {
|
|
18
|
+
|
|
19
|
+
async Export(request: ExportRequest): Promise<ExportResponse> {
|
|
20
|
+
const exportUrl = "/WsDali/Export";
|
|
21
|
+
|
|
22
|
+
const reqParams = new URLSearchParams();
|
|
23
|
+
if (request.Path) {
|
|
24
|
+
reqParams.append("Path", request.Path);
|
|
25
|
+
}
|
|
26
|
+
if (request.Safe !== undefined) {
|
|
27
|
+
reqParams.append("Safe", String(request.Safe));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const response = await fetch(`${exportUrl}?${reqParams.toString()}`);
|
|
31
|
+
const filename = response.headers.get("Content-Disposition");
|
|
32
|
+
const content = await response.blob();
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
filename: filename ? filename.split("filename=")[1] : "WsDali_Export",
|
|
36
|
+
content
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
8
40
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { scopedLogger } from "@hpcc-js/util";
|
|
2
|
-
import { LogaccessServiceBase, WsLogaccess } from "./wsdl/ws_logaccess/v1.
|
|
2
|
+
import { LogaccessServiceBase, WsLogaccess } from "./wsdl/ws_logaccess/v1.08/ws_logaccess";
|
|
3
3
|
|
|
4
4
|
const logger = scopedLogger("@hpcc-js/comms/services/wsLogaccess.ts");
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { deepMixin, xml2json, XMLNode } from "@hpcc-js/util";
|
|
2
|
-
import { WsWorkunits, WorkunitsServiceBase } from "./wsdl/WsWorkunits/v2/WsWorkunits";
|
|
2
|
+
import { WsWorkunits, WorkunitsServiceBase } from "./wsdl/WsWorkunits/v2.02/WsWorkunits";
|
|
3
3
|
import { IConnection, IOptions } from "../connection";
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { IConnection, IOptions } from "../../../../connection";
|
|
2
|
+
import { Service } from "../../../../espConnection";
|
|
3
|
+
|
|
4
|
+
export namespace WsCloud {
|
|
5
|
+
|
|
6
|
+
export type int = number;
|
|
7
|
+
|
|
8
|
+
export interface GetPODsRequest {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Port {
|
|
13
|
+
ContainerPort: int;
|
|
14
|
+
Name: string;
|
|
15
|
+
Protocol: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface Ports {
|
|
19
|
+
Port: Port[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface Pod {
|
|
23
|
+
Name: string;
|
|
24
|
+
Status: string;
|
|
25
|
+
CreationTimestamp: string;
|
|
26
|
+
ContainerName: string;
|
|
27
|
+
ContainerCount: int;
|
|
28
|
+
ContainerReadyCount: int;
|
|
29
|
+
ContainerRestartCount: int;
|
|
30
|
+
Ports: Ports;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface Pods {
|
|
34
|
+
Pod: Pod[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface GetPODsResponse {
|
|
38
|
+
Pods: Pods;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface GetServicesRequest {
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface GetServicesResponse {
|
|
46
|
+
Result: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface WsCloudPingRequest {
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface WsCloudPingResponse {
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export class CloudServiceBase extends Service {
|
|
60
|
+
|
|
61
|
+
constructor(optsConnection: IOptions | IConnection) {
|
|
62
|
+
super(optsConnection, "WsCloud", "1.02");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
GetPODs(request: Partial<WsCloud.GetPODsRequest>): Promise<WsCloud.GetPODsResponse> {
|
|
66
|
+
return this._connection.send("GetPODs", request, "json", false, undefined, "GetPODsResponse");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
GetServices(request: Partial<WsCloud.GetServicesRequest>): Promise<WsCloud.GetServicesResponse> {
|
|
70
|
+
return this._connection.send("GetServices", request, "json", false, undefined, "GetServicesResponse");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
Ping(request: Partial<WsCloud.WsCloudPingRequest>): Promise<WsCloud.WsCloudPingResponse> {
|
|
74
|
+
return this._connection.send("Ping", request, "json", false, undefined, "WsCloudPingResponse");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|