hcloud-sdk 14.13.2 → 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 +60 -806
- package/lib/Hcloud.d.ts +20 -10
- package/lib/Hcloud.js +60 -10
- package/lib/interfaces/auditor/index.d.ts +4 -2
- 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/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 +16 -1
- package/lib/interfaces/high5/space/execution/index.d.ts +14 -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/changelog.d.ts +30 -0
- package/lib/interfaces/high5/wave/changelog.js +18 -0
- package/lib/interfaces/high5/wave/index.d.ts +48 -1
- package/lib/interfaces/high5/wave/index.js +14 -1
- 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/GeneralSettings.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/mothership/index.d.ts +1 -0
- package/lib/interfaces/nats/index.d.ts +35 -20
- package/lib/interfaces/nats/index.js +132 -94
- package/lib/service/agent/bundle/dev/index.d.ts +5 -2
- package/lib/service/agent/bundle/dev/index.js +30 -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 +21 -11
- package/lib/service/dali/DaliAvatar.js +63 -8
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +5 -7
- package/lib/service/dali/avatar/DaliFuseSpace.js +29 -26
- 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 +5 -7
- package/lib/service/dali/avatar/DaliHigh5Space.js +29 -26
- 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 +13 -5
- package/lib/service/high5/execution/index.js +32 -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/DesignOperations.d.ts +1 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +2 -0
- 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 +36 -9
- package/lib/service/high5/space/execution/index.js +96 -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 +28 -21
- package/lib/service/high5/space/index.js +138 -86
- 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/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 +14 -7
- package/lib/service/high5/wave/s3/index.js +64 -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 +56 -45
- 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 +38 -35
- package/lib/service/idp/user/index.d.ts +20 -15
- package/lib/service/idp/user/index.js +94 -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 +7 -9
- 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
|
@@ -16,22 +16,64 @@ 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");
|
|
22
23
|
class High5Space extends Base_1.default {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
get event() {
|
|
25
|
+
if (this._event === undefined) {
|
|
26
|
+
this._event = new event_1.High5Event(this.options, this.axios);
|
|
27
|
+
}
|
|
28
|
+
return this._event;
|
|
29
|
+
}
|
|
30
|
+
get execute() {
|
|
31
|
+
if (this._execute === undefined) {
|
|
32
|
+
this._execute = new execution_1.High5SpaceExecute(this.options, this.axios);
|
|
33
|
+
}
|
|
34
|
+
return this._execute;
|
|
35
|
+
}
|
|
36
|
+
get webhook() {
|
|
37
|
+
if (this._webhook === undefined) {
|
|
38
|
+
this._webhook = new webhook_1.High5Webhook(this.options, this.axios);
|
|
39
|
+
}
|
|
40
|
+
return this._webhook;
|
|
41
|
+
}
|
|
42
|
+
get secret() {
|
|
43
|
+
if (this._secret === undefined) {
|
|
44
|
+
this._secret = new secret_1.default(this.options, this.axios);
|
|
45
|
+
}
|
|
46
|
+
return this._secret;
|
|
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
|
+
}
|
|
54
|
+
get wave() {
|
|
55
|
+
if (this._wave === undefined) {
|
|
56
|
+
this._wave = new wave_1.default(this.options, this.axios);
|
|
57
|
+
}
|
|
58
|
+
return this._wave;
|
|
59
|
+
}
|
|
60
|
+
get node() {
|
|
61
|
+
if (this._node === undefined) {
|
|
62
|
+
this._node = new node_1.default(this.options, this.axios);
|
|
63
|
+
}
|
|
64
|
+
return this._node;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Retrieves all High5 Spaces of the specified Organization matching the search filter(s). Will return all Spaces if no search filter is provided.
|
|
68
|
+
* @param orgName Name of the organization
|
|
69
|
+
* @param filters (optional) Array of search filters
|
|
70
|
+
* @param sorting (optional) Sorting object
|
|
71
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
72
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
73
|
+
* @returns Object containing an array of High5 Spaces and the total number of results found in the database (independent of limit and page)
|
|
74
|
+
*/
|
|
75
|
+
searchSpaces(_a) {
|
|
76
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }) {
|
|
35
77
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
36
78
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/search?page=${page}&limit=${limit}`), {
|
|
37
79
|
filters: filtersDTO,
|
|
@@ -39,17 +81,19 @@ class High5Space extends Base_1.default {
|
|
|
39
81
|
});
|
|
40
82
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
41
83
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
87
|
+
* @param orgName Name of the organization
|
|
88
|
+
* @param spaceName Name of the space
|
|
89
|
+
* @param filters (optional) Array of search filters
|
|
90
|
+
* @param sorting (optional) Sorting object
|
|
91
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
92
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
93
|
+
* @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
|
|
94
|
+
*/
|
|
95
|
+
searchSpacePermissions(_a) {
|
|
96
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
|
|
53
97
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
54
98
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
|
|
55
99
|
filters: filtersDTO,
|
|
@@ -57,75 +101,87 @@ class High5Space extends Base_1.default {
|
|
|
57
101
|
});
|
|
58
102
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
59
103
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Retrieves a High5 Space by its name.
|
|
107
|
+
* @param orgName Name of the Organization
|
|
108
|
+
* @param spaceId ID of the High5 Space
|
|
109
|
+
* @returns The requested Space
|
|
110
|
+
*/
|
|
111
|
+
getSpace(orgName, spaceName) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
113
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
68
114
|
return resp.data;
|
|
69
115
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Creates a new High5 Space in the specified Organization.
|
|
119
|
+
* @param orgName Name of the Organization
|
|
120
|
+
* @param name Name for the new Space
|
|
121
|
+
* @returns The created Space
|
|
122
|
+
*/
|
|
123
|
+
createSpace(orgName, name) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
125
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
|
|
78
126
|
return resp.data;
|
|
79
127
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Delete a space by its name.
|
|
131
|
+
* @param orgName Name of the Organization
|
|
132
|
+
* @param spaceName Name of the Space
|
|
133
|
+
*/
|
|
134
|
+
deleteSpace(orgName, spaceName) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
136
|
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
87
137
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Adds/Updates/Removes the permission a user has in the specified space.
|
|
141
|
+
* @param orgName Name of the Organization
|
|
142
|
+
* @param spaceName Name of the Space
|
|
143
|
+
* @param userId ID of the User
|
|
144
|
+
* @param permission New permission
|
|
145
|
+
* @returns The Space with updated permissions
|
|
146
|
+
*/
|
|
147
|
+
updateUserSpacePermission(orgName, spaceName, userId, permission) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
149
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
|
|
98
150
|
userId,
|
|
99
151
|
permission,
|
|
100
152
|
});
|
|
101
153
|
return resp.data;
|
|
102
154
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
|
|
158
|
+
* @param orgName Name of the Organization
|
|
159
|
+
* @param spaceName Name of the Space
|
|
160
|
+
* @param teamName Name of the Team
|
|
161
|
+
* @param permission New permission
|
|
162
|
+
* @returns The Space with updated permissions
|
|
163
|
+
*/
|
|
164
|
+
updateTeamSpacePermission(orgName, spaceName, teamName, permission) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
166
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
|
|
113
167
|
teamName,
|
|
114
168
|
permission,
|
|
115
169
|
});
|
|
116
170
|
return resp.data;
|
|
117
171
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
|
|
175
|
+
* @param orgName Name of the organization
|
|
176
|
+
* @param orgName Name of the space
|
|
177
|
+
* @param filters (optional) Array of search filters
|
|
178
|
+
* @param sorting (optional) Sorting object
|
|
179
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
180
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
181
|
+
* @returns Object containing an array of streams and the total number of results found in the database (independent of limit and page)
|
|
182
|
+
*/
|
|
183
|
+
searchStreamsOfSpace(_a) {
|
|
184
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
|
|
129
185
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
130
186
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/streams/search?page=${page}&limit=${limit}`), {
|
|
131
187
|
filters: filtersDTO,
|
|
@@ -133,25 +189,21 @@ class High5Space extends Base_1.default {
|
|
|
133
189
|
});
|
|
134
190
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
135
191
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Updates the name of a space.
|
|
195
|
+
* @param orgName Name of the organization
|
|
196
|
+
* @param newSpaceName Current name of the space
|
|
197
|
+
* @param newName New name for the space
|
|
198
|
+
* @returns The updated space
|
|
199
|
+
*/
|
|
200
|
+
renameSpace(orgName, spaceName, newSpaceName) {
|
|
201
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
202
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
|
|
145
203
|
newSpaceName,
|
|
146
204
|
});
|
|
147
205
|
return resp.data;
|
|
148
206
|
});
|
|
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
207
|
}
|
|
156
208
|
getEndpoint(endpoint) {
|
|
157
209
|
return `${this.options.server}/api/high5${endpoint}`;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../../Base";
|
|
3
|
+
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
4
|
+
import { Pool, PoolChange, PoolQueryOptions, PoolTargetPatch } from "../../../../interfaces/high5/space/pool";
|
|
5
|
+
import { OrganizationMember } from "../../../../interfaces/idp";
|
|
6
|
+
export default class High5Pool extends Base {
|
|
7
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
8
|
+
/**
|
|
9
|
+
* Get a pool from a space
|
|
10
|
+
*
|
|
11
|
+
* @param orgName - Name of the organization
|
|
12
|
+
* @param spaceName - Name of the space
|
|
13
|
+
* @param name - Name of the pool
|
|
14
|
+
* @returns Pool
|
|
15
|
+
*/
|
|
16
|
+
getPool(orgName: string, spaceName: string, name: string): Promise<Pool>;
|
|
17
|
+
/**
|
|
18
|
+
* Replace a pool of a space
|
|
19
|
+
*
|
|
20
|
+
* @param orgName - Name of the organization
|
|
21
|
+
* @param spaceName - Name of the space
|
|
22
|
+
* @param poolName - Name of the old/current pool
|
|
23
|
+
* @param name - New name for the pool
|
|
24
|
+
* @param targets - Execution targets that compromise the pool
|
|
25
|
+
* @returns The new Pool
|
|
26
|
+
*/
|
|
27
|
+
replacePool(orgName: string, spaceName: string, poolName: string, name: string, targets: string[]): Promise<PoolChange>;
|
|
28
|
+
/**
|
|
29
|
+
* Patch a pool of a space
|
|
30
|
+
*
|
|
31
|
+
* @param orgName - Name of the organization
|
|
32
|
+
* @param spaceName - Name of the space
|
|
33
|
+
* @param poolName - Name of the pool
|
|
34
|
+
* @param name - New name for the pool
|
|
35
|
+
* @param targets - Execution targets that compromise the pool
|
|
36
|
+
* @returns The patched Pool
|
|
37
|
+
*/
|
|
38
|
+
patchPool(orgName: string, spaceName: string, poolName: string, name?: string, targets?: PoolTargetPatch): Promise<PoolChange>;
|
|
39
|
+
/**
|
|
40
|
+
* Delete a pool of a space
|
|
41
|
+
*
|
|
42
|
+
* @param orgName - Name of the organization
|
|
43
|
+
* @param spaceName - Name of the space
|
|
44
|
+
* @param poolName - Name of the pool
|
|
45
|
+
*/
|
|
46
|
+
deletePool(orgName: string, spaceName: string, poolName: string): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves all pools of a High5 Space which match the provided search filter(s). Will return all pools of the Space if no filter is provided.
|
|
49
|
+
*
|
|
50
|
+
* @param orgName Name of the Organization
|
|
51
|
+
* @param spaceName Name of the Space
|
|
52
|
+
* @param filters (optional) Array of search filters
|
|
53
|
+
* @param sorting (optional) Sorting object
|
|
54
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
55
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
56
|
+
* @returns Object containing an array of Pool and the total number of results found in the database (independent of limit and page)
|
|
57
|
+
*/
|
|
58
|
+
searchPools({ orgName, spaceName, filters, sorting, options, limit, page, }: SearchParams & {
|
|
59
|
+
orgName: string;
|
|
60
|
+
spaceName: string;
|
|
61
|
+
options?: PoolQueryOptions;
|
|
62
|
+
}): Promise<PaginatedResponse<Pool>>;
|
|
63
|
+
/**
|
|
64
|
+
* Add a pool to a space
|
|
65
|
+
*
|
|
66
|
+
* @param orgName - Name of the organization
|
|
67
|
+
* @param spaceName - Name of the space
|
|
68
|
+
* @param name - Name of the pool
|
|
69
|
+
* @param targets - Execution targets that compromise the pool
|
|
70
|
+
* @returns The created Pool
|
|
71
|
+
*/
|
|
72
|
+
addPool(orgName: string, spaceName: string, name: string, targets: string[]): Promise<PoolChange>;
|
|
73
|
+
/**
|
|
74
|
+
* Retrieves all the pools the current user is assigned to as an execution target
|
|
75
|
+
*
|
|
76
|
+
* @returns Array of pools the user is assigned to as execution target
|
|
77
|
+
*/
|
|
78
|
+
getPools(): Promise<Pool[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Retrieves all targets of a pool which match the provided search filter(s). Will return all targets of the pool if no filter is provided.
|
|
81
|
+
*
|
|
82
|
+
* @param orgName Name of the Organization
|
|
83
|
+
* @param spaceName Name of the Space
|
|
84
|
+
* @param poolName Name of the pool
|
|
85
|
+
* @param filters (optional) Array of search filters
|
|
86
|
+
* @param sorting (optional) Sorting object
|
|
87
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
88
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
89
|
+
* @returns Object containing an array of OrganizationMember and the total number of results found in the database (independent of limit and page)
|
|
90
|
+
*/
|
|
91
|
+
searchTargetsOfPool({ orgName, spaceName, poolName, filters, sorting, limit, page, }: SearchParams & {
|
|
92
|
+
orgName: string;
|
|
93
|
+
spaceName: string;
|
|
94
|
+
poolName: string;
|
|
95
|
+
}): Promise<PaginatedResponse<OrganizationMember>>;
|
|
96
|
+
protected getEndpoint(endpoint: string): string;
|
|
97
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
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
|
+
const Base_1 = require("../../../../Base");
|
|
13
|
+
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
14
|
+
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
15
|
+
class High5Pool extends Base_1.default {
|
|
16
|
+
constructor(options, axios) {
|
|
17
|
+
super(options, axios);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get a pool from a space
|
|
21
|
+
*
|
|
22
|
+
* @param orgName - Name of the organization
|
|
23
|
+
* @param spaceName - Name of the space
|
|
24
|
+
* @param name - Name of the pool
|
|
25
|
+
* @returns Pool
|
|
26
|
+
*/
|
|
27
|
+
getPool(orgName, spaceName, name) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${name}`));
|
|
30
|
+
return resp.data;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Replace a pool of a space
|
|
35
|
+
*
|
|
36
|
+
* @param orgName - Name of the organization
|
|
37
|
+
* @param spaceName - Name of the space
|
|
38
|
+
* @param poolName - Name of the old/current pool
|
|
39
|
+
* @param name - New name for the pool
|
|
40
|
+
* @param targets - Execution targets that compromise the pool
|
|
41
|
+
* @returns The new Pool
|
|
42
|
+
*/
|
|
43
|
+
replacePool(orgName, spaceName, poolName, name, targets) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${poolName}`), {
|
|
46
|
+
name,
|
|
47
|
+
targets,
|
|
48
|
+
});
|
|
49
|
+
return resp.data;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Patch a pool of a space
|
|
54
|
+
*
|
|
55
|
+
* @param orgName - Name of the organization
|
|
56
|
+
* @param spaceName - Name of the space
|
|
57
|
+
* @param poolName - Name of the pool
|
|
58
|
+
* @param name - New name for the pool
|
|
59
|
+
* @param targets - Execution targets that compromise the pool
|
|
60
|
+
* @returns The patched Pool
|
|
61
|
+
*/
|
|
62
|
+
patchPool(orgName, spaceName, poolName, name, targets) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
if (name === undefined && targets === undefined) {
|
|
65
|
+
throw new Error("unable to patch pool when there are no arguments to send");
|
|
66
|
+
}
|
|
67
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${poolName}`), {
|
|
68
|
+
name,
|
|
69
|
+
targets,
|
|
70
|
+
});
|
|
71
|
+
return resp.data;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Delete a pool of a space
|
|
76
|
+
*
|
|
77
|
+
* @param orgName - Name of the organization
|
|
78
|
+
* @param spaceName - Name of the space
|
|
79
|
+
* @param poolName - Name of the pool
|
|
80
|
+
*/
|
|
81
|
+
deletePool(orgName, spaceName, poolName) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${poolName}`));
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves all pools of a High5 Space which match the provided search filter(s). Will return all pools of the Space if no filter is provided.
|
|
88
|
+
*
|
|
89
|
+
* @param orgName Name of the Organization
|
|
90
|
+
* @param spaceName Name of the Space
|
|
91
|
+
* @param filters (optional) Array of search filters
|
|
92
|
+
* @param sorting (optional) Sorting object
|
|
93
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
94
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
95
|
+
* @returns Object containing an array of Pool and the total number of results found in the database (independent of limit and page)
|
|
96
|
+
*/
|
|
97
|
+
searchPools(_a) {
|
|
98
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, options, limit = 25, page = 0, }) {
|
|
99
|
+
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
100
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/search`), {
|
|
101
|
+
filters: filtersDTO,
|
|
102
|
+
sorting: sorting,
|
|
103
|
+
}, {
|
|
104
|
+
params: {
|
|
105
|
+
limit,
|
|
106
|
+
page,
|
|
107
|
+
totalTargetCount: options === null || options === void 0 ? void 0 : options.getTotalTargetCount,
|
|
108
|
+
targetsSample: options === null || options === void 0 ? void 0 : options.getTargetsSample,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Add a pool to a space
|
|
116
|
+
*
|
|
117
|
+
* @param orgName - Name of the organization
|
|
118
|
+
* @param spaceName - Name of the space
|
|
119
|
+
* @param name - Name of the pool
|
|
120
|
+
* @param targets - Execution targets that compromise the pool
|
|
121
|
+
* @returns The created Pool
|
|
122
|
+
*/
|
|
123
|
+
addPool(orgName, spaceName, name, targets) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools`), { name, targets });
|
|
126
|
+
return resp.data;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Retrieves all the pools the current user is assigned to as an execution target
|
|
131
|
+
*
|
|
132
|
+
* @returns Array of pools the user is assigned to as execution target
|
|
133
|
+
*/
|
|
134
|
+
getPools() {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
const resp = yield this.axios.get(this.getEndpoint("/v1/pools"));
|
|
137
|
+
return resp.data;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Retrieves all targets of a pool which match the provided search filter(s). Will return all targets of the pool if no filter is provided.
|
|
142
|
+
*
|
|
143
|
+
* @param orgName Name of the Organization
|
|
144
|
+
* @param spaceName Name of the Space
|
|
145
|
+
* @param poolName Name of the pool
|
|
146
|
+
* @param filters (optional) Array of search filters
|
|
147
|
+
* @param sorting (optional) Sorting object
|
|
148
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
149
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
150
|
+
* @returns Object containing an array of OrganizationMember and the total number of results found in the database (independent of limit and page)
|
|
151
|
+
*/
|
|
152
|
+
searchTargetsOfPool(_a) {
|
|
153
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, poolName, filters, sorting, limit = 25, page = 0, }) {
|
|
154
|
+
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
155
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${poolName}/targets/search`), {
|
|
156
|
+
filters: filtersDTO,
|
|
157
|
+
sorting: sorting,
|
|
158
|
+
}, {
|
|
159
|
+
params: {
|
|
160
|
+
page,
|
|
161
|
+
limit,
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
getEndpoint(endpoint) {
|
|
168
|
+
return `${this.options.server}/api/high5${endpoint}`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
exports.default = High5Pool;
|
|
@@ -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
|
}
|