@hpcc-js/comms 2.91.3 → 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 (86) hide show
  1. package/dist/index.es6.js +86 -95
  2. package/dist/index.es6.js.map +1 -1
  3. package/dist/index.js +101 -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 +101 -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/__tests__/workunit.js +1 -1
  13. package/lib-es6/__tests__/workunit.js.map +1 -1
  14. package/lib-es6/ecl/dfuWorkunit.js +8 -2
  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 +5 -0
  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 +41 -37
  27. package/lib-es6/ecl/workunit.js.map +1 -1
  28. package/lib-es6/services/wsWorkunits.js +14 -60
  29. package/lib-es6/services/wsWorkunits.js.map +1 -1
  30. package/lib-es6/services/wsdl/WsWorkunits/v1.97/WsWorkunits.js +376 -0
  31. package/lib-es6/services/wsdl/WsWorkunits/v1.97/WsWorkunits.js.map +1 -0
  32. package/lib-es6/services/wsdl/WsWorkunits/v1.99/WsWorkunits.js +376 -0
  33. package/lib-es6/services/wsdl/WsWorkunits/v1.99/WsWorkunits.js.map +1 -0
  34. package/lib-es6/services/wsdl/WsWorkunits/v2/WsWorkunits.js +376 -0
  35. package/lib-es6/services/wsdl/WsWorkunits/v2/WsWorkunits.js.map +1 -0
  36. package/package.json +7 -6
  37. package/src/__package__.ts +2 -2
  38. package/src/__tests__/workunit.ts +1 -1
  39. package/src/ecl/dfuWorkunit.ts +7 -2
  40. package/src/ecl/graph.ts +4 -4
  41. package/src/ecl/query.ts +17 -16
  42. package/src/ecl/result.ts +36 -17
  43. package/src/ecl/scope.ts +10 -9
  44. package/src/ecl/sourceFile.ts +5 -5
  45. package/src/ecl/timer.ts +6 -4
  46. package/src/ecl/workunit.ts +87 -87
  47. package/src/services/wsWorkunits.ts +41 -2661
  48. package/src/services/wsdl/WsWorkunits/v1.97/WsWorkunits.ts +3134 -0
  49. package/src/services/wsdl/WsWorkunits/v1.99/WsWorkunits.ts +3162 -0
  50. package/src/services/wsdl/WsWorkunits/v2/WsWorkunits.ts +3165 -0
  51. package/types/__package__.d.ts +2 -2
  52. package/types/ecl/dfuWorkunit.d.ts.map +1 -1
  53. package/types/ecl/graph.d.ts +4 -4
  54. package/types/ecl/graph.d.ts.map +1 -1
  55. package/types/ecl/query.d.ts +16 -15
  56. package/types/ecl/query.d.ts.map +1 -1
  57. package/types/ecl/result.d.ts +26 -7
  58. package/types/ecl/result.d.ts.map +1 -1
  59. package/types/ecl/scope.d.ts +10 -9
  60. package/types/ecl/scope.d.ts.map +1 -1
  61. package/types/ecl/sourceFile.d.ts +5 -5
  62. package/types/ecl/sourceFile.d.ts.map +1 -1
  63. package/types/ecl/timer.d.ts +6 -4
  64. package/types/ecl/timer.d.ts.map +1 -1
  65. package/types/ecl/workunit.d.ts +66 -65
  66. package/types/ecl/workunit.d.ts.map +1 -1
  67. package/types/services/wsWorkunits.d.ts +17 -2256
  68. package/types/services/wsWorkunits.d.ts.map +1 -1
  69. package/types/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts +2529 -0
  70. package/types/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts.map +1 -0
  71. package/types/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts +2555 -0
  72. package/types/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts.map +1 -0
  73. package/types/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts +2558 -0
  74. package/types/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts.map +1 -0
  75. package/types-3.4/__package__.d.ts +2 -2
  76. package/types-3.4/ecl/graph.d.ts +4 -4
  77. package/types-3.4/ecl/query.d.ts +16 -15
  78. package/types-3.4/ecl/result.d.ts +26 -7
  79. package/types-3.4/ecl/scope.d.ts +10 -9
  80. package/types-3.4/ecl/sourceFile.d.ts +5 -5
  81. package/types-3.4/ecl/timer.d.ts +6 -4
  82. package/types-3.4/ecl/workunit.d.ts +66 -65
  83. package/types-3.4/services/wsWorkunits.d.ts +17 -2256
  84. package/types-3.4/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts +2529 -0
  85. package/types-3.4/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts +2555 -0
  86. package/types-3.4/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts +2558 -0
@@ -1,11 +1,11 @@
1
- import { Cache, deepMixinT, IEvent, scopedLogger, StateCallback, StateEvents, StateObject, StatePropCallback, StringAnyMap, XMLNode } from "@hpcc-js/util";
1
+ import { Cache, deepMixinT, IEvent, RecursivePartial, scopedLogger, StateCallback, StateEvents, StateObject, StatePropCallback, StringAnyMap, XMLNode } from "@hpcc-js/util";
2
2
  import { format as d3Format } from "d3-format";
3
3
  import { utcFormat, utcParse } from "d3-time-format";
4
4
  import { IConnection, IOptions } from "../connection";
5
5
  import { ESPExceptions } from "../espConnection";
6
6
  import { WsSMC } from "../services/wsSMC";
7
7
  import * as WsTopology from "../services/wsTopology";
8
- import * as WsWorkunits from "../services/wsWorkunits";
8
+ import { WsWorkunits, WUStateID, WorkunitsService, WorkunitsServiceEx, WUUpdate } from "../services/wsWorkunits";
9
9
  import { createGraph, createXGMMLGraph, ECLGraph, GraphCache, ScopeGraph, XGMMLGraph, XGMMLVertex } from "./graph";
10
10
  import { Resource } from "./resource";
11
11
  import { Result, ResultCache } from "./result";
@@ -149,8 +149,6 @@ function formatValues(item: IScope, key: string, dedup: DedupProperties): IPrope
149
149
 
150
150
  const logger = scopedLogger("workunit.ts");
151
151
 
152
- const WUStateID = WsWorkunits.WUStateID;
153
-
154
152
  export class WorkunitCache extends Cache<{ BaseUrl: string, Wuid: string }, Workunit> {
155
153
  constructor() {
156
154
  super((obj) => {
@@ -167,7 +165,7 @@ export interface DebugState {
167
165
  }
168
166
 
169
167
  export interface IWorkunit {
170
- ResultViews: WsWorkunits.WUInfo.ResultViews;
168
+ ResultViews: WsWorkunits.ResultViews;
171
169
  HelpersCount: number;
172
170
  }
173
171
 
@@ -183,34 +181,34 @@ export interface ITimeElapsed {
183
181
  }
184
182
 
185
183
  export type WorkunitEvents = "completed" | StateEvents;
186
- export type UWorkunitState = WsWorkunits.WUQuery.ECLWorkunit & WsWorkunits.WUInfo.Workunit & WsSMC.ActiveWorkunit & IWorkunit & IDebugWorkunit;
187
- export type IWorkunitState = WsWorkunits.WUQuery.ECLWorkunit | WsWorkunits.WUInfo.Workunit | WsSMC.ActiveWorkunit | IWorkunit | IDebugWorkunit;
188
- export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implements WsWorkunits.WUInfo.Workunit {
189
- connection: WsWorkunits.WorkunitsService;
184
+ export type UWorkunitState = WsWorkunits.ECLWorkunit & WsWorkunits.Workunit & WsSMC.ActiveWorkunit & IWorkunit & IDebugWorkunit;
185
+ export type IWorkunitState = WsWorkunits.ECLWorkunit | WsWorkunits.Workunit | WsSMC.ActiveWorkunit | IWorkunit | IDebugWorkunit;
186
+ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implements WsWorkunits.Workunit {
187
+ connection: WorkunitsService;
190
188
  topologyConnection: WsTopology.TopologyService;
191
189
  get BaseUrl() { return this.connection.baseUrl; }
192
190
 
193
191
  private _debugMode: boolean = false;
194
192
  private _debugAllGraph: any;
195
- private _submitAction: WsWorkunits.WUUpdate.Action;
193
+ private _submitAction: WUUpdate.Action;
196
194
 
197
195
  // Accessors ---
198
- get properties(): WsWorkunits.WUQuery.ECLWorkunit & WsWorkunits.WUInfo.Workunit { return this.get(); }
196
+ get properties(): WsWorkunits.ECLWorkunit & WsWorkunits.Workunit { return this.get(); }
199
197
  get Wuid(): string { return this.get("Wuid"); }
200
198
  get Owner(): string { return this.get("Owner", ""); }
201
199
  get Cluster(): string { return this.get("Cluster", ""); }
202
200
  get Jobname(): string { return this.get("Jobname", ""); }
203
201
  get Description(): string { return this.get("Description", ""); }
204
202
  get ActionEx(): string { return this.get("ActionEx", ""); }
205
- get StateID(): WsWorkunits.WUStateID { return this.get("StateID", WsWorkunits.WUStateID.Unknown); }
206
- get State(): string { return this.get("State") || WsWorkunits.WUStateID[this.StateID]; }
203
+ get StateID(): WUStateID { return this.get("StateID", WUStateID.Unknown); }
204
+ get State(): string { return this.get("State") || WUStateID[this.StateID]; }
207
205
  get Protected(): boolean { return this.get("Protected", false); }
208
- get Exceptions(): WsWorkunits.WUInfo.Exceptions2 { return this.get("Exceptions", { ECLException: [] }); }
209
- get ResultViews(): WsWorkunits.WUInfo.ResultViews { return this.get("ResultViews", { View: [] }); }
206
+ get Exceptions(): WsWorkunits.Exceptions2 { return this.get("Exceptions", { ECLException: [] }); }
207
+ get ResultViews(): WsWorkunits.ResultViews { return this.get("ResultViews", { View: [] }); }
210
208
 
211
209
  private _resultCache = new ResultCache();
212
210
  get ResultCount(): number { return this.get("ResultCount", 0); }
213
- get Results(): WsWorkunits.WUInfo.Results { return this.get("Results", { ECLResult: [] }); }
211
+ get Results(): WsWorkunits.Results { return this.get("Results", { ECLResult: [] }); }
214
212
  get CResults(): Result[] {
215
213
  return this.Results.ECLResult.map((eclResult) => {
216
214
  return this._resultCache.get(eclResult, () => {
@@ -225,7 +223,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
225
223
  });
226
224
  return retVal;
227
225
  }
228
- get Timers(): WsWorkunits.WUInfo.Timers { return this.get("Timers", { ECLTimer: [] }); }
226
+ get Timers(): WsWorkunits.Timers { return this.get("Timers", { ECLTimer: [] }); }
229
227
  get CTimers(): Timer[] {
230
228
  return this.Timers.ECLTimer.map((eclTimer) => {
231
229
  return new Timer(this.connection, this.Wuid, eclTimer);
@@ -234,7 +232,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
234
232
 
235
233
  private _graphCache = new GraphCache();
236
234
  get GraphCount(): number { return this.get("GraphCount", 0); }
237
- get Graphs(): WsWorkunits.WUInfo.Graphs { return this.get("Graphs", { ECLGraph: [] }); }
235
+ get Graphs(): WsWorkunits.Graphs { return this.get("Graphs", { ECLGraph: [] }); }
238
236
  get CGraphs(): ECLGraph[] {
239
237
  return this.Graphs.ECLGraph.map((eclGraph) => {
240
238
  return this._graphCache.get(eclGraph, () => {
@@ -242,9 +240,9 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
242
240
  });
243
241
  });
244
242
  }
245
- get ThorLogList(): WsWorkunits.WUInfo.ThorLogList { return this.get("ThorLogList"); }
243
+ get ThorLogList(): WsWorkunits.ThorLogList { return this.get("ThorLogList"); }
246
244
  get ResourceURLCount(): number { return this.get("ResourceURLCount", 0); }
247
- get ResourceURLs(): WsWorkunits.WUInfo.ResourceURLs { return this.get("ResourceURLs", { URL: [] }); }
245
+ get ResourceURLs(): WsWorkunits.ResourceURLs { return this.get("ResourceURLs", { URL: [] }); }
248
246
  get CResourceURLs(): Resource[] {
249
247
  return this.ResourceURLs.URL.map((url) => {
250
248
  return new Resource(this, url);
@@ -254,7 +252,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
254
252
  get DateTimeScheduled(): string { return this.get("DateTimeScheduled"); }
255
253
  get IsPausing(): boolean { return this.get("IsPausing"); }
256
254
  get ThorLCR(): boolean { return this.get("ThorLCR"); }
257
- get ApplicationValues(): WsWorkunits.WUInfo.ApplicationValues { return this.get("ApplicationValues", { ApplicationValue: [] }); }
255
+ get ApplicationValues(): WsWorkunits.ApplicationValues { return this.get("ApplicationValues", { ApplicationValue: [] }); }
258
256
  get HasArchiveQuery(): boolean { return this.get("HasArchiveQuery"); }
259
257
  get StateEx(): string { return this.get("StateEx"); }
260
258
  get PriorityClass(): number { return this.get("PriorityClass"); }
@@ -262,23 +260,22 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
262
260
  get Snapshot(): string { return this.get("Snapshot"); }
263
261
  get ResultLimit(): number { return this.get("ResultLimit"); }
264
262
  get EventSchedule(): number { return this.get("EventSchedule"); }
265
- get HaveSubGraphTimings(): boolean { return this.get("HaveSubGraphTimings"); }
266
- get Query(): WsWorkunits.WUInfo.Query { return this.get("Query"); }
263
+ get Query(): WsWorkunits.Query { return this.get("Query"); }
267
264
  get HelpersCount(): number { return this.get("HelpersCount", 0); }
268
- get Helpers(): WsWorkunits.WUInfo.Helpers { return this.get("Helpers", { ECLHelpFile: [] }); }
269
- get DebugValues(): WsWorkunits.WUInfo.DebugValues { return this.get("DebugValues"); }
270
- get AllowedClusters(): WsWorkunits.WUInfo.AllowedClusters { return this.get("AllowedClusters"); }
265
+ get Helpers(): WsWorkunits.Helpers { return this.get("Helpers", { ECLHelpFile: [] }); }
266
+ get DebugValues(): WsWorkunits.DebugValues { return this.get("DebugValues"); }
267
+ get AllowedClusters(): WsWorkunits.AllowedClusters { return this.get("AllowedClusters"); }
271
268
  get ErrorCount(): number { return this.get("ErrorCount", 0); }
272
269
  get WarningCount(): number { return this.get("WarningCount", 0); }
273
270
  get InfoCount(): number { return this.get("InfoCount", 0); }
274
271
  get AlertCount(): number { return this.get("AlertCount", 0); }
275
272
  get SourceFileCount(): number { return this.get("SourceFileCount", 0); }
276
- get SourceFiles(): WsWorkunits.WUInfo.SourceFiles { return this.get("SourceFiles", { ECLSourceFile: [] }); }
273
+ get SourceFiles(): WsWorkunits.SourceFiles { return this.get("SourceFiles", { ECLSourceFile: [] }); }
277
274
  get CSourceFiles(): SourceFile[] {
278
275
  return this.SourceFiles.ECLSourceFile.map(eclSourceFile => new SourceFile(this.connection, this.Wuid, eclSourceFile));
279
276
  }
280
277
  get VariableCount(): number { return this.get("VariableCount", 0); }
281
- get Variables(): WsWorkunits.WUInfo.Variables { return this.get("Variables", { ECLResult: [] }); }
278
+ get Variables(): WsWorkunits.Variables { return this.get("Variables", { ECLResult: [] }); }
282
279
  get TimerCount(): number { return this.get("TimerCount", 0); }
283
280
  get HasDebugValue(): boolean { return this.get("HasDebugValue"); }
284
281
  get ApplicationValueCount(): number { return this.get("ApplicationValueCount", 0); }
@@ -297,8 +294,8 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
297
294
  get Scope(): string { return this.get("Scope"); }
298
295
  get AbortBy(): string { return this.get("AbortBy"); }
299
296
  get AbortTime(): string { return this.get("AbortTime"); }
300
- get Workflows(): WsWorkunits.WUInfo.Workflows { return this.get("Workflows"); }
301
- get TimingData(): WsWorkunits.WUInfo.TimingData { return this.get("TimingData"); }
297
+ get Workflows(): WsWorkunits.Workflows { return this.get("Workflows"); }
298
+ get TimingData(): WsWorkunits.TimingData { return this.get("TimingData"); }
302
299
  get HelpersDesc(): string { return this.get("HelpersDesc"); }
303
300
  get GraphsDesc(): string { return this.get("GraphsDesc"); }
304
301
  get SourceFilesDesc(): string { return this.get("SourceFilesDesc"); }
@@ -308,10 +305,12 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
308
305
  get DebugValuesDesc(): string { return this.get("DebugValuesDesc"); }
309
306
  get ApplicationValuesDesc(): string { return this.get("ApplicationValuesDesc"); }
310
307
  get WorkflowsDesc(): string { return this.get("WorkflowsDesc"); }
311
- get ServiceNames(): WsWorkunits.WUInfo.ServiceNames { return this.get("ServiceNames"); }
308
+ get ServiceNames(): WsWorkunits.ServiceNames { return this.get("ServiceNames"); }
312
309
  get CompileCost(): number { return this.get("CompileCost"); }
313
310
  get ExecuteCost(): number { return this.get("ExecuteCost"); }
314
311
  get FileAccessCost(): number { return this.get("FileAccessCost"); }
312
+ get NoAccess(): boolean { return this.get("NoAccess"); }
313
+ get ECLWUProcessList(): WsWorkunits.ECLWUProcessList { return this.get("ECLWUProcessList"); }
315
314
 
316
315
  // Factories ---
317
316
  static create(optsConnection: IOptions | IConnection): Promise<Workunit> {
@@ -341,7 +340,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
341
340
  return Workunit.create(server).then((wu) => {
342
341
  return wu.update({ QueryText: ecl });
343
342
  }).then((wu) => {
344
- return compileOnly ? wu.submit(target, WsWorkunits.WUUpdate.Action.Compile) : wu.submit(target);
343
+ return compileOnly ? wu.submit(target, WUUpdate.Action.Compile) : wu.submit(target);
345
344
  });
346
345
  }
347
346
 
@@ -349,8 +348,8 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
349
348
  return Workunit.submit(server, target, ecl, true);
350
349
  }
351
350
 
352
- static query(server: IOptions | IConnection, opts: WsWorkunits.WUQuery.Request): Promise<Workunit[]> {
353
- const wsWorkunits = new WsWorkunits.WorkunitsService(server);
351
+ static query(server: IOptions | IConnection, opts: Partial<WsWorkunits.WUQuery>): Promise<Workunit[]> {
352
+ const wsWorkunits = new WorkunitsService(server);
354
353
  return wsWorkunits.WUQuery(opts).then((response) => {
355
354
  return response.Workunits.ECLWorkunit.map(function (wu) {
356
355
  return Workunit.attach(server, wu.Wuid, wu);
@@ -361,7 +360,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
361
360
  // --- --- ---
362
361
  protected constructor(optsConnection: IOptions | IConnection, wuid?: string) {
363
362
  super();
364
- this.connection = new WsWorkunits.WorkunitsService(optsConnection);
363
+ this.connection = new WorkunitsService(optsConnection);
365
364
  this.topologyConnection = new WsTopology.TopologyService(optsConnection);
366
365
  this.clearState(wuid);
367
366
  }
@@ -373,12 +372,12 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
373
372
  });
374
373
  }
375
374
 
376
- update(request: Partial<WsWorkunits.WUUpdate.Request>): Promise<Workunit> {
375
+ update(request: Partial<WsWorkunits.WUUpdate>): Promise<Workunit> {
377
376
  return this.connection.WUUpdate({
378
377
  ...request,
379
378
  ...{
380
379
  Wuid: this.Wuid,
381
- StateOrig: this.State,
380
+ StateOrig: this.StateID,
382
381
  JobnameOrig: this.Jobname,
383
382
  DescriptionOrig: this.Description,
384
383
  ProtectedOrig: this.Protected,
@@ -390,7 +389,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
390
389
  });
391
390
  }
392
391
 
393
- submit(_cluster?: string, action: WsWorkunits.WUUpdate.Action = WsWorkunits.WUUpdate.Action.Run, resultLimit?: number): Promise<Workunit> {
392
+ submit(_cluster?: string, action: WUUpdate.Action = WUUpdate.Action.Run, resultLimit?: number): Promise<Workunit> {
394
393
  let clusterPromise;
395
394
  if (_cluster !== void 0) {
396
395
  clusterPromise = Promise.resolve(_cluster);
@@ -401,8 +400,8 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
401
400
  }
402
401
 
403
402
  this._debugMode = false;
404
- if (action === WsWorkunits.WUUpdate.Action.Debug) {
405
- action = WsWorkunits.WUUpdate.Action.Run;
403
+ if (action === WUUpdate.Action.Debug) {
404
+ action = WUUpdate.Action.Run;
406
405
  this._debugMode = true;
407
406
  }
408
407
 
@@ -432,7 +431,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
432
431
  isComplete(): boolean {
433
432
  switch (this.StateID) {
434
433
  case WUStateID.Compiled:
435
- return this.ActionEx === "compile" || this._submitAction === WsWorkunits.WUUpdate.Action.Compile;
434
+ return this.ActionEx === "compile" || this._submitAction === WUUpdate.Action.Compile;
436
435
  case WUStateID.Completed:
437
436
  case WUStateID.Failed:
438
437
  case WUStateID.Aborted:
@@ -487,47 +486,47 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
487
486
  }
488
487
 
489
488
  setToFailed() {
490
- return this.WUAction("SetToFailed");
489
+ return this.WUAction(WsWorkunits.ECLWUActions.SetToFailed);
491
490
  }
492
491
 
493
492
  pause() {
494
- return this.WUAction("Pause");
493
+ return this.WUAction(WsWorkunits.ECLWUActions.Pause);
495
494
  }
496
495
 
497
496
  pauseNow() {
498
- return this.WUAction("PauseNow");
497
+ return this.WUAction(WsWorkunits.ECLWUActions.PauseNow);
499
498
  }
500
499
 
501
500
  resume() {
502
- return this.WUAction("Resume");
501
+ return this.WUAction(WsWorkunits.ECLWUActions.Resume);
503
502
  }
504
503
 
505
504
  abort() {
506
- return this.WUAction("Abort");
505
+ return this.WUAction(WsWorkunits.ECLWUActions.Abort);
507
506
  }
508
507
 
509
508
  protect() {
510
- return this.WUAction("Protect");
509
+ return this.WUAction(WsWorkunits.ECLWUActions.Protect);
511
510
  }
512
511
 
513
512
  unprotect() {
514
- return this.WUAction("Unprotect");
513
+ return this.WUAction(WsWorkunits.ECLWUActions.Unprotect);
515
514
  }
516
515
 
517
516
  delete() {
518
- return this.WUAction("Delete");
517
+ return this.WUAction(WsWorkunits.ECLWUActions.Delete);
519
518
  }
520
519
 
521
520
  restore() {
522
- return this.WUAction("Restore");
521
+ return this.WUAction(WsWorkunits.ECLWUActions.Restore);
523
522
  }
524
523
 
525
524
  deschedule() {
526
- return this.WUAction("Deschedule");
525
+ return this.WUAction(WsWorkunits.ECLWUActions.Deschedule);
527
526
  }
528
527
 
529
528
  reschedule() {
530
- return this.WUAction("Reschedule");
529
+ return this.WUAction(WsWorkunits.ECLWUActions.Reschedule);
531
530
  }
532
531
 
533
532
  resubmit(): Promise<Workunit> {
@@ -563,7 +562,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
563
562
  return this;
564
563
  }
565
564
 
566
- async refreshInfo(request?: Partial<WsWorkunits.WUInfo.Request>): Promise<this> {
565
+ async refreshInfo(request?: Partial<WsWorkunits.WUInfo>): Promise<this> {
567
566
  await this.WUInfo(request);
568
567
  return this;
569
568
  }
@@ -573,7 +572,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
573
572
  return this;
574
573
  }
575
574
 
576
- async refresh(full: boolean = false, request?: Partial<WsWorkunits.WUInfo.Request>): Promise<this> {
575
+ async refresh(full: boolean = false, request?: Partial<WsWorkunits.WUInfo>): Promise<this> {
577
576
  if (full) {
578
577
  await Promise.all([this.refreshInfo(request), this.refreshDebug()]);
579
578
  } else {
@@ -582,18 +581,18 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
582
581
  return this;
583
582
  }
584
583
 
585
- eclExceptions(): WsWorkunits.WUInfo.ECLException[] {
584
+ eclExceptions(): WsWorkunits.ECLException[] {
586
585
  return this.Exceptions.ECLException;
587
586
  }
588
587
 
589
588
  fetchArchive(): Promise<string> {
590
- return this.connection.WUFile({
589
+ return this.connection.WUFileEx({
591
590
  Wuid: this.Wuid,
592
591
  Type: "ArchiveQuery"
593
592
  });
594
593
  }
595
594
 
596
- fetchECLExceptions(): Promise<WsWorkunits.WUInfo.ECLException[]> {
595
+ fetchECLExceptions(): Promise<WsWorkunits.ECLException[]> {
597
596
  return this.WUInfo({ IncludeExceptions: true }).then(() => {
598
597
  return this.eclExceptions();
599
598
  });
@@ -611,13 +610,13 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
611
610
  });
612
611
  }
613
612
 
614
- fetchQuery(): Promise<WsWorkunits.WUInfo.Query> {
613
+ fetchQuery(): Promise<WsWorkunits.Query> {
615
614
  return this.WUInfo({ IncludeECL: true, TruncateEclTo64k: false }).then(() => {
616
615
  return this.Query;
617
616
  });
618
617
  }
619
618
 
620
- fetchHelpers(): Promise<WsWorkunits.WUInfo.ECLHelpFile[]> {
619
+ fetchHelpers(): Promise<WsWorkunits.ECLHelpFile[]> {
621
620
  return this.WUInfo({ IncludeHelpers: true }).then(() => {
622
621
  return this.Helpers?.ECLHelpFile || [];
623
622
  });
@@ -641,15 +640,15 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
641
640
  });
642
641
  }
643
642
 
644
- fetchDetailsMeta(request: Partial<WsWorkunits.WUDetailsMeta.Request> = {}): Promise<WsWorkunits.WUDetailsMeta.Response> {
643
+ fetchDetailsMeta(request: RecursivePartial<WsWorkunits.WUDetailsMeta> = {}): Promise<WsWorkunits.WUDetailsMetaResponse> {
645
644
  return this.WUDetailsMeta(request);
646
645
  }
647
646
 
648
- fetchDetailsRaw(request: Partial<WsWorkunits.WUDetails.Request> = {}): Promise<WsWorkunits.WUDetails.Scope[]> {
647
+ fetchDetailsRaw(request: RecursivePartial<WsWorkunits.WUDetails> = {}): Promise<WsWorkunits.Scope[]> {
649
648
  return this.WUDetails(request).then(response => response.Scopes.Scope);
650
649
  }
651
650
 
652
- normalizeDetails(meta: WsWorkunits.WUDetailsMeta.Response, scopes: WsWorkunits.WUDetails.Scope[]): { meta: WsWorkunits.WUDetailsMeta.Response, columns: { [id: string]: any }, data: IScope[] } {
651
+ normalizeDetails(meta: WsWorkunits.WUDetailsMetaResponse, scopes: WsWorkunits.Scope[]): { meta: WsWorkunits.WUDetailsMetaResponse, columns: { [id: string]: any }, data: IScope[] } {
653
652
  const columns: { [id: string]: any } = {
654
653
  id: {
655
654
  Measure: "label"
@@ -758,17 +757,17 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
758
757
  };
759
758
  }
760
759
 
761
- fetchDetailsNormalized(request: Partial<WsWorkunits.WUDetails.Request> = {}): Promise<{ meta: WsWorkunits.WUDetailsMeta.Response, columns: { [id: string]: any }, data: IScope[] }> {
760
+ fetchDetailsNormalized(request: RecursivePartial<WsWorkunits.WUDetails> = {}): Promise<{ meta: WsWorkunits.WUDetailsMetaResponse, columns: { [id: string]: any }, data: IScope[] }> {
762
761
  return Promise.all([this.fetchDetailsMeta(), this.fetchDetailsRaw(request)]).then(promises => {
763
762
  return this.normalizeDetails(promises[0], promises[1]);
764
763
  });
765
764
  }
766
765
 
767
- fetchInfo(request: Partial<WsWorkunits.WUInfo.Request> = {}): Promise<WsWorkunits.WUInfo.Response> {
766
+ fetchInfo(request: Partial<WsWorkunits.WUInfo> = {}): Promise<WsWorkunits.WUInfoResponse> {
768
767
  return this.WUInfo(request);
769
768
  }
770
769
 
771
- fetchDetails(request: Partial<WsWorkunits.WUDetails.Request> = {}): Promise<Scope[]> {
770
+ fetchDetails(request: RecursivePartial<WsWorkunits.WUDetails> = {}): Promise<Scope[]> {
772
771
  return this.WUDetails(request).then((response) => {
773
772
  return response.Scopes.Scope.map((rawScope) => {
774
773
  return new Scope(this, rawScope);
@@ -776,7 +775,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
776
775
  });
777
776
  }
778
777
 
779
- fetchDetailsHierarchy(request: Partial<WsWorkunits.WUDetails.Request> = {}): Promise<Scope[]> {
778
+ fetchDetailsHierarchy(request: Partial<WsWorkunits.WUDetails> = {}): Promise<Scope[]> {
780
779
  return this.WUDetails(request).then((response) => {
781
780
  const retVal: Scope[] = [];
782
781
 
@@ -812,12 +811,12 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
812
811
  return this.fetchDetails({
813
812
  ScopeFilter: {
814
813
  MaxDepth: 999999,
815
- Ids: graphIDs,
816
- ScopeTypes: rootTypes
814
+ Ids: { id: graphIDs },
815
+ ScopeTypes: { ScopeType: rootTypes },
817
816
  },
818
817
  NestedFilter: {
819
818
  Depth: 999999,
820
- ScopeTypes: ["graph", "subgraph", "activity", "edge", "function"]
819
+ ScopeTypes: { ScopeType: ["graph", "subgraph", "activity", "edge", "function"] }
821
820
  },
822
821
  PropertiesToReturn: {
823
822
  AllStatistics: true,
@@ -972,7 +971,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
972
971
  }
973
972
 
974
973
  // WsWorkunits passthroughs ---
975
- protected WUQuery(_request: Partial<WsWorkunits.WUQuery.Request> = {}): Promise<WsWorkunits.WUQuery.Response> {
974
+ protected WUQuery(_request: Partial<WsWorkunits.WUQuery> = {}): Promise<WsWorkunits.WUQueryResponse> {
976
975
  return this.connection.WUQuery({ ..._request, Wuid: this.Wuid }).then((response) => {
977
976
  this.set(response.Workunits.ECLWorkunit[0]);
978
977
  return response;
@@ -990,7 +989,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
990
989
  logger.warning("Unexpected exception: ");
991
990
  throw e;
992
991
  }
993
- return {} as WsWorkunits.WUQuery.Response;
992
+ return {} as WsWorkunits.WUQueryResponse;
994
993
  });
995
994
  }
996
995
 
@@ -1002,10 +1001,11 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
1002
1001
  });
1003
1002
  }
1004
1003
 
1005
- protected WUInfo(_request: Partial<WsWorkunits.WUInfo.Request> = {}): Promise<WsWorkunits.WUInfo.Response> {
1004
+ protected WUInfo(_request: Partial<WsWorkunits.WUInfo> = {}): Promise<WsWorkunits.WUInfoResponse> {
1006
1005
  const includeResults = _request.IncludeResults || _request.IncludeResultsViewNames;
1007
1006
  return this.connection.WUInfo({
1008
- ..._request, Wuid: this.Wuid,
1007
+ ..._request,
1008
+ Wuid: this.Wuid,
1009
1009
  IncludeResults: includeResults,
1010
1010
  IncludeResultsViewNames: includeResults,
1011
1011
  SuppressResultSchemas: false
@@ -1031,22 +1031,22 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
1031
1031
  logger.warning("Unexpected exception: ");
1032
1032
  throw e;
1033
1033
  }
1034
- return {} as WsWorkunits.WUInfo.Response;
1034
+ return {} as WsWorkunits.WUInfoResponse;
1035
1035
  });
1036
1036
  }
1037
1037
 
1038
- protected WUResubmit(request: Partial<WsWorkunits.WUResubmit.Request>): Promise<WsWorkunits.WUResubmit.Response> {
1039
- return this.connection.WUResubmit(deepMixinT<WsWorkunits.WUResubmit.Request>({}, request, {
1040
- Wuids: [this.Wuid]
1038
+ protected WUResubmit(request: Partial<WsWorkunits.WUResubmit>): Promise<WsWorkunits.WUResubmitResponse> {
1039
+ return this.connection.WUResubmit(deepMixinT<WsWorkunits.WUResubmit>({}, request, {
1040
+ Wuids: { Item: [this.Wuid] }
1041
1041
  }));
1042
1042
  }
1043
1043
 
1044
- protected WUDetailsMeta(request: Partial<WsWorkunits.WUDetailsMeta.Request>): Promise<WsWorkunits.WUDetailsMeta.Response> {
1044
+ protected WUDetailsMeta(request: Partial<WsWorkunits.WUDetailsMeta>): Promise<WsWorkunits.WUDetailsMetaResponse> {
1045
1045
  return this.connection.WUDetailsMeta(request);
1046
1046
  }
1047
1047
 
1048
- protected WUDetails(request: Partial<WsWorkunits.WUDetails.Request>): Promise<WsWorkunits.WUDetails.Response> {
1049
- return this.connection.WUDetails(deepMixinT<WsWorkunits.WUDetails.Request>({
1048
+ protected WUDetails(request: RecursivePartial<WsWorkunits.WUDetails>): Promise<WsWorkunits.WUDetailsResponse> {
1049
+ return this.connection.WUDetails(deepMixinT<WsWorkunits.WUDetails>({
1050
1050
  ScopeFilter: {
1051
1051
  MaxDepth: 9999
1052
1052
  },
@@ -1065,7 +1065,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
1065
1065
  IncludeCreatorType: false
1066
1066
  }
1067
1067
  }, request, { WUID: this.Wuid })).then((response) => {
1068
- return deepMixinT<WsWorkunits.WUDetails.Response>({
1068
+ return deepMixinT<WsWorkunits.WUDetailsResponse>({
1069
1069
  Scopes: {
1070
1070
  Scope: []
1071
1071
  }
@@ -1073,9 +1073,9 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
1073
1073
  });
1074
1074
  }
1075
1075
 
1076
- protected WUAction(actionType: WsWorkunits.WUAction.Type): Promise<WsWorkunits.WUAction.Response> {
1076
+ protected WUAction(actionType: WsWorkunits.ECLWUActions): Promise<WsWorkunits.WUActionResponse> {
1077
1077
  return this.connection.WUAction({
1078
- Wuids: [this.Wuid],
1078
+ Wuids: { Item: [this.Wuid] },
1079
1079
  WUActionType: actionType
1080
1080
  }).then((response) => {
1081
1081
  return this.refresh().then(() => {
@@ -1091,13 +1091,13 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
1091
1091
  Cluster: this.Cluster,
1092
1092
  JobName: name || this.Jobname,
1093
1093
  AllowForeignFiles: true,
1094
- Activate: true,
1094
+ Activate: WsWorkunits.WUQueryActivationMode.ActivateQuery,
1095
1095
  Wait: 5000
1096
1096
  });
1097
1097
  }
1098
1098
 
1099
- publishEx(request: Partial<WsWorkunits.WsWorkunits.WUPublishWorkunit>) {
1100
- const service = new WsWorkunits.WorkunitsServiceEx({ baseUrl: "" });
1099
+ publishEx(request: Partial<WsWorkunits.WUPublishWorkunit>) {
1100
+ const service = new WorkunitsServiceEx({ baseUrl: "" });
1101
1101
  const publishRequest = {
1102
1102
  Wuid: this.Wuid,
1103
1103
  Cluster: this.Cluster,
@@ -1117,7 +1117,7 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
1117
1117
  optsStr += ` ${key}='${opts[key]}'`;
1118
1118
  }
1119
1119
  }
1120
- return this.connection.WUCDebug({
1120
+ return this.connection.WUCDebugEx({
1121
1121
  Wuid: this.Wuid,
1122
1122
  Command: `<debug:${command} uid='${this.Wuid}'${optsStr}/>`
1123
1123
  }).then((response) => {