attlaz-client 1.7.9 → 1.8.1
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/README.md +27 -2
- 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 +2 -2
package/README.md
CHANGED
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Attlaz Javascript/Node client
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
[Attlaz](https://attlaz.com) is a cloud-based iPaas (Integration Platform as a Service), automation and data management platform.
|
|
5
|
+
|
|
6
|
+
Getting Started
|
|
7
|
+
---------------
|
|
8
|
+
|
|
9
|
+
Install Attlaz using `yarn`:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn add attlaz-client
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or npm, if you wish:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install attlaz-client
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Getting Help
|
|
22
|
+
------------
|
|
23
|
+
|
|
24
|
+
Check the [Attlaz Documentation](https://attlaz.com/docs).
|
|
25
|
+
|
|
26
|
+
Please ask usage and debugging questions on [StackOverflow](http://stackoverflow.com/questions/tagged/attlaz) (use the ["attlaz"](http://stackoverflow.com/questions/ask?tags=attlaz) tag).
|
|
27
|
+
(Please do not ask support questions here on Bitbucket.)
|
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.parallelLimit);
|
|
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.1";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "attlaz-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Javascript Client to access Attlaz API",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://bitbucket.org/attlaz/javascript-client.git"
|
|
10
10
|
},
|
|
11
|
+
"homepage": "https://attlaz.com",
|
|
11
12
|
"files": [
|
|
12
13
|
"dist/*"
|
|
13
14
|
],
|
|
@@ -40,7 +41,6 @@
|
|
|
40
41
|
"typescript": "^4.6.2",
|
|
41
42
|
"dotenv": "^16.0.0"
|
|
42
43
|
},
|
|
43
|
-
"homepage": "https://bitbucket.org/attlaz/javascript-client#readme",
|
|
44
44
|
"directories": {
|
|
45
45
|
"test": "test"
|
|
46
46
|
}
|