attlaz-client 1.9.53 → 1.9.54
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.
|
@@ -12,6 +12,9 @@ class QueryString {
|
|
|
12
12
|
return this.parameters;
|
|
13
13
|
}
|
|
14
14
|
build() {
|
|
15
|
+
if (this.parameters.length === 0) {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
15
18
|
const output = [];
|
|
16
19
|
for (const parameter of this.parameters) {
|
|
17
20
|
let value = parameter.value;
|
|
@@ -20,7 +23,7 @@ class QueryString {
|
|
|
20
23
|
}
|
|
21
24
|
output.push(parameter.parameter + '=' + value);
|
|
22
25
|
}
|
|
23
|
-
return output.join('&');
|
|
26
|
+
return '?' + output.join('&');
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
exports.QueryString = QueryString;
|
package/dist/Service/Endpoint.js
CHANGED
|
@@ -48,7 +48,7 @@ class Endpoint {
|
|
|
48
48
|
return this.formatParameters(data.jsonSerialize());
|
|
49
49
|
}
|
|
50
50
|
if (data instanceof QueryString_1.QueryString) {
|
|
51
|
-
return data.
|
|
51
|
+
return data.getParameters();
|
|
52
52
|
}
|
|
53
53
|
const result = {};
|
|
54
54
|
for (const [key, value] of Object.entries(data)) {
|
|
@@ -142,9 +142,12 @@ class Endpoint {
|
|
|
142
142
|
if (pagination.limit !== null && pagination.limit !== undefined) {
|
|
143
143
|
queryString.set('limit', pagination.limit);
|
|
144
144
|
}
|
|
145
|
-
if (pagination.startingAfter !== null && pagination.startingAfter !== undefined) {
|
|
145
|
+
if (pagination.startingAfter !== null && pagination.startingAfter !== undefined && pagination.startingAfter !== '') {
|
|
146
146
|
queryString.set('starting_after', pagination.startingAfter);
|
|
147
147
|
}
|
|
148
|
+
if (pagination.endingBefore !== null && pagination.endingBefore !== undefined && pagination.endingBefore !== '') {
|
|
149
|
+
queryString.set('ending_before', pagination.endingBefore);
|
|
150
|
+
}
|
|
148
151
|
}
|
|
149
152
|
return queryString;
|
|
150
153
|
}
|
|
@@ -40,7 +40,6 @@ class FlowRunEndpoint extends Endpoint_1.Endpoint {
|
|
|
40
40
|
// }
|
|
41
41
|
// params.statuses = flowRunStatuses;
|
|
42
42
|
// }
|
|
43
|
-
const params = queryString.build();
|
|
44
43
|
const result = await this.requestCollection('/flows/' + flowId + '/runsummaries' + queryString.build(), FlowRunSummary_1.FlowRunSummary.parse);
|
|
45
44
|
return result;
|
|
46
45
|
}
|
|
@@ -45,7 +45,7 @@ class LogEndpoint extends Endpoint_1.Endpoint {
|
|
|
45
45
|
}
|
|
46
46
|
async getCursoredLogEntries(logStreamId, pagination) {
|
|
47
47
|
const queryString = this.buildQuery(pagination);
|
|
48
|
-
let cmd = '/logstreams/' + Utils_1.Utils.base64encode(logStreamId.id) + '/logs
|
|
48
|
+
let cmd = '/logstreams/' + Utils_1.Utils.base64encode(logStreamId.id) + '/logs' + queryString.build();
|
|
49
49
|
const result = await this.requestCollection(cmd, Log_1.Log.parse);
|
|
50
50
|
return result;
|
|
51
51
|
}
|