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
|
@@ -14,18 +14,17 @@ const Base_1 = require("../../../../../Base");
|
|
|
14
14
|
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
15
|
const searchFilter_1 = require("../../../../../helper/searchFilter");
|
|
16
16
|
class IdpOAuthApp extends Base_1.default {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.searchOauthAppsOfOrganization = (_a) => __awaiter(this, [_a], void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0, }) {
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves all OAuth apps of the specified Organization matching the provided search filter(s). Will return all OAuth apps if no search filter is provided.
|
|
19
|
+
* @param orgName Name of the Organization
|
|
20
|
+
* @param filters (optional) Array of search filters
|
|
21
|
+
* @param sorting (optional) Sorting object
|
|
22
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
23
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
24
|
+
* @returns Object containing an array of OAuth apps and the total number of results found in the database (independent of limit and page)
|
|
25
|
+
*/
|
|
26
|
+
searchOauthAppsOfOrganization(_a) {
|
|
27
|
+
return __awaiter(this, arguments, void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0, }) {
|
|
29
28
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
30
29
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
31
30
|
});
|
|
@@ -35,66 +34,78 @@ class IdpOAuthApp extends Base_1.default {
|
|
|
35
34
|
});
|
|
36
35
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
37
36
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves an OAuthApp by its ID.
|
|
40
|
+
* @param orgName Name of the Organization
|
|
41
|
+
* @param oauthAppId ID of the OAuthApp
|
|
42
|
+
* @returns the requested OAuthApp
|
|
43
|
+
*/
|
|
44
|
+
getOAuthApp(orgName, oauthAppId) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
46
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`));
|
|
46
47
|
return resp.data;
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new OAuth app in the specified Organization.
|
|
52
|
+
* @param orgName Name of the Organization
|
|
53
|
+
* @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
|
|
54
|
+
* @returns The created OAuth app
|
|
55
|
+
*/
|
|
56
|
+
createOAuthApp(orgName, oAuthAppCreate) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
58
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth`), oAuthAppCreate);
|
|
56
59
|
return resp.data;
|
|
57
60
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Updates an existing OAuth app.
|
|
64
|
+
* @param orgName Name of the Organization
|
|
65
|
+
* @param oauthAppId ID of the OAuth app to be updated
|
|
66
|
+
* @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
|
|
67
|
+
* @returns the updated OAuth app
|
|
68
|
+
*/
|
|
69
|
+
updateOAuthApp(orgName, oauthAppId, oAuthAppCreate) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
71
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`), oAuthAppCreate);
|
|
67
72
|
return resp.data;
|
|
68
73
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Deletes an OAuthApp by its ID.
|
|
77
|
+
* @param orgName Name of the Organization
|
|
78
|
+
* @param oauthAppId ID of the OAuthApp
|
|
79
|
+
*/
|
|
80
|
+
deleteOAuthApp(orgName, oauthAppId) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
82
|
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`));
|
|
76
83
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Creates a new secret for an existing OAuthApp.
|
|
87
|
+
* @param orgName Name of the Organization
|
|
88
|
+
* @param oauthAppId ID of the OAuthApp
|
|
89
|
+
* @param secretName Name of the Secret
|
|
90
|
+
* @returns the updated OAuth app
|
|
91
|
+
*/
|
|
92
|
+
createOAuthAppSecret(orgName, oauthAppId, secretName) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
94
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}/secret`), {
|
|
86
95
|
secretName,
|
|
87
96
|
});
|
|
88
97
|
return resp.data;
|
|
89
98
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Deletes the specified OAuthApp secret.
|
|
102
|
+
* @param orgName Name of the Organization
|
|
103
|
+
* @param oauthAppId ID of the OAuthApp
|
|
104
|
+
* @param secret Name of the secret that shall be deleted
|
|
105
|
+
* @returns the updated OAuthApp
|
|
106
|
+
*/
|
|
107
|
+
deleteOAuthAppSecret(orgName, oauthAppId, secret) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
109
|
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}/secret/${secret}`));
|
|
99
110
|
return resp.data;
|
|
100
111
|
});
|
|
@@ -10,13 +10,13 @@ export declare class IdpOrganizationTeams extends Base {
|
|
|
10
10
|
* @param userIds List of User IDs to be added to the Team
|
|
11
11
|
* @returns The created Team
|
|
12
12
|
*/
|
|
13
|
-
createTeam
|
|
13
|
+
createTeam(orgName: string, teamName: string, userIds: string[]): Promise<Team>;
|
|
14
14
|
/**
|
|
15
15
|
* Deletes a Team.
|
|
16
16
|
* @param orgName Name of the Organization
|
|
17
17
|
* @param teamName Name of the Team
|
|
18
18
|
*/
|
|
19
|
-
deleteTeam
|
|
19
|
+
deleteTeam(orgName: string, teamName: string): Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* Updates an existing Team.
|
|
22
22
|
* @param orgName Name of the Organization
|
|
@@ -26,14 +26,14 @@ export declare class IdpOrganizationTeams extends Base {
|
|
|
26
26
|
* @param teamUsersPatchOperation (optional) Enum describing what operation shall be executed: Add, set or remove
|
|
27
27
|
* @returns The updated Team object
|
|
28
28
|
*/
|
|
29
|
-
patchTeam
|
|
29
|
+
patchTeam(orgName: string, teamName: string, newName?: string, userIds?: string[], teamUsersPatchOperation?: TeamUsersPatchOperation): Promise<Team>;
|
|
30
30
|
/**
|
|
31
31
|
* Retrieve a Team by its name.
|
|
32
32
|
* @param orgName Name of the Organization
|
|
33
33
|
* @param teamName Name of the Team
|
|
34
34
|
* @returns The requested Team
|
|
35
35
|
*/
|
|
36
|
-
getTeam
|
|
36
|
+
getTeam(orgName: string, teamName: string): Promise<Team>;
|
|
37
37
|
/**
|
|
38
38
|
* Retrieves all Teams of an Organization that match the provided search filter(s). Returns all Teams if no search filter is provided.
|
|
39
39
|
* @param organizationName Name of the organization
|
|
@@ -44,14 +44,14 @@ export declare class IdpOrganizationTeams extends Base {
|
|
|
44
44
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
45
45
|
* @returns Object containing an array of Teams and the total number of results found in the database (independent of limit and page)
|
|
46
46
|
*/
|
|
47
|
-
searchTeams
|
|
47
|
+
searchTeams(params: {
|
|
48
48
|
organizationName: string;
|
|
49
49
|
filters: SearchFilter[];
|
|
50
50
|
sorting?: Sorting;
|
|
51
51
|
options?: TeamQueryOptions;
|
|
52
52
|
limit?: number;
|
|
53
53
|
page?: number;
|
|
54
|
-
})
|
|
54
|
+
}): Promise<PaginatedResponse<Team>>;
|
|
55
55
|
/**
|
|
56
56
|
* Retrieves all Members of a Team that match the provided search filter(s). Returns all Members if no search filter is provided.
|
|
57
57
|
* @param organizationName Name of the organization
|
|
@@ -62,10 +62,10 @@ export declare class IdpOrganizationTeams extends Base {
|
|
|
62
62
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
63
63
|
* @returns Object containing an array of Team members and the total number of results found in the database (independent of limit and page)
|
|
64
64
|
*/
|
|
65
|
-
searchTeamMembers
|
|
65
|
+
searchTeamMembers({ organizationName, teamName, filters, sorting, limit, page, }: SearchParams & {
|
|
66
66
|
organizationName: string;
|
|
67
67
|
teamName: string;
|
|
68
|
-
})
|
|
68
|
+
}): Promise<PaginatedResponse<ReducedUser & {
|
|
69
69
|
email: string;
|
|
70
70
|
}>>;
|
|
71
71
|
protected getEndpoint(endpoint: string): string;
|
|
@@ -14,37 +14,40 @@ const Base_1 = require("../../../../Base");
|
|
|
14
14
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
15
15
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
16
|
class IdpOrganizationTeams extends Base_1.default {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.createTeam = (orgName, teamName, userIds) => __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new Team in the specified Organization.
|
|
19
|
+
* @param orgName Name of the Organization
|
|
20
|
+
* @param teamName Name of the Team
|
|
21
|
+
* @param userIds List of User IDs to be added to the Team
|
|
22
|
+
* @returns The created Team
|
|
23
|
+
*/
|
|
24
|
+
createTeam(orgName, teamName, userIds) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
26
|
const resp = yield this.axios.post(this.getEndpoint(`/${orgName}/teams`), { name: teamName, userIds: userIds });
|
|
28
27
|
return resp.data;
|
|
29
28
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Deletes a Team.
|
|
32
|
+
* @param orgName Name of the Organization
|
|
33
|
+
* @param teamName Name of the Team
|
|
34
|
+
*/
|
|
35
|
+
deleteTeam(orgName, teamName) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
37
|
yield this.axios.delete(this.getEndpoint(`/${orgName}/teams/${teamName}`));
|
|
37
38
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Updates an existing Team.
|
|
42
|
+
* @param orgName Name of the Organization
|
|
43
|
+
* @param teamName Name of the Team
|
|
44
|
+
* @param newName (optional) New Team name
|
|
45
|
+
* @param userIds (optional) List of user IDs to be added to, deleted from or set to the Team depending on the parameter 'teamUserPatchOperation'
|
|
46
|
+
* @param teamUsersPatchOperation (optional) Enum describing what operation shall be executed: Add, set or remove
|
|
47
|
+
* @returns The updated Team object
|
|
48
|
+
*/
|
|
49
|
+
patchTeam(orgName, teamName, newName, userIds, teamUsersPatchOperation) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
51
|
const resp = yield this.axios.patch(this.getEndpoint(`/${orgName}/teams/${teamName}`), {
|
|
49
52
|
name: newName,
|
|
50
53
|
userIds: userIds,
|
|
@@ -52,27 +55,31 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
52
55
|
});
|
|
53
56
|
return resp.data;
|
|
54
57
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Retrieve a Team by its name.
|
|
61
|
+
* @param orgName Name of the Organization
|
|
62
|
+
* @param teamName Name of the Team
|
|
63
|
+
* @returns The requested Team
|
|
64
|
+
*/
|
|
65
|
+
getTeam(orgName, teamName) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
67
|
const resp = yield this.axios.get(this.getEndpoint(`/${orgName}/teams/${teamName}`));
|
|
63
68
|
return resp.data;
|
|
64
69
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Retrieves all Teams of an Organization that match the provided search filter(s). Returns all Teams if no search filter is provided.
|
|
73
|
+
* @param organizationName Name of the organization
|
|
74
|
+
* @param filters (optional) Array of search filters
|
|
75
|
+
* @param sorting (optional) Sorting object
|
|
76
|
+
* @param options (optional) Defines query options to retrieve additional properties for the returned Team objects.
|
|
77
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
78
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
79
|
+
* @returns Object containing an array of Teams and the total number of results found in the database (independent of limit and page)
|
|
80
|
+
*/
|
|
81
|
+
searchTeams(params) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
83
|
var _a, _b;
|
|
77
84
|
const limit = params.limit || 25;
|
|
78
85
|
const page = params.page || 0;
|
|
@@ -87,17 +94,19 @@ class IdpOrganizationTeams extends Base_1.default {
|
|
|
87
94
|
});
|
|
88
95
|
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
89
96
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Retrieves all Members of a Team that match the provided search filter(s). Returns all Members if no search filter is provided.
|
|
100
|
+
* @param organizationName Name of the organization
|
|
101
|
+
* @param teamName Name of the Team
|
|
102
|
+
* @param filters (optional) Array of search filters
|
|
103
|
+
* @param sorting (optional) Sorting object
|
|
104
|
+
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
105
|
+
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
106
|
+
* @returns Object containing an array of Team members and the total number of results found in the database (independent of limit and page)
|
|
107
|
+
*/
|
|
108
|
+
searchTeamMembers(_a) {
|
|
109
|
+
return __awaiter(this, arguments, void 0, function* ({ organizationName, teamName, filters, sorting, limit = 25, page = 0, }) {
|
|
101
110
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
102
111
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
103
112
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
1
|
+
import Base from "../../../Base";
|
|
3
2
|
import { SuccessfulAuth } from "../../../interfaces/idp/user/SuccessfulAuth";
|
|
4
3
|
export declare class IdpRegistration extends Base {
|
|
5
|
-
constructor(options: Options, axios: AxiosInstance);
|
|
6
4
|
/**
|
|
7
5
|
* Registers a User in the HCloud system. This endpoint will send a verification link (with expiration date) to the Users' email address.
|
|
8
6
|
* At this point the User will have an account status of 'AWAITING_VALIDATION' and cannot sign into his account. If the registration won't be
|
|
@@ -15,7 +13,7 @@ export declare class IdpRegistration extends Base {
|
|
|
15
13
|
* @param regionId - Optional region id
|
|
16
14
|
* @param targetUrl Optional url the link in the mail will point to
|
|
17
15
|
*/
|
|
18
|
-
register
|
|
16
|
+
register(name: string, email: string, password: string, captcha: string, company?: string, regionId?: string, targetUrl?: string, validationCode?: string): Promise<void>;
|
|
19
17
|
/**
|
|
20
18
|
* Triggers the registration mail to be resend if the first one got lost
|
|
21
19
|
* @param name - Name of the User
|
|
@@ -26,7 +24,7 @@ export declare class IdpRegistration extends Base {
|
|
|
26
24
|
* @param regionId - Optional region id
|
|
27
25
|
* @param targetUrl Optional url the link in the mail will point to
|
|
28
26
|
*/
|
|
29
|
-
resendRegistrationMail
|
|
27
|
+
resendRegistrationMail(name: string, email: string, password: string, captcha: string, company?: string, regionId?: string, targetUrl?: string): Promise<void>;
|
|
30
28
|
/**
|
|
31
29
|
* Validates a previous registration. If successful, the Users account status will be set to 'Active'.
|
|
32
30
|
* @param email - Email of the User
|
|
@@ -34,6 +32,6 @@ export declare class IdpRegistration extends Base {
|
|
|
34
32
|
* @param regionId - Optional region id
|
|
35
33
|
* @returns Bearer Token and User object
|
|
36
34
|
*/
|
|
37
|
-
validateRegistration
|
|
35
|
+
validateRegistration(email: string, verificationCode: string): Promise<SuccessfulAuth>;
|
|
38
36
|
protected getEndpoint(endpoint: string): string;
|
|
39
37
|
}
|
|
@@ -12,21 +12,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.IdpRegistration = void 0;
|
|
13
13
|
const Base_1 = require("../../../Base");
|
|
14
14
|
class IdpRegistration extends Base_1.default {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.register = (name, email, password, captcha, company, regionId, targetUrl) => __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
/**
|
|
16
|
+
* Registers a User in the HCloud system. This endpoint will send a verification link (with expiration date) to the Users' email address.
|
|
17
|
+
* At this point the User will have an account status of 'AWAITING_VALIDATION' and cannot sign into his account. If the registration won't be
|
|
18
|
+
* validated before the expiration date, the user will be deleted again.
|
|
19
|
+
* @param name - Name of the User
|
|
20
|
+
* @param email - Email of the User
|
|
21
|
+
* @param password - Password
|
|
22
|
+
* @param captcha - Captcha
|
|
23
|
+
* @param company - Optional company name
|
|
24
|
+
* @param regionId - Optional region id
|
|
25
|
+
* @param targetUrl Optional url the link in the mail will point to
|
|
26
|
+
*/
|
|
27
|
+
register(name, email, password, captcha, company, regionId, targetUrl, validationCode) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
29
|
yield this.axios.post(this.getEndpoint("/v1/register"), {
|
|
31
30
|
name: name,
|
|
32
31
|
email: email,
|
|
@@ -35,19 +34,21 @@ class IdpRegistration extends Base_1.default {
|
|
|
35
34
|
company,
|
|
36
35
|
regionId,
|
|
37
36
|
targetUrl,
|
|
38
|
-
});
|
|
37
|
+
}, { params: { validationCode } });
|
|
39
38
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Triggers the registration mail to be resend if the first one got lost
|
|
42
|
+
* @param name - Name of the User
|
|
43
|
+
* @param email - Email of the User
|
|
44
|
+
* @param password - Password
|
|
45
|
+
* @param captcha - Captcha
|
|
46
|
+
* @param company - Optional company name
|
|
47
|
+
* @param regionId - Optional region id
|
|
48
|
+
* @param targetUrl Optional url the link in the mail will point to
|
|
49
|
+
*/
|
|
50
|
+
resendRegistrationMail(name, email, password, captcha, company, regionId, targetUrl) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
52
|
yield this.axios.patch(this.getEndpoint("/v1/register/resendRegistrationEmail"), {
|
|
52
53
|
name: name,
|
|
53
54
|
email: email,
|
|
@@ -58,14 +59,16 @@ class IdpRegistration extends Base_1.default {
|
|
|
58
59
|
targetUrl,
|
|
59
60
|
});
|
|
60
61
|
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Validates a previous registration. If successful, the Users account status will be set to 'Active'.
|
|
65
|
+
* @param email - Email of the User
|
|
66
|
+
* @param verificationCode - Email verification code
|
|
67
|
+
* @param regionId - Optional region id
|
|
68
|
+
* @returns Bearer Token and User object
|
|
69
|
+
*/
|
|
70
|
+
validateRegistration(email, verificationCode) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
72
|
var _a;
|
|
70
73
|
const resp = yield this.axios.patch(this.getEndpoint("/v1/register/verify"), {
|
|
71
74
|
email,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
1
|
+
import Base from "../../../Base";
|
|
3
2
|
import { PaginatedResponse, SearchFilter, Sorting } from "../../../interfaces/global";
|
|
4
3
|
import { Organization, OrganizationQueryOptions } from "../../../interfaces/idp/organization";
|
|
5
4
|
import { OrganizationMemberInvitation } from "../../../interfaces/idp/organization/member/invitations";
|
|
@@ -11,27 +10,29 @@ export declare class IdpUser extends Base {
|
|
|
11
10
|
/**
|
|
12
11
|
* Handles everything around a user's settings
|
|
13
12
|
*/
|
|
14
|
-
settings: IdpSettings;
|
|
13
|
+
get settings(): IdpSettings;
|
|
14
|
+
private _settings?;
|
|
15
15
|
/**
|
|
16
16
|
* Handles everything around a user's password
|
|
17
17
|
*/
|
|
18
|
-
password: UserPasswordService;
|
|
18
|
+
get password(): UserPasswordService;
|
|
19
|
+
private _password?;
|
|
19
20
|
/**
|
|
20
21
|
* Handles everything around a user's license
|
|
21
22
|
*/
|
|
22
|
-
license: IdpUserLicense;
|
|
23
|
-
|
|
23
|
+
get license(): IdpUserLicense;
|
|
24
|
+
private _license?;
|
|
24
25
|
/**
|
|
25
26
|
* Retrieves the User database entry for the requesting user.
|
|
26
27
|
* @returns User object
|
|
27
28
|
*/
|
|
28
|
-
getUser
|
|
29
|
+
getUser(): Promise<User>;
|
|
29
30
|
/**
|
|
30
31
|
* Updates the User database entry of the requesting user.
|
|
31
32
|
* @param user UserPatch object holding the new User values
|
|
32
33
|
* @returns User object
|
|
33
34
|
*/
|
|
34
|
-
patchUser
|
|
35
|
+
patchUser(user: UserPatch): Promise<User>;
|
|
35
36
|
/**
|
|
36
37
|
* Updates the Password of the requesting user.
|
|
37
38
|
* @param oldPassword String object holding the old password
|
|
@@ -39,15 +40,15 @@ export declare class IdpUser extends Base {
|
|
|
39
40
|
* @param token String (optional) object holding the current TOTP token
|
|
40
41
|
* @returns User object
|
|
41
42
|
*/
|
|
42
|
-
patchUserPassword
|
|
43
|
+
patchUserPassword(oldPassword: string, newPassword: string, totp?: string): Promise<User>;
|
|
43
44
|
/**
|
|
44
45
|
* Deletes user session and logs him out of HCloud on all devices.
|
|
45
46
|
*/
|
|
46
|
-
deleteUserSession
|
|
47
|
+
deleteUserSession(): Promise<void>;
|
|
47
48
|
/**
|
|
48
49
|
* Deletes the requesting user.
|
|
49
50
|
*/
|
|
50
|
-
deleteUser
|
|
51
|
+
deleteUser(): Promise<void>;
|
|
51
52
|
/**
|
|
52
53
|
* Retrieves all Organizations of a user that match the provided search filter(s). Returns all Organizations of the user if no search filter is provided.
|
|
53
54
|
* @param filters (optional) Array of search filters
|
|
@@ -57,13 +58,13 @@ export declare class IdpUser extends Base {
|
|
|
57
58
|
* @param options (optional) Defines query options to retrieve additional properties for the returned Organization objects.
|
|
58
59
|
* @returns Object containing an array of Organizations and the total number of results found in the database (independent of limit and page)
|
|
59
60
|
*/
|
|
60
|
-
searchOrganizations
|
|
61
|
+
searchOrganizations(params: {
|
|
61
62
|
filters: SearchFilter[];
|
|
62
63
|
sorting?: Sorting;
|
|
63
64
|
limit?: number;
|
|
64
65
|
page?: number;
|
|
65
66
|
options?: OrganizationQueryOptions;
|
|
66
|
-
})
|
|
67
|
+
}): Promise<PaginatedResponse<Organization>>;
|
|
67
68
|
/**
|
|
68
69
|
* Retrieves all organization invitations of a user that match the provided search filter(s). Returns all invitations of the user if no search filter is provided.
|
|
69
70
|
* @param filters (optional) Array of search filters
|
|
@@ -72,11 +73,15 @@ export declare class IdpUser extends Base {
|
|
|
72
73
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
73
74
|
* @returns Object containing an array of invitations and the total number of results found in the database (independent of limit and page)
|
|
74
75
|
*/
|
|
75
|
-
searchInvitations
|
|
76
|
+
searchInvitations(params: {
|
|
76
77
|
filters: SearchFilter[];
|
|
77
78
|
sorting?: Sorting;
|
|
78
79
|
limit?: number;
|
|
79
80
|
page?: number;
|
|
80
|
-
})
|
|
81
|
+
}): Promise<PaginatedResponse<OrganizationMemberInvitation>>;
|
|
82
|
+
/**
|
|
83
|
+
* Maintains a user's online status
|
|
84
|
+
*/
|
|
85
|
+
ping(): Promise<void>;
|
|
81
86
|
protected getEndpoint(endpoint: string): string;
|
|
82
87
|
}
|