hcloud-sdk 15.0.0 → 16.0.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/changelog.md +54 -36
- package/lib/interfaces/auditor/index.d.ts +4 -2
- package/lib/interfaces/high5/execution/index.d.ts +22 -0
- package/lib/interfaces/high5/execution/index.js +10 -0
- package/lib/interfaces/high5/index.d.ts +2 -2
- package/lib/interfaces/high5/index.js +2 -2
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +14 -1
- package/lib/interfaces/high5/space/execution/index.d.ts +3 -0
- package/lib/interfaces/high5/space/pool/index.d.ts +30 -0
- package/lib/interfaces/high5/space/pool/index.js +9 -0
- package/lib/interfaces/high5/wave/index.d.ts +18 -1
- package/lib/interfaces/high5/wave/index.js +4 -0
- package/lib/interfaces/idp/organization/member/index.d.ts +2 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.js +21 -1
- package/lib/interfaces/idp/user/Totp.d.ts +4 -2
- package/lib/interfaces/idp/user/index.d.ts +1 -0
- package/lib/interfaces/nats/index.d.ts +28 -0
- package/lib/interfaces/nats/index.js +61 -5
- package/lib/service/agent/bundle/dev/index.d.ts +3 -0
- package/lib/service/agent/bundle/dev/index.js +16 -0
- package/lib/service/dali/DaliAvatar.d.ts +10 -4
- package/lib/service/dali/DaliAvatar.js +12 -2
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +1 -1
- package/lib/service/dali/avatar/DaliFuseSpace.js +3 -3
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +29 -0
- package/lib/service/dali/avatar/DaliHigh5Pool.js +61 -0
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +1 -1
- package/lib/service/dali/avatar/DaliHigh5Space.js +3 -3
- package/lib/service/high5/execution/index.d.ts +8 -0
- package/lib/service/high5/execution/index.js +21 -0
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +1 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +2 -0
- package/lib/service/high5/space/execution/index.d.ts +28 -1
- package/lib/service/high5/space/execution/index.js +41 -2
- package/lib/service/high5/space/index.d.ts +3 -0
- package/lib/service/high5/space/index.js +7 -0
- package/lib/service/high5/space/pool/index.d.ts +97 -0
- package/lib/service/high5/space/pool/index.js +171 -0
- package/lib/service/high5/wave/s3/index.d.ts +8 -1
- package/lib/service/high5/wave/s3/index.js +14 -0
- package/lib/service/idp/oauth/index.d.ts +2 -2
- package/lib/service/idp/oauth/index.js +12 -13
- package/lib/service/idp/registration/index.d.ts +1 -1
- package/lib/service/idp/registration/index.js +2 -2
- package/lib/service/idp/user/index.d.ts +4 -0
- package/lib/service/idp/user/index.js +8 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +1 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +1 -1
- package/package.json +1 -1
|
@@ -16,16 +16,21 @@ var NatsSubject;
|
|
|
16
16
|
NatsSubject["IDP_USER_SECURITY_PATS"] = "hcloud.idp.user.${userId}.security.pats";
|
|
17
17
|
NatsSubject["IDP_USER_SECURITY_GENERAL"] = "hcloud.idp.user.${userId}.security.general";
|
|
18
18
|
NatsSubject["IDP_USER_LICENSE"] = "hcloud.idp.user.${userId}.license";
|
|
19
|
+
NatsSubject["IDP_USER_SETTINGS_OAUTH_REVOKE"] = "hcloud.idp.user.${userId}.settings.oauth.${oAuthAppId}.revoke";
|
|
20
|
+
NatsSubject["IDP_ORGANIZATION"] = "hcloud.idp.organization.${base64orgName}";
|
|
19
21
|
NatsSubject["IDP_ORGANIZATION_INVITATIONS"] = "hcloud.idp.organization.${base64orgName}.invitations";
|
|
20
22
|
NatsSubject["IDP_ORGANIZATION_MEMBERS"] = "hcloud.idp.organization.${base64orgName}.members";
|
|
21
23
|
NatsSubject["IDP_ORGANIZATION_MEMBERS_EXECUTION_TARGET"] = "hcloud.idp.organization.${base64orgName}.members.${base64email}.executionTarget";
|
|
22
24
|
NatsSubject["IDP_ORGANIZATION_TEAMS"] = "hcloud.idp.organization.${base64orgName}.teams";
|
|
23
25
|
NatsSubject["IDP_ORGANIZATION_TEAM_MEMBERS"] = "hcloud.idp.organization.${base64orgName}.teams.${base64teamName}.members";
|
|
24
26
|
NatsSubject["IDP_ORGANIZATION_LICENSE"] = "hcloud.idp.organization.${base64orgName}.license";
|
|
27
|
+
NatsSubject["IDP_ORGANIZATION_SETTINGS_OAUTHAPP"] = "hcloud.idp.organization.${base64orgName}.settings.oauthapp.${oAuthAppId}";
|
|
25
28
|
NatsSubject["HIGH5_SPACES"] = "hcloud.high5.organization.${base64orgName}.spaces";
|
|
26
29
|
NatsSubject["HIGH5_SPACE_PERMISSIONS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
|
|
27
30
|
NatsSubject["HIGH5_STREAM_EXECUTE"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}";
|
|
28
31
|
NatsSubject["HIGH5_STREAM_CANCEL"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}";
|
|
32
|
+
NatsSubject["HIGH5_STREAM_DEBUG_STOPPED"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}.${executionId}.stopped";
|
|
33
|
+
NatsSubject["HIGH5_STREAM_DEBUG_COMMAND"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}.${executionSecret}.command";
|
|
29
34
|
NatsSubject["HIGH5_EVENTS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events";
|
|
30
35
|
NatsSubject["HIGH5_STREAMS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.streams";
|
|
31
36
|
NatsSubject["HIGH5_EVENT_STREAMS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams";
|
|
@@ -38,6 +43,8 @@ var NatsSubject;
|
|
|
38
43
|
NatsSubject["High5_DESIGN"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design";
|
|
39
44
|
NatsSubject["HIGH5_SNAPSHOTS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.snapshots";
|
|
40
45
|
NatsSubject["HIGH5_WAVE_ENGINE_LATEST"] = "hcloud.high5.wave.engine.latest";
|
|
46
|
+
NatsSubject["HIGH5_SPACES_POOLS"] = "hcloud.high5.organization.${organizationId}.spaces.${spaceId}.pools.>";
|
|
47
|
+
NatsSubject["HIGH5_SPACES_POOL"] = "hcloud.high5.organization.${organizationId}.spaces.${spaceId}.pools.${poolId}";
|
|
41
48
|
NatsSubject["FUSE_SPACES"] = "hcloud.fuse.organization.${base64orgName}.spaces";
|
|
42
49
|
NatsSubject["FUSE_SPACE_PERMISSIONS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
|
|
43
50
|
NatsSubject["FUSE_JOBS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs";
|
|
@@ -78,6 +85,7 @@ var NatsObjectType;
|
|
|
78
85
|
NatsObjectType["WEBHOOK_LOG"] = "WEBHOOK_LOG";
|
|
79
86
|
NatsObjectType["SECRET"] = "SECRET";
|
|
80
87
|
NatsObjectType["CATALOG"] = "CATALOG";
|
|
88
|
+
NatsObjectType["POOL"] = "POOL";
|
|
81
89
|
NatsObjectType["AUDIT_LOG"] = "AUDIT_LOG";
|
|
82
90
|
NatsObjectType["MAIL"] = "MAIL";
|
|
83
91
|
NatsObjectType["CRONJOB"] = "CRONJOB";
|
|
@@ -124,7 +132,19 @@ NatsSubjects.IDP = (_a = class {
|
|
|
124
132
|
return NatsSubjects.replace(NatsSubject.IDP_USER_SECURITY_GENERAL, { userId });
|
|
125
133
|
},
|
|
126
134
|
_c),
|
|
135
|
+
_b.Settings = (userId) => {
|
|
136
|
+
return {
|
|
137
|
+
OAuth: {
|
|
138
|
+
REVOKE: (oAuthAppId) => {
|
|
139
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_SETTINGS_OAUTH_REVOKE, { userId, oAuthAppId });
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
},
|
|
127
144
|
_b),
|
|
145
|
+
_a.ORGANIZATION = (organizationName) => {
|
|
146
|
+
return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION, { organizationName });
|
|
147
|
+
},
|
|
128
148
|
_a.Organization = (_d = class {
|
|
129
149
|
},
|
|
130
150
|
__setFunctionName(_d, "Organization"),
|
|
@@ -157,6 +177,13 @@ NatsSubjects.IDP = (_a = class {
|
|
|
157
177
|
_d.LICENSE = (organizationName) => {
|
|
158
178
|
return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_LICENSE, { organizationName });
|
|
159
179
|
},
|
|
180
|
+
_d.Settings = (organizationName) => {
|
|
181
|
+
return {
|
|
182
|
+
OAuthApp: (oAuthAppId) => {
|
|
183
|
+
return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_SETTINGS_OAUTHAPP, { organizationName, oAuthAppId });
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
},
|
|
160
187
|
_d),
|
|
161
188
|
_a);
|
|
162
189
|
NatsSubjects.Fuse = (_f = class {
|
|
@@ -195,6 +222,24 @@ NatsSubjects.High5 = (_j = class {
|
|
|
195
222
|
_k.CANCEL = (organizationId, email) => {
|
|
196
223
|
return NatsSubjects.replace(NatsSubject.HIGH5_STREAM_CANCEL, { organizationId, email });
|
|
197
224
|
},
|
|
225
|
+
_k.DEBUG = (organizationId, email) => {
|
|
226
|
+
return {
|
|
227
|
+
STOPPED: function (executionId) {
|
|
228
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_STREAM_DEBUG_STOPPED, {
|
|
229
|
+
organizationId,
|
|
230
|
+
email,
|
|
231
|
+
executionId,
|
|
232
|
+
});
|
|
233
|
+
},
|
|
234
|
+
COMMAND: function (executionSecret) {
|
|
235
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_STREAM_DEBUG_COMMAND, {
|
|
236
|
+
organizationId,
|
|
237
|
+
email,
|
|
238
|
+
executionSecret,
|
|
239
|
+
});
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
},
|
|
198
243
|
_k),
|
|
199
244
|
_j.SPACES = (organizationName) => {
|
|
200
245
|
return NatsSubjects.replace(NatsSubject.HIGH5_SPACES, { organizationName });
|
|
@@ -202,6 +247,12 @@ NatsSubjects.High5 = (_j = class {
|
|
|
202
247
|
_j.Space = (_l = class {
|
|
203
248
|
},
|
|
204
249
|
__setFunctionName(_l, "Space"),
|
|
250
|
+
_l.POOLS = (organizationId, spaceId) => {
|
|
251
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_SPACES_POOLS, { organizationId, spaceId });
|
|
252
|
+
},
|
|
253
|
+
_l.POOL = (organizationId, spaceId, poolId) => {
|
|
254
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_SPACES_POOL, { organizationId, spaceId, poolId });
|
|
255
|
+
},
|
|
205
256
|
_l.PERMISSIONS = (organizationName, spaceName) => {
|
|
206
257
|
return NatsSubjects.replace(NatsSubject.HIGH5_SPACE_PERMISSIONS, { organizationName, spaceName });
|
|
207
258
|
},
|
|
@@ -292,18 +343,23 @@ NatsSubjects.Logging = (product) => {
|
|
|
292
343
|
// eslint-disable-next-line complexity
|
|
293
344
|
NatsSubjects.replace = (subject, replacements) => {
|
|
294
345
|
subject = subject.replace("${userId}", replacements.userId || "null");
|
|
295
|
-
subject = subject.replace("${base64orgName}", replacements.organizationName ? base64Encode(replacements.organizationName) : "null");
|
|
346
|
+
subject = subject.replace("${base64orgName}", replacements.organizationName ? (replacements.organizationName === "*" ? "*" : base64Encode(replacements.organizationName)) : "null");
|
|
296
347
|
subject = subject.replace("${organizationId}", replacements.organizationId || "null");
|
|
297
|
-
subject = subject.replace("${base64spaceName}", replacements.spaceName ? base64Encode(replacements.spaceName) : "null");
|
|
298
|
-
subject = subject.replace("${
|
|
348
|
+
subject = subject.replace("${base64spaceName}", replacements.spaceName ? (replacements.spaceName === "*" ? "*" : base64Encode(replacements.spaceName)) : "null");
|
|
349
|
+
subject = subject.replace("${spaceId}", replacements.spaceId || "null");
|
|
350
|
+
subject = subject.replace("${base64eventName}", replacements.eventName ? (replacements.eventName === "*" ? "*" : base64Encode(replacements.eventName)) : "null");
|
|
299
351
|
subject = subject.replace("${streamId}", replacements.streamId || "null");
|
|
300
352
|
subject = subject.replace("${designId}", replacements.designId || "null");
|
|
301
353
|
subject = subject.replace("${nodeId}", replacements.nodeId || "null");
|
|
302
354
|
subject = subject.replace("${product}", replacements.product || "null");
|
|
303
|
-
subject = subject.replace("${base64email}", replacements.email ? base64Encode(replacements.email) : "null");
|
|
355
|
+
subject = subject.replace("${base64email}", replacements.email ? (replacements.email === "*" ? "*" : base64Encode(replacements.email)) : "null");
|
|
304
356
|
subject = subject.replace("${webhookId}", replacements.webhookId || "null");
|
|
305
357
|
subject = subject.replace("${jobId}", replacements.jobId || "null");
|
|
306
|
-
subject = subject.replace("${base64teamName}", replacements.teamName ? base64Encode(replacements.teamName) : "null");
|
|
358
|
+
subject = subject.replace("${base64teamName}", replacements.teamName ? (replacements.teamName === "*" ? "*" : base64Encode(replacements.teamName)) : "null");
|
|
359
|
+
subject = subject.replace("${base64poolName}", replacements.poolName ? (replacements.poolName === "*" ? "*" : base64Encode(replacements.poolName)) : "null");
|
|
360
|
+
subject = subject.replace("${poolId}", replacements.poolId || "null");
|
|
361
|
+
subject = subject.replace("${executionId}", replacements.executionId || "null");
|
|
362
|
+
subject = subject.replace("${executionSecret}", replacements.executionSecret || "null");
|
|
307
363
|
return subject;
|
|
308
364
|
};
|
|
309
365
|
const base64Encode = (str) => {
|
|
@@ -13,5 +13,8 @@ export declare class DevBundle extends Base {
|
|
|
13
13
|
* @returns 204 - No content
|
|
14
14
|
*/
|
|
15
15
|
updateDevBundleState(allowDev: boolean): Promise<void>;
|
|
16
|
+
getCurrentVersion(): Promise<string>;
|
|
17
|
+
setCurrentVersion(version: string): Promise<void>;
|
|
18
|
+
restart(): Promise<void>;
|
|
16
19
|
protected getEndpoint(endpoint: string): string;
|
|
17
20
|
}
|
|
@@ -37,6 +37,22 @@ class DevBundle extends Base_1.default {
|
|
|
37
37
|
return resp.data;
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
+
getCurrentVersion() {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const resp = yield this.axios.get(this.getEndpoint("/v1/bundle/version"));
|
|
43
|
+
return resp.data;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
setCurrentVersion(version) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
yield this.axios.put(this.getEndpoint("/v1/bundle/version"), { version }, { headers: { "Content-Type": "application/x-www-form-urlencoded" } });
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
restart() {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
yield this.axios.post(this.getEndpoint("/v1/bundle/restart"));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
40
56
|
getEndpoint(endpoint) {
|
|
41
57
|
return `${this.options.server}/api/agent${endpoint}`;
|
|
42
58
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Base from "../../Base";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { DaliFuseSpace } from "./avatar/DaliFuseSpace";
|
|
3
|
+
import { DaliHigh5Pool } from "./avatar/DaliHigh5Pool";
|
|
4
|
+
import { DaliHigh5Space } from "./avatar/DaliHigh5Space";
|
|
4
5
|
import { DaliOAuthApp } from "./avatar/DaliOAuthApp";
|
|
5
6
|
import { DaliOrganization } from "./avatar/DaliOrganization";
|
|
6
7
|
import { DaliTeam } from "./avatar/DaliTeam";
|
|
@@ -24,12 +25,17 @@ export declare class DaliAvatar extends Base {
|
|
|
24
25
|
/**
|
|
25
26
|
* Handles everything around high5 spaces avatars
|
|
26
27
|
*/
|
|
27
|
-
get high5Space():
|
|
28
|
+
get high5Space(): DaliHigh5Space;
|
|
28
29
|
private _high5Space?;
|
|
30
|
+
/**
|
|
31
|
+
* Handles everything around high5 pools avatars
|
|
32
|
+
*/
|
|
33
|
+
get high5Pool(): DaliHigh5Pool;
|
|
34
|
+
private _high5Pool?;
|
|
29
35
|
/**
|
|
30
36
|
* Handles everything around fuse spaces avatars
|
|
31
37
|
*/
|
|
32
|
-
get fuseSpace():
|
|
38
|
+
get fuseSpace(): DaliFuseSpace;
|
|
33
39
|
private _fuseSpace?;
|
|
34
40
|
/**
|
|
35
41
|
* Handles everything around OAuth applications avatars
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DaliAvatar = void 0;
|
|
4
4
|
const Base_1 = require("../../Base");
|
|
5
5
|
const DaliFuseSpace_1 = require("./avatar/DaliFuseSpace");
|
|
6
|
+
const DaliHigh5Pool_1 = require("./avatar/DaliHigh5Pool");
|
|
6
7
|
const DaliHigh5Space_1 = require("./avatar/DaliHigh5Space");
|
|
7
8
|
const DaliOAuthApp_1 = require("./avatar/DaliOAuthApp");
|
|
8
9
|
const DaliOrganization_1 = require("./avatar/DaliOrganization");
|
|
@@ -41,16 +42,25 @@ class DaliAvatar extends Base_1.default {
|
|
|
41
42
|
*/
|
|
42
43
|
get high5Space() {
|
|
43
44
|
if (this._high5Space === undefined) {
|
|
44
|
-
this._high5Space = new DaliHigh5Space_1.
|
|
45
|
+
this._high5Space = new DaliHigh5Space_1.DaliHigh5Space(this.options, this.axios);
|
|
45
46
|
}
|
|
46
47
|
return this._high5Space;
|
|
47
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Handles everything around high5 pools avatars
|
|
51
|
+
*/
|
|
52
|
+
get high5Pool() {
|
|
53
|
+
if (this._high5Pool === undefined) {
|
|
54
|
+
this._high5Pool = new DaliHigh5Pool_1.DaliHigh5Pool(this.options, this.axios);
|
|
55
|
+
}
|
|
56
|
+
return this._high5Pool;
|
|
57
|
+
}
|
|
48
58
|
/**
|
|
49
59
|
* Handles everything around fuse spaces avatars
|
|
50
60
|
*/
|
|
51
61
|
get fuseSpace() {
|
|
52
62
|
if (this._fuseSpace === undefined) {
|
|
53
|
-
this._fuseSpace = new DaliFuseSpace_1.
|
|
63
|
+
this._fuseSpace = new DaliFuseSpace_1.DaliFuseSpace(this.options, this.axios);
|
|
54
64
|
}
|
|
55
65
|
return this._fuseSpace;
|
|
56
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Base from "../../../Base";
|
|
2
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class DaliFuseSpace extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* Creates a default avatar for the specified Fuse space.
|
|
6
6
|
* @param orgName Name of the organization
|
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.DaliFuseSpace = void 0;
|
|
13
13
|
const Base_1 = require("../../../Base");
|
|
14
|
-
class
|
|
14
|
+
class DaliFuseSpace extends Base_1.default {
|
|
15
15
|
/**
|
|
16
16
|
* Creates a default avatar for the specified Fuse space.
|
|
17
17
|
* @param orgName Name of the organization
|
|
@@ -55,4 +55,4 @@ class DaliFuse extends Base_1.default {
|
|
|
55
55
|
return `${this.options.server}/api/dali${endpoint}`;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
exports.
|
|
58
|
+
exports.DaliFuseSpace = DaliFuseSpace;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Base from "../../../Base";
|
|
2
|
+
import { AvatarCreated } from "../../../interfaces/dali";
|
|
3
|
+
export declare class DaliHigh5Pool extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a default avatar for the specified High5 pool.
|
|
6
|
+
* @param orgName Name of the organization
|
|
7
|
+
* @param spaceName Name of the space
|
|
8
|
+
* @param poolName Name of the pool
|
|
9
|
+
* @returns Public URL of the created avatar
|
|
10
|
+
*/
|
|
11
|
+
createAvatar(orgName: string, spaceName: string, poolName: string): Promise<AvatarCreated>;
|
|
12
|
+
/**
|
|
13
|
+
* Deletes the avatar of the High5 pool from cloud storage. If you want to update it instead, use updateAvatar().
|
|
14
|
+
* @param orgName Name of the organization
|
|
15
|
+
* @param spaceName Name of the space
|
|
16
|
+
* @param poolName Name of the pool
|
|
17
|
+
*/
|
|
18
|
+
deleteAvatar(orgName: string, spaceName: string, poolName: string): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Updates the avatar of the specified High5 pool
|
|
21
|
+
* @param orgName Name of the organization
|
|
22
|
+
* @param spaceName Name of the space
|
|
23
|
+
* @param poolName Name of the pool
|
|
24
|
+
* @param file Image as Javascript File
|
|
25
|
+
* @returns Public URL of the new avatar
|
|
26
|
+
*/
|
|
27
|
+
updateAvatar(orgName: string, spaceName: string, poolName: string, file: File): Promise<AvatarCreated>;
|
|
28
|
+
protected getEndpoint(endpoint: string): string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DaliHigh5Pool = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class DaliHigh5Pool extends Base_1.default {
|
|
15
|
+
/**
|
|
16
|
+
* Creates a default avatar for the specified High5 pool.
|
|
17
|
+
* @param orgName Name of the organization
|
|
18
|
+
* @param spaceName Name of the space
|
|
19
|
+
* @param poolName Name of the pool
|
|
20
|
+
* @returns Public URL of the created avatar
|
|
21
|
+
*/
|
|
22
|
+
createAvatar(orgName, spaceName, poolName) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}/pools/${poolName}`), {});
|
|
25
|
+
return resp.data;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Deletes the avatar of the High5 pool from cloud storage. If you want to update it instead, use updateAvatar().
|
|
30
|
+
* @param orgName Name of the organization
|
|
31
|
+
* @param spaceName Name of the space
|
|
32
|
+
* @param poolName Name of the pool
|
|
33
|
+
*/
|
|
34
|
+
deleteAvatar(orgName, spaceName, poolName) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}/pools/${poolName}`));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Updates the avatar of the specified High5 pool
|
|
41
|
+
* @param orgName Name of the organization
|
|
42
|
+
* @param spaceName Name of the space
|
|
43
|
+
* @param poolName Name of the pool
|
|
44
|
+
* @param file Image as Javascript File
|
|
45
|
+
* @returns Public URL of the new avatar
|
|
46
|
+
*/
|
|
47
|
+
updateAvatar(orgName, spaceName, poolName, file) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const data = new FormData();
|
|
50
|
+
data.append("avatar", file);
|
|
51
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/high5/${spaceName}/pools/${poolName}`), data, {
|
|
52
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
53
|
+
});
|
|
54
|
+
return resp.data;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
getEndpoint(endpoint) {
|
|
58
|
+
return `${this.options.server}/api/dali${endpoint}`;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.DaliHigh5Pool = DaliHigh5Pool;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Base from "../../../Base";
|
|
2
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class DaliHigh5Space extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* Creates a default avatar for the specified High5 space.
|
|
6
6
|
* @param orgName Name of the organization
|
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.DaliHigh5Space = void 0;
|
|
13
13
|
const Base_1 = require("../../../Base");
|
|
14
|
-
class
|
|
14
|
+
class DaliHigh5Space extends Base_1.default {
|
|
15
15
|
/**
|
|
16
16
|
* Creates a default avatar for the specified High5 space.
|
|
17
17
|
* @param orgName Name of the organization
|
|
@@ -55,4 +55,4 @@ class DaliHigh5 extends Base_1.default {
|
|
|
55
55
|
return `${this.options.server}/api/dali${endpoint}`;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
exports.
|
|
58
|
+
exports.DaliHigh5Space = DaliHigh5Space;
|
|
@@ -6,5 +6,13 @@ export declare class High5OrganizationExecute extends Base {
|
|
|
6
6
|
private _logs?;
|
|
7
7
|
get status(): High5OrganizationExecutionStates;
|
|
8
8
|
private _status?;
|
|
9
|
+
/**
|
|
10
|
+
* Cancel stream execution
|
|
11
|
+
* @param orgName Name of the Organization
|
|
12
|
+
* @param spaceName Name of the Space
|
|
13
|
+
* @param high5ExecutionId ID of the stream execution
|
|
14
|
+
* @returns 204 No Content
|
|
15
|
+
*/
|
|
16
|
+
cancelExecution(orgName: string, spaceName: string, high5ExecutionId: string): Promise<void>;
|
|
9
17
|
protected getEndpoint(endpoint: string): string;
|
|
10
18
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.High5OrganizationExecute = void 0;
|
|
4
13
|
const Base_1 = require("../../../Base");
|
|
@@ -17,6 +26,18 @@ class High5OrganizationExecute extends Base_1.default {
|
|
|
17
26
|
}
|
|
18
27
|
return this._status;
|
|
19
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Cancel stream execution
|
|
31
|
+
* @param orgName Name of the Organization
|
|
32
|
+
* @param spaceName Name of the Space
|
|
33
|
+
* @param high5ExecutionId ID of the stream execution
|
|
34
|
+
* @returns 204 No Content
|
|
35
|
+
*/
|
|
36
|
+
cancelExecution(orgName, spaceName, high5ExecutionId) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/${high5ExecutionId}/cancel`));
|
|
39
|
+
});
|
|
40
|
+
}
|
|
20
41
|
getEndpoint(endpoint) {
|
|
21
42
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
22
43
|
}
|
|
@@ -13,7 +13,7 @@ export default class DesignOperations extends Base {
|
|
|
13
13
|
unlinkNodes(uuid: string): OperationQueue;
|
|
14
14
|
protected getEndpoint(endpoint: string): string;
|
|
15
15
|
}
|
|
16
|
-
declare class OperationQueue {
|
|
16
|
+
export declare class OperationQueue {
|
|
17
17
|
operations: DesignOperation[];
|
|
18
18
|
parent: DesignOperations;
|
|
19
19
|
constructor(parent: DesignOperations);
|
|
@@ -28,4 +28,3 @@ declare class OperationQueue {
|
|
|
28
28
|
linkNodes(details: LinkNodes["details"]): this;
|
|
29
29
|
unlinkNodes(uuid: string): this;
|
|
30
30
|
}
|
|
31
|
-
export {};
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OperationQueue = void 0;
|
|
12
13
|
const Base_1 = require("../../../../../../Base");
|
|
13
14
|
const DesignOperation_1 = require("../../../../../../interfaces/high5/space/event/stream/design/DesignOperation");
|
|
14
15
|
class DesignOperations extends Base_1.default {
|
|
@@ -115,3 +116,4 @@ class OperationQueue {
|
|
|
115
116
|
return this;
|
|
116
117
|
}
|
|
117
118
|
}
|
|
119
|
+
exports.OperationQueue = OperationQueue;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Base from "../../../../Base";
|
|
2
|
+
import { DebugCommand } from "../../../../interfaces/high5";
|
|
2
3
|
import { High5ExecutionPackage, High5ExecutionPatch, High5ExecutionRequest, High5ExecutionResponse } from "../../../../interfaces/high5/space/execution";
|
|
3
4
|
import { High5SpaceExecutionLogs } from "./log/index";
|
|
4
5
|
import { High5SpaceExecutionStates } from "./status/index";
|
|
@@ -15,7 +16,7 @@ export declare class High5SpaceExecute extends Base {
|
|
|
15
16
|
* @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
|
|
16
17
|
* @returns the stream result
|
|
17
18
|
*/
|
|
18
|
-
executeHigh5Stream(orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest, design?: boolean): Promise<High5ExecutionResponse>;
|
|
19
|
+
executeHigh5Stream(orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest, design?: boolean, debug?: boolean): Promise<High5ExecutionResponse>;
|
|
19
20
|
/**
|
|
20
21
|
* Executes all streams within an event.
|
|
21
22
|
* @param orgName Name of the Organization
|
|
@@ -44,5 +45,31 @@ export declare class High5SpaceExecute extends Base {
|
|
|
44
45
|
* @returns StreamLog
|
|
45
46
|
*/
|
|
46
47
|
high5ExecutionStatusAndLogResponse(orgName: string, spaceName: string, secret: string, high5ExecutionResponse: High5ExecutionPatch): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Issue debug command to a stopped execution running in debug mode.
|
|
50
|
+
* If the agent that is handling this execution does not acknowledge
|
|
51
|
+
* the debug command after a certain timeframe, a timeout error will
|
|
52
|
+
* be thrown.
|
|
53
|
+
*
|
|
54
|
+
* Only the user that triggered the execution can send debug commands.
|
|
55
|
+
*
|
|
56
|
+
* @param orgName Name of the organization
|
|
57
|
+
* @param spaceName Name of the space
|
|
58
|
+
* @param executionId ID of the execution. Obtained from High5ExecutionResponse
|
|
59
|
+
* @param command DebugCommand to send
|
|
60
|
+
*/
|
|
61
|
+
issueDebugCommand(orgName: string, spaceName: string, executionId: string, command: DebugCommand): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Log an execution crash to High5
|
|
64
|
+
*
|
|
65
|
+
* Useful when regular logging is not possible.
|
|
66
|
+
*
|
|
67
|
+
* @param orgName the organizations's name
|
|
68
|
+
* @param spaceName the spaces's name
|
|
69
|
+
* @param streamId the id of the stream
|
|
70
|
+
* @param secret the secret of the stream execution object
|
|
71
|
+
* @param message crash log
|
|
72
|
+
*/
|
|
73
|
+
logExecutionCrash(orgName: string, spaceName: string, secret: string, message?: string): Promise<void>;
|
|
47
74
|
protected getEndpoint(endpoint: string): string;
|
|
48
75
|
}
|
|
@@ -35,8 +35,13 @@ class High5SpaceExecute extends Base_1.default {
|
|
|
35
35
|
* @returns the stream result
|
|
36
36
|
*/
|
|
37
37
|
executeHigh5Stream(orgName_1, spaceName_1, streamId_1, high5ExecutionRequest_1) {
|
|
38
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamId, high5ExecutionRequest, design = false) {
|
|
39
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}
|
|
38
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamId, high5ExecutionRequest, design = false, debug = false) {
|
|
39
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}`), high5ExecutionRequest, {
|
|
40
|
+
params: {
|
|
41
|
+
design,
|
|
42
|
+
debug,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
40
45
|
return resp.data;
|
|
41
46
|
});
|
|
42
47
|
}
|
|
@@ -82,6 +87,40 @@ class High5SpaceExecute extends Base_1.default {
|
|
|
82
87
|
yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/${secret}`), high5ExecutionResponse);
|
|
83
88
|
});
|
|
84
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Issue debug command to a stopped execution running in debug mode.
|
|
92
|
+
* If the agent that is handling this execution does not acknowledge
|
|
93
|
+
* the debug command after a certain timeframe, a timeout error will
|
|
94
|
+
* be thrown.
|
|
95
|
+
*
|
|
96
|
+
* Only the user that triggered the execution can send debug commands.
|
|
97
|
+
*
|
|
98
|
+
* @param orgName Name of the organization
|
|
99
|
+
* @param spaceName Name of the space
|
|
100
|
+
* @param executionId ID of the execution. Obtained from High5ExecutionResponse
|
|
101
|
+
* @param command DebugCommand to send
|
|
102
|
+
*/
|
|
103
|
+
issueDebugCommand(orgName, spaceName, executionId, command) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/${executionId}`), command);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Log an execution crash to High5
|
|
110
|
+
*
|
|
111
|
+
* Useful when regular logging is not possible.
|
|
112
|
+
*
|
|
113
|
+
* @param orgName the organizations's name
|
|
114
|
+
* @param spaceName the spaces's name
|
|
115
|
+
* @param streamId the id of the stream
|
|
116
|
+
* @param secret the secret of the stream execution object
|
|
117
|
+
* @param message crash log
|
|
118
|
+
*/
|
|
119
|
+
logExecutionCrash(orgName, spaceName, secret, message) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/${secret}/crash`), { message });
|
|
122
|
+
});
|
|
123
|
+
}
|
|
85
124
|
getEndpoint(endpoint) {
|
|
86
125
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
87
126
|
}
|
|
@@ -5,6 +5,7 @@ import { High5Space as Space, High5SpaceEntityPermission as SpaceEntityPermissio
|
|
|
5
5
|
import { High5Event } from "./event";
|
|
6
6
|
import { High5SpaceExecute } from "./execution";
|
|
7
7
|
import High5Node from "./node";
|
|
8
|
+
import High5Pool from "./pool";
|
|
8
9
|
import High5Secret from "./secret";
|
|
9
10
|
import High5Wave from "./wave";
|
|
10
11
|
import { High5Webhook } from "./webhook";
|
|
@@ -17,6 +18,8 @@ export declare class High5Space extends Base {
|
|
|
17
18
|
private _webhook?;
|
|
18
19
|
get secret(): High5Secret;
|
|
19
20
|
private _secret?;
|
|
21
|
+
get pool(): High5Pool;
|
|
22
|
+
private _pool?;
|
|
20
23
|
get wave(): High5Wave;
|
|
21
24
|
private _wave?;
|
|
22
25
|
get node(): High5Node;
|
|
@@ -16,6 +16,7 @@ const searchFilter_1 = require("../../../helper/searchFilter");
|
|
|
16
16
|
const event_1 = require("./event");
|
|
17
17
|
const execution_1 = require("./execution");
|
|
18
18
|
const node_1 = require("./node");
|
|
19
|
+
const pool_1 = require("./pool");
|
|
19
20
|
const secret_1 = require("./secret");
|
|
20
21
|
const wave_1 = require("./wave");
|
|
21
22
|
const webhook_1 = require("./webhook");
|
|
@@ -44,6 +45,12 @@ class High5Space extends Base_1.default {
|
|
|
44
45
|
}
|
|
45
46
|
return this._secret;
|
|
46
47
|
}
|
|
48
|
+
get pool() {
|
|
49
|
+
if (this._pool === undefined) {
|
|
50
|
+
this._pool = new pool_1.default(this.options, this.axios);
|
|
51
|
+
}
|
|
52
|
+
return this._pool;
|
|
53
|
+
}
|
|
47
54
|
get wave() {
|
|
48
55
|
if (this._wave === undefined) {
|
|
49
56
|
this._wave = new wave_1.default(this.options, this.axios);
|