@opentap/runner-client 2.37.0 → 2.38.0-alpha.1.18342654209

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.
@@ -1357,89 +1357,45 @@ export declare class OnTestStepRun implements IOnTestStepRun {
1357
1357
  static fromJS(data: any): OnTestStepRun;
1358
1358
  toJSON(data?: any): any;
1359
1359
  }
1360
- export interface ITestStepRunEvent {
1361
- parent?: string;
1362
- testStepId?: string;
1363
- testStepName?: string;
1364
- testStepTypeName?: string;
1365
- id?: string;
1366
- verdict?: number;
1367
- startTime?: string;
1368
- parameters?: Parameter[];
1369
- }
1370
- export declare class TestStepRunEvent implements ITestStepRunEvent {
1371
- parent?: string;
1372
- testStepId?: string;
1373
- testStepName?: string;
1374
- testStepTypeName?: string;
1375
- id?: string;
1376
- verdict?: number;
1377
- startTime?: string;
1378
- parameters?: Parameter[];
1379
- protected _discriminator: string;
1380
- constructor(data?: ITestStepRunEvent);
1381
- init(_data?: any): void;
1382
- static fromJS(data: any): TestStepRunEvent;
1383
- toJSON(data?: any): any;
1384
- }
1385
- export declare type ITestStepRunStartEventArgs = ITestStepRunEvent;
1386
- export declare class TestStepRunStartEventArgs extends TestStepRunEvent implements ITestStepRunStartEventArgs {
1387
- constructor(data?: ITestStepRunStartEventArgs);
1388
- init(_data?: any): void;
1389
- static fromJS(data: any): TestStepRunStartEventArgs;
1390
- toJSON(data?: any): any;
1391
- }
1392
- export declare type ITestStepRunCompletedEventArgs = ITestStepRunEvent;
1393
- export declare class TestStepRunCompletedEventArgs extends TestStepRunEvent implements ITestStepRunCompletedEventArgs {
1394
- constructor(data?: ITestStepRunCompletedEventArgs);
1395
- init(_data?: any): void;
1396
- static fromJS(data: any): TestStepRunCompletedEventArgs;
1397
- toJSON(data?: any): any;
1398
- }
1399
- export interface ITestPlanRunEvent {
1400
- testPlanRunId?: number;
1401
- testPlanRunGuid?: string;
1402
- path?: string;
1403
- name?: string;
1404
- verdict?: string;
1405
- startTime?: string;
1406
- runner?: string;
1407
- status?: string;
1408
- isCampaign?: boolean;
1409
- operator?: string;
1410
- }
1411
- export declare class TestPlanRunEvent implements ITestPlanRunEvent {
1412
- testPlanRunId?: number;
1360
+ export declare class TestPlanRunEvent {
1361
+ runId?: number;
1413
1362
  testPlanRunGuid?: string;
1414
- path?: string;
1415
1363
  name?: string;
1416
1364
  verdict?: string;
1417
1365
  startTime?: string;
1418
- runner?: string;
1419
1366
  status?: string;
1420
- isCampaign?: boolean;
1421
- operator?: string;
1422
- protected _discriminator: string;
1423
- constructor(data?: ITestPlanRunEvent);
1367
+ isCampaignRun?: boolean;
1368
+ projectId?: string;
1369
+ dataLocation?: string;
1370
+ operatorId?: string;
1371
+ runnerId?: string;
1372
+ runnerName?: string;
1373
+ sessionId?: string;
1374
+ imageId?: string;
1375
+ runnerVersion?: string;
1376
+ openTapVersion?: string;
1377
+ testPlanHash?: string;
1378
+ capabilities?: string;
1379
+ testPlanJson?: string;
1380
+ testPlanName?: string;
1381
+ testPlanPath?: string;
1382
+ testPlanPathId?: string;
1383
+ testPlanVersion?: string;
1384
+ constructor(data?: any);
1424
1385
  init(_data?: any): void;
1425
- static fromJS(data: any): TestPlanRunEvent;
1426
1386
  toJSON(data?: any): any;
1427
1387
  }
1428
- export declare type ITestPlanRunStartEventArgs = ITestPlanRunEvent;
1429
- export declare class TestPlanRunStartEventArgs extends TestPlanRunEvent implements ITestPlanRunStartEventArgs {
1430
- constructor(data?: ITestPlanRunStartEventArgs);
1388
+ export declare class TestPlanRunStartEvent extends TestPlanRunEvent {
1389
+ constructor(data?: any);
1431
1390
  init(_data?: any): void;
1432
- static fromJS(data: any): TestPlanRunStartEventArgs;
1391
+ static fromJS(data: any): TestPlanRunStartEvent;
1433
1392
  toJSON(data?: any): any;
1434
1393
  }
1435
- export interface ITestPlanRunCompletedEventArgs extends ITestPlanRunEvent {
1436
- durationInSeconds?: number;
1437
- }
1438
- export declare class TestPlanRunCompletedEventArgs extends TestPlanRunEvent implements ITestPlanRunCompletedEventArgs {
1439
- durationInSeconds?: number;
1440
- constructor(data?: ITestPlanRunCompletedEventArgs);
1394
+ export declare class TestPlanRunCompletedEvent extends TestPlanRunEvent {
1395
+ duration?: string;
1396
+ constructor(data?: any);
1441
1397
  init(_data?: any): void;
1442
- static fromJS(data: any): TestPlanRunCompletedEventArgs;
1398
+ static fromJS(data: any): TestPlanRunCompletedEvent;
1443
1399
  toJSON(data?: any): any;
1444
1400
  }
1445
1401
  export interface IRunnerEvent {
package/dist/cjs/DTOs.js CHANGED
@@ -17,7 +17,7 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.SessionStartInitiated = exports.SessionEventArgs = exports.SettingsTapPackage = exports.RepositorySettingsPackageDefinition = exports.RepositoryPackageDefinition = exports.RepositoryPackageReference = exports.ProfileGroup = exports.ListItemType = exports.ComponentSettings = exports.FileDescriptor = exports.Resource = exports.PluginTypeSelectorControl = exports.PictureControl = exports.PasswordControl = exports.MultiSelectControl = exports.DropdownControl = exports.EnabledControl = exports.DirectoryPathControl = exports.FilePathControl = exports.ComboBoxControl = exports.TextBoxControl = exports.DataGridControl = exports.DataGridReferenceControl = exports.CheckBoxControl = exports.AvailableValue = exports.ButtonsControl = exports.ButtonControl = exports.ExternalParameter = exports.MetaData = exports.DisplayAttribute = exports.VisualStatus = exports.UnitAttribute = exports.Icon = exports.ColumnDisplayName = exports.LayoutMode = exports.Layout = exports.Setting = exports.ComponentSettingsListItem = exports.AnnotatedObject = exports.ComponentSettingsList = exports.DisplayMode = exports.ComponentSettingsIdentifier = exports.ComponentSettingsBase = exports.Links = exports.Session = exports.ImageResolveErrorResponse = exports.NoResponderError = exports.ErrorResponse = exports.PackageSpecifier = exports.Image = void 0;
19
19
  exports.SettingsChangedEventArgs = exports.TestPlanExecutionStateChangedEventArgs = exports.TestPlanChangeEventArgs = exports.StoppedEventArgs = exports.StoppingEventArgs = exports.StartedEventArgs = exports.StartingEventArgs = exports.SessionTimeoutEventArgs = exports.SessionEventType = exports.SessionEvent = exports.MetricValue = exports.MetricsConfiguration = exports.SessionMetricInfo = exports.MetricsPollRate = exports.SessionMetricType = exports.SessionMetricKind = exports.ResultColumn = exports.Result = exports.LogEvent = exports.TestStepRun = exports.WatchDog = exports.Parameter = exports.BreakPoints = exports.InstalledFile = exports.Interaction = exports.CommonContext = exports.CommonSettings = exports.ValidationError = exports.TestStepValidationError = exports.TestStepCopy = exports.TestStepType = exports.TestStep = exports.TestPlan = exports.ExecutionState = exports.Verdict = exports.RunStatus = exports.MissingLicenseResponse = exports.LogEntry = exports.LogList = exports.ApiException = exports.ImageCreationFailed = exports.ImageCreated = exports.ImageCreating = exports.ImageEventArgs = exports.SessionInactivityLimitHit = exports.SessionShutdownFailed = exports.SessionShutdown = exports.SessionShutdownInitiated = exports.SessionStartFailed = exports.SessionStarted = void 0;
20
- exports.RunnerStatus = exports.StreamInfoStatus = exports.RemoteConnection = exports.SaveDefaultSettings = exports.AssetUpdatedEvent = exports.MetadataUpdatedEvent = exports.RunnerDeletedEvent = exports.RunnerUpdatedEvent = exports.RunnerRegisteredEvent = exports.RunnerEvent = exports.TestPlanRunCompletedEventArgs = exports.TestPlanRunStartEventArgs = exports.TestPlanRunEvent = exports.TestStepRunCompletedEventArgs = exports.TestStepRunStartEventArgs = exports.TestStepRunEvent = exports.OnTestStepRun = exports.OnTestPlanRun = exports.MetricsConfigurationChangedEventArgs = exports.HeartbeatEventArgs = exports.TestPlanSettingsChangedEventArgs = exports.UserInputRequestCompletedEventArgs = exports.UserInputRequestEventArgs = exports.BreakEventArgs = exports.TestStepChangeEventArgs = void 0;
20
+ exports.RunnerStatus = exports.StreamInfoStatus = exports.RemoteConnection = exports.SaveDefaultSettings = exports.AssetUpdatedEvent = exports.MetadataUpdatedEvent = exports.RunnerDeletedEvent = exports.RunnerUpdatedEvent = exports.RunnerRegisteredEvent = exports.RunnerEvent = exports.TestPlanRunCompletedEvent = exports.TestPlanRunStartEvent = exports.TestPlanRunEvent = exports.OnTestStepRun = exports.OnTestPlanRun = exports.MetricsConfigurationChangedEventArgs = exports.HeartbeatEventArgs = exports.TestPlanSettingsChangedEventArgs = exports.UserInputRequestCompletedEventArgs = exports.UserInputRequestEventArgs = exports.BreakEventArgs = exports.TestStepChangeEventArgs = void 0;
21
21
  var Image = /** @class */ (function () {
22
22
  function Image(data) {
23
23
  this.packages = [];
@@ -3771,13 +3771,18 @@ var OnTestStepRun = /** @class */ (function () {
3771
3771
  this.status = _data['Status'];
3772
3772
  this.stepId = _data['StepId'];
3773
3773
  this.parentRunId = _data['ParentRunId'];
3774
- this.verdict = _data['Verdict'];
3775
- this.duration = _data['Duration'];
3776
3774
  if (Array.isArray(_data['Parameters'])) {
3777
3775
  this.parameters = [];
3778
3776
  for (var _i = 0, _a = _data['Parameters']; _i < _a.length; _i++) {
3779
3777
  var item = _a[_i];
3780
- this.parameters.push(Parameter.fromJS(item));
3778
+ var parameter = Parameter.fromJS(item);
3779
+ this.parameters.push(parameter);
3780
+ if (parameter.group === '' && parameter.name === 'Verdict') {
3781
+ this.verdict = parameter.value;
3782
+ }
3783
+ if (parameter.group === '' && parameter.name === 'Duration') {
3784
+ this.duration = parameter.value;
3785
+ }
3781
3786
  }
3782
3787
  }
3783
3788
  }
@@ -3807,118 +3812,6 @@ var OnTestStepRun = /** @class */ (function () {
3807
3812
  return OnTestStepRun;
3808
3813
  }());
3809
3814
  exports.OnTestStepRun = OnTestStepRun;
3810
- var TestStepRunEvent = /** @class */ (function () {
3811
- function TestStepRunEvent(data) {
3812
- if (data) {
3813
- for (var property in data) {
3814
- if (Object.prototype.hasOwnProperty.call(data, property))
3815
- this[property] = data[property];
3816
- }
3817
- }
3818
- this._discriminator = 'TestStepRunEvent';
3819
- }
3820
- TestStepRunEvent.prototype.init = function (_data) {
3821
- if (_data) {
3822
- this.parent = _data['Parent'];
3823
- this.testStepId = _data['TestStepId'];
3824
- this.testStepName = _data['TestStepName'];
3825
- this.testStepTypeName = _data['TestStepTypeName'];
3826
- this.id = _data['Id'];
3827
- this.verdict = _data['Verdict'];
3828
- this.startTime = _data['StartTime'];
3829
- if (Array.isArray(_data['Parameters'])) {
3830
- this.parameters = [];
3831
- for (var _i = 0, _a = _data['Parameters']; _i < _a.length; _i++) {
3832
- var item = _a[_i];
3833
- this.parameters.push(Parameter.fromJS(item));
3834
- }
3835
- }
3836
- }
3837
- };
3838
- TestStepRunEvent.fromJS = function (data) {
3839
- data = typeof data === 'object' ? data : {};
3840
- if (data['discriminator'] === 'TestStepRunStartEventArgs') {
3841
- var result_41 = new TestStepRunStartEventArgs();
3842
- result_41.init(data);
3843
- return result_41;
3844
- }
3845
- if (data['discriminator'] === 'TestStepRunCompletedEventArgs') {
3846
- var result_42 = new TestStepRunCompletedEventArgs();
3847
- result_42.init(data);
3848
- return result_42;
3849
- }
3850
- var result = new TestStepRunEvent();
3851
- result.init(data);
3852
- return result;
3853
- };
3854
- TestStepRunEvent.prototype.toJSON = function (data) {
3855
- data['Parent'] = this.parent;
3856
- data['TestStepId'] = this.testStepId;
3857
- data['TestStepName'] = this.testStepName;
3858
- data['TestStepTypeName'] = this.testStepTypeName;
3859
- data['Id'] = this.id;
3860
- data['Verdict'] = this.verdict;
3861
- data['StartTime'] = this.startTime;
3862
- if (Array.isArray(this.parameters)) {
3863
- data['Parameters'] = [];
3864
- for (var _i = 0, _a = this.parameters; _i < _a.length; _i++) {
3865
- var item = _a[_i];
3866
- data['Parameters'].push(item.toJSON());
3867
- }
3868
- }
3869
- return data;
3870
- };
3871
- return TestStepRunEvent;
3872
- }());
3873
- exports.TestStepRunEvent = TestStepRunEvent;
3874
- var TestStepRunStartEventArgs = /** @class */ (function (_super) {
3875
- __extends(TestStepRunStartEventArgs, _super);
3876
- function TestStepRunStartEventArgs(data) {
3877
- var _this = _super.call(this, data) || this;
3878
- _this._discriminator = 'TestStepRunStartEventArgs';
3879
- return _this;
3880
- }
3881
- TestStepRunStartEventArgs.prototype.init = function (_data) {
3882
- _super.prototype.init.call(this, _data);
3883
- };
3884
- TestStepRunStartEventArgs.fromJS = function (data) {
3885
- data = typeof data === 'object' ? data : {};
3886
- var result = new TestStepRunStartEventArgs();
3887
- result.init(data);
3888
- return result;
3889
- };
3890
- TestStepRunStartEventArgs.prototype.toJSON = function (data) {
3891
- data = typeof data === 'object' ? data : {};
3892
- _super.prototype.toJSON.call(this, data);
3893
- return data;
3894
- };
3895
- return TestStepRunStartEventArgs;
3896
- }(TestStepRunEvent));
3897
- exports.TestStepRunStartEventArgs = TestStepRunStartEventArgs;
3898
- var TestStepRunCompletedEventArgs = /** @class */ (function (_super) {
3899
- __extends(TestStepRunCompletedEventArgs, _super);
3900
- function TestStepRunCompletedEventArgs(data) {
3901
- var _this = _super.call(this, data) || this;
3902
- _this._discriminator = 'TestStepRunCompletedEventArgs';
3903
- return _this;
3904
- }
3905
- TestStepRunCompletedEventArgs.prototype.init = function (_data) {
3906
- _super.prototype.init.call(this, _data);
3907
- };
3908
- TestStepRunCompletedEventArgs.fromJS = function (data) {
3909
- data = typeof data === 'object' ? data : {};
3910
- var result = new TestStepRunCompletedEventArgs();
3911
- result.init(data);
3912
- return result;
3913
- };
3914
- TestStepRunCompletedEventArgs.prototype.toJSON = function (data) {
3915
- data = typeof data === 'object' ? data : {};
3916
- _super.prototype.toJSON.call(this, data);
3917
- return data;
3918
- };
3919
- return TestStepRunCompletedEventArgs;
3920
- }(TestStepRunEvent));
3921
- exports.TestStepRunCompletedEventArgs = TestStepRunCompletedEventArgs;
3922
3815
  var TestPlanRunEvent = /** @class */ (function () {
3923
3816
  function TestPlanRunEvent(data) {
3924
3817
  if (data) {
@@ -3927,107 +3820,112 @@ var TestPlanRunEvent = /** @class */ (function () {
3927
3820
  this[property] = data[property];
3928
3821
  }
3929
3822
  }
3930
- this._discriminator = 'TestPlanRunEvent';
3931
3823
  }
3932
3824
  TestPlanRunEvent.prototype.init = function (_data) {
3933
3825
  if (_data) {
3934
- this.testPlanRunId = _data['Run/TestPlanRunId'];
3935
- this.testPlanRunGuid = _data['Run/TestPlanRunGuid'];
3936
- this.path = _data['Run/Path'];
3826
+ this.runId = _data['Run/Id'];
3827
+ this.testPlanRunGuid = _data['Run/Guid'];
3937
3828
  this.name = _data['Run/Name'];
3938
3829
  this.verdict = _data['Run/Verdict'];
3939
3830
  this.startTime = _data['Run/StartTime'];
3940
- this.runner = _data['Run/Runner'];
3941
3831
  this.status = _data['Run/Status'];
3942
- this.isCampaign = _data['Run/IsCampaign'];
3943
- this.operator = _data['Run/Operator'];
3944
- }
3945
- };
3946
- TestPlanRunEvent.fromJS = function (data) {
3947
- data = typeof data === 'object' ? data : {};
3948
- if (data['discriminator'] === 'TestPlanRunStartEventArgs') {
3949
- var result_43 = new TestPlanRunStartEventArgs();
3950
- result_43.init(data);
3951
- return result_43;
3952
- }
3953
- if (data['discriminator'] === 'TestPlanRunCompletedEventArgs') {
3954
- var result_44 = new TestPlanRunCompletedEventArgs();
3955
- result_44.init(data);
3956
- return result_44;
3832
+ this.isCampaignRun = _data['Run/IsCampaign'];
3833
+ this.projectId = _data['Run/Test Plan/ProjectId'];
3834
+ this.dataLocation = _data['Run/DataLocation'];
3835
+ this.operatorId = _data['Run/Operator/Id'];
3836
+ this.runnerId = _data['Run/Runner/Id'];
3837
+ this.runnerName = _data['Run/Runner/Name'];
3838
+ this.sessionId = _data['Run/Runner/Session/Id'];
3839
+ this.imageId = _data['Run/Runner/Session/ImageId'];
3840
+ this.runnerVersion = _data['Run/Version/OpenTap.Runner'];
3841
+ this.openTapVersion = _data['Run/Version/OpenTap'];
3842
+ this.testPlanHash = _data['Run/Test Plan/Hash'];
3843
+ this.capabilities = _data['Run/Capabilities'];
3844
+ this.testPlanJson = _data['Run/Test Plan/Json'];
3845
+ this.testPlanName = _data['Run/Test Plan/Name'];
3846
+ this.testPlanPath = _data['Run/Test Plan/Path'];
3847
+ this.testPlanPathId = _data['Run/Test Plan/PathId'];
3848
+ this.testPlanVersion = _data['Run/Test Plan/Version'];
3957
3849
  }
3958
- var result = new TestPlanRunEvent();
3959
- result.init(data);
3960
- return result;
3961
3850
  };
3962
3851
  TestPlanRunEvent.prototype.toJSON = function (data) {
3963
3852
  data = typeof data === 'object' ? data : {};
3964
- data['Run/TestPlanRunId'] = this.testPlanRunId;
3965
- data['Run/TestPlanRunGuid'] = this.testPlanRunGuid;
3966
- data['Run/Path'] = this.path;
3853
+ data['Run/Id'] = this.runId;
3854
+ data['Run/Guid'] = this.testPlanRunGuid;
3967
3855
  data['Run/Name'] = this.name;
3968
3856
  data['Run/Verdict'] = this.verdict;
3969
3857
  data['Run/StartTime'] = this.startTime;
3970
- data['Run/Runner'] = this.runner;
3971
3858
  data['Run/Status'] = this.status;
3972
- data['Run/IsCampaign'] = this.isCampaign;
3973
- data['Run/Operator'] = this.operator;
3859
+ data['Run/IsCampaign'] = this.isCampaignRun;
3860
+ data['Run/Test Plan/ProjectId'] = this.projectId;
3861
+ data['Run/DataLocation'] = this.dataLocation;
3862
+ data['Run/Operator/Id'] = this.operatorId;
3863
+ data['Run/Runner/Id'] = this.runnerId;
3864
+ data['Run/Runner/Name'] = this.runnerName;
3865
+ data['Run/Runner/Session/Id'] = this.sessionId;
3866
+ data['Run/Runner/Session/ImageId'] = this.imageId;
3867
+ data['Run/Version/OpenTap.Runner'] = this.runnerVersion;
3868
+ data['Run/Version/OpenTap'] = this.openTapVersion;
3869
+ data['Run/Test Plan/Hash'] = this.testPlanHash;
3870
+ data['Run/Capabilities'] = this.capabilities;
3871
+ data['Run/Test Plan/Json'] = this.testPlanJson;
3872
+ data['Run/Test Plan/Name'] = this.testPlanName;
3873
+ data['Run/Test Plan/Path'] = this.testPlanPath;
3874
+ data['Run/Test Plan/PathId'] = this.testPlanPathId;
3875
+ data['Run/Test Plan/Version'] = this.testPlanVersion;
3974
3876
  return data;
3975
3877
  };
3976
3878
  return TestPlanRunEvent;
3977
3879
  }());
3978
3880
  exports.TestPlanRunEvent = TestPlanRunEvent;
3979
- var TestPlanRunStartEventArgs = /** @class */ (function (_super) {
3980
- __extends(TestPlanRunStartEventArgs, _super);
3981
- function TestPlanRunStartEventArgs(data) {
3982
- var _this = _super.call(this, data) || this;
3983
- _this._discriminator = 'TestPlanRunStartEventArgs';
3984
- return _this;
3881
+ var TestPlanRunStartEvent = /** @class */ (function (_super) {
3882
+ __extends(TestPlanRunStartEvent, _super);
3883
+ function TestPlanRunStartEvent(data) {
3884
+ return _super.call(this, data) || this;
3985
3885
  }
3986
- TestPlanRunStartEventArgs.prototype.init = function (_data) {
3886
+ TestPlanRunStartEvent.prototype.init = function (_data) {
3987
3887
  _super.prototype.init.call(this, _data);
3988
3888
  };
3989
- TestPlanRunStartEventArgs.fromJS = function (data) {
3889
+ TestPlanRunStartEvent.fromJS = function (data) {
3990
3890
  data = typeof data === 'object' ? data : {};
3991
- var result = new TestPlanRunStartEventArgs();
3891
+ var result = new TestPlanRunStartEvent();
3992
3892
  result.init(data);
3993
3893
  return result;
3994
3894
  };
3995
- TestPlanRunStartEventArgs.prototype.toJSON = function (data) {
3895
+ TestPlanRunStartEvent.prototype.toJSON = function (data) {
3996
3896
  data = typeof data === 'object' ? data : {};
3997
3897
  _super.prototype.toJSON.call(this, data);
3998
3898
  return data;
3999
3899
  };
4000
- return TestPlanRunStartEventArgs;
3900
+ return TestPlanRunStartEvent;
4001
3901
  }(TestPlanRunEvent));
4002
- exports.TestPlanRunStartEventArgs = TestPlanRunStartEventArgs;
4003
- var TestPlanRunCompletedEventArgs = /** @class */ (function (_super) {
4004
- __extends(TestPlanRunCompletedEventArgs, _super);
4005
- function TestPlanRunCompletedEventArgs(data) {
4006
- var _this = _super.call(this, data) || this;
4007
- _this._discriminator = 'TestPlanRunCompletedEventArgs';
4008
- return _this;
3902
+ exports.TestPlanRunStartEvent = TestPlanRunStartEvent;
3903
+ var TestPlanRunCompletedEvent = /** @class */ (function (_super) {
3904
+ __extends(TestPlanRunCompletedEvent, _super);
3905
+ function TestPlanRunCompletedEvent(data) {
3906
+ return _super.call(this, data) || this;
4009
3907
  }
4010
- TestPlanRunCompletedEventArgs.prototype.init = function (_data) {
3908
+ TestPlanRunCompletedEvent.prototype.init = function (_data) {
4011
3909
  _super.prototype.init.call(this, _data);
4012
3910
  if (_data) {
4013
- this.durationInSeconds = _data['Run/DurationInSeconds'];
3911
+ this.duration = _data['Run/Duration'];
4014
3912
  }
4015
3913
  };
4016
- TestPlanRunCompletedEventArgs.fromJS = function (data) {
3914
+ TestPlanRunCompletedEvent.fromJS = function (data) {
4017
3915
  data = typeof data === 'object' ? data : {};
4018
- var result = new TestPlanRunCompletedEventArgs();
3916
+ var result = new TestPlanRunCompletedEvent();
4019
3917
  result.init(data);
4020
3918
  return result;
4021
3919
  };
4022
- TestPlanRunCompletedEventArgs.prototype.toJSON = function (data) {
3920
+ TestPlanRunCompletedEvent.prototype.toJSON = function (data) {
4023
3921
  data = typeof data === 'object' ? data : {};
4024
- data['Run/DurationInSeconds'] = this.durationInSeconds;
3922
+ data['Run/Duration'] = this.duration;
4025
3923
  _super.prototype.toJSON.call(this, data);
4026
3924
  return data;
4027
3925
  };
4028
- return TestPlanRunCompletedEventArgs;
3926
+ return TestPlanRunCompletedEvent;
4029
3927
  }(TestPlanRunEvent));
4030
- exports.TestPlanRunCompletedEventArgs = TestPlanRunCompletedEventArgs;
3928
+ exports.TestPlanRunCompletedEvent = TestPlanRunCompletedEvent;
4031
3929
  var RunnerEvent = /** @class */ (function () {
4032
3930
  function RunnerEvent(data) {
4033
3931
  if (data) {
@@ -4046,19 +3944,19 @@ var RunnerEvent = /** @class */ (function () {
4046
3944
  RunnerEvent.fromJS = function (data) {
4047
3945
  data = typeof data === 'object' ? data : {};
4048
3946
  if (data['type'] === 'RunnerRegisteredEvent') {
4049
- var result_45 = new RunnerRegisteredEvent();
4050
- result_45.init(data);
4051
- return result_45;
3947
+ var result_41 = new RunnerRegisteredEvent();
3948
+ result_41.init(data);
3949
+ return result_41;
4052
3950
  }
4053
3951
  if (data['type'] === 'RunnerUpdatedEvent') {
4054
- var result_46 = new RunnerUpdatedEvent();
4055
- result_46.init(data);
4056
- return result_46;
3952
+ var result_42 = new RunnerUpdatedEvent();
3953
+ result_42.init(data);
3954
+ return result_42;
4057
3955
  }
4058
3956
  if (data['type'] === 'RunnerDeletedEvent') {
4059
- var result_47 = new RunnerDeletedEvent();
4060
- result_47.init(data);
4061
- return result_47;
3957
+ var result_43 = new RunnerDeletedEvent();
3958
+ result_43.init(data);
3959
+ return result_43;
4062
3960
  }
4063
3961
  var result = new RunnerEvent();
4064
3962
  result.init(data);
@@ -1,5 +1,5 @@
1
+ import { AssetUpdatedEvent, ErrorResponse, RunnerEvent, TestPlanRunCompletedEvent, TestPlanRunStartEvent } from './DTOs';
1
2
  import { ConnectionOptions, Subscription, SubscriptionOptions } from 'nats.ws';
2
- import { ErrorResponse, RunnerEvent, TestPlanRunCompletedEventArgs, TestPlanRunStartEventArgs, TestStepRunCompletedEventArgs, TestStepRunStartEventArgs, AssetUpdatedEvent } from './DTOs';
3
3
  import { BaseClient } from './BaseClient';
4
4
  export interface RunnerLifetimeEvent {
5
5
  RunnerId: string;
@@ -23,24 +23,6 @@ export declare class SystemClient extends BaseClient {
23
23
  * @param {SubscriptionOptions} options?
24
24
  */
25
25
  subscribeRunnerUpdatedEvents(runnerId: string, listener: (error: ErrorResponse | null, message: RunnerEvent | null) => void, options?: SubscriptionOptions): Subscription;
26
- /**
27
- * Subscribe to the test step run start events for the given Runner and Run ID.
28
- * Wildcard can be used for the Runner or Run ID to receive all test step run start events.
29
- * @param {string} runnerId
30
- * @param {string} runId
31
- * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
32
- * @param {SubscriptionOptions} options?
33
- */
34
- subscribeTestStepRunStartEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestStepRunStartEventArgs | null) => void, options?: SubscriptionOptions): Subscription;
35
- /**
36
- * Subscribe to the test step run completed events for the given Runner and Run ID.
37
- * Wildcard can be used for the Runner or Run ID to receive all test step run completed events.
38
- * @param {string} runnerId
39
- * @param {string} runId
40
- * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
41
- * @param {SubscriptionOptions} options?
42
- */
43
- subscribeTestStepRunCompletedEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestStepRunCompletedEventArgs | null) => void, options?: SubscriptionOptions): Subscription;
44
26
  /**
45
27
  * Subscribe to the test plan run start events for the given Runner and Run ID.
46
28
  * Wildcard can be used for the Runner or Run ID to receive all test plan run start events.
@@ -49,7 +31,7 @@ export declare class SystemClient extends BaseClient {
49
31
  * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
50
32
  * @param {SubscriptionOptions} options?
51
33
  */
52
- subscribeTestPlanRunStartEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestPlanRunStartEventArgs | null) => void, options?: SubscriptionOptions): Subscription;
34
+ subscribeTestPlanRunStartEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestPlanRunStartEvent | null) => void, options?: SubscriptionOptions): Subscription;
53
35
  /**
54
36
  * Subscribe to the test plan run completed events for the given Runner and Run ID.
55
37
  * Wildcard can be used for the Runner or Run ID to receive all test plan run completed events.
@@ -58,7 +40,7 @@ export declare class SystemClient extends BaseClient {
58
40
  * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
59
41
  * @param {SubscriptionOptions} options?
60
42
  */
61
- subscribeTestPlanRunCompletedEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestPlanRunCompletedEventArgs | null) => void, options?: SubscriptionOptions): Subscription;
43
+ subscribeTestPlanRunCompletedEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestPlanRunCompletedEvent | null) => void, options?: SubscriptionOptions): Subscription;
62
44
  /**
63
45
  * Subscribe to the asset update events for the given Runner ID.
64
46
  * Wildcard can be used to receive all asset update events.
@@ -27,8 +27,8 @@ var __assign = (this && this.__assign) || function () {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SystemClient = void 0;
30
- var nats_ws_1 = require("nats.ws");
31
30
  var DTOs_1 = require("./DTOs");
31
+ var nats_ws_1 = require("nats.ws");
32
32
  var BaseClient_1 = require("./BaseClient");
33
33
  var SystemClient = /** @class */ (function (_super) {
34
34
  __extends(SystemClient, _super);
@@ -84,60 +84,6 @@ var SystemClient = /** @class */ (function (_super) {
84
84
  }
85
85
  } }));
86
86
  };
87
- /**
88
- * Subscribe to the test step run start events for the given Runner and Run ID.
89
- * Wildcard can be used for the Runner or Run ID to receive all test step run start events.
90
- * @param {string} runnerId
91
- * @param {string} runId
92
- * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
93
- * @param {SubscriptionOptions} options?
94
- */
95
- SystemClient.prototype.subscribeTestStepRunStartEventListener = function (runnerId, runId, listener, options) {
96
- var _this = this;
97
- var subject = "Runner.".concat(runnerId, ".Runs.").concat(runId, ".Events.TestStepRunStart");
98
- return this.subscribe(subject, __assign(__assign({}, options), { callback: function (error, message) {
99
- if (error) {
100
- listener(_this.natsErrorHandler(error, subject), null);
101
- return;
102
- }
103
- try {
104
- var jsonCodec = (0, nats_ws_1.JSONCodec)();
105
- var testStepRunStartEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
106
- var testStepRunStartEventArgs = DTOs_1.TestStepRunStartEventArgs.fromJS(testStepRunStartEventArgsJs);
107
- listener(null, testStepRunStartEventArgs);
108
- }
109
- catch (error) {
110
- listener(_this.natsErrorHandler(error, subject), null);
111
- }
112
- } }));
113
- };
114
- /**
115
- * Subscribe to the test step run completed events for the given Runner and Run ID.
116
- * Wildcard can be used for the Runner or Run ID to receive all test step run completed events.
117
- * @param {string} runnerId
118
- * @param {string} runId
119
- * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
120
- * @param {SubscriptionOptions} options?
121
- */
122
- SystemClient.prototype.subscribeTestStepRunCompletedEventListener = function (runnerId, runId, listener, options) {
123
- var _this = this;
124
- var subject = "Runner.".concat(runnerId, ".Runs.").concat(runId, ".Events.TestStepRunCompleted");
125
- return this.subscribe(subject, __assign(__assign({}, options), { callback: function (error, message) {
126
- if (error) {
127
- listener(_this.natsErrorHandler(error, subject), null);
128
- return;
129
- }
130
- try {
131
- var jsonCodec = (0, nats_ws_1.JSONCodec)();
132
- var testStepRunCompletedEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
133
- var testStepRunCompletedEventArgs = DTOs_1.TestStepRunCompletedEventArgs.fromJS(testStepRunCompletedEventArgsJs);
134
- listener(null, testStepRunCompletedEventArgs);
135
- }
136
- catch (error) {
137
- listener(_this.natsErrorHandler(error, subject), null);
138
- }
139
- } }));
140
- };
141
87
  /**
142
88
  * Subscribe to the test plan run start events for the given Runner and Run ID.
143
89
  * Wildcard can be used for the Runner or Run ID to receive all test plan run start events.
@@ -156,8 +102,8 @@ var SystemClient = /** @class */ (function (_super) {
156
102
  }
157
103
  try {
158
104
  var jsonCodec = (0, nats_ws_1.JSONCodec)();
159
- var testPlanRunStartEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
160
- var testPlanRunStartEventArgs = DTOs_1.TestPlanRunStartEventArgs.fromJS(testPlanRunStartEventArgsJs);
105
+ var eventJson = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
106
+ var testPlanRunStartEventArgs = DTOs_1.TestPlanRunStartEvent.fromJS(eventJson);
161
107
  listener(null, testPlanRunStartEventArgs);
162
108
  }
163
109
  catch (error) {
@@ -183,8 +129,8 @@ var SystemClient = /** @class */ (function (_super) {
183
129
  }
184
130
  try {
185
131
  var jsonCodec = (0, nats_ws_1.JSONCodec)();
186
- var testPlanRunCompletedEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
187
- var testPlanRunCompletedEventArgs = DTOs_1.TestPlanRunCompletedEventArgs.fromJS(testPlanRunCompletedEventArgsJs);
132
+ var eventJson = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
133
+ var testPlanRunCompletedEventArgs = DTOs_1.TestPlanRunCompletedEvent.fromJS(eventJson);
188
134
  listener(null, testPlanRunCompletedEventArgs);
189
135
  }
190
136
  catch (error) {
@@ -1357,89 +1357,45 @@ export declare class OnTestStepRun implements IOnTestStepRun {
1357
1357
  static fromJS(data: any): OnTestStepRun;
1358
1358
  toJSON(data?: any): any;
1359
1359
  }
1360
- export interface ITestStepRunEvent {
1361
- parent?: string;
1362
- testStepId?: string;
1363
- testStepName?: string;
1364
- testStepTypeName?: string;
1365
- id?: string;
1366
- verdict?: number;
1367
- startTime?: string;
1368
- parameters?: Parameter[];
1369
- }
1370
- export declare class TestStepRunEvent implements ITestStepRunEvent {
1371
- parent?: string;
1372
- testStepId?: string;
1373
- testStepName?: string;
1374
- testStepTypeName?: string;
1375
- id?: string;
1376
- verdict?: number;
1377
- startTime?: string;
1378
- parameters?: Parameter[];
1379
- protected _discriminator: string;
1380
- constructor(data?: ITestStepRunEvent);
1381
- init(_data?: any): void;
1382
- static fromJS(data: any): TestStepRunEvent;
1383
- toJSON(data?: any): any;
1384
- }
1385
- export declare type ITestStepRunStartEventArgs = ITestStepRunEvent;
1386
- export declare class TestStepRunStartEventArgs extends TestStepRunEvent implements ITestStepRunStartEventArgs {
1387
- constructor(data?: ITestStepRunStartEventArgs);
1388
- init(_data?: any): void;
1389
- static fromJS(data: any): TestStepRunStartEventArgs;
1390
- toJSON(data?: any): any;
1391
- }
1392
- export declare type ITestStepRunCompletedEventArgs = ITestStepRunEvent;
1393
- export declare class TestStepRunCompletedEventArgs extends TestStepRunEvent implements ITestStepRunCompletedEventArgs {
1394
- constructor(data?: ITestStepRunCompletedEventArgs);
1395
- init(_data?: any): void;
1396
- static fromJS(data: any): TestStepRunCompletedEventArgs;
1397
- toJSON(data?: any): any;
1398
- }
1399
- export interface ITestPlanRunEvent {
1400
- testPlanRunId?: number;
1401
- testPlanRunGuid?: string;
1402
- path?: string;
1403
- name?: string;
1404
- verdict?: string;
1405
- startTime?: string;
1406
- runner?: string;
1407
- status?: string;
1408
- isCampaign?: boolean;
1409
- operator?: string;
1410
- }
1411
- export declare class TestPlanRunEvent implements ITestPlanRunEvent {
1412
- testPlanRunId?: number;
1360
+ export declare class TestPlanRunEvent {
1361
+ runId?: number;
1413
1362
  testPlanRunGuid?: string;
1414
- path?: string;
1415
1363
  name?: string;
1416
1364
  verdict?: string;
1417
1365
  startTime?: string;
1418
- runner?: string;
1419
1366
  status?: string;
1420
- isCampaign?: boolean;
1421
- operator?: string;
1422
- protected _discriminator: string;
1423
- constructor(data?: ITestPlanRunEvent);
1367
+ isCampaignRun?: boolean;
1368
+ projectId?: string;
1369
+ dataLocation?: string;
1370
+ operatorId?: string;
1371
+ runnerId?: string;
1372
+ runnerName?: string;
1373
+ sessionId?: string;
1374
+ imageId?: string;
1375
+ runnerVersion?: string;
1376
+ openTapVersion?: string;
1377
+ testPlanHash?: string;
1378
+ capabilities?: string;
1379
+ testPlanJson?: string;
1380
+ testPlanName?: string;
1381
+ testPlanPath?: string;
1382
+ testPlanPathId?: string;
1383
+ testPlanVersion?: string;
1384
+ constructor(data?: any);
1424
1385
  init(_data?: any): void;
1425
- static fromJS(data: any): TestPlanRunEvent;
1426
1386
  toJSON(data?: any): any;
1427
1387
  }
1428
- export declare type ITestPlanRunStartEventArgs = ITestPlanRunEvent;
1429
- export declare class TestPlanRunStartEventArgs extends TestPlanRunEvent implements ITestPlanRunStartEventArgs {
1430
- constructor(data?: ITestPlanRunStartEventArgs);
1388
+ export declare class TestPlanRunStartEvent extends TestPlanRunEvent {
1389
+ constructor(data?: any);
1431
1390
  init(_data?: any): void;
1432
- static fromJS(data: any): TestPlanRunStartEventArgs;
1391
+ static fromJS(data: any): TestPlanRunStartEvent;
1433
1392
  toJSON(data?: any): any;
1434
1393
  }
1435
- export interface ITestPlanRunCompletedEventArgs extends ITestPlanRunEvent {
1436
- durationInSeconds?: number;
1437
- }
1438
- export declare class TestPlanRunCompletedEventArgs extends TestPlanRunEvent implements ITestPlanRunCompletedEventArgs {
1439
- durationInSeconds?: number;
1440
- constructor(data?: ITestPlanRunCompletedEventArgs);
1394
+ export declare class TestPlanRunCompletedEvent extends TestPlanRunEvent {
1395
+ duration?: string;
1396
+ constructor(data?: any);
1441
1397
  init(_data?: any): void;
1442
- static fromJS(data: any): TestPlanRunCompletedEventArgs;
1398
+ static fromJS(data: any): TestPlanRunCompletedEvent;
1443
1399
  toJSON(data?: any): any;
1444
1400
  }
1445
1401
  export interface IRunnerEvent {
package/dist/mjs/DTOs.js CHANGED
@@ -3308,12 +3308,18 @@ export class OnTestStepRun {
3308
3308
  this.status = _data['Status'];
3309
3309
  this.stepId = _data['StepId'];
3310
3310
  this.parentRunId = _data['ParentRunId'];
3311
- this.verdict = _data['Verdict'];
3312
- this.duration = _data['Duration'];
3313
3311
  if (Array.isArray(_data['Parameters'])) {
3314
3312
  this.parameters = [];
3315
- for (const item of _data['Parameters'])
3316
- this.parameters.push(Parameter.fromJS(item));
3313
+ for (const item of _data['Parameters']) {
3314
+ const parameter = Parameter.fromJS(item);
3315
+ this.parameters.push(parameter);
3316
+ if (parameter.group === '' && parameter.name === 'Verdict') {
3317
+ this.verdict = parameter.value;
3318
+ }
3319
+ if (parameter.group === '' && parameter.name === 'Duration') {
3320
+ this.duration = parameter.value;
3321
+ }
3322
+ }
3317
3323
  }
3318
3324
  }
3319
3325
  }
@@ -3338,104 +3344,6 @@ export class OnTestStepRun {
3338
3344
  return data;
3339
3345
  }
3340
3346
  }
3341
- export class TestStepRunEvent {
3342
- constructor(data) {
3343
- if (data) {
3344
- for (const property in data) {
3345
- if (Object.prototype.hasOwnProperty.call(data, property))
3346
- this[property] = data[property];
3347
- }
3348
- }
3349
- this._discriminator = 'TestStepRunEvent';
3350
- }
3351
- init(_data) {
3352
- if (_data) {
3353
- this.parent = _data['Parent'];
3354
- this.testStepId = _data['TestStepId'];
3355
- this.testStepName = _data['TestStepName'];
3356
- this.testStepTypeName = _data['TestStepTypeName'];
3357
- this.id = _data['Id'];
3358
- this.verdict = _data['Verdict'];
3359
- this.startTime = _data['StartTime'];
3360
- if (Array.isArray(_data['Parameters'])) {
3361
- this.parameters = [];
3362
- for (const item of _data['Parameters'])
3363
- this.parameters.push(Parameter.fromJS(item));
3364
- }
3365
- }
3366
- }
3367
- static fromJS(data) {
3368
- data = typeof data === 'object' ? data : {};
3369
- if (data['discriminator'] === 'TestStepRunStartEventArgs') {
3370
- const result = new TestStepRunStartEventArgs();
3371
- result.init(data);
3372
- return result;
3373
- }
3374
- if (data['discriminator'] === 'TestStepRunCompletedEventArgs') {
3375
- const result = new TestStepRunCompletedEventArgs();
3376
- result.init(data);
3377
- return result;
3378
- }
3379
- const result = new TestStepRunEvent();
3380
- result.init(data);
3381
- return result;
3382
- }
3383
- toJSON(data) {
3384
- data['Parent'] = this.parent;
3385
- data['TestStepId'] = this.testStepId;
3386
- data['TestStepName'] = this.testStepName;
3387
- data['TestStepTypeName'] = this.testStepTypeName;
3388
- data['Id'] = this.id;
3389
- data['Verdict'] = this.verdict;
3390
- data['StartTime'] = this.startTime;
3391
- if (Array.isArray(this.parameters)) {
3392
- data['Parameters'] = [];
3393
- for (const item of this.parameters)
3394
- data['Parameters'].push(item.toJSON());
3395
- }
3396
- return data;
3397
- }
3398
- }
3399
- export class TestStepRunStartEventArgs extends TestStepRunEvent {
3400
- constructor(data) {
3401
- super(data);
3402
- this._discriminator = 'TestStepRunStartEventArgs';
3403
- }
3404
- init(_data) {
3405
- super.init(_data);
3406
- }
3407
- static fromJS(data) {
3408
- data = typeof data === 'object' ? data : {};
3409
- const result = new TestStepRunStartEventArgs();
3410
- result.init(data);
3411
- return result;
3412
- }
3413
- toJSON(data) {
3414
- data = typeof data === 'object' ? data : {};
3415
- super.toJSON(data);
3416
- return data;
3417
- }
3418
- }
3419
- export class TestStepRunCompletedEventArgs extends TestStepRunEvent {
3420
- constructor(data) {
3421
- super(data);
3422
- this._discriminator = 'TestStepRunCompletedEventArgs';
3423
- }
3424
- init(_data) {
3425
- super.init(_data);
3426
- }
3427
- static fromJS(data) {
3428
- data = typeof data === 'object' ? data : {};
3429
- const result = new TestStepRunCompletedEventArgs();
3430
- result.init(data);
3431
- return result;
3432
- }
3433
- toJSON(data) {
3434
- data = typeof data === 'object' ? data : {};
3435
- super.toJSON(data);
3436
- return data;
3437
- }
3438
- }
3439
3347
  export class TestPlanRunEvent {
3440
3348
  constructor(data) {
3441
3349
  if (data) {
@@ -3444,64 +3352,72 @@ export class TestPlanRunEvent {
3444
3352
  this[property] = data[property];
3445
3353
  }
3446
3354
  }
3447
- this._discriminator = 'TestPlanRunEvent';
3448
3355
  }
3449
3356
  init(_data) {
3450
3357
  if (_data) {
3451
- this.testPlanRunId = _data['Run/TestPlanRunId'];
3452
- this.testPlanRunGuid = _data['Run/TestPlanRunGuid'];
3453
- this.path = _data['Run/Path'];
3358
+ this.runId = _data['Run/Id'];
3359
+ this.testPlanRunGuid = _data['Run/Guid'];
3454
3360
  this.name = _data['Run/Name'];
3455
3361
  this.verdict = _data['Run/Verdict'];
3456
3362
  this.startTime = _data['Run/StartTime'];
3457
- this.runner = _data['Run/Runner'];
3458
3363
  this.status = _data['Run/Status'];
3459
- this.isCampaign = _data['Run/IsCampaign'];
3460
- this.operator = _data['Run/Operator'];
3461
- }
3462
- }
3463
- static fromJS(data) {
3464
- data = typeof data === 'object' ? data : {};
3465
- if (data['discriminator'] === 'TestPlanRunStartEventArgs') {
3466
- const result = new TestPlanRunStartEventArgs();
3467
- result.init(data);
3468
- return result;
3469
- }
3470
- if (data['discriminator'] === 'TestPlanRunCompletedEventArgs') {
3471
- const result = new TestPlanRunCompletedEventArgs();
3472
- result.init(data);
3473
- return result;
3474
- }
3475
- const result = new TestPlanRunEvent();
3476
- result.init(data);
3477
- return result;
3478
- }
3479
- toJSON(data) {
3480
- data = typeof data === 'object' ? data : {};
3481
- data['Run/TestPlanRunId'] = this.testPlanRunId;
3482
- data['Run/TestPlanRunGuid'] = this.testPlanRunGuid;
3483
- data['Run/Path'] = this.path;
3364
+ this.isCampaignRun = _data['Run/IsCampaign'];
3365
+ this.projectId = _data['Run/Test Plan/ProjectId'];
3366
+ this.dataLocation = _data['Run/DataLocation'];
3367
+ this.operatorId = _data['Run/Operator/Id'];
3368
+ this.runnerId = _data['Run/Runner/Id'];
3369
+ this.runnerName = _data['Run/Runner/Name'];
3370
+ this.sessionId = _data['Run/Runner/Session/Id'];
3371
+ this.imageId = _data['Run/Runner/Session/ImageId'];
3372
+ this.runnerVersion = _data['Run/Version/OpenTap.Runner'];
3373
+ this.openTapVersion = _data['Run/Version/OpenTap'];
3374
+ this.testPlanHash = _data['Run/Test Plan/Hash'];
3375
+ this.capabilities = _data['Run/Capabilities'];
3376
+ this.testPlanJson = _data['Run/Test Plan/Json'];
3377
+ this.testPlanName = _data['Run/Test Plan/Name'];
3378
+ this.testPlanPath = _data['Run/Test Plan/Path'];
3379
+ this.testPlanPathId = _data['Run/Test Plan/PathId'];
3380
+ this.testPlanVersion = _data['Run/Test Plan/Version'];
3381
+ }
3382
+ }
3383
+ toJSON(data) {
3384
+ data = typeof data === 'object' ? data : {};
3385
+ data['Run/Id'] = this.runId;
3386
+ data['Run/Guid'] = this.testPlanRunGuid;
3484
3387
  data['Run/Name'] = this.name;
3485
3388
  data['Run/Verdict'] = this.verdict;
3486
3389
  data['Run/StartTime'] = this.startTime;
3487
- data['Run/Runner'] = this.runner;
3488
3390
  data['Run/Status'] = this.status;
3489
- data['Run/IsCampaign'] = this.isCampaign;
3490
- data['Run/Operator'] = this.operator;
3491
- return data;
3492
- }
3493
- }
3494
- export class TestPlanRunStartEventArgs extends TestPlanRunEvent {
3391
+ data['Run/IsCampaign'] = this.isCampaignRun;
3392
+ data['Run/Test Plan/ProjectId'] = this.projectId;
3393
+ data['Run/DataLocation'] = this.dataLocation;
3394
+ data['Run/Operator/Id'] = this.operatorId;
3395
+ data['Run/Runner/Id'] = this.runnerId;
3396
+ data['Run/Runner/Name'] = this.runnerName;
3397
+ data['Run/Runner/Session/Id'] = this.sessionId;
3398
+ data['Run/Runner/Session/ImageId'] = this.imageId;
3399
+ data['Run/Version/OpenTap.Runner'] = this.runnerVersion;
3400
+ data['Run/Version/OpenTap'] = this.openTapVersion;
3401
+ data['Run/Test Plan/Hash'] = this.testPlanHash;
3402
+ data['Run/Capabilities'] = this.capabilities;
3403
+ data['Run/Test Plan/Json'] = this.testPlanJson;
3404
+ data['Run/Test Plan/Name'] = this.testPlanName;
3405
+ data['Run/Test Plan/Path'] = this.testPlanPath;
3406
+ data['Run/Test Plan/PathId'] = this.testPlanPathId;
3407
+ data['Run/Test Plan/Version'] = this.testPlanVersion;
3408
+ return data;
3409
+ }
3410
+ }
3411
+ export class TestPlanRunStartEvent extends TestPlanRunEvent {
3495
3412
  constructor(data) {
3496
3413
  super(data);
3497
- this._discriminator = 'TestPlanRunStartEventArgs';
3498
3414
  }
3499
3415
  init(_data) {
3500
3416
  super.init(_data);
3501
3417
  }
3502
3418
  static fromJS(data) {
3503
3419
  data = typeof data === 'object' ? data : {};
3504
- const result = new TestPlanRunStartEventArgs();
3420
+ const result = new TestPlanRunStartEvent();
3505
3421
  result.init(data);
3506
3422
  return result;
3507
3423
  }
@@ -3511,26 +3427,25 @@ export class TestPlanRunStartEventArgs extends TestPlanRunEvent {
3511
3427
  return data;
3512
3428
  }
3513
3429
  }
3514
- export class TestPlanRunCompletedEventArgs extends TestPlanRunEvent {
3430
+ export class TestPlanRunCompletedEvent extends TestPlanRunEvent {
3515
3431
  constructor(data) {
3516
3432
  super(data);
3517
- this._discriminator = 'TestPlanRunCompletedEventArgs';
3518
3433
  }
3519
3434
  init(_data) {
3520
3435
  super.init(_data);
3521
3436
  if (_data) {
3522
- this.durationInSeconds = _data['Run/DurationInSeconds'];
3437
+ this.duration = _data['Run/Duration'];
3523
3438
  }
3524
3439
  }
3525
3440
  static fromJS(data) {
3526
3441
  data = typeof data === 'object' ? data : {};
3527
- const result = new TestPlanRunCompletedEventArgs();
3442
+ const result = new TestPlanRunCompletedEvent();
3528
3443
  result.init(data);
3529
3444
  return result;
3530
3445
  }
3531
3446
  toJSON(data) {
3532
3447
  data = typeof data === 'object' ? data : {};
3533
- data['Run/DurationInSeconds'] = this.durationInSeconds;
3448
+ data['Run/Duration'] = this.duration;
3534
3449
  super.toJSON(data);
3535
3450
  return data;
3536
3451
  }
@@ -1,5 +1,5 @@
1
+ import { AssetUpdatedEvent, ErrorResponse, RunnerEvent, TestPlanRunCompletedEvent, TestPlanRunStartEvent } from './DTOs';
1
2
  import { ConnectionOptions, Subscription, SubscriptionOptions } from 'nats.ws';
2
- import { ErrorResponse, RunnerEvent, TestPlanRunCompletedEventArgs, TestPlanRunStartEventArgs, TestStepRunCompletedEventArgs, TestStepRunStartEventArgs, AssetUpdatedEvent } from './DTOs';
3
3
  import { BaseClient } from './BaseClient';
4
4
  export interface RunnerLifetimeEvent {
5
5
  RunnerId: string;
@@ -23,24 +23,6 @@ export declare class SystemClient extends BaseClient {
23
23
  * @param {SubscriptionOptions} options?
24
24
  */
25
25
  subscribeRunnerUpdatedEvents(runnerId: string, listener: (error: ErrorResponse | null, message: RunnerEvent | null) => void, options?: SubscriptionOptions): Subscription;
26
- /**
27
- * Subscribe to the test step run start events for the given Runner and Run ID.
28
- * Wildcard can be used for the Runner or Run ID to receive all test step run start events.
29
- * @param {string} runnerId
30
- * @param {string} runId
31
- * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
32
- * @param {SubscriptionOptions} options?
33
- */
34
- subscribeTestStepRunStartEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestStepRunStartEventArgs | null) => void, options?: SubscriptionOptions): Subscription;
35
- /**
36
- * Subscribe to the test step run completed events for the given Runner and Run ID.
37
- * Wildcard can be used for the Runner or Run ID to receive all test step run completed events.
38
- * @param {string} runnerId
39
- * @param {string} runId
40
- * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
41
- * @param {SubscriptionOptions} options?
42
- */
43
- subscribeTestStepRunCompletedEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestStepRunCompletedEventArgs | null) => void, options?: SubscriptionOptions): Subscription;
44
26
  /**
45
27
  * Subscribe to the test plan run start events for the given Runner and Run ID.
46
28
  * Wildcard can be used for the Runner or Run ID to receive all test plan run start events.
@@ -49,7 +31,7 @@ export declare class SystemClient extends BaseClient {
49
31
  * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
50
32
  * @param {SubscriptionOptions} options?
51
33
  */
52
- subscribeTestPlanRunStartEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestPlanRunStartEventArgs | null) => void, options?: SubscriptionOptions): Subscription;
34
+ subscribeTestPlanRunStartEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestPlanRunStartEvent | null) => void, options?: SubscriptionOptions): Subscription;
53
35
  /**
54
36
  * Subscribe to the test plan run completed events for the given Runner and Run ID.
55
37
  * Wildcard can be used for the Runner or Run ID to receive all test plan run completed events.
@@ -58,7 +40,7 @@ export declare class SystemClient extends BaseClient {
58
40
  * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
59
41
  * @param {SubscriptionOptions} options?
60
42
  */
61
- subscribeTestPlanRunCompletedEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestPlanRunCompletedEventArgs | null) => void, options?: SubscriptionOptions): Subscription;
43
+ subscribeTestPlanRunCompletedEventListener(runnerId: string, runId: string, listener: (error: ErrorResponse | null, message: TestPlanRunCompletedEvent | null) => void, options?: SubscriptionOptions): Subscription;
62
44
  /**
63
45
  * Subscribe to the asset update events for the given Runner ID.
64
46
  * Wildcard can be used to receive all asset update events.
@@ -1,5 +1,5 @@
1
+ import { AssetUpdatedEvent, RunnerEvent, TestPlanRunCompletedEvent, TestPlanRunStartEvent } from './DTOs';
1
2
  import { JSONCodec } from 'nats.ws';
2
- import { RunnerEvent, TestPlanRunCompletedEventArgs, TestPlanRunStartEventArgs, TestStepRunCompletedEventArgs, TestStepRunStartEventArgs, AssetUpdatedEvent, } from './DTOs';
3
3
  import { BaseClient } from './BaseClient';
4
4
  export class SystemClient extends BaseClient {
5
5
  constructor(baseSubject, options) {
@@ -52,58 +52,6 @@ export class SystemClient extends BaseClient {
52
52
  }
53
53
  } }));
54
54
  }
55
- /**
56
- * Subscribe to the test step run start events for the given Runner and Run ID.
57
- * Wildcard can be used for the Runner or Run ID to receive all test step run start events.
58
- * @param {string} runnerId
59
- * @param {string} runId
60
- * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
61
- * @param {SubscriptionOptions} options?
62
- */
63
- subscribeTestStepRunStartEventListener(runnerId, runId, listener, options) {
64
- const subject = `Runner.${runnerId}.Runs.${runId}.Events.TestStepRunStart`;
65
- return this.subscribe(subject, Object.assign(Object.assign({}, options), { callback: (error, message) => {
66
- if (error) {
67
- listener(this.natsErrorHandler(error, subject), null);
68
- return;
69
- }
70
- try {
71
- const jsonCodec = JSONCodec();
72
- const testStepRunStartEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
73
- const testStepRunStartEventArgs = TestStepRunStartEventArgs.fromJS(testStepRunStartEventArgsJs);
74
- listener(null, testStepRunStartEventArgs);
75
- }
76
- catch (error) {
77
- listener(this.natsErrorHandler(error, subject), null);
78
- }
79
- } }));
80
- }
81
- /**
82
- * Subscribe to the test step run completed events for the given Runner and Run ID.
83
- * Wildcard can be used for the Runner or Run ID to receive all test step run completed events.
84
- * @param {string} runnerId
85
- * @param {string} runId
86
- * @param {(error:ErrorResponse|null,message:TestStepRunStartEventArgs|null)=>void} listener
87
- * @param {SubscriptionOptions} options?
88
- */
89
- subscribeTestStepRunCompletedEventListener(runnerId, runId, listener, options) {
90
- const subject = `Runner.${runnerId}.Runs.${runId}.Events.TestStepRunCompleted`;
91
- return this.subscribe(subject, Object.assign(Object.assign({}, options), { callback: (error, message) => {
92
- if (error) {
93
- listener(this.natsErrorHandler(error, subject), null);
94
- return;
95
- }
96
- try {
97
- const jsonCodec = JSONCodec();
98
- const testStepRunCompletedEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
99
- const testStepRunCompletedEventArgs = TestStepRunCompletedEventArgs.fromJS(testStepRunCompletedEventArgsJs);
100
- listener(null, testStepRunCompletedEventArgs);
101
- }
102
- catch (error) {
103
- listener(this.natsErrorHandler(error, subject), null);
104
- }
105
- } }));
106
- }
107
55
  /**
108
56
  * Subscribe to the test plan run start events for the given Runner and Run ID.
109
57
  * Wildcard can be used for the Runner or Run ID to receive all test plan run start events.
@@ -121,8 +69,8 @@ export class SystemClient extends BaseClient {
121
69
  }
122
70
  try {
123
71
  const jsonCodec = JSONCodec();
124
- const testPlanRunStartEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
125
- const testPlanRunStartEventArgs = TestPlanRunStartEventArgs.fromJS(testPlanRunStartEventArgsJs);
72
+ const eventJson = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
73
+ const testPlanRunStartEventArgs = TestPlanRunStartEvent.fromJS(eventJson);
126
74
  listener(null, testPlanRunStartEventArgs);
127
75
  }
128
76
  catch (error) {
@@ -147,8 +95,8 @@ export class SystemClient extends BaseClient {
147
95
  }
148
96
  try {
149
97
  const jsonCodec = JSONCodec();
150
- const testPlanRunCompletedEventArgsJs = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
151
- const testPlanRunCompletedEventArgs = TestPlanRunCompletedEventArgs.fromJS(testPlanRunCompletedEventArgsJs);
98
+ const eventJson = jsonCodec.decode(message === null || message === void 0 ? void 0 : message.data);
99
+ const testPlanRunCompletedEventArgs = TestPlanRunCompletedEvent.fromJS(eventJson);
152
100
  listener(null, testPlanRunCompletedEventArgs);
153
101
  }
154
102
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.37.0",
3
+ "version": "2.38.0-alpha.1.18342654209",
4
4
  "description": "This is the web client for the OpenTAP Runner.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/mjs/index.js",