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

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 = [];
@@ -3807,118 +3807,6 @@ var OnTestStepRun = /** @class */ (function () {
3807
3807
  return OnTestStepRun;
3808
3808
  }());
3809
3809
  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
3810
  var TestPlanRunEvent = /** @class */ (function () {
3923
3811
  function TestPlanRunEvent(data) {
3924
3812
  if (data) {
@@ -3927,107 +3815,112 @@ var TestPlanRunEvent = /** @class */ (function () {
3927
3815
  this[property] = data[property];
3928
3816
  }
3929
3817
  }
3930
- this._discriminator = 'TestPlanRunEvent';
3931
3818
  }
3932
3819
  TestPlanRunEvent.prototype.init = function (_data) {
3933
3820
  if (_data) {
3934
- this.testPlanRunId = _data['Run/TestPlanRunId'];
3935
- this.testPlanRunGuid = _data['Run/TestPlanRunGuid'];
3936
- this.path = _data['Run/Path'];
3821
+ this.runId = _data['Run/Id'];
3822
+ this.testPlanRunGuid = _data['Run/Guid'];
3937
3823
  this.name = _data['Run/Name'];
3938
3824
  this.verdict = _data['Run/Verdict'];
3939
3825
  this.startTime = _data['Run/StartTime'];
3940
- this.runner = _data['Run/Runner'];
3941
3826
  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;
3827
+ this.isCampaignRun = _data['Run/IsCampaign'];
3828
+ this.projectId = _data['Run/Test Plan/ProjectId'];
3829
+ this.dataLocation = _data['Run/DataLocation'];
3830
+ this.operatorId = _data['Run/Operator/Id'];
3831
+ this.runnerId = _data['Run/Runner/Id'];
3832
+ this.runnerName = _data['Run/Runner/Name'];
3833
+ this.sessionId = _data['Run/Runner/Session/Id'];
3834
+ this.imageId = _data['Run/Runner/Session/ImageId'];
3835
+ this.runnerVersion = _data['Run/Version/OpenTap.Runner'];
3836
+ this.openTapVersion = _data['Run/Version/OpenTap'];
3837
+ this.testPlanHash = _data['Run/Test Plan/Hash'];
3838
+ this.capabilities = _data['Run/Capabilities'];
3839
+ this.testPlanJson = _data['Run/Test Plan/Json'];
3840
+ this.testPlanName = _data['Run/Test Plan/Name'];
3841
+ this.testPlanPath = _data['Run/Test Plan/Path'];
3842
+ this.testPlanPathId = _data['Run/Test Plan/PathId'];
3843
+ this.testPlanVersion = _data['Run/Test Plan/Version'];
3957
3844
  }
3958
- var result = new TestPlanRunEvent();
3959
- result.init(data);
3960
- return result;
3961
3845
  };
3962
3846
  TestPlanRunEvent.prototype.toJSON = function (data) {
3963
3847
  data = typeof data === 'object' ? data : {};
3964
- data['Run/TestPlanRunId'] = this.testPlanRunId;
3965
- data['Run/TestPlanRunGuid'] = this.testPlanRunGuid;
3966
- data['Run/Path'] = this.path;
3848
+ data['Run/Id'] = this.runId;
3849
+ data['Run/Guid'] = this.testPlanRunGuid;
3967
3850
  data['Run/Name'] = this.name;
3968
3851
  data['Run/Verdict'] = this.verdict;
3969
3852
  data['Run/StartTime'] = this.startTime;
3970
- data['Run/Runner'] = this.runner;
3971
3853
  data['Run/Status'] = this.status;
3972
- data['Run/IsCampaign'] = this.isCampaign;
3973
- data['Run/Operator'] = this.operator;
3854
+ data['Run/IsCampaign'] = this.isCampaignRun;
3855
+ data['Run/Test Plan/ProjectId'] = this.projectId;
3856
+ data['Run/DataLocation'] = this.dataLocation;
3857
+ data['Run/Operator/Id'] = this.operatorId;
3858
+ data['Run/Runner/Id'] = this.runnerId;
3859
+ data['Run/Runner/Name'] = this.runnerName;
3860
+ data['Run/Runner/Session/Id'] = this.sessionId;
3861
+ data['Run/Runner/Session/ImageId'] = this.imageId;
3862
+ data['Run/Version/OpenTap.Runner'] = this.runnerVersion;
3863
+ data['Run/Version/OpenTap'] = this.openTapVersion;
3864
+ data['Run/Test Plan/Hash'] = this.testPlanHash;
3865
+ data['Run/Capabilities'] = this.capabilities;
3866
+ data['Run/Test Plan/Json'] = this.testPlanJson;
3867
+ data['Run/Test Plan/Name'] = this.testPlanName;
3868
+ data['Run/Test Plan/Path'] = this.testPlanPath;
3869
+ data['Run/Test Plan/PathId'] = this.testPlanPathId;
3870
+ data['Run/Test Plan/Version'] = this.testPlanVersion;
3974
3871
  return data;
3975
3872
  };
3976
3873
  return TestPlanRunEvent;
3977
3874
  }());
3978
3875
  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;
3876
+ var TestPlanRunStartEvent = /** @class */ (function (_super) {
3877
+ __extends(TestPlanRunStartEvent, _super);
3878
+ function TestPlanRunStartEvent(data) {
3879
+ return _super.call(this, data) || this;
3985
3880
  }
3986
- TestPlanRunStartEventArgs.prototype.init = function (_data) {
3881
+ TestPlanRunStartEvent.prototype.init = function (_data) {
3987
3882
  _super.prototype.init.call(this, _data);
3988
3883
  };
3989
- TestPlanRunStartEventArgs.fromJS = function (data) {
3884
+ TestPlanRunStartEvent.fromJS = function (data) {
3990
3885
  data = typeof data === 'object' ? data : {};
3991
- var result = new TestPlanRunStartEventArgs();
3886
+ var result = new TestPlanRunStartEvent();
3992
3887
  result.init(data);
3993
3888
  return result;
3994
3889
  };
3995
- TestPlanRunStartEventArgs.prototype.toJSON = function (data) {
3890
+ TestPlanRunStartEvent.prototype.toJSON = function (data) {
3996
3891
  data = typeof data === 'object' ? data : {};
3997
3892
  _super.prototype.toJSON.call(this, data);
3998
3893
  return data;
3999
3894
  };
4000
- return TestPlanRunStartEventArgs;
3895
+ return TestPlanRunStartEvent;
4001
3896
  }(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;
3897
+ exports.TestPlanRunStartEvent = TestPlanRunStartEvent;
3898
+ var TestPlanRunCompletedEvent = /** @class */ (function (_super) {
3899
+ __extends(TestPlanRunCompletedEvent, _super);
3900
+ function TestPlanRunCompletedEvent(data) {
3901
+ return _super.call(this, data) || this;
4009
3902
  }
4010
- TestPlanRunCompletedEventArgs.prototype.init = function (_data) {
3903
+ TestPlanRunCompletedEvent.prototype.init = function (_data) {
4011
3904
  _super.prototype.init.call(this, _data);
4012
3905
  if (_data) {
4013
- this.durationInSeconds = _data['Run/DurationInSeconds'];
3906
+ this.duration = _data['Run/Duration'];
4014
3907
  }
4015
3908
  };
4016
- TestPlanRunCompletedEventArgs.fromJS = function (data) {
3909
+ TestPlanRunCompletedEvent.fromJS = function (data) {
4017
3910
  data = typeof data === 'object' ? data : {};
4018
- var result = new TestPlanRunCompletedEventArgs();
3911
+ var result = new TestPlanRunCompletedEvent();
4019
3912
  result.init(data);
4020
3913
  return result;
4021
3914
  };
4022
- TestPlanRunCompletedEventArgs.prototype.toJSON = function (data) {
3915
+ TestPlanRunCompletedEvent.prototype.toJSON = function (data) {
4023
3916
  data = typeof data === 'object' ? data : {};
4024
- data['Run/DurationInSeconds'] = this.durationInSeconds;
3917
+ data['Run/Duration'] = this.duration;
4025
3918
  _super.prototype.toJSON.call(this, data);
4026
3919
  return data;
4027
3920
  };
4028
- return TestPlanRunCompletedEventArgs;
3921
+ return TestPlanRunCompletedEvent;
4029
3922
  }(TestPlanRunEvent));
4030
- exports.TestPlanRunCompletedEventArgs = TestPlanRunCompletedEventArgs;
3923
+ exports.TestPlanRunCompletedEvent = TestPlanRunCompletedEvent;
4031
3924
  var RunnerEvent = /** @class */ (function () {
4032
3925
  function RunnerEvent(data) {
4033
3926
  if (data) {
@@ -4046,19 +3939,19 @@ var RunnerEvent = /** @class */ (function () {
4046
3939
  RunnerEvent.fromJS = function (data) {
4047
3940
  data = typeof data === 'object' ? data : {};
4048
3941
  if (data['type'] === 'RunnerRegisteredEvent') {
4049
- var result_45 = new RunnerRegisteredEvent();
4050
- result_45.init(data);
4051
- return result_45;
3942
+ var result_41 = new RunnerRegisteredEvent();
3943
+ result_41.init(data);
3944
+ return result_41;
4052
3945
  }
4053
3946
  if (data['type'] === 'RunnerUpdatedEvent') {
4054
- var result_46 = new RunnerUpdatedEvent();
4055
- result_46.init(data);
4056
- return result_46;
3947
+ var result_42 = new RunnerUpdatedEvent();
3948
+ result_42.init(data);
3949
+ return result_42;
4057
3950
  }
4058
3951
  if (data['type'] === 'RunnerDeletedEvent') {
4059
- var result_47 = new RunnerDeletedEvent();
4060
- result_47.init(data);
4061
- return result_47;
3952
+ var result_43 = new RunnerDeletedEvent();
3953
+ result_43.init(data);
3954
+ return result_43;
4062
3955
  }
4063
3956
  var result = new RunnerEvent();
4064
3957
  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
@@ -3338,104 +3338,6 @@ export class OnTestStepRun {
3338
3338
  return data;
3339
3339
  }
3340
3340
  }
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
3341
  export class TestPlanRunEvent {
3440
3342
  constructor(data) {
3441
3343
  if (data) {
@@ -3444,64 +3346,72 @@ export class TestPlanRunEvent {
3444
3346
  this[property] = data[property];
3445
3347
  }
3446
3348
  }
3447
- this._discriminator = 'TestPlanRunEvent';
3448
3349
  }
3449
3350
  init(_data) {
3450
3351
  if (_data) {
3451
- this.testPlanRunId = _data['Run/TestPlanRunId'];
3452
- this.testPlanRunGuid = _data['Run/TestPlanRunGuid'];
3453
- this.path = _data['Run/Path'];
3352
+ this.runId = _data['Run/Id'];
3353
+ this.testPlanRunGuid = _data['Run/Guid'];
3454
3354
  this.name = _data['Run/Name'];
3455
3355
  this.verdict = _data['Run/Verdict'];
3456
3356
  this.startTime = _data['Run/StartTime'];
3457
- this.runner = _data['Run/Runner'];
3458
3357
  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;
3358
+ this.isCampaignRun = _data['Run/IsCampaign'];
3359
+ this.projectId = _data['Run/Test Plan/ProjectId'];
3360
+ this.dataLocation = _data['Run/DataLocation'];
3361
+ this.operatorId = _data['Run/Operator/Id'];
3362
+ this.runnerId = _data['Run/Runner/Id'];
3363
+ this.runnerName = _data['Run/Runner/Name'];
3364
+ this.sessionId = _data['Run/Runner/Session/Id'];
3365
+ this.imageId = _data['Run/Runner/Session/ImageId'];
3366
+ this.runnerVersion = _data['Run/Version/OpenTap.Runner'];
3367
+ this.openTapVersion = _data['Run/Version/OpenTap'];
3368
+ this.testPlanHash = _data['Run/Test Plan/Hash'];
3369
+ this.capabilities = _data['Run/Capabilities'];
3370
+ this.testPlanJson = _data['Run/Test Plan/Json'];
3371
+ this.testPlanName = _data['Run/Test Plan/Name'];
3372
+ this.testPlanPath = _data['Run/Test Plan/Path'];
3373
+ this.testPlanPathId = _data['Run/Test Plan/PathId'];
3374
+ this.testPlanVersion = _data['Run/Test Plan/Version'];
3375
+ }
3376
+ }
3377
+ toJSON(data) {
3378
+ data = typeof data === 'object' ? data : {};
3379
+ data['Run/Id'] = this.runId;
3380
+ data['Run/Guid'] = this.testPlanRunGuid;
3484
3381
  data['Run/Name'] = this.name;
3485
3382
  data['Run/Verdict'] = this.verdict;
3486
3383
  data['Run/StartTime'] = this.startTime;
3487
- data['Run/Runner'] = this.runner;
3488
3384
  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 {
3385
+ data['Run/IsCampaign'] = this.isCampaignRun;
3386
+ data['Run/Test Plan/ProjectId'] = this.projectId;
3387
+ data['Run/DataLocation'] = this.dataLocation;
3388
+ data['Run/Operator/Id'] = this.operatorId;
3389
+ data['Run/Runner/Id'] = this.runnerId;
3390
+ data['Run/Runner/Name'] = this.runnerName;
3391
+ data['Run/Runner/Session/Id'] = this.sessionId;
3392
+ data['Run/Runner/Session/ImageId'] = this.imageId;
3393
+ data['Run/Version/OpenTap.Runner'] = this.runnerVersion;
3394
+ data['Run/Version/OpenTap'] = this.openTapVersion;
3395
+ data['Run/Test Plan/Hash'] = this.testPlanHash;
3396
+ data['Run/Capabilities'] = this.capabilities;
3397
+ data['Run/Test Plan/Json'] = this.testPlanJson;
3398
+ data['Run/Test Plan/Name'] = this.testPlanName;
3399
+ data['Run/Test Plan/Path'] = this.testPlanPath;
3400
+ data['Run/Test Plan/PathId'] = this.testPlanPathId;
3401
+ data['Run/Test Plan/Version'] = this.testPlanVersion;
3402
+ return data;
3403
+ }
3404
+ }
3405
+ export class TestPlanRunStartEvent extends TestPlanRunEvent {
3495
3406
  constructor(data) {
3496
3407
  super(data);
3497
- this._discriminator = 'TestPlanRunStartEventArgs';
3498
3408
  }
3499
3409
  init(_data) {
3500
3410
  super.init(_data);
3501
3411
  }
3502
3412
  static fromJS(data) {
3503
3413
  data = typeof data === 'object' ? data : {};
3504
- const result = new TestPlanRunStartEventArgs();
3414
+ const result = new TestPlanRunStartEvent();
3505
3415
  result.init(data);
3506
3416
  return result;
3507
3417
  }
@@ -3511,26 +3421,25 @@ export class TestPlanRunStartEventArgs extends TestPlanRunEvent {
3511
3421
  return data;
3512
3422
  }
3513
3423
  }
3514
- export class TestPlanRunCompletedEventArgs extends TestPlanRunEvent {
3424
+ export class TestPlanRunCompletedEvent extends TestPlanRunEvent {
3515
3425
  constructor(data) {
3516
3426
  super(data);
3517
- this._discriminator = 'TestPlanRunCompletedEventArgs';
3518
3427
  }
3519
3428
  init(_data) {
3520
3429
  super.init(_data);
3521
3430
  if (_data) {
3522
- this.durationInSeconds = _data['Run/DurationInSeconds'];
3431
+ this.duration = _data['Run/Duration'];
3523
3432
  }
3524
3433
  }
3525
3434
  static fromJS(data) {
3526
3435
  data = typeof data === 'object' ? data : {};
3527
- const result = new TestPlanRunCompletedEventArgs();
3436
+ const result = new TestPlanRunCompletedEvent();
3528
3437
  result.init(data);
3529
3438
  return result;
3530
3439
  }
3531
3440
  toJSON(data) {
3532
3441
  data = typeof data === 'object' ? data : {};
3533
- data['Run/DurationInSeconds'] = this.durationInSeconds;
3442
+ data['Run/Duration'] = this.duration;
3534
3443
  super.toJSON(data);
3535
3444
  return data;
3536
3445
  }
@@ -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.1.18338586909",
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",