hcloud-sdk 14.13.2 → 15.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 +36 -800
- package/lib/Hcloud.d.ts +20 -10
- package/lib/Hcloud.js +60 -10
- package/lib/interfaces/bouncer/features/index.d.ts +3 -6
- package/lib/interfaces/frontend/featureflags/index.d.ts +7 -0
- package/lib/interfaces/frontend/featureflags/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +2 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +11 -0
- package/lib/interfaces/high5/wave/changelog.d.ts +30 -0
- package/lib/interfaces/high5/wave/changelog.js +18 -0
- package/lib/interfaces/high5/wave/index.d.ts +31 -1
- package/lib/interfaces/high5/wave/index.js +10 -1
- package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
- package/lib/interfaces/mothership/index.d.ts +1 -0
- package/lib/interfaces/nats/index.d.ts +8 -21
- package/lib/interfaces/nats/index.js +72 -90
- package/lib/service/agent/bundle/dev/index.d.ts +2 -2
- package/lib/service/agent/bundle/dev/index.js +14 -10
- package/lib/service/agent/context/index.d.ts +7 -9
- package/lib/service/agent/context/index.js +41 -32
- package/lib/service/agent/index.d.ts +9 -7
- package/lib/service/agent/index.js +23 -6
- package/lib/service/auditor/index.d.ts +6 -7
- package/lib/service/auditor/index.js +23 -17
- package/lib/service/auditor/internal/index.d.ts +2 -2
- package/lib/service/auditor/internal/index.js +24 -20
- package/lib/service/bouncer/features/index.d.ts +1 -1
- package/lib/service/bouncer/features/index.js +5 -3
- package/lib/service/bouncer/index.d.ts +3 -10
- package/lib/service/bouncer/index.js +6 -21
- package/lib/service/dali/DaliAvatar.d.ts +13 -9
- package/lib/service/dali/DaliAvatar.js +53 -8
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +4 -6
- package/lib/service/dali/avatar/DaliFuseSpace.js +26 -23
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +4 -6
- package/lib/service/dali/avatar/DaliHigh5Space.js +26 -23
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +4 -6
- package/lib/service/dali/avatar/DaliOAuthApp.js +26 -23
- package/lib/service/dali/avatar/DaliOrganization.d.ts +4 -6
- package/lib/service/dali/avatar/DaliOrganization.js +23 -20
- package/lib/service/dali/avatar/DaliTeam.d.ts +4 -6
- package/lib/service/dali/avatar/DaliTeam.js +26 -23
- package/lib/service/dali/avatar/DaliUser.d.ts +4 -6
- package/lib/service/dali/avatar/DaliUser.js +20 -17
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +14 -7
- package/lib/service/fuse/index.d.ts +8 -7
- package/lib/service/fuse/index.js +23 -9
- package/lib/service/fuse/internal/index.d.ts +3 -4
- package/lib/service/fuse/internal/index.js +5 -3
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +3 -4
- package/lib/service/fuse/internal/space/cronjob/index.js +5 -3
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +2 -4
- package/lib/service/fuse/internal/space/cronjob/log/index.js +11 -12
- package/lib/service/fuse/internal/space/index.d.ts +5 -6
- package/lib/service/fuse/internal/space/index.js +24 -18
- package/lib/service/fuse/space/cronjob/index.d.ts +15 -15
- package/lib/service/fuse/space/cronjob/index.js +133 -105
- package/lib/service/fuse/space/cronjob/log/index.d.ts +3 -3
- package/lib/service/fuse/space/cronjob/log/index.js +24 -23
- package/lib/service/fuse/space/index.d.ts +13 -14
- package/lib/service/fuse/space/index.js +88 -70
- package/lib/service/high5/execution/index.d.ts +5 -5
- package/lib/service/high5/execution/index.js +11 -4
- package/lib/service/high5/execution/log/index.d.ts +2 -2
- package/lib/service/high5/execution/log/index.js +11 -12
- package/lib/service/high5/execution/status/index.d.ts +2 -2
- package/lib/service/high5/execution/status/index.js +11 -12
- package/lib/service/high5/index.d.ts +12 -9
- package/lib/service/high5/index.js +36 -12
- package/lib/service/high5/internal/index.d.ts +3 -4
- package/lib/service/high5/internal/index.js +5 -3
- package/lib/service/high5/internal/space/index.d.ts +2 -2
- package/lib/service/high5/internal/space/index.js +19 -15
- package/lib/service/high5/joinToken/index.d.ts +4 -4
- package/lib/service/high5/joinToken/index.js +36 -28
- package/lib/service/high5/space/event/index.d.ts +9 -10
- package/lib/service/high5/space/event/index.js +58 -46
- package/lib/service/high5/space/event/stream/design/index.d.ts +23 -8
- package/lib/service/high5/space/event/stream/design/index.js +60 -25
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +5 -5
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +65 -58
- package/lib/service/high5/space/event/stream/index.d.ts +14 -15
- package/lib/service/high5/space/event/stream/index.js +125 -103
- package/lib/service/high5/space/execution/index.d.ts +9 -9
- package/lib/service/high5/space/execution/index.js +57 -42
- package/lib/service/high5/space/execution/log/index.d.ts +4 -6
- package/lib/service/high5/space/execution/log/index.js +22 -21
- package/lib/service/high5/space/execution/status/index.d.ts +1 -1
- package/lib/service/high5/space/execution/status/index.js +10 -8
- package/lib/service/high5/space/index.d.ts +25 -21
- package/lib/service/high5/space/index.js +131 -86
- package/lib/service/high5/space/secret/index.d.ts +6 -6
- package/lib/service/high5/space/secret/index.js +59 -49
- package/lib/service/high5/space/wave/index.d.ts +7 -9
- package/lib/service/high5/space/wave/index.js +40 -33
- package/lib/service/high5/space/webhook/index.d.ts +21 -14
- package/lib/service/high5/space/webhook/index.js +106 -73
- package/lib/service/high5/space/webhook/log/index.d.ts +2 -4
- package/lib/service/high5/space/webhook/log/index.js +11 -12
- package/lib/service/high5/wave/s3/index.d.ts +6 -6
- package/lib/service/high5/wave/s3/index.js +50 -38
- package/lib/service/idp/index.d.ts +17 -15
- package/lib/service/idp/index.js +104 -56
- package/lib/service/idp/internal/index.d.ts +2 -4
- package/lib/service/idp/internal/index.js +10 -11
- package/lib/service/idp/oauth/index.d.ts +16 -12
- package/lib/service/idp/oauth/index.js +55 -43
- package/lib/service/idp/organization/index.d.ts +12 -10
- package/lib/service/idp/organization/index.js +63 -28
- package/lib/service/idp/organization/license/index.d.ts +2 -2
- package/lib/service/idp/organization/license/index.js +5 -4
- package/lib/service/idp/organization/member/index.d.ts +10 -11
- package/lib/service/idp/organization/member/index.js +62 -48
- package/lib/service/idp/organization/member/invitations/index.d.ts +3 -3
- package/lib/service/idp/organization/member/invitations/index.js +47 -43
- package/lib/service/idp/organization/settings/domain/index.d.ts +7 -8
- package/lib/service/idp/organization/settings/domain/index.js +42 -29
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +5 -5
- package/lib/service/idp/organization/settings/domain/saml/index.js +58 -48
- package/lib/service/idp/organization/settings/index.d.ts +5 -5
- package/lib/service/idp/organization/settings/index.js +17 -4
- package/lib/service/idp/organization/settings/oauth/index.d.ts +9 -11
- package/lib/service/idp/organization/settings/oauth/index.js +67 -56
- package/lib/service/idp/organization/team/index.d.ts +8 -8
- package/lib/service/idp/organization/team/index.js +64 -55
- package/lib/service/idp/registration/index.d.ts +4 -6
- package/lib/service/idp/registration/index.js +37 -34
- package/lib/service/idp/user/index.d.ts +16 -15
- package/lib/service/idp/user/index.js +86 -51
- package/lib/service/idp/user/license/index.d.ts +2 -2
- package/lib/service/idp/user/license/index.js +5 -4
- package/lib/service/idp/user/password/index.d.ts +1 -1
- package/lib/service/idp/user/password/index.js +10 -11
- package/lib/service/idp/user/settings/connections/index.d.ts +2 -4
- package/lib/service/idp/user/settings/connections/index.js +9 -10
- package/lib/service/idp/user/settings/general/index.d.ts +10 -6
- package/lib/service/idp/user/settings/general/index.js +25 -13
- package/lib/service/idp/user/settings/index.d.ts +13 -9
- package/lib/service/idp/user/settings/index.js +53 -8
- package/lib/service/idp/user/settings/notifications/index.d.ts +3 -5
- package/lib/service/idp/user/settings/notifications/index.js +14 -13
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +3 -5
- package/lib/service/idp/user/settings/oauthApps/index.js +17 -16
- package/lib/service/idp/user/settings/pats/index.d.ts +8 -10
- package/lib/service/idp/user/settings/pats/index.js +55 -44
- package/lib/service/idp/user/settings/twoFactor/index.d.ts +3 -4
- package/lib/service/idp/user/settings/twoFactor/index.js +8 -3
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +6 -8
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +36 -29
- package/lib/service/mailer/index.d.ts +4 -5
- package/lib/service/mailer/index.js +12 -8
- package/lib/service/mailer/internal/index.d.ts +4 -4
- package/lib/service/mailer/internal/index.js +38 -33
- package/lib/service/mothership/index.d.ts +12 -12
- package/lib/service/mothership/index.js +92 -79
- package/lib/service/nats/index.d.ts +1 -3
- package/lib/service/nats/index.js +2 -2
- package/lib/utils/bouncer/features/Provider.d.ts +3 -0
- package/lib/utils/bouncer/features/Provider.js +20 -2
- package/package.json +1 -1
|
@@ -14,19 +14,18 @@ const Base_1 = require("../../../../../Base");
|
|
|
14
14
|
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
15
|
const searchFilter_1 = require("../../../../../helper/searchFilter");
|
|
16
16
|
class High5SpaceExecutionLogs extends Base_1.default {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.searchExecutionLogs = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, spaceName, payload = false, filters, sorting, limit = 25, page = 0, }) {
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves all stream execution logs for a given execution inside a space.
|
|
19
|
+
* @param orgName Name of the Organization
|
|
20
|
+
* @param spaceName Name of the Space
|
|
21
|
+
* @param filters (optional) Array of search filters
|
|
22
|
+
* @param sorting (optional) Sorting object
|
|
23
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
24
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
25
|
+
* @returns Object containing an array of Stream execution logs as well as the total number of results
|
|
26
|
+
*/
|
|
27
|
+
searchExecutionLogs(_a) {
|
|
28
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, payload = false, filters, sorting, limit = 25, page = 0, }) {
|
|
30
29
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
31
30
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/logs/search?page=${page}&limit=${limit}&payload=${payload}`), {
|
|
32
31
|
filters: filtersDTO,
|
|
@@ -34,14 +33,16 @@ class High5SpaceExecutionLogs extends Base_1.default {
|
|
|
34
33
|
});
|
|
35
34
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
36
35
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the execution log of a stream.
|
|
39
|
+
* @param orgName Name of the Organization
|
|
40
|
+
* @param spaceName Name of the Space
|
|
41
|
+
* @param streamLogId ID of the stream log
|
|
42
|
+
* @returns Stream execution log
|
|
43
|
+
*/
|
|
44
|
+
getStreamExecutionLog(orgName_1, spaceName_1, streamLogId_1) {
|
|
45
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamLogId, payload = false) {
|
|
45
46
|
const resp = yield this.axios
|
|
46
47
|
.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/logs/${streamLogId}?payload=${payload}`))
|
|
47
48
|
.catch((err) => {
|
|
@@ -11,6 +11,6 @@ export declare class High5SpaceExecutionStates extends Base {
|
|
|
11
11
|
* @param streamStatusId ID of the stream status
|
|
12
12
|
* @returns Object containing an array of Stream execution logs as well as the total number of results
|
|
13
13
|
*/
|
|
14
|
-
getStreamExecutionStatus
|
|
14
|
+
getStreamExecutionStatus(orgName: string, spaceName: string, streamStatusId: string, limit?: number, page?: number): Promise<PaginatedResponse<High5ExecutionStatus>>;
|
|
15
15
|
protected getEndpoint(endpoint: string): string;
|
|
16
16
|
}
|
|
@@ -15,14 +15,16 @@ const paginatedResponseHelper_1 = require("../../../../../helper/paginatedRespon
|
|
|
15
15
|
class High5SpaceExecutionStates extends Base_1.default {
|
|
16
16
|
constructor(options, axios) {
|
|
17
17
|
super(options, axios);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves all stream execution logs for a given stream.
|
|
21
|
+
* @param orgName Name of the Organization
|
|
22
|
+
* @param spaceName Name of the Space
|
|
23
|
+
* @param streamStatusId ID of the stream status
|
|
24
|
+
* @returns Object containing an array of Stream execution logs as well as the total number of results
|
|
25
|
+
*/
|
|
26
|
+
getStreamExecutionStatus(orgName_1, spaceName_1, streamStatusId_1) {
|
|
27
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamStatusId, limit = 25, page = 0) {
|
|
26
28
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/status/${streamStatusId}?page=${page}&limit=${limit}`));
|
|
27
29
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
28
30
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
1
|
+
import Base from "../../../Base";
|
|
3
2
|
import { PaginatedResponse, SearchParams } from "../../../interfaces/global";
|
|
4
3
|
import { Stream } from "../../../interfaces/high5";
|
|
5
4
|
import { High5Space as Space, High5SpaceEntityPermission as SpaceEntityPermission, High5SpacePermission as SpacePermission } from "../../../interfaces/high5/space";
|
|
@@ -10,13 +9,18 @@ import High5Secret from "./secret";
|
|
|
10
9
|
import High5Wave from "./wave";
|
|
11
10
|
import { High5Webhook } from "./webhook";
|
|
12
11
|
export declare class High5Space extends Base {
|
|
13
|
-
event: High5Event;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
get event(): High5Event;
|
|
13
|
+
private _event?;
|
|
14
|
+
get execute(): High5SpaceExecute;
|
|
15
|
+
private _execute?;
|
|
16
|
+
get webhook(): High5Webhook;
|
|
17
|
+
private _webhook?;
|
|
18
|
+
get secret(): High5Secret;
|
|
19
|
+
private _secret?;
|
|
20
|
+
get wave(): High5Wave;
|
|
21
|
+
private _wave?;
|
|
22
|
+
get node(): High5Node;
|
|
23
|
+
private _node?;
|
|
20
24
|
/**
|
|
21
25
|
* Retrieves all High5 Spaces of the specified Organization matching the search filter(s). Will return all Spaces if no search filter is provided.
|
|
22
26
|
* @param orgName Name of the organization
|
|
@@ -26,9 +30,9 @@ export declare class High5Space extends Base {
|
|
|
26
30
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
27
31
|
* @returns Object containing an array of High5 Spaces and the total number of results found in the database (independent of limit and page)
|
|
28
32
|
*/
|
|
29
|
-
searchSpaces
|
|
33
|
+
searchSpaces({ orgName, filters, sorting, limit, page }: SearchParams & {
|
|
30
34
|
orgName: string;
|
|
31
|
-
})
|
|
35
|
+
}): Promise<PaginatedResponse<Space>>;
|
|
32
36
|
/**
|
|
33
37
|
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
34
38
|
* @param orgName Name of the organization
|
|
@@ -39,30 +43,30 @@ export declare class High5Space extends Base {
|
|
|
39
43
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
40
44
|
* @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
|
|
41
45
|
*/
|
|
42
|
-
searchSpacePermissions
|
|
46
|
+
searchSpacePermissions({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
|
|
43
47
|
orgName: string;
|
|
44
48
|
spaceName: string;
|
|
45
|
-
})
|
|
49
|
+
}): Promise<PaginatedResponse<SpaceEntityPermission>>;
|
|
46
50
|
/**
|
|
47
51
|
* Retrieves a High5 Space by its name.
|
|
48
52
|
* @param orgName Name of the Organization
|
|
49
53
|
* @param spaceId ID of the High5 Space
|
|
50
54
|
* @returns The requested Space
|
|
51
55
|
*/
|
|
52
|
-
getSpace
|
|
56
|
+
getSpace(orgName: string, spaceName: string): Promise<Space>;
|
|
53
57
|
/**
|
|
54
58
|
* Creates a new High5 Space in the specified Organization.
|
|
55
59
|
* @param orgName Name of the Organization
|
|
56
60
|
* @param name Name for the new Space
|
|
57
61
|
* @returns The created Space
|
|
58
62
|
*/
|
|
59
|
-
createSpace
|
|
63
|
+
createSpace(orgName: string, name: string): Promise<Space>;
|
|
60
64
|
/**
|
|
61
65
|
* Delete a space by its name.
|
|
62
66
|
* @param orgName Name of the Organization
|
|
63
67
|
* @param spaceName Name of the Space
|
|
64
68
|
*/
|
|
65
|
-
deleteSpace
|
|
69
|
+
deleteSpace(orgName: string, spaceName: string): Promise<void>;
|
|
66
70
|
/**
|
|
67
71
|
* Adds/Updates/Removes the permission a user has in the specified space.
|
|
68
72
|
* @param orgName Name of the Organization
|
|
@@ -71,7 +75,7 @@ export declare class High5Space extends Base {
|
|
|
71
75
|
* @param permission New permission
|
|
72
76
|
* @returns The Space with updated permissions
|
|
73
77
|
*/
|
|
74
|
-
updateUserSpacePermission
|
|
78
|
+
updateUserSpacePermission(orgName: string, spaceName: string, userId: string, permission: SpacePermission): Promise<SpaceEntityPermission>;
|
|
75
79
|
/**
|
|
76
80
|
* Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
|
|
77
81
|
* @param orgName Name of the Organization
|
|
@@ -80,7 +84,7 @@ export declare class High5Space extends Base {
|
|
|
80
84
|
* @param permission New permission
|
|
81
85
|
* @returns The Space with updated permissions
|
|
82
86
|
*/
|
|
83
|
-
updateTeamSpacePermission
|
|
87
|
+
updateTeamSpacePermission(orgName: string, spaceName: string, teamName: string, permission: SpacePermission): Promise<SpaceEntityPermission>;
|
|
84
88
|
/**
|
|
85
89
|
* Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
|
|
86
90
|
* @param orgName Name of the organization
|
|
@@ -91,10 +95,10 @@ export declare class High5Space extends Base {
|
|
|
91
95
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
92
96
|
* @returns Object containing an array of streams and the total number of results found in the database (independent of limit and page)
|
|
93
97
|
*/
|
|
94
|
-
searchStreamsOfSpace
|
|
98
|
+
searchStreamsOfSpace({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
|
|
95
99
|
orgName: string;
|
|
96
100
|
spaceName: string;
|
|
97
|
-
})
|
|
101
|
+
}): Promise<PaginatedResponse<Stream>>;
|
|
98
102
|
/**
|
|
99
103
|
* Updates the name of a space.
|
|
100
104
|
* @param orgName Name of the organization
|
|
@@ -102,6 +106,6 @@ export declare class High5Space extends Base {
|
|
|
102
106
|
* @param newName New name for the space
|
|
103
107
|
* @returns The updated space
|
|
104
108
|
*/
|
|
105
|
-
renameSpace
|
|
109
|
+
renameSpace(orgName: string, spaceName: string, newSpaceName: string): Promise<Space>;
|
|
106
110
|
protected getEndpoint(endpoint: string): string;
|
|
107
111
|
}
|
|
@@ -20,18 +20,53 @@ const secret_1 = require("./secret");
|
|
|
20
20
|
const wave_1 = require("./wave");
|
|
21
21
|
const webhook_1 = require("./webhook");
|
|
22
22
|
class High5Space extends Base_1.default {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
get event() {
|
|
24
|
+
if (this._event === undefined) {
|
|
25
|
+
this._event = new event_1.High5Event(this.options, this.axios);
|
|
26
|
+
}
|
|
27
|
+
return this._event;
|
|
28
|
+
}
|
|
29
|
+
get execute() {
|
|
30
|
+
if (this._execute === undefined) {
|
|
31
|
+
this._execute = new execution_1.High5SpaceExecute(this.options, this.axios);
|
|
32
|
+
}
|
|
33
|
+
return this._execute;
|
|
34
|
+
}
|
|
35
|
+
get webhook() {
|
|
36
|
+
if (this._webhook === undefined) {
|
|
37
|
+
this._webhook = new webhook_1.High5Webhook(this.options, this.axios);
|
|
38
|
+
}
|
|
39
|
+
return this._webhook;
|
|
40
|
+
}
|
|
41
|
+
get secret() {
|
|
42
|
+
if (this._secret === undefined) {
|
|
43
|
+
this._secret = new secret_1.default(this.options, this.axios);
|
|
44
|
+
}
|
|
45
|
+
return this._secret;
|
|
46
|
+
}
|
|
47
|
+
get wave() {
|
|
48
|
+
if (this._wave === undefined) {
|
|
49
|
+
this._wave = new wave_1.default(this.options, this.axios);
|
|
50
|
+
}
|
|
51
|
+
return this._wave;
|
|
52
|
+
}
|
|
53
|
+
get node() {
|
|
54
|
+
if (this._node === undefined) {
|
|
55
|
+
this._node = new node_1.default(this.options, this.axios);
|
|
56
|
+
}
|
|
57
|
+
return this._node;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves all High5 Spaces of the specified Organization matching the search filter(s). Will return all Spaces if no search filter is provided.
|
|
61
|
+
* @param orgName Name of the organization
|
|
62
|
+
* @param filters (optional) Array of search filters
|
|
63
|
+
* @param sorting (optional) Sorting object
|
|
64
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
65
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
66
|
+
* @returns Object containing an array of High5 Spaces and the total number of results found in the database (independent of limit and page)
|
|
67
|
+
*/
|
|
68
|
+
searchSpaces(_a) {
|
|
69
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }) {
|
|
35
70
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
36
71
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/search?page=${page}&limit=${limit}`), {
|
|
37
72
|
filters: filtersDTO,
|
|
@@ -39,17 +74,19 @@ class High5Space extends Base_1.default {
|
|
|
39
74
|
});
|
|
40
75
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
41
76
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
80
|
+
* @param orgName Name of the organization
|
|
81
|
+
* @param spaceName Name of the space
|
|
82
|
+
* @param filters (optional) Array of search filters
|
|
83
|
+
* @param sorting (optional) Sorting object
|
|
84
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
85
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
86
|
+
* @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
|
|
87
|
+
*/
|
|
88
|
+
searchSpacePermissions(_a) {
|
|
89
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
|
|
53
90
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
54
91
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
|
|
55
92
|
filters: filtersDTO,
|
|
@@ -57,75 +94,87 @@ class High5Space extends Base_1.default {
|
|
|
57
94
|
});
|
|
58
95
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
59
96
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Retrieves a High5 Space by its name.
|
|
100
|
+
* @param orgName Name of the Organization
|
|
101
|
+
* @param spaceId ID of the High5 Space
|
|
102
|
+
* @returns The requested Space
|
|
103
|
+
*/
|
|
104
|
+
getSpace(orgName, spaceName) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
106
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
68
107
|
return resp.data;
|
|
69
108
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Creates a new High5 Space in the specified Organization.
|
|
112
|
+
* @param orgName Name of the Organization
|
|
113
|
+
* @param name Name for the new Space
|
|
114
|
+
* @returns The created Space
|
|
115
|
+
*/
|
|
116
|
+
createSpace(orgName, name) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
118
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
|
|
78
119
|
return resp.data;
|
|
79
120
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Delete a space by its name.
|
|
124
|
+
* @param orgName Name of the Organization
|
|
125
|
+
* @param spaceName Name of the Space
|
|
126
|
+
*/
|
|
127
|
+
deleteSpace(orgName, spaceName) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
129
|
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
87
130
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Adds/Updates/Removes the permission a user has in the specified space.
|
|
134
|
+
* @param orgName Name of the Organization
|
|
135
|
+
* @param spaceName Name of the Space
|
|
136
|
+
* @param userId ID of the User
|
|
137
|
+
* @param permission New permission
|
|
138
|
+
* @returns The Space with updated permissions
|
|
139
|
+
*/
|
|
140
|
+
updateUserSpacePermission(orgName, spaceName, userId, permission) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
142
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
|
|
98
143
|
userId,
|
|
99
144
|
permission,
|
|
100
145
|
});
|
|
101
146
|
return resp.data;
|
|
102
147
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
|
|
151
|
+
* @param orgName Name of the Organization
|
|
152
|
+
* @param spaceName Name of the Space
|
|
153
|
+
* @param teamName Name of the Team
|
|
154
|
+
* @param permission New permission
|
|
155
|
+
* @returns The Space with updated permissions
|
|
156
|
+
*/
|
|
157
|
+
updateTeamSpacePermission(orgName, spaceName, teamName, permission) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
159
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
|
|
113
160
|
teamName,
|
|
114
161
|
permission,
|
|
115
162
|
});
|
|
116
163
|
return resp.data;
|
|
117
164
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
|
|
168
|
+
* @param orgName Name of the organization
|
|
169
|
+
* @param orgName Name of the space
|
|
170
|
+
* @param filters (optional) Array of search filters
|
|
171
|
+
* @param sorting (optional) Sorting object
|
|
172
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
173
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
174
|
+
* @returns Object containing an array of streams and the total number of results found in the database (independent of limit and page)
|
|
175
|
+
*/
|
|
176
|
+
searchStreamsOfSpace(_a) {
|
|
177
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
|
|
129
178
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
130
179
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/streams/search?page=${page}&limit=${limit}`), {
|
|
131
180
|
filters: filtersDTO,
|
|
@@ -133,25 +182,21 @@ class High5Space extends Base_1.default {
|
|
|
133
182
|
});
|
|
134
183
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
135
184
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Updates the name of a space.
|
|
188
|
+
* @param orgName Name of the organization
|
|
189
|
+
* @param newSpaceName Current name of the space
|
|
190
|
+
* @param newName New name for the space
|
|
191
|
+
* @returns The updated space
|
|
192
|
+
*/
|
|
193
|
+
renameSpace(orgName, spaceName, newSpaceName) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
195
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
|
|
145
196
|
newSpaceName,
|
|
146
197
|
});
|
|
147
198
|
return resp.data;
|
|
148
199
|
});
|
|
149
|
-
this.event = new event_1.High5Event(this.options, this.axios);
|
|
150
|
-
this.execute = new execution_1.High5SpaceExecute(this.options, this.axios);
|
|
151
|
-
this.webhook = new webhook_1.High5Webhook(this.options, this.axios);
|
|
152
|
-
this.secret = new secret_1.default(this.options, this.axios);
|
|
153
|
-
this.wave = new wave_1.default(this.options, this.axios);
|
|
154
|
-
this.node = new node_1.default(this.options, this.axios);
|
|
155
200
|
}
|
|
156
201
|
getEndpoint(endpoint) {
|
|
157
202
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
@@ -17,10 +17,10 @@ export default class High5Secret extends Base {
|
|
|
17
17
|
* @param encrypted - (optional) Whether to get all secret values only in encrypted form.
|
|
18
18
|
* @returns Object containing an array of secret keys as well as the total number of results found in the database (independent of limit and page)
|
|
19
19
|
*/
|
|
20
|
-
searchSecrets
|
|
20
|
+
searchSecrets({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
|
|
21
21
|
orgName: string;
|
|
22
22
|
spaceName: string;
|
|
23
|
-
})
|
|
23
|
+
}): Promise<PaginatedResponse<Secret>>;
|
|
24
24
|
/**
|
|
25
25
|
* Adds a secret key-value pair to a space.
|
|
26
26
|
* @param orgName - Name of the organization
|
|
@@ -30,7 +30,7 @@ export default class High5Secret extends Base {
|
|
|
30
30
|
* @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
|
|
31
31
|
* @returns The created Secret
|
|
32
32
|
*/
|
|
33
|
-
addSecret
|
|
33
|
+
addSecret(orgName: string, spaceName: string, secret: CreateSecret): Promise<Secret>;
|
|
34
34
|
/**
|
|
35
35
|
* Updates the value for an existent secret key-value pair.
|
|
36
36
|
* @param orgName - Name of the organization
|
|
@@ -40,14 +40,14 @@ export default class High5Secret extends Base {
|
|
|
40
40
|
* @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
|
|
41
41
|
* @returns The updated Secret
|
|
42
42
|
*/
|
|
43
|
-
updateSecret
|
|
43
|
+
updateSecret(orgName: string, spaceName: string, key: string, secret: UpdateSecret): Promise<Secret>;
|
|
44
44
|
/**
|
|
45
45
|
* Deletes a key-value pair of the space
|
|
46
46
|
* @param orgName - Name of the organization
|
|
47
47
|
* @param spaceName - Name of the space
|
|
48
48
|
* @param key - Key of the key-value pair
|
|
49
49
|
*/
|
|
50
|
-
deleteSecret
|
|
50
|
+
deleteSecret(orgName: string, spaceName: string, key: string): Promise<void>;
|
|
51
51
|
/**
|
|
52
52
|
* Get secret value by its key
|
|
53
53
|
* @param orgName - Name of the organization
|
|
@@ -55,6 +55,6 @@ export default class High5Secret extends Base {
|
|
|
55
55
|
* @param key - Key of the key-value pair
|
|
56
56
|
* @returns Secret details
|
|
57
57
|
*/
|
|
58
|
-
getSecret
|
|
58
|
+
getSecret(orgName: string, spaceName: string, key: string): Promise<Secret>;
|
|
59
59
|
protected getEndpoint(endpoint: string): string;
|
|
60
60
|
}
|