@opentap/runner-client 2.19.0-alpha.1.9 → 2.19.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.
package/lib/DTOs.d.ts CHANGED
@@ -1205,22 +1205,34 @@ export declare class TestPlanSettingsChangedEventArgs extends SessionEvent imple
1205
1205
  toJSON(data?: any): any;
1206
1206
  }
1207
1207
  export declare type ITestPlanSettingsChangedEventArgs = ISessionEvent;
1208
- export interface ITestStepRunStatusEvent {
1208
+ export interface IOnTestPlanRun {
1209
+ status?: string;
1210
+ userId?: string;
1211
+ }
1212
+ export declare class OnTestPlanRun implements IOnTestPlanRun {
1213
+ status?: string;
1214
+ userId?: string;
1215
+ constructor(data?: IOnTestPlanRun);
1216
+ init(_data?: any): void;
1217
+ static fromJS(data: any): OnTestPlanRun;
1218
+ toJSON(data?: any): any;
1219
+ }
1220
+ export interface IOnTestStepRun {
1209
1221
  status?: string;
1210
1222
  stepId?: string;
1211
1223
  parentRunId?: string;
1212
1224
  verdict?: string;
1213
1225
  duration?: string;
1214
1226
  }
1215
- export declare class TestStepRunStatusEvent implements ITestStepRunStatusEvent {
1227
+ export declare class OnTestStepRun implements IOnTestStepRun {
1216
1228
  status?: string;
1217
1229
  stepId?: string;
1218
1230
  parentRunId?: string;
1219
1231
  verdict?: string;
1220
1232
  duration?: string;
1221
- constructor(data?: ITestStepRunStatusEvent);
1233
+ constructor(data?: IOnTestStepRun);
1222
1234
  init(_data?: any): void;
1223
- static fromJS(data: any): TestStepRunStatusEvent;
1235
+ static fromJS(data: any): OnTestStepRun;
1224
1236
  toJSON(data?: any): any;
1225
1237
  }
1226
1238
  export interface ITestStepRunEvent {
package/lib/DTOs.js CHANGED
@@ -3507,8 +3507,8 @@ var TestPlanSettingsChangedEventArgs = /** @class */ (function (_super) {
3507
3507
  return TestPlanSettingsChangedEventArgs;
3508
3508
  }(SessionEvent));
3509
3509
  export { TestPlanSettingsChangedEventArgs };
3510
- var TestStepRunStatusEvent = /** @class */ (function () {
3511
- function TestStepRunStatusEvent(data) {
3510
+ var OnTestPlanRun = /** @class */ (function () {
3511
+ function OnTestPlanRun(data) {
3512
3512
  if (data) {
3513
3513
  for (var property in data) {
3514
3514
  if (Object.prototype.hasOwnProperty.call(data, property))
@@ -3516,7 +3516,37 @@ var TestStepRunStatusEvent = /** @class */ (function () {
3516
3516
  }
3517
3517
  }
3518
3518
  }
3519
- TestStepRunStatusEvent.prototype.init = function (_data) {
3519
+ OnTestPlanRun.prototype.init = function (_data) {
3520
+ if (_data) {
3521
+ this.status = _data['Status'];
3522
+ this.userId = _data['UserId'];
3523
+ }
3524
+ };
3525
+ OnTestPlanRun.fromJS = function (data) {
3526
+ data = typeof data === 'object' ? data : {};
3527
+ var result = new OnTestPlanRun();
3528
+ result.init(data);
3529
+ return result;
3530
+ };
3531
+ OnTestPlanRun.prototype.toJSON = function (data) {
3532
+ data = typeof data === 'object' ? data : {};
3533
+ data['Status'] = this.status;
3534
+ data['UserId'] = this.userId;
3535
+ return data;
3536
+ };
3537
+ return OnTestPlanRun;
3538
+ }());
3539
+ export { OnTestPlanRun };
3540
+ var OnTestStepRun = /** @class */ (function () {
3541
+ function OnTestStepRun(data) {
3542
+ if (data) {
3543
+ for (var property in data) {
3544
+ if (Object.prototype.hasOwnProperty.call(data, property))
3545
+ this[property] = data[property];
3546
+ }
3547
+ }
3548
+ }
3549
+ OnTestStepRun.prototype.init = function (_data) {
3520
3550
  if (_data) {
3521
3551
  this.status = _data['Status'];
3522
3552
  this.stepId = _data['StepId'];
@@ -3525,13 +3555,13 @@ var TestStepRunStatusEvent = /** @class */ (function () {
3525
3555
  this.duration = _data['Duration'];
3526
3556
  }
3527
3557
  };
3528
- TestStepRunStatusEvent.fromJS = function (data) {
3558
+ OnTestStepRun.fromJS = function (data) {
3529
3559
  data = typeof data === 'object' ? data : {};
3530
- var result = new TestStepRunStatusEvent();
3560
+ var result = new OnTestStepRun();
3531
3561
  result.init(data);
3532
3562
  return result;
3533
3563
  };
3534
- TestStepRunStatusEvent.prototype.toJSON = function (data) {
3564
+ OnTestStepRun.prototype.toJSON = function (data) {
3535
3565
  data = typeof data === 'object' ? data : {};
3536
3566
  data['Status'] = this.status;
3537
3567
  data['StepId'] = this.stepId;
@@ -3540,9 +3570,9 @@ var TestStepRunStatusEvent = /** @class */ (function () {
3540
3570
  data['Duration'] = this.duration;
3541
3571
  return data;
3542
3572
  };
3543
- return TestStepRunStatusEvent;
3573
+ return OnTestStepRun;
3544
3574
  }());
3545
- export { TestStepRunStatusEvent };
3575
+ export { OnTestStepRun };
3546
3576
  var TestStepRunEvent = /** @class */ (function () {
3547
3577
  function TestStepRunEvent(data) {
3548
3578
  if (data) {
@@ -1,4 +1,4 @@
1
- import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SessionEvent, Setting, TestPlan, TestPlanRunEvent, TestRun, TestStepRunStatusEvent, TestStepType, TestStepValidationError, WatchDog } from './DTOs';
1
+ import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, OnTestPlanRun, OnTestStepRun, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog } from './DTOs';
2
2
  import { ConnectionOptions, NatsError, Subscription, SubscriptionOptions } from 'nats.ws';
3
3
  import { BaseClient } from './BaseClient';
4
4
  export declare class SessionClient extends BaseClient {
@@ -32,11 +32,11 @@ export declare class SessionClient extends BaseClient {
32
32
  /**
33
33
  * Connect to listen to the TestPlanRun events for the given test plan run ID.
34
34
  * @param {string} testPlanRunId
35
- * @param {(event:TestPlanRunEvent|undefined,err:NatsError|Error|null)=>void} handler
35
+ * @param {(event:OnTestPlanRun|undefined,err:NatsError|Error|null)=>void} handler
36
36
  * @param {SubscriptionOptions} options?
37
37
  * @returns Subscription
38
38
  */
39
- connectTestPlanRunEvents(testPlanRunId: string, handler: (event: TestPlanRunEvent | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
39
+ connectTestPlanRunEvents(testPlanRunId: string, handler: (event: OnTestPlanRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
40
40
  /**
41
41
  * Connect to listen to the test plan run logs for the given test plan run ID
42
42
  * @param {string} testPlanRunId
@@ -57,11 +57,11 @@ export declare class SessionClient extends BaseClient {
57
57
  * Connect to listen to the test step run events for the given test step and test plan run ID
58
58
  * @param {string} testPlanRunId
59
59
  * @param {string} testStepRunId
60
- * @param {(testRun:TestStepRunStatusEvent|undefined,err:NatsError|Error|null)=>void} handler
60
+ * @param {(testRun:OnTestStepRun|undefined,err:NatsError|Error|null)=>void} handler
61
61
  * @param {SubscriptionOptions} options?
62
62
  * @returns Subscription
63
63
  */
64
- connectTestStepRunEvents(testPlanRunId: string, testStepRunId: string, handler: (testStepRunId: string | undefined, testRun: TestStepRunStatusEvent | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
64
+ connectTestStepRunEvents(testPlanRunId: string, testStepRunId: string, handler: (testStepRunId: string | undefined, testRun: OnTestStepRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
65
65
  /**
66
66
  * Connect to listen to the test step run parameters for the given test step and test plan run ID
67
67
  * @param {string} testPlanRunId
@@ -24,7 +24,7 @@ var __assign = (this && this.__assign) || function () {
24
24
  };
25
25
  return __assign.apply(this, arguments);
26
26
  };
27
- import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, Parameter, Result, RunStatus, SessionEvent, Setting, TestPlan, TestPlanRunEvent, TestRun, TestStepRunStatusEvent, TestStepType, TestStepValidationError, WatchDog, } from './DTOs';
27
+ import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, OnTestPlanRun, OnTestStepRun, Parameter, Result, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog, } from './DTOs';
28
28
  import { JSONCodec } from 'nats.ws';
29
29
  import { BaseClient } from './BaseClient';
30
30
  var SessionClient = /** @class */ (function (_super) {
@@ -145,7 +145,7 @@ var SessionClient = /** @class */ (function (_super) {
145
145
  /**
146
146
  * Connect to listen to the TestPlanRun events for the given test plan run ID.
147
147
  * @param {string} testPlanRunId
148
- * @param {(event:TestPlanRunEvent|undefined,err:NatsError|Error|null)=>void} handler
148
+ * @param {(event:OnTestPlanRun|undefined,err:NatsError|Error|null)=>void} handler
149
149
  * @param {SubscriptionOptions} options?
150
150
  * @returns Subscription
151
151
  */
@@ -157,9 +157,9 @@ var SessionClient = /** @class */ (function (_super) {
157
157
  }
158
158
  try {
159
159
  var jsonCodec = JSONCodec();
160
- var testPlanRunEventJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
161
- var testPlanRunEvent = TestPlanRunEvent.fromJS(testPlanRunEventJs);
162
- handler(testPlanRunEvent, error);
160
+ var onTestPlanRunJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
161
+ var onTestPlanRun = OnTestPlanRun.fromJS(onTestPlanRunJs);
162
+ handler(onTestPlanRun, error);
163
163
  }
164
164
  catch (error) {
165
165
  handler(undefined, error);
@@ -218,7 +218,7 @@ var SessionClient = /** @class */ (function (_super) {
218
218
  * Connect to listen to the test step run events for the given test step and test plan run ID
219
219
  * @param {string} testPlanRunId
220
220
  * @param {string} testStepRunId
221
- * @param {(testRun:TestStepRunStatusEvent|undefined,err:NatsError|Error|null)=>void} handler
221
+ * @param {(testRun:OnTestStepRun|undefined,err:NatsError|Error|null)=>void} handler
222
222
  * @param {SubscriptionOptions} options?
223
223
  * @returns Subscription
224
224
  */
@@ -231,10 +231,10 @@ var SessionClient = /** @class */ (function (_super) {
231
231
  }
232
232
  try {
233
233
  var jsonCodec = JSONCodec();
234
- var testStepRunEventJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
235
- var testStepRunEvent = TestStepRunStatusEvent.fromJS(testStepRunEventJs);
234
+ var onTestStepRunJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
235
+ var onTestStepRun = OnTestStepRun.fromJS(onTestStepRunJs);
236
236
  var stepRunId = (_a = encodedMessage.subject.match(/\.StepRun\.(.+)$/)) === null || _a === void 0 ? void 0 : _a[1];
237
- handler(stepRunId, testStepRunEvent, error);
237
+ handler(stepRunId, onTestStepRun, error);
238
238
  }
239
239
  catch (error) {
240
240
  handler(undefined, undefined, error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.19.0-alpha.1.9",
3
+ "version": "2.19.0",
4
4
  "description": "This is the web client for the OpenTAP Runner.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",