@hpcc-js/comms 2.77.0 → 2.78.2

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.
Files changed (61) hide show
  1. package/dist/index.es6.js +238 -111
  2. package/dist/index.es6.js.map +1 -1
  3. package/dist/index.js +241 -110
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist/index.node.js +241 -110
  8. package/dist/index.node.js.map +1 -1
  9. package/dist/index.node.min.js +1 -1
  10. package/dist/index.node.min.js.map +1 -1
  11. package/lib-es6/__package__.js +2 -2
  12. package/lib-es6/ecl/logicalFile.js +5 -0
  13. package/lib-es6/ecl/logicalFile.js.map +1 -1
  14. package/lib-es6/services/wsDFU.js +6 -2
  15. package/lib-es6/services/wsDFU.js.map +1 -1
  16. package/lib-es6/services/wsLogaccess.js +106 -2
  17. package/lib-es6/services/wsLogaccess.js.map +1 -1
  18. package/lib-es6/services/wsWorkunits.js +3 -0
  19. package/lib-es6/services/wsWorkunits.js.map +1 -1
  20. package/lib-es6/services/wsdl/WsDali/v1.04/WsDali.js +19 -19
  21. package/lib-es6/services/wsdl/WsDali/v1.04/WsDali.js.map +1 -1
  22. package/lib-es6/services/wsdl/WsDfu/v1.63/WsDfu.js +80 -77
  23. package/lib-es6/services/wsdl/WsDfu/v1.63/WsDfu.js.map +1 -1
  24. package/lib-es6/services/wsdl/ws_logaccess/v1.02/ws_logaccess.js +47 -0
  25. package/lib-es6/services/wsdl/ws_logaccess/v1.02/ws_logaccess.js.map +1 -0
  26. package/package.json +3 -3
  27. package/src/__package__.ts +2 -2
  28. package/src/ecl/logicalFile.ts +4 -3
  29. package/src/services/wsCloud.ts +1 -1
  30. package/src/services/wsDFU.ts +9 -10
  31. package/src/services/wsLogaccess.ts +145 -3
  32. package/src/services/wsWorkunits.ts +62 -0
  33. package/src/services/wsdl/WsDali/v1.04/WsDali.ts +156 -156
  34. package/src/services/wsdl/WsDfu/v1.63/WsDfu.ts +1219 -1217
  35. package/src/services/wsdl/ws_logaccess/v1.02/ws_logaccess.ts +161 -0
  36. package/types/__package__.d.ts +2 -2
  37. package/types/ecl/logicalFile.d.ts +4 -3
  38. package/types/ecl/logicalFile.d.ts.map +1 -1
  39. package/types/services/wsCloud.d.ts +1 -1
  40. package/types/services/wsCloud.d.ts.map +1 -1
  41. package/types/services/wsDFU.d.ts +7 -2
  42. package/types/services/wsDFU.d.ts.map +1 -1
  43. package/types/services/wsLogaccess.d.ts +46 -2
  44. package/types/services/wsLogaccess.d.ts.map +1 -1
  45. package/types/services/wsWorkunits.d.ts +48 -0
  46. package/types/services/wsWorkunits.d.ts.map +1 -1
  47. package/types/services/wsdl/WsDali/v1.04/WsDali.d.ts +27 -27
  48. package/types/services/wsdl/WsDali/v1.04/WsDali.d.ts.map +1 -1
  49. package/types/services/wsdl/WsDfu/v1.63/WsDfu.d.ts +49 -48
  50. package/types/services/wsdl/WsDfu/v1.63/WsDfu.d.ts.map +1 -1
  51. package/types/services/wsdl/ws_logaccess/v1.02/ws_logaccess.d.ts +126 -0
  52. package/types/services/wsdl/ws_logaccess/v1.02/ws_logaccess.d.ts.map +1 -0
  53. package/types-3.4/__package__.d.ts +2 -2
  54. package/types-3.4/ecl/logicalFile.d.ts +4 -3
  55. package/types-3.4/services/wsCloud.d.ts +1 -1
  56. package/types-3.4/services/wsDFU.d.ts +7 -2
  57. package/types-3.4/services/wsLogaccess.d.ts +46 -2
  58. package/types-3.4/services/wsWorkunits.d.ts +48 -0
  59. package/types-3.4/services/wsdl/WsDali/v1.04/WsDali.d.ts +27 -27
  60. package/types-3.4/services/wsdl/WsDfu/v1.63/WsDfu.d.ts +49 -48
  61. package/types-3.4/services/wsdl/ws_logaccess/v1.02/ws_logaccess.d.ts +126 -0
@@ -0,0 +1,47 @@
1
+ import { __extends } from "tslib";
2
+ import { Service } from "../../../../espConnection";
3
+ export var WsLogaccess;
4
+ (function (WsLogaccess) {
5
+ var LogAccessType;
6
+ (function (LogAccessType) {
7
+ LogAccessType[LogAccessType["All"] = 0] = "All";
8
+ LogAccessType[LogAccessType["ByJobIdID"] = 1] = "ByJobIdID";
9
+ LogAccessType[LogAccessType["ByComponent"] = 2] = "ByComponent";
10
+ LogAccessType[LogAccessType["ByLogType"] = 3] = "ByLogType";
11
+ LogAccessType[LogAccessType["ByTargetAudience"] = 4] = "ByTargetAudience";
12
+ LogAccessType[LogAccessType["BySourceInstance"] = 5] = "BySourceInstance";
13
+ LogAccessType[LogAccessType["BySourceNode"] = 6] = "BySourceNode";
14
+ LogAccessType[LogAccessType["ByFieldName"] = 7] = "ByFieldName";
15
+ })(LogAccessType = WsLogaccess.LogAccessType || (WsLogaccess.LogAccessType = {}));
16
+ var LogAccessFilterOperator;
17
+ (function (LogAccessFilterOperator) {
18
+ LogAccessFilterOperator[LogAccessFilterOperator["NONE"] = 0] = "NONE";
19
+ LogAccessFilterOperator[LogAccessFilterOperator["AND"] = 1] = "AND";
20
+ LogAccessFilterOperator[LogAccessFilterOperator["OR"] = 2] = "OR";
21
+ })(LogAccessFilterOperator = WsLogaccess.LogAccessFilterOperator || (WsLogaccess.LogAccessFilterOperator = {}));
22
+ var LogSelectColumnMode;
23
+ (function (LogSelectColumnMode) {
24
+ LogSelectColumnMode[LogSelectColumnMode["MIN"] = 0] = "MIN";
25
+ LogSelectColumnMode[LogSelectColumnMode["DEFAULT"] = 1] = "DEFAULT";
26
+ LogSelectColumnMode[LogSelectColumnMode["ALL"] = 2] = "ALL";
27
+ LogSelectColumnMode[LogSelectColumnMode["CUSTOM"] = 3] = "CUSTOM";
28
+ })(LogSelectColumnMode = WsLogaccess.LogSelectColumnMode || (WsLogaccess.LogSelectColumnMode = {}));
29
+ })(WsLogaccess || (WsLogaccess = {}));
30
+ var LogaccessServiceBase = /** @class */ (function (_super) {
31
+ __extends(LogaccessServiceBase, _super);
32
+ function LogaccessServiceBase(optsConnection) {
33
+ return _super.call(this, optsConnection, "ws_logaccess", "1.02") || this;
34
+ }
35
+ LogaccessServiceBase.prototype.GetLogAccessInfo = function (request) {
36
+ return this._connection.send("GetLogAccessInfo", request);
37
+ };
38
+ LogaccessServiceBase.prototype.GetLogs = function (request) {
39
+ return this._connection.send("GetLogs", request);
40
+ };
41
+ LogaccessServiceBase.prototype.Ping = function (request) {
42
+ return this._connection.send("Ping", request);
43
+ };
44
+ return LogaccessServiceBase;
45
+ }(Service));
46
+ export { LogaccessServiceBase };
47
+ //# sourceMappingURL=ws_logaccess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ws_logaccess.js","sourceRoot":"","sources":["../../../../../src/services/wsdl/ws_logaccess/v1.02/ws_logaccess.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEpD,MAAM,KAAW,WAAW,CAyI3B;AAzID,WAAiB,WAAW;IAMxB,IAAY,aASX;IATD,WAAY,aAAa;QACrB,+CAAO,CAAA;QACP,2DAAa,CAAA;QACb,+DAAe,CAAA;QACf,2DAAa,CAAA;QACb,yEAAoB,CAAA;QACpB,yEAAoB,CAAA;QACpB,iEAAgB,CAAA;QAChB,+DAAe,CAAA;IACnB,CAAC,EATW,aAAa,GAAb,yBAAa,KAAb,yBAAa,QASxB;IAED,IAAY,uBAIX;IAJD,WAAY,uBAAuB;QAC/B,qEAAQ,CAAA;QACR,mEAAO,CAAA;QACP,iEAAM,CAAA;IACV,CAAC,EAJW,uBAAuB,GAAvB,mCAAuB,KAAvB,mCAAuB,QAIlC;IAED,IAAY,mBAKX;IALD,WAAY,mBAAmB;QAC3B,2DAAO,CAAA;QACP,mEAAW,CAAA;QACX,2DAAO,CAAA;QACP,iEAAU,CAAA;IACd,CAAC,EALW,mBAAmB,GAAnB,+BAAmB,KAAnB,+BAAmB,QAK9B;AA6GL,CAAC,EAzIgB,WAAW,KAAX,WAAW,QAyI3B;AAED;IAA0C,wCAAO;IAE7C,8BAAY,cAAsC;eAC9C,kBAAM,cAAc,EAAE,cAAc,EAAE,MAAM,CAAC;IACjD,CAAC;IAED,+CAAgB,GAAhB,UAAiB,OAA4C;QACzD,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED,sCAAO,GAAP,UAAQ,OAAmC;QACvC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,mCAAI,GAAJ,UAAK,OAA4C;QAC7C,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAEL,2BAAC;AAAD,CAAC,AAlBD,CAA0C,OAAO,GAkBhD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/comms",
3
- "version": "2.77.0",
3
+ "version": "2.78.2",
4
4
  "description": "hpcc-js - Communications",
5
5
  "main": "dist/index.node.js",
6
6
  "module": "dist/index.es6",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@hpcc-js/ddl-shim": "^2.19.1",
64
- "@hpcc-js/util": "^2.47.1",
64
+ "@hpcc-js/util": "^2.48.0",
65
65
  "@xmldom/xmldom": "0.8.2",
66
66
  "abort-controller": "3.0.0",
67
67
  "node-fetch": "2.6.7",
@@ -92,5 +92,5 @@
92
92
  "url": "https://github.com/hpcc-systems/Visualization/issues"
93
93
  },
94
94
  "homepage": "https://github.com/hpcc-systems/Visualization",
95
- "gitHead": "f0688c1ec5caf09f8b18dd57539cf91b86265770"
95
+ "gitHead": "8d068b051ff1c18a57fd38fec3fa3517c77780ee"
96
96
  }
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/comms";
2
- export const PKG_VERSION = "2.77.0";
3
- export const BUILD_VERSION = "2.103.3";
2
+ export const PKG_VERSION = "2.78.2";
3
+ export const BUILD_VERSION = "2.103.6";
@@ -1,6 +1,6 @@
1
1
  import { Cache, StateObject } from "@hpcc-js/util";
2
2
  import { IConnection, IOptions } from "../connection";
3
- import { DFUService, WsDfu, DFUDefFileFormat, base64Binary } from "../services/wsDFU";
3
+ import { DFUService, WsDfu } from "../services/wsDFU";
4
4
 
5
5
  export class LogicalFileCache extends Cache<{ BaseUrl: string, Cluster: string, Name: string }, LogicalFile> {
6
6
  constructor() {
@@ -72,7 +72,7 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme
72
72
  get IsCompressed(): boolean { return this.get("IsCompressed"); }
73
73
  get BrowseData(): boolean { return this.get("BrowseData"); }
74
74
  get jsonInfo(): string { return this.get("jsonInfo"); }
75
- get binInfo(): base64Binary { return this.get("binInfo"); }
75
+ get binInfo(): WsDfu.base64Binary { return this.get("binInfo"); }
76
76
  get PackageID(): string { return this.get("PackageID"); }
77
77
  get Partition(): WsDfu.Partition { return this.get("Partition"); }
78
78
  get Blooms(): WsDfu.Blooms { return this.get("Blooms"); }
@@ -81,6 +81,7 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme
81
81
  get IsRestricted(): boolean { return this.get("IsRestricted"); }
82
82
  get AtRestCost(): number { return this.get("AtRestCost"); }
83
83
  get AccessCost(): number { return this.get("AccessCost"); }
84
+ get ExpirationDate(): string { return this.get("ExpirationDate"); }
84
85
 
85
86
  get properties(): FileDetailEx { return this.get(); }
86
87
 
@@ -147,7 +148,7 @@ export class LogicalFile extends StateObject<FileDetailEx, FileDetailEx> impleme
147
148
  });
148
149
  }
149
150
 
150
- fetchDefFile(format: DFUDefFileFormat): Promise<string> {
151
+ fetchDefFile(format: WsDfu.DFUDefFileFormat): Promise<string> {
151
152
  return this.connection.DFUFile({ Name: this.Name, Format: format });
152
153
  }
153
154
 
@@ -6,7 +6,7 @@ export {
6
6
 
7
7
  export class CloudService extends CloudServiceBase {
8
8
 
9
- getPODs(): Promise<any[]> {
9
+ getPODs(): Promise<object[]> {
10
10
  return super.GetPODs({}).then((response) => {
11
11
  try {
12
12
  const obj = typeof response.Result === "string" ? JSON.parse(response.Result) : response.Result;
@@ -1,14 +1,13 @@
1
- import {
2
- DfuServiceBase, WsDfu, DFUArrayActions, DFUChangeProtection, DFUChangeRestriction,
3
- DFUDefFileFormat, FileAccessRole, SecAccessType, DFUFileType,
4
- base64Binary
5
- } from "./wsdl/WsDfu/v1.63/WsDfu";
1
+ import { DfuServiceBase, WsDfu } from "./wsdl/WsDfu/v1.63/WsDfu";
6
2
 
7
- export {
8
- WsDfu, DFUArrayActions, DFUChangeProtection, DFUChangeRestriction,
9
- DFUDefFileFormat, FileAccessRole, SecAccessType, DFUFileType,
10
- base64Binary
11
- };
3
+ export { WsDfu };
4
+
5
+ export const DFUArrayActions = WsDfu.DFUArrayActions;
6
+ export const DFUDefFileFormat = WsDfu.DFUDefFileFormat;
7
+ export const DFUChangeProtection = WsDfu.DFUChangeProtection;
8
+ export const DFUChangeRestriction = WsDfu.DFUChangeRestriction;
9
+
10
+ export type base64Binary = WsDfu.base64Binary;
12
11
 
13
12
  export class DFUService extends DfuServiceBase {
14
13
 
@@ -1,8 +1,150 @@
1
- import { LogaccessServiceBase, WsLogaccess, LogAccessType } from "./wsdl/ws_logaccess/v1/ws_logaccess";
1
+ import { scopedLogger } from "@hpcc-js/util";
2
+ import { LogaccessServiceBase, WsLogaccess } from "./wsdl/ws_logaccess/v1.02/ws_logaccess";
3
+
4
+ const logger = scopedLogger("@hpcc-js/comms/services/wsLogaccess.ts");
2
5
 
3
6
  export {
4
- WsLogaccess, LogAccessType
7
+ WsLogaccess
8
+ };
9
+
10
+ export enum KnownColumns {
11
+ audience = "hpcc.log.audience",
12
+ class = "hpcc.log.class",
13
+ jobId = "hpcc.log.jobid",
14
+ message = "hpcc.log.message",
15
+ procId = "hpcc.log.procid",
16
+ sequence = "hpcc.log.sequence",
17
+ threadId = "hpcc.log.threadid",
18
+ timestamp = "hpcc.log.timestamp",
19
+ containerName = "kubernetes.container.name"
20
+ }
21
+
22
+ const RKnownColumns: { [key: string]: string } = {};
23
+ for (const key in KnownColumns) {
24
+ if (KnownColumns.hasOwnProperty(key)) {
25
+ RKnownColumns[KnownColumns[key]] = key;
26
+ }
27
+ }
28
+
29
+ export interface GetLogsExRequest {
30
+ audience?: string;
31
+ class?: string;
32
+ jobId?: string;
33
+ message?: string;
34
+ procId?: string;
35
+ sequence?: string;
36
+ threadId?: string;
37
+ timestamp?: string;
38
+ containerName?: string;
39
+ StartDate?: Date;
40
+ EndDate?: Date;
41
+ LogLineStartFrom: number,
42
+ LogLineLimit: number
43
+ }
44
+
45
+ export interface LogLine {
46
+ audience?: string;
47
+ class?: string;
48
+ jobId?: string;
49
+ message?: string;
50
+ procId?: number;
51
+ sequence?: string;
52
+ threadId?: number;
53
+ timestamp?: string;
54
+ containerName?: string;
55
+ }
56
+
57
+ const defaultToLogLine = (line?: any): LogLine => {
58
+ const retVal: LogLine = {};
59
+ for (const key in RKnownColumns) {
60
+ retVal[RKnownColumns[key]] = line?.fields[0][key];
61
+ }
62
+ return retVal;
5
63
  };
6
64
 
65
+ export interface GetLogsExResponse {
66
+ lines: LogLine[],
67
+ total: number,
68
+ }
69
+
7
70
  export class LogaccessService extends LogaccessServiceBase {
8
- }
71
+
72
+ GetLogAccessInfo(request: WsLogaccess.GetLogAccessInfoRequest): Promise<WsLogaccess.GetLogAccessInfoResponse> {
73
+ return super.GetLogAccessInfo(request);
74
+ }
75
+
76
+ GetLogs(request: WsLogaccess.GetLogsRequest): Promise<WsLogaccess.GetLogsResponse> {
77
+ return super.GetLogs(request);
78
+ }
79
+
80
+ GetLogsEx(request: GetLogsExRequest): Promise<GetLogsExResponse> {
81
+ const getLogsRequest: WsLogaccess.GetLogsRequest = {
82
+ Filter: {
83
+ leftBinaryFilter: {
84
+ BinaryLogFilter: [{
85
+ leftFilter: {
86
+ LogCategory: WsLogaccess.LogAccessType.All,
87
+ } as WsLogaccess.leftFilter,
88
+ } as WsLogaccess.BinaryLogFilter]
89
+ }
90
+ },
91
+ Range: {
92
+ StartDate: new Date(0).toISOString(),
93
+ },
94
+ LogLineStartFrom: request.LogLineStartFrom ?? 0,
95
+ LogLineLimit: request.LogLineLimit ?? 100,
96
+ SelectColumnMode: WsLogaccess.LogSelectColumnMode.DEFAULT,
97
+ Format: "JSON"
98
+ };
99
+
100
+ const filters: WsLogaccess.leftFilter[] = [];
101
+ for (const key in request) {
102
+ if (key in KnownColumns) {
103
+ filters.push({
104
+ LogCategory: WsLogaccess.LogAccessType.ByFieldName,
105
+ SearchField: KnownColumns[key],
106
+ SearchByValue: request[key]
107
+ });
108
+ }
109
+ }
110
+
111
+ let binaryLogFilter = getLogsRequest.Filter.leftBinaryFilter.BinaryLogFilter[0];
112
+ filters.forEach((filter, i) => {
113
+ if (i === 0) {
114
+ binaryLogFilter.leftFilter = filter;
115
+ } else if (i === filters.length - 1) {
116
+ binaryLogFilter.Operator = WsLogaccess.LogAccessFilterOperator.AND;
117
+ binaryLogFilter.rightFilter = filter;
118
+ } else {
119
+ binaryLogFilter.Operator = WsLogaccess.LogAccessFilterOperator.AND;
120
+ binaryLogFilter.rightBinaryFilter = {
121
+ BinaryLogFilter: [{
122
+ leftFilter: filter
123
+ } as WsLogaccess.BinaryLogFilter]
124
+ };
125
+ binaryLogFilter = binaryLogFilter.rightBinaryFilter.BinaryLogFilter[0];
126
+ }
127
+ });
128
+
129
+ if (request.StartDate && request.EndDate) {
130
+ getLogsRequest.Range.StartDate = request.StartDate.toISOString();
131
+ getLogsRequest.Range.EndDate = request.EndDate.toISOString();
132
+ }
133
+
134
+ return this.GetLogs(getLogsRequest).then(response => {
135
+ try {
136
+ const logLines = JSON.parse(response.LogLines);
137
+ return {
138
+ lines: logLines.lines?.map(defaultToLogLine) ?? [],
139
+ total: response.TotalLogLinesAvailable ?? 10000
140
+ };
141
+ } catch (e) {
142
+ logger.error(e);
143
+ }
144
+ return {
145
+ lines: [],
146
+ total: 0
147
+ };
148
+ });
149
+ }
150
+ }
@@ -1854,6 +1854,64 @@ export namespace WUQuerySetAliasAction {
1854
1854
  }
1855
1855
  }
1856
1856
 
1857
+ export namespace WUQueryFiles {
1858
+ export interface Request {
1859
+ Target: string;
1860
+ QueryId: string;
1861
+ }
1862
+
1863
+ export interface Exception {
1864
+ Code: string;
1865
+ Audience: string;
1866
+ Source: string;
1867
+ Message: string;
1868
+ }
1869
+
1870
+ export interface Exceptions {
1871
+ Source: string;
1872
+ Exception: Exception[];
1873
+ }
1874
+
1875
+ export interface File {
1876
+ Error: string;
1877
+ LogicalName: string;
1878
+ }
1879
+
1880
+ export interface Files {
1881
+ File: File[];
1882
+ }
1883
+
1884
+ export interface SubFiles {
1885
+ File: string[];
1886
+ }
1887
+
1888
+ export interface SuperFile {
1889
+ Name: string;
1890
+ SubFiles: SubFiles;
1891
+ SuperFiles: SuperFiles;
1892
+ }
1893
+
1894
+ export interface SuperFiles {
1895
+ SuperFile: SuperFile[];
1896
+ }
1897
+
1898
+ export interface QueryUsingFile {
1899
+ Id: string;
1900
+ Package: string;
1901
+ }
1902
+
1903
+ export interface Queries {
1904
+ QueryUsingFile: QueryUsingFile[];
1905
+ }
1906
+
1907
+ export interface Response {
1908
+ Exceptions: Exceptions;
1909
+ Files: Files;
1910
+ SuperFiles: SuperFiles;
1911
+ Queries: Queries;
1912
+ }
1913
+ }
1914
+
1857
1915
  export namespace WUPublishWorkunit {
1858
1916
  export interface Request {
1859
1917
  Wuid: string;
@@ -2663,6 +2721,10 @@ export class WorkunitsService extends Service {
2663
2721
  return this._connection.send("WUPublishWorkunit", request);
2664
2722
  }
2665
2723
 
2724
+ WUQueryFiles(request: WUQueryFiles.Request): Promise<WUQueryFiles.Response> {
2725
+ return this._connection.send("WUQueryFiles", request);
2726
+ }
2727
+
2666
2728
  WUGetGraph(request: WUGetGraph.Request): Promise<WUGetGraph.Response> {
2667
2729
  return this._connection.send("WUGetGraph", request);
2668
2730
  }