attlaz-client 1.9.29 → 1.9.31
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/Flow/FlowRunResponse.d.ts +0 -1
- package/dist/Service/ChannelEndpoint.js +2 -2
- package/dist/Service/FlowRunRequestEndpoint.js +6 -1
- package/dist/Service/LogEndpoint.js +2 -2
- package/dist/Service/NotificationsEndpoint.js +1 -1
- package/dist/Service/StorageEndpoint.js +10 -4
- package/dist/Service/TriggerEndpoint.js +1 -1
- package/dist/Service/UserEndpoint.js +4 -4
- package/dist/Service/WorkspaceMemberEndpoint.js +1 -1
- package/package.json +1 -1
|
@@ -83,7 +83,7 @@ class ChannelEndpoint extends Endpoint_1.Endpoint {
|
|
|
83
83
|
const result = await this.requestObject(url, subscriberChannel, Channel_1.Channel.parse, 'POST');
|
|
84
84
|
const updatedChannel = result.getData();
|
|
85
85
|
if (updatedChannel === null) {
|
|
86
|
-
throw new Error('
|
|
86
|
+
throw new Error('Unable to update channel: wrong response from API');
|
|
87
87
|
}
|
|
88
88
|
return updatedChannel;
|
|
89
89
|
}
|
|
@@ -104,7 +104,7 @@ class ChannelEndpoint extends Endpoint_1.Endpoint {
|
|
|
104
104
|
const re = result.getData();
|
|
105
105
|
if (re === null) {
|
|
106
106
|
console.log('testChannel wrong data', { result, parsed: re });
|
|
107
|
-
throw new Error('
|
|
107
|
+
throw new Error('Unable to test channel: wrong response from API');
|
|
108
108
|
}
|
|
109
109
|
return re.tested;
|
|
110
110
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlowRunRequestEndpoint = void 0;
|
|
4
4
|
const Endpoint_1 = require("./Endpoint");
|
|
5
|
+
const FlowRunResponse_1 = require("../Model/Flow/FlowRunResponse");
|
|
5
6
|
class FlowRunRequestEndpoint extends Endpoint_1.Endpoint {
|
|
6
7
|
async postFlowRunRequest(taskId, params, wait = false) {
|
|
7
8
|
let url = '/flows/' + taskId + '/flowrunrequests';
|
|
@@ -10,7 +11,11 @@ class FlowRunRequestEndpoint extends Endpoint_1.Endpoint {
|
|
|
10
11
|
}
|
|
11
12
|
try {
|
|
12
13
|
const parser = (raw) => {
|
|
13
|
-
|
|
14
|
+
const flowRunResponse = new FlowRunResponse_1.FlowRunResponse();
|
|
15
|
+
flowRunResponse.flowRunRequestId = raw.flow_run_request;
|
|
16
|
+
flowRunResponse.result = raw.result;
|
|
17
|
+
flowRunResponse.success = raw.success;
|
|
18
|
+
return flowRunResponse;
|
|
14
19
|
};
|
|
15
20
|
const result = await this.requestObject(url, params, parser, 'POST');
|
|
16
21
|
// console.log('TODO: parse postTaskExecutionRequest result', result);
|
|
@@ -70,7 +70,7 @@ class LogEndpoint extends Endpoint_1.Endpoint {
|
|
|
70
70
|
const re = result.getData();
|
|
71
71
|
if (re === null) {
|
|
72
72
|
console.log('delete log entry wrong data', { result, parsed: re });
|
|
73
|
-
throw new Error('
|
|
73
|
+
throw new Error('Unable to delete log entry: wrong response from API');
|
|
74
74
|
}
|
|
75
75
|
return re.deleted;
|
|
76
76
|
}
|
|
@@ -91,7 +91,7 @@ class LogEndpoint extends Endpoint_1.Endpoint {
|
|
|
91
91
|
const re = result.getData();
|
|
92
92
|
if (re === null) {
|
|
93
93
|
console.log('Log stream cleared wrong data', { result, parsed: re });
|
|
94
|
-
throw new Error('
|
|
94
|
+
throw new Error('Unable to clear log stream: wrong response from API');
|
|
95
95
|
}
|
|
96
96
|
return re.cleared;
|
|
97
97
|
}
|
|
@@ -26,7 +26,7 @@ class NotificationsEndpoint extends Endpoint_1.Endpoint {
|
|
|
26
26
|
const result = await this.requestObject('/notifications', notification, parser, 'POST');
|
|
27
27
|
const savedNotification = result.getData();
|
|
28
28
|
if (savedNotification === null) {
|
|
29
|
-
throw new Error('
|
|
29
|
+
throw new Error('Unable to save notification: wrong response from API');
|
|
30
30
|
}
|
|
31
31
|
return savedNotification;
|
|
32
32
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StorageEndpoint = void 0;
|
|
4
4
|
const Endpoint_1 = require("./Endpoint");
|
|
5
|
+
const StorageInformation_1 = require("../Model/Storage/StorageInformation");
|
|
5
6
|
const StorageItem_1 = require("../Model/Storage/StorageItem");
|
|
6
7
|
const StorageItemInformation_1 = require("../Model/Storage/StorageItemInformation");
|
|
7
8
|
class StorageEndpoint extends Endpoint_1.Endpoint {
|
|
@@ -9,7 +10,12 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
|
|
|
9
10
|
let cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType;
|
|
10
11
|
try {
|
|
11
12
|
const parser = (raw) => {
|
|
12
|
-
|
|
13
|
+
const storageInformation = new StorageInformation_1.StorageInformation();
|
|
14
|
+
storageInformation.bytes = raw.bytes;
|
|
15
|
+
storageInformation.bytes_limit = raw.bytes_limit;
|
|
16
|
+
storageInformation.items = raw.items;
|
|
17
|
+
storageInformation.pools = raw.pools;
|
|
18
|
+
return storageInformation;
|
|
13
19
|
};
|
|
14
20
|
const result = await this.requestObject(cmd, null, parser, 'GET');
|
|
15
21
|
return result.getData();
|
|
@@ -31,7 +37,7 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
|
|
|
31
37
|
const re = result.getData();
|
|
32
38
|
if (re === null) {
|
|
33
39
|
console.log('clearpool wrong data', { result, parsed: re });
|
|
34
|
-
throw new Error('
|
|
40
|
+
throw new Error('Unable to clear storage pool: wrong response from API');
|
|
35
41
|
}
|
|
36
42
|
return re.deleted;
|
|
37
43
|
}
|
|
@@ -75,7 +81,7 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
|
|
|
75
81
|
const savedItem = result.getData();
|
|
76
82
|
if (savedItem === null) {
|
|
77
83
|
console.log('Storage set item wrong data', { result, parsed: savedItem });
|
|
78
|
-
throw new Error('
|
|
84
|
+
throw new Error('Unable to save storage item: wrong response from API');
|
|
79
85
|
}
|
|
80
86
|
return savedItem;
|
|
81
87
|
}
|
|
@@ -96,7 +102,7 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
|
|
|
96
102
|
const x = result.getData();
|
|
97
103
|
if (x === null) {
|
|
98
104
|
console.log('Storage delete item wrong data', { result, parsed: x });
|
|
99
|
-
throw new Error('
|
|
105
|
+
throw new Error('Unable to delete storage item: wrong response from API');
|
|
100
106
|
}
|
|
101
107
|
return x.deleted;
|
|
102
108
|
}
|
|
@@ -39,7 +39,7 @@ class TriggerEndpoint extends Endpoint_1.Endpoint {
|
|
|
39
39
|
const result = await this.requestObject(url, trigger, Trigger_1.Trigger.parse, 'POST');
|
|
40
40
|
const createdTrigger = result.getData();
|
|
41
41
|
if (createdTrigger === null) {
|
|
42
|
-
throw new Error('
|
|
42
|
+
throw new Error('Unable save trigger: wrong response from API');
|
|
43
43
|
}
|
|
44
44
|
return createdTrigger;
|
|
45
45
|
}
|
|
@@ -22,7 +22,7 @@ class UserEndpoint extends Endpoint_1.Endpoint {
|
|
|
22
22
|
const token = result.getData();
|
|
23
23
|
if (token === null) {
|
|
24
24
|
console.log('auth by auth provider wrong data', { result, parsed: token });
|
|
25
|
-
throw new Error('
|
|
25
|
+
throw new Error('Unable to authenticate by auth provider: wrong response from API');
|
|
26
26
|
}
|
|
27
27
|
return token;
|
|
28
28
|
}
|
|
@@ -58,7 +58,7 @@ class UserEndpoint extends Endpoint_1.Endpoint {
|
|
|
58
58
|
const re = result.getData();
|
|
59
59
|
if (re === null) {
|
|
60
60
|
console.log('remove auth provider wrong data', { result, parsed: re });
|
|
61
|
-
throw new Error('
|
|
61
|
+
throw new Error('Unable to remove auth provider: wrong response from API');
|
|
62
62
|
}
|
|
63
63
|
return re.deleted;
|
|
64
64
|
}
|
|
@@ -130,7 +130,7 @@ class UserEndpoint extends Endpoint_1.Endpoint {
|
|
|
130
130
|
const re = result.getData();
|
|
131
131
|
if (re === null) {
|
|
132
132
|
console.log('reset password request wrong data', { result, parsed: re });
|
|
133
|
-
throw new Error('
|
|
133
|
+
throw new Error('Unable to request password reset: wrong response from API');
|
|
134
134
|
}
|
|
135
135
|
return re.requested;
|
|
136
136
|
}
|
|
@@ -151,7 +151,7 @@ class UserEndpoint extends Endpoint_1.Endpoint {
|
|
|
151
151
|
const re = result.getData();
|
|
152
152
|
if (re === null) {
|
|
153
153
|
console.log('reset password wrong data', { result, parsed: re });
|
|
154
|
-
throw new Error('
|
|
154
|
+
throw new Error('Unable to reset password: wrong response from API');
|
|
155
155
|
}
|
|
156
156
|
return re.updated;
|
|
157
157
|
}
|
|
@@ -48,7 +48,7 @@ class WorkspaceMemberEndpoint extends Endpoint_1.Endpoint {
|
|
|
48
48
|
const re = result.getData();
|
|
49
49
|
if (re === null) {
|
|
50
50
|
console.log('invite member wrong data', { result, parsed: re });
|
|
51
|
-
throw new Error('
|
|
51
|
+
throw new Error('Unable invite member: wrong response from API');
|
|
52
52
|
}
|
|
53
53
|
// if (Utils.isNullOrUndefined(result)) {
|
|
54
54
|
// return null;
|