hcloud-sdk 15.0.0 → 17.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 +78 -33
- package/lib/Hcloud.d.ts +3 -0
- package/lib/Hcloud.js +7 -0
- package/lib/helper/ValidationHelper.d.ts +66 -0
- package/lib/helper/ValidationHelper.js +312 -0
- package/lib/interfaces/auditor/index.d.ts +10 -4
- package/lib/interfaces/auditor/index.js +4 -0
- package/lib/interfaces/friday/index.d.ts +3 -0
- package/lib/interfaces/friday/index.js +19 -0
- package/lib/interfaces/friday/space/database/document/index.d.ts +34 -0
- package/lib/interfaces/friday/space/database/document/index.js +13 -0
- package/lib/interfaces/friday/space/database/index.d.ts +12 -0
- package/lib/interfaces/friday/space/database/index.js +2 -0
- package/lib/interfaces/friday/space/index.d.ts +21 -0
- package/lib/interfaces/friday/space/index.js +11 -0
- package/lib/interfaces/frontend/config/index.d.ts +1 -0
- package/lib/interfaces/fuse/space/index.d.ts +1 -0
- package/lib/interfaces/global/Products.d.ts +3 -1
- package/lib/interfaces/global/Products.js +2 -0
- package/lib/interfaces/global/Views.d.ts +2 -1
- package/lib/interfaces/global/Views.js +1 -0
- package/lib/interfaces/high5/execution/index.d.ts +43 -0
- package/lib/interfaces/high5/execution/index.js +12 -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 +22 -1
- package/lib/interfaces/high5/space/event/stream/node/index.js +6 -1
- package/lib/interfaces/high5/space/execution/index.d.ts +57 -1
- package/lib/interfaces/high5/space/execution/index.js +8 -0
- package/lib/interfaces/high5/space/index.d.ts +2 -0
- package/lib/interfaces/high5/space/pool/index.d.ts +28 -0
- package/lib/interfaces/high5/space/pool/index.js +2 -0
- package/lib/interfaces/high5/space/webhook/index.d.ts +3 -1
- package/lib/interfaces/high5/wave/index.d.ts +26 -4
- package/lib/interfaces/high5/wave/index.js +4 -0
- package/lib/interfaces/idp/index.d.ts +1 -0
- package/lib/interfaces/idp/index.js +1 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +11 -0
- package/lib/interfaces/idp/organization/member/index.d.ts +3 -0
- package/lib/interfaces/idp/organization/service-accounts.d.ts +8 -0
- package/lib/interfaces/idp/organization/service-accounts.js +2 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +1 -0
- package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/GeneralSettings.js +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +15 -2
- package/lib/interfaces/idp/user/Scopes.js +39 -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 +92 -5
- package/lib/interfaces/nats/index.js +155 -11
- package/lib/service/agent/bundle/dev/index.d.ts +3 -0
- package/lib/service/agent/bundle/dev/index.js +16 -0
- package/lib/service/agent/context/index.d.ts +5 -0
- package/lib/service/agent/context/index.js +14 -0
- package/lib/service/dali/DaliAvatar.d.ts +22 -4
- package/lib/service/dali/DaliAvatar.js +32 -2
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +26 -0
- package/lib/service/dali/avatar/DaliCosmoSpace.js +58 -0
- 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/dali/avatar/DaliServiceAccount.d.ts +26 -0
- package/lib/service/dali/avatar/DaliServiceAccount.js +58 -0
- package/lib/service/friday/index.d.ts +13 -0
- package/lib/service/friday/index.js +35 -0
- package/lib/service/friday/space/database/document/index.d.ts +58 -0
- package/lib/service/friday/space/database/document/index.js +97 -0
- package/lib/service/friday/space/database/index.d.ts +55 -0
- package/lib/service/friday/space/database/index.js +101 -0
- package/lib/service/friday/space/index.d.ts +81 -0
- package/lib/service/friday/space/index.js +150 -0
- 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 +5 -1
- package/lib/service/high5/space/execution/index.d.ts +31 -1
- package/lib/service/high5/space/execution/index.js +47 -2
- package/lib/service/high5/space/execution/status/index.d.ts +13 -6
- package/lib/service/high5/space/execution/status/index.js +20 -8
- package/lib/service/high5/space/index.d.ts +18 -6
- package/lib/service/high5/space/index.js +30 -7
- 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 +29 -8
- package/lib/service/idp/oauth/index.d.ts +2 -2
- package/lib/service/idp/oauth/index.js +12 -13
- package/lib/service/idp/organization/index.d.ts +6 -0
- package/lib/service/idp/organization/index.js +10 -0
- package/lib/service/idp/organization/member/index.d.ts +2 -1
- package/lib/service/idp/organization/member/index.js +2 -1
- package/lib/service/idp/organization/service-accounts/index.d.ts +64 -0
- package/lib/service/idp/organization/service-accounts/index.js +108 -0
- 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 +9 -0
- package/lib/service/idp/user/password/index.js +1 -1
- 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/lib/service/mothership/index.js +0 -1
- package/lib/service/nats/index.js +2 -3
- package/lib/utils/bouncer/features/Provider.js +0 -3
- package/package.json +22 -24
|
@@ -0,0 +1,150 @@
|
|
|
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.FridaySpace = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelper");
|
|
15
|
+
const searchFilter_1 = require("../../../helper/searchFilter");
|
|
16
|
+
const database_1 = require("./database");
|
|
17
|
+
class FridaySpace extends Base_1.default {
|
|
18
|
+
get database() {
|
|
19
|
+
if (this._database === undefined) {
|
|
20
|
+
this._database = new database_1.FridayDatabase(this.options, this.axios);
|
|
21
|
+
}
|
|
22
|
+
return this._database;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves all Friday Spaces of the specified Organization matching the search filter(s). Will return all Spaces if no search filter is provided.
|
|
26
|
+
* @param orgName Name of the organization
|
|
27
|
+
* @param filters (optional) Array of search filters
|
|
28
|
+
* @param sorting (optional) Sorting object
|
|
29
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
30
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
31
|
+
* @returns Object containing an array of Friday Spaces and the total number of results found in the database (independent of limit and page)
|
|
32
|
+
*/
|
|
33
|
+
searchSpaces(_a) {
|
|
34
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }) {
|
|
35
|
+
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
36
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/search?page=${page}&limit=${limit}`), {
|
|
37
|
+
filters: filtersDTO,
|
|
38
|
+
sorting: sorting,
|
|
39
|
+
});
|
|
40
|
+
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves a Friday Space by its name.
|
|
45
|
+
* @param orgName Name of the Organization
|
|
46
|
+
* @param spaceName Name of the Friday Space
|
|
47
|
+
* @returns The requested Space
|
|
48
|
+
*/
|
|
49
|
+
getSpace(orgName, spaceName) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
52
|
+
return resp.data;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Creates a new Friday Space in the specified Organization.
|
|
57
|
+
* @param orgName Name of the Organization
|
|
58
|
+
* @param name Name for the new Space
|
|
59
|
+
* @returns The created Space
|
|
60
|
+
*/
|
|
61
|
+
createSpace(orgName, name) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name });
|
|
64
|
+
return resp.data;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Delete a space by its name.
|
|
69
|
+
* @param orgName Name of the Organization
|
|
70
|
+
* @param spaceName Name of the Space
|
|
71
|
+
*/
|
|
72
|
+
deleteSpace(orgName, spaceName) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Updates the name of a space.
|
|
79
|
+
* @param orgName Name of the organization
|
|
80
|
+
* @param spaceName Current name of the space
|
|
81
|
+
* @param newSpaceName New name for the space
|
|
82
|
+
* @returns The updated space
|
|
83
|
+
*/
|
|
84
|
+
renameSpace(orgName, spaceName, newSpaceName) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
|
|
87
|
+
newSpaceName,
|
|
88
|
+
});
|
|
89
|
+
return resp.data;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
94
|
+
* @param orgName Name of the organization
|
|
95
|
+
* @param spaceName Name of the space
|
|
96
|
+
* @param filters (optional) Array of search filters
|
|
97
|
+
* @param sorting (optional) Sorting object
|
|
98
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
99
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
100
|
+
* @returns Object containing an array of Friday Space Permissions and the total number of results found in the database (independent of limit and page)
|
|
101
|
+
*/
|
|
102
|
+
searchSpacePermissions(_a) {
|
|
103
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
|
|
104
|
+
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
105
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
|
|
106
|
+
filters: filtersDTO,
|
|
107
|
+
sorting: sorting,
|
|
108
|
+
});
|
|
109
|
+
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Adds/Updates/Removes the permission a user has in the specified space.
|
|
114
|
+
* @param orgName Name of the Organization
|
|
115
|
+
* @param spaceName Name of the Space
|
|
116
|
+
* @param userId ID of the User
|
|
117
|
+
* @param permission New permission
|
|
118
|
+
* @returns The Space with updated permissions
|
|
119
|
+
*/
|
|
120
|
+
updateUserSpacePermission(orgName, spaceName, userId, permission) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
|
|
123
|
+
userId,
|
|
124
|
+
permission,
|
|
125
|
+
});
|
|
126
|
+
return resp.data;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
|
|
131
|
+
* @param orgName Name of the Organization
|
|
132
|
+
* @param spaceName Name of the Space
|
|
133
|
+
* @param teamName Name of the Team
|
|
134
|
+
* @param permission New permission
|
|
135
|
+
* @returns The Space with updated permissions
|
|
136
|
+
*/
|
|
137
|
+
updateTeamSpacePermission(orgName, spaceName, teamName, permission) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
|
|
140
|
+
teamName,
|
|
141
|
+
permission,
|
|
142
|
+
});
|
|
143
|
+
return resp.data;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
getEndpoint(endpoint) {
|
|
147
|
+
return `${this.options.server}/api/friday${endpoint}`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.FridaySpace = FridaySpace;
|
|
@@ -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 {
|
|
@@ -56,7 +57,9 @@ class OperationQueue {
|
|
|
56
57
|
this.parent = parent;
|
|
57
58
|
}
|
|
58
59
|
send(orgName, spaceName, eventName, streamId, designHash) {
|
|
59
|
-
|
|
60
|
+
const entriesToSend = [...this.operations];
|
|
61
|
+
this.operations = [];
|
|
62
|
+
return this.parent.send(orgName, spaceName, eventName, streamId, designHash, entriesToSend);
|
|
60
63
|
}
|
|
61
64
|
addNode(details) {
|
|
62
65
|
const op = {
|
|
@@ -115,3 +118,4 @@ class OperationQueue {
|
|
|
115
118
|
return this;
|
|
116
119
|
}
|
|
117
120
|
}
|
|
121
|
+
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";
|
|
@@ -13,9 +14,12 @@ export declare class High5SpaceExecute extends Base {
|
|
|
13
14
|
* @param spaceName the spaces's name
|
|
14
15
|
* @param streamId to identify the stream
|
|
15
16
|
* @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
|
|
17
|
+
* @param design if true the stream will execute the current design rather than the published design build
|
|
18
|
+
* @param debug if true the stream will execute in debug mode and consider breakpoints
|
|
19
|
+
* @param overrideUserAgent if true the User-Agent header will be overwritten with "hcloud-stream" to identify this execution got triggered from within a stream with the TriggerStreamAction node
|
|
16
20
|
* @returns the stream result
|
|
17
21
|
*/
|
|
18
|
-
executeHigh5Stream(orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest, design?: boolean): Promise<High5ExecutionResponse>;
|
|
22
|
+
executeHigh5Stream(orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest, design?: boolean, debug?: boolean, overrideUserAgent?: boolean): Promise<High5ExecutionResponse>;
|
|
19
23
|
/**
|
|
20
24
|
* Executes all streams within an event.
|
|
21
25
|
* @param orgName Name of the Organization
|
|
@@ -44,5 +48,31 @@ export declare class High5SpaceExecute extends Base {
|
|
|
44
48
|
* @returns StreamLog
|
|
45
49
|
*/
|
|
46
50
|
high5ExecutionStatusAndLogResponse(orgName: string, spaceName: string, secret: string, high5ExecutionResponse: High5ExecutionPatch): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Issue debug command to a stopped execution running in debug mode.
|
|
53
|
+
* If the agent that is handling this execution does not acknowledge
|
|
54
|
+
* the debug command after a certain timeframe, a timeout error will
|
|
55
|
+
* be thrown.
|
|
56
|
+
*
|
|
57
|
+
* Only the user that triggered the execution can send debug commands.
|
|
58
|
+
*
|
|
59
|
+
* @param orgName Name of the organization
|
|
60
|
+
* @param spaceName Name of the space
|
|
61
|
+
* @param executionId ID of the execution. Obtained from High5ExecutionResponse
|
|
62
|
+
* @param command DebugCommand to send
|
|
63
|
+
*/
|
|
64
|
+
issueDebugCommand(orgName: string, spaceName: string, executionId: string, command: DebugCommand): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Log an execution crash to High5
|
|
67
|
+
*
|
|
68
|
+
* Useful when regular logging is not possible.
|
|
69
|
+
*
|
|
70
|
+
* @param orgName the organizations's name
|
|
71
|
+
* @param spaceName the spaces's name
|
|
72
|
+
* @param streamId the id of the stream
|
|
73
|
+
* @param secret the secret of the stream execution object
|
|
74
|
+
* @param message crash log
|
|
75
|
+
*/
|
|
76
|
+
logExecutionCrash(orgName: string, spaceName: string, secret: string, message?: string): Promise<void>;
|
|
47
77
|
protected getEndpoint(endpoint: string): string;
|
|
48
78
|
}
|
|
@@ -32,11 +32,22 @@ class High5SpaceExecute extends Base_1.default {
|
|
|
32
32
|
* @param spaceName the spaces's name
|
|
33
33
|
* @param streamId to identify the stream
|
|
34
34
|
* @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
|
|
35
|
+
* @param design if true the stream will execute the current design rather than the published design build
|
|
36
|
+
* @param debug if true the stream will execute in debug mode and consider breakpoints
|
|
37
|
+
* @param overrideUserAgent if true the User-Agent header will be overwritten with "hcloud-stream" to identify this execution got triggered from within a stream with the TriggerStreamAction node
|
|
35
38
|
* @returns the stream result
|
|
36
39
|
*/
|
|
37
40
|
executeHigh5Stream(orgName_1, spaceName_1, streamId_1, high5ExecutionRequest_1) {
|
|
38
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamId, high5ExecutionRequest, design = false) {
|
|
39
|
-
|
|
41
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamId, high5ExecutionRequest, design = false, debug = false, overrideUserAgent = false) {
|
|
42
|
+
if (overrideUserAgent) {
|
|
43
|
+
this.axios.defaults.headers.common["User-Agent"] = "hcloud-stream";
|
|
44
|
+
}
|
|
45
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}`), high5ExecutionRequest, {
|
|
46
|
+
params: {
|
|
47
|
+
design,
|
|
48
|
+
debug,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
40
51
|
return resp.data;
|
|
41
52
|
});
|
|
42
53
|
}
|
|
@@ -82,6 +93,40 @@ class High5SpaceExecute extends Base_1.default {
|
|
|
82
93
|
yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/${secret}`), high5ExecutionResponse);
|
|
83
94
|
});
|
|
84
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Issue debug command to a stopped execution running in debug mode.
|
|
98
|
+
* If the agent that is handling this execution does not acknowledge
|
|
99
|
+
* the debug command after a certain timeframe, a timeout error will
|
|
100
|
+
* be thrown.
|
|
101
|
+
*
|
|
102
|
+
* Only the user that triggered the execution can send debug commands.
|
|
103
|
+
*
|
|
104
|
+
* @param orgName Name of the organization
|
|
105
|
+
* @param spaceName Name of the space
|
|
106
|
+
* @param executionId ID of the execution. Obtained from High5ExecutionResponse
|
|
107
|
+
* @param command DebugCommand to send
|
|
108
|
+
*/
|
|
109
|
+
issueDebugCommand(orgName, spaceName, executionId, command) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/${executionId}/debug`), command);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Log an execution crash to High5
|
|
116
|
+
*
|
|
117
|
+
* Useful when regular logging is not possible.
|
|
118
|
+
*
|
|
119
|
+
* @param orgName the organizations's name
|
|
120
|
+
* @param spaceName the spaces's name
|
|
121
|
+
* @param streamId the id of the stream
|
|
122
|
+
* @param secret the secret of the stream execution object
|
|
123
|
+
* @param message crash log
|
|
124
|
+
*/
|
|
125
|
+
logExecutionCrash(orgName, spaceName, secret, message) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/${secret}/crash`), { message });
|
|
128
|
+
});
|
|
129
|
+
}
|
|
85
130
|
getEndpoint(endpoint) {
|
|
86
131
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
87
132
|
}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import Base, { Options } from "../../../../../Base";
|
|
3
|
-
import {
|
|
4
|
-
import { High5ExecutionStatus } from "../../../../../interfaces/high5/space/execution";
|
|
3
|
+
import { ExecutionTree, High5ExecutionStatus } from "../../../../../interfaces/high5/space/execution";
|
|
5
4
|
export declare class High5SpaceExecutionStates extends Base {
|
|
6
5
|
constructor(options: Options, axios: AxiosInstance);
|
|
7
6
|
/**
|
|
8
|
-
* Retrieves
|
|
7
|
+
* Retrieves an execution status by ID.
|
|
9
8
|
* @param orgName Name of the Organization
|
|
10
9
|
* @param spaceName Name of the Space
|
|
11
|
-
* @param
|
|
12
|
-
* @returns
|
|
10
|
+
* @param executionStatusId ID of the execution status
|
|
11
|
+
* @returns High5ExecutionStatus
|
|
13
12
|
*/
|
|
14
|
-
getStreamExecutionStatus(orgName: string, spaceName: string,
|
|
13
|
+
getStreamExecutionStatus(orgName: string, spaceName: string, executionStatusId: string): Promise<High5ExecutionStatus>;
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves the complete executionTree the stream execution belongs to. An executionTree represents the hierarchical structure of stream executions initiated by a 'Trigger Stream' node.
|
|
16
|
+
* @param orgName Name of the Organization
|
|
17
|
+
* @param spaceName Name of the Space
|
|
18
|
+
* @param executionStatusId ID of the execution status
|
|
19
|
+
* @returns ExecutionTree
|
|
20
|
+
*/
|
|
21
|
+
getExecutionTree(orgName: string, spaceName: string, executionStatusId: string): Promise<ExecutionTree>;
|
|
15
22
|
protected getEndpoint(endpoint: string): string;
|
|
16
23
|
}
|
|
@@ -11,22 +11,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.High5SpaceExecutionStates = void 0;
|
|
13
13
|
const Base_1 = require("../../../../../Base");
|
|
14
|
-
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
14
|
class High5SpaceExecutionStates extends Base_1.default {
|
|
16
15
|
constructor(options, axios) {
|
|
17
16
|
super(options, axios);
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
|
-
* Retrieves
|
|
19
|
+
* Retrieves an execution status by ID.
|
|
21
20
|
* @param orgName Name of the Organization
|
|
22
21
|
* @param spaceName Name of the Space
|
|
23
|
-
* @param
|
|
24
|
-
* @returns
|
|
22
|
+
* @param executionStatusId ID of the execution status
|
|
23
|
+
* @returns High5ExecutionStatus
|
|
25
24
|
*/
|
|
26
|
-
getStreamExecutionStatus(
|
|
27
|
-
return __awaiter(this,
|
|
28
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/status/${
|
|
29
|
-
return
|
|
25
|
+
getStreamExecutionStatus(orgName, spaceName, executionStatusId) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/status/${executionStatusId}`));
|
|
28
|
+
return resp.data;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the complete executionTree the stream execution belongs to. An executionTree represents the hierarchical structure of stream executions initiated by a 'Trigger Stream' node.
|
|
33
|
+
* @param orgName Name of the Organization
|
|
34
|
+
* @param spaceName Name of the Space
|
|
35
|
+
* @param executionStatusId ID of the execution status
|
|
36
|
+
* @returns ExecutionTree
|
|
37
|
+
*/
|
|
38
|
+
getExecutionTree(orgName, spaceName, executionStatusId) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/executionTree/${executionStatusId}`));
|
|
41
|
+
return resp.data;
|
|
30
42
|
});
|
|
31
43
|
}
|
|
32
44
|
getEndpoint(endpoint) {
|
|
@@ -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;
|
|
@@ -36,7 +39,7 @@ export declare class High5Space extends Base {
|
|
|
36
39
|
/**
|
|
37
40
|
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
38
41
|
* @param orgName Name of the organization
|
|
39
|
-
* @param spaceName Name of the
|
|
42
|
+
* @param spaceName Name of the Space
|
|
40
43
|
* @param filters (optional) Array of search filters
|
|
41
44
|
* @param sorting (optional) Sorting object
|
|
42
45
|
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
@@ -50,7 +53,7 @@ export declare class High5Space extends Base {
|
|
|
50
53
|
/**
|
|
51
54
|
* Retrieves a High5 Space by its name.
|
|
52
55
|
* @param orgName Name of the Organization
|
|
53
|
-
* @param
|
|
56
|
+
* @param spaceName Name of the space
|
|
54
57
|
* @returns The requested Space
|
|
55
58
|
*/
|
|
56
59
|
getSpace(orgName: string, spaceName: string): Promise<Space>;
|
|
@@ -58,9 +61,10 @@ export declare class High5Space extends Base {
|
|
|
58
61
|
* Creates a new High5 Space in the specified Organization.
|
|
59
62
|
* @param orgName Name of the Organization
|
|
60
63
|
* @param name Name for the new Space
|
|
64
|
+
* @param enableDev (optional) Specifies to the front-end whether to display the versions in the development of Wave Engines and Node Catalogs
|
|
61
65
|
* @returns The created Space
|
|
62
66
|
*/
|
|
63
|
-
createSpace(orgName: string, name: string): Promise<Space>;
|
|
67
|
+
createSpace(orgName: string, name: string, enableDev?: boolean): Promise<Space>;
|
|
64
68
|
/**
|
|
65
69
|
* Delete a space by its name.
|
|
66
70
|
* @param orgName Name of the Organization
|
|
@@ -88,7 +92,7 @@ export declare class High5Space extends Base {
|
|
|
88
92
|
/**
|
|
89
93
|
* Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
|
|
90
94
|
* @param orgName Name of the organization
|
|
91
|
-
* @param
|
|
95
|
+
* @param spaceName Name of the space
|
|
92
96
|
* @param filters (optional) Array of search filters
|
|
93
97
|
* @param sorting (optional) Sorting object
|
|
94
98
|
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
@@ -102,10 +106,18 @@ export declare class High5Space extends Base {
|
|
|
102
106
|
/**
|
|
103
107
|
* Updates the name of a space.
|
|
104
108
|
* @param orgName Name of the organization
|
|
105
|
-
* @param
|
|
106
|
-
* @param
|
|
109
|
+
* @param spaceName Current name of the space
|
|
110
|
+
* @param newSpaceName New name for the space
|
|
107
111
|
* @returns The updated space
|
|
108
112
|
*/
|
|
109
113
|
renameSpace(orgName: string, spaceName: string, newSpaceName: string): Promise<Space>;
|
|
114
|
+
/**
|
|
115
|
+
* Specifies to the front-end whether to display the versions under development of Wave Engines and Node Catalogs.
|
|
116
|
+
* @param orgName Name of the organization
|
|
117
|
+
* @param spaceName Name of the space
|
|
118
|
+
* @param enableDev Specifies to the front-end whether to display the versions under development of Wave Engines and Node Catalogs
|
|
119
|
+
* @returns The updated space
|
|
120
|
+
*/
|
|
121
|
+
enableDev(orgName: string, spaceName: string, enableDev: boolean): Promise<Space>;
|
|
110
122
|
protected getEndpoint(endpoint: string): string;
|
|
111
123
|
}
|
|
@@ -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);
|
|
@@ -78,7 +85,7 @@ class High5Space extends Base_1.default {
|
|
|
78
85
|
/**
|
|
79
86
|
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
80
87
|
* @param orgName Name of the organization
|
|
81
|
-
* @param spaceName Name of the
|
|
88
|
+
* @param spaceName Name of the Space
|
|
82
89
|
* @param filters (optional) Array of search filters
|
|
83
90
|
* @param sorting (optional) Sorting object
|
|
84
91
|
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
@@ -98,7 +105,7 @@ class High5Space extends Base_1.default {
|
|
|
98
105
|
/**
|
|
99
106
|
* Retrieves a High5 Space by its name.
|
|
100
107
|
* @param orgName Name of the Organization
|
|
101
|
-
* @param
|
|
108
|
+
* @param spaceName Name of the space
|
|
102
109
|
* @returns The requested Space
|
|
103
110
|
*/
|
|
104
111
|
getSpace(orgName, spaceName) {
|
|
@@ -111,11 +118,12 @@ class High5Space extends Base_1.default {
|
|
|
111
118
|
* Creates a new High5 Space in the specified Organization.
|
|
112
119
|
* @param orgName Name of the Organization
|
|
113
120
|
* @param name Name for the new Space
|
|
121
|
+
* @param enableDev (optional) Specifies to the front-end whether to display the versions in the development of Wave Engines and Node Catalogs
|
|
114
122
|
* @returns The created Space
|
|
115
123
|
*/
|
|
116
|
-
createSpace(orgName, name) {
|
|
124
|
+
createSpace(orgName, name, enableDev) {
|
|
117
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name:
|
|
126
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name, enableDev: Boolean(enableDev) });
|
|
119
127
|
return resp.data;
|
|
120
128
|
});
|
|
121
129
|
}
|
|
@@ -166,7 +174,7 @@ class High5Space extends Base_1.default {
|
|
|
166
174
|
/**
|
|
167
175
|
* Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
|
|
168
176
|
* @param orgName Name of the organization
|
|
169
|
-
* @param
|
|
177
|
+
* @param spaceName Name of the space
|
|
170
178
|
* @param filters (optional) Array of search filters
|
|
171
179
|
* @param sorting (optional) Sorting object
|
|
172
180
|
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
@@ -186,8 +194,8 @@ class High5Space extends Base_1.default {
|
|
|
186
194
|
/**
|
|
187
195
|
* Updates the name of a space.
|
|
188
196
|
* @param orgName Name of the organization
|
|
189
|
-
* @param
|
|
190
|
-
* @param
|
|
197
|
+
* @param spaceName Current name of the space
|
|
198
|
+
* @param newSpaceName New name for the space
|
|
191
199
|
* @returns The updated space
|
|
192
200
|
*/
|
|
193
201
|
renameSpace(orgName, spaceName, newSpaceName) {
|
|
@@ -198,6 +206,21 @@ class High5Space extends Base_1.default {
|
|
|
198
206
|
return resp.data;
|
|
199
207
|
});
|
|
200
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Specifies to the front-end whether to display the versions under development of Wave Engines and Node Catalogs.
|
|
211
|
+
* @param orgName Name of the organization
|
|
212
|
+
* @param spaceName Name of the space
|
|
213
|
+
* @param enableDev Specifies to the front-end whether to display the versions under development of Wave Engines and Node Catalogs
|
|
214
|
+
* @returns The updated space
|
|
215
|
+
*/
|
|
216
|
+
enableDev(orgName, spaceName, enableDev) {
|
|
217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/dev`), {
|
|
219
|
+
enableDev,
|
|
220
|
+
});
|
|
221
|
+
return resp.data;
|
|
222
|
+
});
|
|
223
|
+
}
|
|
201
224
|
getEndpoint(endpoint) {
|
|
202
225
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
203
226
|
}
|