@hpcc-js/comms 2.91.2 → 2.92.0

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 (87) hide show
  1. package/dist/index.es6.js +101 -110
  2. package/dist/index.es6.js.map +1 -1
  3. package/dist/index.js +116 -125
  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 +116 -125
  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/__tests__/workunit.js +1 -1
  13. package/lib-es6/__tests__/workunit.js.map +1 -1
  14. package/lib-es6/ecl/dfuWorkunit.js +11 -5
  15. package/lib-es6/ecl/dfuWorkunit.js.map +1 -1
  16. package/lib-es6/ecl/graph.js.map +1 -1
  17. package/lib-es6/ecl/query.js +14 -9
  18. package/lib-es6/ecl/query.js.map +1 -1
  19. package/lib-es6/ecl/result.js +2 -1
  20. package/lib-es6/ecl/result.js.map +1 -1
  21. package/lib-es6/ecl/scope.js +5 -0
  22. package/lib-es6/ecl/scope.js.map +1 -1
  23. package/lib-es6/ecl/sourceFile.js.map +1 -1
  24. package/lib-es6/ecl/timer.js +10 -0
  25. package/lib-es6/ecl/timer.js.map +1 -1
  26. package/lib-es6/ecl/workunit.js +44 -40
  27. package/lib-es6/ecl/workunit.js.map +1 -1
  28. package/lib-es6/services/wsLogaccess.js +1 -1
  29. package/lib-es6/services/wsWorkunits.js +14 -60
  30. package/lib-es6/services/wsWorkunits.js.map +1 -1
  31. package/lib-es6/services/wsdl/WsWorkunits/v1.97/WsWorkunits.js +376 -0
  32. package/lib-es6/services/wsdl/WsWorkunits/v1.97/WsWorkunits.js.map +1 -0
  33. package/lib-es6/services/wsdl/WsWorkunits/v1.99/WsWorkunits.js +376 -0
  34. package/lib-es6/services/wsdl/WsWorkunits/v1.99/WsWorkunits.js.map +1 -0
  35. package/lib-es6/services/wsdl/WsWorkunits/v2/WsWorkunits.js +376 -0
  36. package/lib-es6/services/wsdl/WsWorkunits/v2/WsWorkunits.js.map +1 -0
  37. package/package.json +8 -7
  38. package/src/__package__.ts +2 -2
  39. package/src/__tests__/workunit.ts +1 -1
  40. package/src/ecl/dfuWorkunit.ts +7 -2
  41. package/src/ecl/graph.ts +4 -4
  42. package/src/ecl/query.ts +17 -16
  43. package/src/ecl/result.ts +36 -17
  44. package/src/ecl/scope.ts +10 -9
  45. package/src/ecl/sourceFile.ts +5 -5
  46. package/src/ecl/timer.ts +6 -4
  47. package/src/ecl/workunit.ts +87 -87
  48. package/src/services/wsWorkunits.ts +41 -2661
  49. package/src/services/wsdl/WsWorkunits/v1.97/WsWorkunits.ts +3134 -0
  50. package/src/services/wsdl/WsWorkunits/v1.99/WsWorkunits.ts +3162 -0
  51. package/src/services/wsdl/WsWorkunits/v2/WsWorkunits.ts +3165 -0
  52. package/types/__package__.d.ts +2 -2
  53. package/types/ecl/dfuWorkunit.d.ts.map +1 -1
  54. package/types/ecl/graph.d.ts +4 -4
  55. package/types/ecl/graph.d.ts.map +1 -1
  56. package/types/ecl/query.d.ts +16 -15
  57. package/types/ecl/query.d.ts.map +1 -1
  58. package/types/ecl/result.d.ts +26 -7
  59. package/types/ecl/result.d.ts.map +1 -1
  60. package/types/ecl/scope.d.ts +10 -9
  61. package/types/ecl/scope.d.ts.map +1 -1
  62. package/types/ecl/sourceFile.d.ts +5 -5
  63. package/types/ecl/sourceFile.d.ts.map +1 -1
  64. package/types/ecl/timer.d.ts +6 -4
  65. package/types/ecl/timer.d.ts.map +1 -1
  66. package/types/ecl/workunit.d.ts +66 -65
  67. package/types/ecl/workunit.d.ts.map +1 -1
  68. package/types/services/wsWorkunits.d.ts +17 -2256
  69. package/types/services/wsWorkunits.d.ts.map +1 -1
  70. package/types/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts +2529 -0
  71. package/types/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts.map +1 -0
  72. package/types/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts +2555 -0
  73. package/types/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts.map +1 -0
  74. package/types/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts +2558 -0
  75. package/types/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts.map +1 -0
  76. package/types-3.4/__package__.d.ts +2 -2
  77. package/types-3.4/ecl/graph.d.ts +4 -4
  78. package/types-3.4/ecl/query.d.ts +16 -15
  79. package/types-3.4/ecl/result.d.ts +26 -7
  80. package/types-3.4/ecl/scope.d.ts +10 -9
  81. package/types-3.4/ecl/sourceFile.d.ts +5 -5
  82. package/types-3.4/ecl/timer.d.ts +6 -4
  83. package/types-3.4/ecl/workunit.d.ts +66 -65
  84. package/types-3.4/services/wsWorkunits.d.ts +17 -2256
  85. package/types-3.4/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts +2529 -0
  86. package/types-3.4/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts +2555 -0
  87. package/types-3.4/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts +2558 -0
package/src/ecl/result.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Cache, exists, StateObject } from "@hpcc-js/util";
2
2
  import { IConnection, IOptions } from "../connection";
3
3
  import { WsDfu } from "../services/wsDFU";
4
- import { isECLResult, WorkunitsService, WUInfo, WUResult } from "../services/wsWorkunits";
4
+ import { isECLResult, WorkunitsService, WsWorkunits } from "../services/wsWorkunits";
5
5
  import { parseXSD, XSDSchema, XSDXMLNode } from "./xsdParser";
6
6
 
7
7
  export class GlobalResultCache extends Cache<{ BaseUrl: string, Wuid: string, ResultName: string }, Result> {
@@ -15,7 +15,7 @@ const _results = new GlobalResultCache();
15
15
 
16
16
  export type ResultFilter = { [key: string]: string | number };
17
17
 
18
- export interface ECLResultEx extends WUInfo.ECLResult {
18
+ export interface ECLResultEx extends WsWorkunits.ECLResult {
19
19
  Wuid: string;
20
20
  ResultName?: string;
21
21
  ResultSequence?: number;
@@ -24,6 +24,25 @@ export interface ECLResultEx extends WUInfo.ECLResult {
24
24
  ResultViews: string[];
25
25
  }
26
26
 
27
+ export interface WUResultResponseEx {
28
+
29
+ Exceptions: WsWorkunits.Exceptions;
30
+ Wuid: string;
31
+ Sequence: WsWorkunits.int;
32
+ LogicalName: string;
33
+ Cluster: string;
34
+ Name: string;
35
+ Start: WsWorkunits.long;
36
+ Requested: WsWorkunits.int;
37
+ Count: WsWorkunits.int;
38
+ Total: WsWorkunits.long;
39
+ Result: { [key: string]: any[] } & {
40
+ XmlSchema?: {
41
+ xml: string;
42
+ };
43
+ };
44
+ }
45
+
27
46
  export type UResulState = ECLResultEx & WsDfu.DFULogicalFile;
28
47
  export type IResulState = ECLResultEx | WsDfu.DFULogicalFile;
29
48
  export class Result extends StateObject<UResulState, IResulState> implements ECLResultEx {
@@ -31,7 +50,7 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
31
50
  get BaseUrl() { return this.connection.baseUrl; }
32
51
  protected xsdSchema: XSDSchema;
33
52
 
34
- get properties(): WUInfo.ECLResult { return this.get(); }
53
+ get properties(): WsWorkunits.ECLResult { return this.get(); }
35
54
  get Wuid(): string { return this.get("Wuid"); }
36
55
  get ResultName(): string | undefined { return this.get("ResultName"); }
37
56
  get ResultSequence(): number | undefined { return this.get("ResultSequence"); }
@@ -44,19 +63,19 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
44
63
  get IsSupplied(): boolean { return this.get("IsSupplied"); }
45
64
  get ShowFileContent() { return this.get("ShowFileContent"); }
46
65
  get Total(): number { return this.get("Total"); }
47
- get ECLSchemas(): WUInfo.ECLSchemas { return this.get("ECLSchemas"); }
66
+ get ECLSchemas(): WsWorkunits.ECLSchemas { return this.get("ECLSchemas"); }
48
67
  get NodeGroup(): string { return this.get("NodeGroup"); }
49
68
  get ResultViews(): string[] { return this.get("ResultViews"); }
50
69
  get XmlSchema(): string { return this.get("XmlSchema"); }
51
70
 
52
71
  static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, name: string);
53
72
  static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, sequence: number);
54
- static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclResult: WUInfo.ECLResult, resultViews: string[]);
55
- static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, name_sequence_eclResult?: string | number | WUInfo.ECLResult, resultViews?: string[]): Result {
73
+ static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclResult: WsWorkunits.ECLResult, resultViews: string[]);
74
+ static attach(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, name_sequence_eclResult?: string | number | WsWorkunits.ECLResult, resultViews?: string[]): Result {
56
75
  let retVal: Result;
57
76
  if (Array.isArray(resultViews)) {
58
- retVal = _results.get({ BaseUrl: optsConnection.baseUrl, Wuid: wuid, ResultName: (name_sequence_eclResult as WUInfo.ECLResult).Name }, () => {
59
- return new Result(optsConnection, wuid, name_sequence_eclResult as WUInfo.ECLResult, resultViews);
77
+ retVal = _results.get({ BaseUrl: optsConnection.baseUrl, Wuid: wuid, ResultName: (name_sequence_eclResult as WsWorkunits.ECLResult).Name }, () => {
78
+ return new Result(optsConnection, wuid, name_sequence_eclResult as WsWorkunits.ECLResult, resultViews);
60
79
  });
61
80
  retVal.set(name_sequence_eclResult as any);
62
81
  } else if (typeof resultViews === "undefined") {
@@ -81,9 +100,9 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
81
100
 
82
101
  private constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, name: string);
83
102
  private constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, sequence: number);
84
- private constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclResult: WUInfo.ECLResult, resultViews: string[]);
103
+ private constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclResult: WsWorkunits.ECLResult, resultViews: string[]);
85
104
  private constructor(optsConnection: IOptions | IConnection | WorkunitsService, nodeGroup: string, logicalFile: string, isLogicalFiles: boolean);
86
- private constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid_NodeGroup: string, name_sequence_eclResult_logicalFile?: string | number | WUInfo.ECLResult, resultViews_isLogicalFile?: any[] | boolean) {
105
+ private constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid_NodeGroup: string, name_sequence_eclResult_logicalFile?: string | number | WsWorkunits.ECLResult, resultViews_isLogicalFile?: any[] | boolean) {
87
106
  super();
88
107
  if (optsConnection instanceof WorkunitsService) {
89
108
  this.connection = optsConnection;
@@ -130,7 +149,7 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
130
149
  fetchXMLSchema(refresh = false): Promise<XSDSchema | null> {
131
150
  if (!this._fetchXMLSchemaPromise || refresh) {
132
151
  this._fetchXMLSchemaPromise = this.WUResult().then(response => {
133
- if (exists("Result.XmlSchema.xml", response)) {
152
+ if (response.Result?.XmlSchema?.xml) {
134
153
  this.xsdSchema = parseXSD(response.Result.XmlSchema.xml);
135
154
  return this.xsdSchema;
136
155
  }
@@ -147,7 +166,7 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
147
166
 
148
167
  fetchRows(from: number = 0, count: number = -1, includeSchema: boolean = false, filter: ResultFilter = {}, abortSignal?: AbortSignal): Promise<any[]> {
149
168
  return this.WUResult(from, count, !includeSchema, filter, abortSignal).then((response) => {
150
- const result = response.Result;
169
+ const result: any = response.Result;
151
170
  delete response.Result; // Do not want it in "set"
152
171
  this.set({
153
172
  ...response
@@ -174,7 +193,7 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
174
193
  return this.xsdSchema.root.children();
175
194
  }
176
195
 
177
- protected WUResult(start: number = 0, count: number = 1, suppressXmlSchema: boolean = false, filter: { [key: string]: string | number } = {}, abortSignal?: AbortSignal): Promise<WUResult.Response> {
196
+ protected WUResult(start: number = 0, count: number = 1, suppressXmlSchema: boolean = false, filter: { [key: string]: string | number } = {}, abortSignal?: AbortSignal): Promise<WUResultResponseEx> {
178
197
  const FilterBy = {
179
198
  NamedValue: {
180
199
  itemcount: 0
@@ -186,7 +205,7 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
186
205
  Value: filter[key]
187
206
  };
188
207
  }
189
- const request: WUResult.Request = { FilterBy } as WUResult.Request;
208
+ const request: Partial<WsWorkunits.WUResult> = { FilterBy } as any;
190
209
  if (this.Wuid && this.ResultName !== undefined) {
191
210
  request.Wuid = this.Wuid;
192
211
  request.ResultName = this.ResultName;
@@ -202,13 +221,13 @@ export class Result extends StateObject<UResulState, IResulState> implements ECL
202
221
  request.Start = start;
203
222
  request.Count = count;
204
223
  request.SuppressXmlSchema = suppressXmlSchema;
205
- return this.connection.WUResult(request, abortSignal).then((response) => {
206
- return response;
224
+ return this.connection.WUResult(request, abortSignal).then((response: unknown) => {
225
+ return response as WUResultResponseEx;
207
226
  });
208
227
  }
209
228
  }
210
229
 
211
- export class ResultCache extends Cache<WUInfo.ECLResult, Result> {
230
+ export class ResultCache extends Cache<WsWorkunits.ECLResult, Result> {
212
231
  constructor() {
213
232
  super((obj) => {
214
233
  return Cache.hash([obj.Sequence, obj.Name, obj.Value, obj.FileName]);
package/src/ecl/scope.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { StateObject, StringAnyMap } from "@hpcc-js/util";
2
2
  // import { utcFormat, utcParse } from "d3-time-format";
3
- import { WUDetails } from "../services/wsWorkunits";
3
+ import { WsWorkunits } from "../services/wsWorkunits";
4
4
  import { Workunit } from "./workunit";
5
5
 
6
6
  // const formatter = utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");
7
7
  // const parser = utcParse("%Y-%m-%dT%H:%M:%S.%LZ");
8
8
 
9
- export interface AttributeEx extends WUDetails.Property {
9
+ export interface AttributeEx extends WsWorkunits.Property {
10
10
  FormattedEnd?: string;
11
11
  }
12
12
 
@@ -22,14 +22,14 @@ export class Attribute extends StateObject<AttributeEx, AttributeEx> implements
22
22
  get Creator(): string { return this.get("Creator"); }
23
23
  get CreatorType(): string { return this.get("CreatorType"); }
24
24
 
25
- constructor(scope: BaseScope, attribute: WUDetails.Property) {
25
+ constructor(scope: BaseScope, attribute: WsWorkunits.Property) {
26
26
  super();
27
27
  this.scope = scope;
28
28
  this.set(attribute);
29
29
  }
30
30
  }
31
31
 
32
- export interface ScopeEx extends WUDetails.Scope {
32
+ export interface ScopeEx extends WsWorkunits.Scope {
33
33
  }
34
34
 
35
35
  export interface IScopeVisitor {
@@ -45,8 +45,9 @@ export class BaseScope extends StateObject<ScopeEx, ScopeEx> implements ScopeEx
45
45
  get ScopeName(): string { return this.get("ScopeName"); }
46
46
  get Id(): string { return this.get("Id"); }
47
47
  get ScopeType(): string { return this.get("ScopeType"); }
48
- get Properties(): WUDetails.Properties { return this.get("Properties", { Property: [] }); }
49
- get Notes(): WUDetails.Notes { return this.get("Notes", { Note: [] }); }
48
+ get Properties(): WsWorkunits.Properties { return this.get("Properties", { Property: [] }); }
49
+ get Notes(): WsWorkunits.Notes { return this.get("Notes", { Note: [] }); }
50
+ get SinkActivity(): string { return this.get("SinkActivity"); }
50
51
  get CAttributes(): Attribute[] {
51
52
  // Match "started" and time elapsed
52
53
  const retVal: Attribute[] = [];
@@ -77,12 +78,12 @@ export class BaseScope extends StateObject<ScopeEx, ScopeEx> implements ScopeEx
77
78
  return retVal;
78
79
  }
79
80
 
80
- constructor(scope: WUDetails.Scope) {
81
+ constructor(scope: WsWorkunits.Scope) {
81
82
  super();
82
83
  this.update(scope);
83
84
  }
84
85
 
85
- update(scope: WUDetails.Scope) {
86
+ update(scope: WsWorkunits.Scope) {
86
87
  this.set(scope);
87
88
  this.CAttributes.forEach((attr) => {
88
89
  this._attributeMap[attr.Name] = attr;
@@ -184,7 +185,7 @@ export class BaseScope extends StateObject<ScopeEx, ScopeEx> implements ScopeEx
184
185
  export class Scope extends BaseScope {
185
186
  readonly wu: Workunit;
186
187
 
187
- constructor(wu: Workunit, scope: WUDetails.Scope) {
188
+ constructor(wu: Workunit, scope: WsWorkunits.Scope) {
188
189
  super(scope);
189
190
  this.wu = wu;
190
191
  }
@@ -1,24 +1,24 @@
1
1
  import { StateObject } from "@hpcc-js/util";
2
2
  import { IConnection, IOptions } from "../connection";
3
- import { WorkunitsService, WUInfo } from "../services/wsWorkunits";
3
+ import { WorkunitsService, WsWorkunits } from "../services/wsWorkunits";
4
4
 
5
- export interface ECLSourceFileEx extends WUInfo.ECLSourceFile {
5
+ export interface ECLSourceFileEx extends WsWorkunits.ECLSourceFile {
6
6
  Wuid: string;
7
7
  }
8
8
 
9
9
  export class SourceFile extends StateObject<ECLSourceFileEx, ECLSourceFileEx> implements ECLSourceFileEx {
10
10
  protected connection: WorkunitsService;
11
11
 
12
- get properties(): WUInfo.ECLSourceFile { return this.get(); }
12
+ get properties(): WsWorkunits.ECLSourceFile { return this.get(); }
13
13
  get Wuid(): string { return this.get("Wuid"); }
14
14
  get FileCluster(): string { return this.get("FileCluster"); }
15
15
  get Name(): string { return this.get("Name"); }
16
16
  get IsSuperFile(): boolean { return this.get("IsSuperFile"); }
17
17
  get Subs(): number { return this.get("Subs"); }
18
18
  get Count(): number { return this.get("Count"); }
19
- get ECLSourceFiles(): WUInfo.ECLSourceFiles { return this.get("ECLSourceFiles"); }
19
+ get ECLSourceFiles(): WsWorkunits.ECLSourceFiles { return this.get("ECLSourceFiles"); }
20
20
 
21
- constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclSourceFile: WUInfo.ECLSourceFile) {
21
+ constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclSourceFile: WsWorkunits.ECLSourceFile) {
22
22
  super();
23
23
  if (optsConnection instanceof WorkunitsService) {
24
24
  this.connection = optsConnection;
package/src/ecl/timer.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { espTime2Seconds, StateObject } from "@hpcc-js/util";
2
2
  import { IConnection, IOptions } from "../connection";
3
- import { WorkunitsService, WUInfo } from "../services/wsWorkunits";
3
+ import { WorkunitsService, WsWorkunits } from "../services/wsWorkunits";
4
4
 
5
- export interface ECLTimerEx extends WUInfo.ECLTimer {
5
+ export interface ECLTimerEx extends WsWorkunits.ECLTimer {
6
6
  Wuid: string;
7
7
  Seconds: number;
8
8
  HasSubGraphId: boolean;
@@ -11,7 +11,7 @@ export interface ECLTimerEx extends WUInfo.ECLTimer {
11
11
  export class Timer extends StateObject<ECLTimerEx, ECLTimerEx> implements ECLTimerEx {
12
12
  protected connection: WorkunitsService;
13
13
 
14
- get properties(): WUInfo.ECLTimer { return this.get(); }
14
+ get properties(): WsWorkunits.ECLTimer { return this.get(); }
15
15
  get Wuid(): string { return this.get("Wuid"); }
16
16
  get Name(): string { return this.get("Name"); }
17
17
  get Value(): string { return this.get("Value"); }
@@ -20,8 +20,10 @@ export class Timer extends StateObject<ECLTimerEx, ECLTimerEx> implements ECLTim
20
20
  get SubGraphId(): number { return this.get("SubGraphId"); }
21
21
  get HasSubGraphId(): boolean { return this.get("HasSubGraphId"); }
22
22
  get count(): number { return this.get("count"); }
23
+ get Timestamp(): number { return this.get("Timestamp"); }
24
+ get When(): string { return this.get("When"); }
23
25
 
24
- constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclTimer: WUInfo.ECLTimer) {
26
+ constructor(optsConnection: IOptions | IConnection | WorkunitsService, wuid: string, eclTimer: WsWorkunits.ECLTimer) {
25
27
  super();
26
28
  if (optsConnection instanceof WorkunitsService) {
27
29
  this.connection = optsConnection;