attlaz-client 1.9.47 → 1.9.48
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/Http/Data/QueryString.d.ts +1 -1
- package/dist/Http/Data/QueryString.js +5 -1
- package/dist/Model/Pagination/CursorPagination.d.ts +1 -0
- package/dist/Model/Pagination/CursorPagination.js +1 -0
- package/dist/Service/FlowRunEndpoint.d.ts +2 -1
- package/dist/Service/FlowRunEndpoint.js +10 -6
- package/dist/Service/LogEndpoint.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,11 @@ class QueryString {
|
|
|
11
11
|
build() {
|
|
12
12
|
const output = [];
|
|
13
13
|
for (const parameter of this.parameters) {
|
|
14
|
-
|
|
14
|
+
let value = parameter.value;
|
|
15
|
+
if (Array.isArray(value)) {
|
|
16
|
+
value = value.join(',');
|
|
17
|
+
}
|
|
18
|
+
output.push(parameter.parameter + '=' + value);
|
|
15
19
|
}
|
|
16
20
|
return output.join('&');
|
|
17
21
|
}
|
|
@@ -4,9 +4,10 @@ import { FlowRunStatus } from '../Model/Flow/FlowRunStatus';
|
|
|
4
4
|
import { FlowRunSummary } from '../Model/Flow/FlowRunSummary';
|
|
5
5
|
import { FlowRunHistory } from '../Model/Flow/FlowRunHistory';
|
|
6
6
|
import { CollectionResult } from '../Model/Result/CollectionResult';
|
|
7
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination';
|
|
7
8
|
export declare class FlowRunEndpoint extends Endpoint {
|
|
8
9
|
getFlowRuns(flowId: string): Promise<CollectionResult<FlowRun>>;
|
|
9
|
-
getFlowRunSummaries(flowId: string,
|
|
10
|
+
getFlowRunSummaries(flowId: string, flowRunStatuses?: FlowRunStatus[] | null, pagination?: CursorPagination | null, projectEnvironmentId?: string | null): Promise<CollectionResult<FlowRunSummary>>;
|
|
10
11
|
getFlowRunSummary(flowRunId: string): Promise<FlowRunSummary | null>;
|
|
11
12
|
getFlowRunHistory(flowRunId: string): Promise<CollectionResult<FlowRunHistory>>;
|
|
12
13
|
updateFlowRun(taskExecutionId: string, status: FlowRunStatus, time?: Date | null): Promise<FlowRun>;
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowRunEndpoint = void 0;
|
|
4
4
|
const Endpoint_1 = require("./Endpoint");
|
|
5
|
-
const Utils_1 = require("../Utils");
|
|
6
5
|
const ClientError_1 = require("../Model/Error/ClientError");
|
|
7
6
|
const HttpClient_1 = require("../Http/HttpClient");
|
|
8
7
|
const FlowRun_1 = require("../Model/Flow/FlowRun");
|
|
9
8
|
const FlowRunSummary_1 = require("../Model/Flow/FlowRunSummary");
|
|
10
9
|
const FlowRunHistory_1 = require("../Model/Flow/FlowRunHistory");
|
|
10
|
+
const QueryString_1 = require("../Http/Data/QueryString");
|
|
11
11
|
class FlowRunEndpoint extends Endpoint_1.Endpoint {
|
|
12
12
|
async getFlowRuns(flowId) {
|
|
13
13
|
const result = await this.requestCollection('/flows/' + flowId + '/runs', null, FlowRun_1.FlowRun.parse);
|
|
14
14
|
return result;
|
|
15
15
|
}
|
|
16
|
-
async getFlowRunSummaries(flowId,
|
|
16
|
+
async getFlowRunSummaries(flowId, flowRunStatuses = null, pagination = null, projectEnvironmentId = null) {
|
|
17
17
|
try {
|
|
18
|
-
|
|
18
|
+
const queryString = new QueryString_1.QueryString();
|
|
19
19
|
// if (from !== null && from !== undefined) {
|
|
20
20
|
//
|
|
21
21
|
// params = {};
|
|
@@ -28,8 +28,11 @@ class FlowRunEndpoint extends Endpoint_1.Endpoint {
|
|
|
28
28
|
// }
|
|
29
29
|
// params.to = to.toISOString();
|
|
30
30
|
// }
|
|
31
|
-
if (
|
|
32
|
-
|
|
31
|
+
if (projectEnvironmentId !== null && projectEnvironmentId !== undefined) {
|
|
32
|
+
queryString.set('project_environment', projectEnvironmentId);
|
|
33
|
+
}
|
|
34
|
+
if (flowRunStatuses !== null && flowRunStatuses !== undefined && flowRunStatuses.length > 0) {
|
|
35
|
+
queryString.set('statuses', flowRunStatuses.map(status => status.toString()));
|
|
33
36
|
}
|
|
34
37
|
// if (flowRunStatuses !== null && flowRunStatuses.length > 0) {
|
|
35
38
|
// if (params === null || params === undefined) {
|
|
@@ -37,7 +40,8 @@ class FlowRunEndpoint extends Endpoint_1.Endpoint {
|
|
|
37
40
|
// }
|
|
38
41
|
// params.statuses = flowRunStatuses;
|
|
39
42
|
// }
|
|
40
|
-
const
|
|
43
|
+
const params = queryString.build();
|
|
44
|
+
const result = await this.requestCollection('/flows/' + flowId + '/runsummaries', queryString, FlowRunSummary_1.FlowRunSummary.parse);
|
|
41
45
|
return result;
|
|
42
46
|
}
|
|
43
47
|
catch (error) {
|
|
@@ -123,7 +123,7 @@ class LogEndpoint extends Endpoint_1.Endpoint {
|
|
|
123
123
|
}
|
|
124
124
|
async getByProject(projectId) {
|
|
125
125
|
const parser = (raw) => {
|
|
126
|
-
return new LogStream_1.LogStream(new LogStreamId_1.LogStreamId(raw['id']
|
|
126
|
+
return new LogStream_1.LogStream(new LogStreamId_1.LogStreamId(raw['id']), raw['name']);
|
|
127
127
|
};
|
|
128
128
|
const result = await this.requestCollection('projects/' + projectId + '/logstreams', null, parser);
|
|
129
129
|
return result;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.9.
|
|
1
|
+
export declare const VERSION = "1.9.48";
|
package/dist/version.js
CHANGED