@opentap/runner-client 2.12.0-alpha.1.1 → 2.12.0-alpha.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/DTOs.d.ts +6 -14
- package/lib/DTOs.js +7 -31
- package/lib/RunnerClient.d.ts +3 -3
- package/lib/RunnerClient.js +3 -3
- package/package.json +1 -1
package/lib/DTOs.d.ts
CHANGED
|
@@ -63,27 +63,19 @@ export interface IImageResolveErrorResponse extends IErrorResponse {
|
|
|
63
63
|
}
|
|
64
64
|
export declare class Session implements ISession {
|
|
65
65
|
subject?: string | undefined;
|
|
66
|
-
id?: string;
|
|
67
|
-
constructor(data?: ISession);
|
|
68
|
-
init(_data?: any): void;
|
|
69
|
-
static fromJS(data: any): Session;
|
|
70
|
-
toJSON(data?: any): any;
|
|
71
|
-
}
|
|
72
|
-
export interface ISession {
|
|
73
|
-
subject?: string | undefined;
|
|
74
|
-
id?: string;
|
|
75
|
-
}
|
|
76
|
-
export declare class SessionDetails extends Session implements ISessionDetails {
|
|
66
|
+
id?: string | undefined;
|
|
77
67
|
imageId?: string | undefined;
|
|
78
68
|
executionState?: ExecutionState;
|
|
79
69
|
testPlanRunId?: string | undefined;
|
|
80
70
|
startedBy?: string | undefined;
|
|
81
|
-
constructor(data?:
|
|
71
|
+
constructor(data?: ISession);
|
|
82
72
|
init(_data?: any): void;
|
|
83
|
-
static fromJS(data: any):
|
|
73
|
+
static fromJS(data: any): Session;
|
|
84
74
|
toJSON(data?: any): any;
|
|
85
75
|
}
|
|
86
|
-
export interface
|
|
76
|
+
export interface ISession {
|
|
77
|
+
subject?: string | undefined;
|
|
78
|
+
id?: string | undefined;
|
|
87
79
|
imageId?: string | undefined;
|
|
88
80
|
executionState?: ExecutionState;
|
|
89
81
|
testPlanRunId?: string | undefined;
|
package/lib/DTOs.js
CHANGED
|
@@ -182,6 +182,10 @@ var Session = /** @class */ (function () {
|
|
|
182
182
|
if (_data) {
|
|
183
183
|
this.subject = _data['Subject'];
|
|
184
184
|
this.id = _data['Id'];
|
|
185
|
+
this.imageId = _data['ImageId'];
|
|
186
|
+
this.executionState = _data['ExecutionState'];
|
|
187
|
+
this.testPlanRunId = _data['TestPlanRunId'];
|
|
188
|
+
this.startedBy = _data['StartedBy'];
|
|
185
189
|
}
|
|
186
190
|
};
|
|
187
191
|
Session.fromJS = function (data) {
|
|
@@ -194,43 +198,15 @@ var Session = /** @class */ (function () {
|
|
|
194
198
|
data = typeof data === 'object' ? data : {};
|
|
195
199
|
data['Subject'] = this.subject;
|
|
196
200
|
data['Id'] = this.id;
|
|
197
|
-
return data;
|
|
198
|
-
};
|
|
199
|
-
return Session;
|
|
200
|
-
}());
|
|
201
|
-
export { Session };
|
|
202
|
-
var SessionDetails = /** @class */ (function (_super) {
|
|
203
|
-
__extends(SessionDetails, _super);
|
|
204
|
-
function SessionDetails(data) {
|
|
205
|
-
return _super.call(this, data) || this;
|
|
206
|
-
}
|
|
207
|
-
SessionDetails.prototype.init = function (_data) {
|
|
208
|
-
_super.prototype.init.call(this, _data);
|
|
209
|
-
if (_data) {
|
|
210
|
-
this.imageId = _data['ImageId'] ? RunStatus.fromJS(_data['ImageId']) : undefined;
|
|
211
|
-
this.executionState = _data['ExecutionState'] ? RunStatus.fromJS(_data['ExecutionState']) : undefined;
|
|
212
|
-
this.testPlanRunId = _data['TestPlanRunId'] ? RunStatus.fromJS(_data['TestPlanRunId']) : undefined;
|
|
213
|
-
this.startedBy = _data['StartedBy'] ? RunStatus.fromJS(_data['StartedBy']) : undefined;
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
SessionDetails.fromJS = function (data) {
|
|
217
|
-
data = typeof data === 'object' ? data : {};
|
|
218
|
-
var result = new SessionDetails();
|
|
219
|
-
result.init(data);
|
|
220
|
-
return result;
|
|
221
|
-
};
|
|
222
|
-
SessionDetails.prototype.toJSON = function (data) {
|
|
223
|
-
data = typeof data === 'object' ? data : {};
|
|
224
201
|
data['ImageId'] = this.imageId;
|
|
225
202
|
data['ExecutionState'] = this.executionState;
|
|
226
203
|
data['TestPlanRunId'] = this.testPlanRunId;
|
|
227
204
|
data['StartedBy'] = this.startedBy;
|
|
228
|
-
_super.prototype.toJSON.call(this, data);
|
|
229
205
|
return data;
|
|
230
206
|
};
|
|
231
|
-
return
|
|
232
|
-
}(
|
|
233
|
-
export {
|
|
207
|
+
return Session;
|
|
208
|
+
}());
|
|
209
|
+
export { Session };
|
|
234
210
|
var Links = /** @class */ (function () {
|
|
235
211
|
function Links(data) {
|
|
236
212
|
if (data) {
|
package/lib/RunnerClient.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Image, Session
|
|
1
|
+
import { Image, Session } from './DTOs';
|
|
2
2
|
import { BaseClient } from './BaseClient';
|
|
3
3
|
import { ConnectionOptions } from 'nats.ws';
|
|
4
4
|
export declare class RunnerClient extends BaseClient {
|
|
@@ -16,9 +16,9 @@ export declare class RunnerClient extends BaseClient {
|
|
|
16
16
|
getImages(): Promise<Image[]>;
|
|
17
17
|
/**
|
|
18
18
|
* Get all sessions
|
|
19
|
-
* @returns {{Promise<
|
|
19
|
+
* @returns {{Promise<Session[]>}}
|
|
20
20
|
*/
|
|
21
|
-
getSessions(): Promise<
|
|
21
|
+
getSessions(): Promise<Session[]>;
|
|
22
22
|
/**
|
|
23
23
|
* Create a OpenTAP package configuration image from a list image inputs consisting of user specified packages and repositories.
|
|
24
24
|
* @param {Image[]} images List of images
|
package/lib/RunnerClient.js
CHANGED
|
@@ -13,7 +13,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
-
import { Image, Session
|
|
16
|
+
import { Image, Session } from './DTOs';
|
|
17
17
|
import { BaseClient } from './BaseClient';
|
|
18
18
|
var RunnerClient = /** @class */ (function (_super) {
|
|
19
19
|
__extends(RunnerClient, _super);
|
|
@@ -45,11 +45,11 @@ var RunnerClient = /** @class */ (function (_super) {
|
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
47
|
* Get all sessions
|
|
48
|
-
* @returns {{Promise<
|
|
48
|
+
* @returns {{Promise<Session[]>}}
|
|
49
49
|
*/
|
|
50
50
|
RunnerClient.prototype.getSessions = function () {
|
|
51
51
|
return this.request('GetSessions')
|
|
52
|
-
.then(function (
|
|
52
|
+
.then(function (sessionArrayJs) { return sessionArrayJs.map(function (sessionJs) { return Session.fromJS(sessionJs); }); })
|
|
53
53
|
.then(this.success())
|
|
54
54
|
.catch(this.error());
|
|
55
55
|
};
|