attlaz-client 1.7.10 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Model/Task.d.ts +2 -0
- package/dist/Model/Task.js +4 -0
- package/dist/Service/TaskExecutionEndpoint.d.ts +1 -1
- package/dist/Service/TaskExecutionEndpoint.js +7 -1
- package/dist/Utils.d.ts +1 -0
- package/dist/Utils.js +3 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/Model/Task.d.ts
CHANGED
package/dist/Model/Task.js
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Task = void 0;
|
|
4
4
|
const State_1 = require("./State");
|
|
5
|
+
const Utils_1 = require("../Utils");
|
|
5
6
|
class Task {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.direct = false;
|
|
8
9
|
this.state = State_1.State.Active;
|
|
10
|
+
/** The maximum number of tasks to run at any time (0 = no limit) **/
|
|
11
|
+
this.parallelLimit = 0;
|
|
9
12
|
}
|
|
10
13
|
static parse(rawTask) {
|
|
11
14
|
const task = new Task();
|
|
@@ -16,6 +19,7 @@ class Task {
|
|
|
16
19
|
task.description = rawTask.description;
|
|
17
20
|
task.direct = rawTask.direct;
|
|
18
21
|
task.state = State_1.State.fromString(rawTask.state);
|
|
22
|
+
task.parallelLimit = Utils_1.Utils.parseInt(rawTask.parallel_limit);
|
|
19
23
|
return task;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
@@ -5,7 +5,7 @@ import { TaskExecutionHistory } from '../Model/TaskExecutionHistory';
|
|
|
5
5
|
import { TaskExecutionStatus } from '../Model/TaskExecutionStatus';
|
|
6
6
|
export declare class TaskExecutionEndpoint extends Endpoint {
|
|
7
7
|
getTaskExecutions(taskId: string): Promise<TaskExecution[]>;
|
|
8
|
-
getTaskExecutionSummaries(taskId: string, from?: Date | null, to?: Date | null, projectEnvironmentId?: string | null): Promise<TaskExecutionSummary[]>;
|
|
8
|
+
getTaskExecutionSummaries(taskId: string, from?: Date | null, to?: Date | null, taskExecutionStatuses?: TaskExecutionStatus[] | null, projectEnvironmentId?: string | null): Promise<TaskExecutionSummary[]>;
|
|
9
9
|
getTaskExecutionSummary(taskExecutionId: string): Promise<TaskExecutionSummary | null>;
|
|
10
10
|
getTaskExecutionHistory(taskExecutionId: string): Promise<TaskExecutionHistory[]>;
|
|
11
11
|
updateTaskExecution(taskExecutionId: string, status: TaskExecutionStatus, time?: Date | null): Promise<TaskExecution>;
|
|
@@ -25,7 +25,7 @@ class TaskExecutionEndpoint extends Endpoint_1.Endpoint {
|
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
async getTaskExecutionSummaries(taskId, from = null, to = null, projectEnvironmentId = null) {
|
|
28
|
+
async getTaskExecutionSummaries(taskId, from = null, to = null, taskExecutionStatuses = null, projectEnvironmentId = null) {
|
|
29
29
|
try {
|
|
30
30
|
let params = null;
|
|
31
31
|
if (from !== null && from !== undefined) {
|
|
@@ -46,6 +46,12 @@ class TaskExecutionEndpoint extends Endpoint_1.Endpoint {
|
|
|
46
46
|
}
|
|
47
47
|
params.environment = projectEnvironmentId;
|
|
48
48
|
}
|
|
49
|
+
if (taskExecutionStatuses !== null && taskExecutionStatuses.length > 0) {
|
|
50
|
+
if (params === null || params === undefined) {
|
|
51
|
+
params = {};
|
|
52
|
+
}
|
|
53
|
+
params.statuses = taskExecutionStatuses.length;
|
|
54
|
+
}
|
|
49
55
|
const rawTaskExecutions = await this.httpClient.request('/tasks/' + taskId + '/executionsummaries', params);
|
|
50
56
|
let taskExecutions = [];
|
|
51
57
|
for (let rawTaskExecution of rawTaskExecutions) {
|
package/dist/Utils.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare class Utils {
|
|
|
3
3
|
static isTrue(input: string | number | boolean | null | undefined): boolean;
|
|
4
4
|
static parseRawDate(input: Date): Date;
|
|
5
5
|
static parseEnum<T>(input: string, Enum: any): T | null;
|
|
6
|
+
static parseInt(input: string | number | boolean): number;
|
|
6
7
|
static base64encode(input: string): string;
|
|
7
8
|
static base64decode(encodedString: string): string;
|
|
8
9
|
static isIterable(variable: any): boolean;
|
package/dist/Utils.js
CHANGED
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.8.0";
|
package/dist/version.js
CHANGED