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.
Files changed (181) hide show
  1. package/changelog.md +60 -806
  2. package/lib/Hcloud.d.ts +20 -10
  3. package/lib/Hcloud.js +60 -10
  4. package/lib/interfaces/auditor/index.d.ts +4 -2
  5. package/lib/interfaces/bouncer/features/index.d.ts +3 -6
  6. package/lib/interfaces/frontend/featureflags/index.d.ts +7 -0
  7. package/lib/interfaces/frontend/featureflags/index.js +2 -0
  8. package/lib/interfaces/high5/execution/index.d.ts +22 -0
  9. package/lib/interfaces/high5/execution/index.js +10 -0
  10. package/lib/interfaces/high5/index.d.ts +2 -2
  11. package/lib/interfaces/high5/index.js +2 -2
  12. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
  13. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +16 -1
  14. package/lib/interfaces/high5/space/execution/index.d.ts +14 -0
  15. package/lib/interfaces/high5/space/pool/index.d.ts +30 -0
  16. package/lib/interfaces/high5/space/pool/index.js +9 -0
  17. package/lib/interfaces/high5/wave/changelog.d.ts +30 -0
  18. package/lib/interfaces/high5/wave/changelog.js +18 -0
  19. package/lib/interfaces/high5/wave/index.d.ts +48 -1
  20. package/lib/interfaces/high5/wave/index.js +14 -1
  21. package/lib/interfaces/idp/organization/member/index.d.ts +2 -0
  22. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +1 -0
  23. package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
  24. package/lib/interfaces/idp/user/Scopes.d.ts +1 -0
  25. package/lib/interfaces/idp/user/Scopes.js +21 -1
  26. package/lib/interfaces/idp/user/Totp.d.ts +4 -2
  27. package/lib/interfaces/idp/user/index.d.ts +1 -0
  28. package/lib/interfaces/mothership/index.d.ts +1 -0
  29. package/lib/interfaces/nats/index.d.ts +35 -20
  30. package/lib/interfaces/nats/index.js +132 -94
  31. package/lib/service/agent/bundle/dev/index.d.ts +5 -2
  32. package/lib/service/agent/bundle/dev/index.js +30 -10
  33. package/lib/service/agent/context/index.d.ts +7 -9
  34. package/lib/service/agent/context/index.js +41 -32
  35. package/lib/service/agent/index.d.ts +9 -7
  36. package/lib/service/agent/index.js +23 -6
  37. package/lib/service/auditor/index.d.ts +6 -7
  38. package/lib/service/auditor/index.js +23 -17
  39. package/lib/service/auditor/internal/index.d.ts +2 -2
  40. package/lib/service/auditor/internal/index.js +24 -20
  41. package/lib/service/bouncer/features/index.d.ts +1 -1
  42. package/lib/service/bouncer/features/index.js +5 -3
  43. package/lib/service/bouncer/index.d.ts +3 -10
  44. package/lib/service/bouncer/index.js +6 -21
  45. package/lib/service/dali/DaliAvatar.d.ts +21 -11
  46. package/lib/service/dali/DaliAvatar.js +63 -8
  47. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +5 -7
  48. package/lib/service/dali/avatar/DaliFuseSpace.js +29 -26
  49. package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +29 -0
  50. package/lib/service/dali/avatar/DaliHigh5Pool.js +61 -0
  51. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +5 -7
  52. package/lib/service/dali/avatar/DaliHigh5Space.js +29 -26
  53. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +4 -6
  54. package/lib/service/dali/avatar/DaliOAuthApp.js +26 -23
  55. package/lib/service/dali/avatar/DaliOrganization.d.ts +4 -6
  56. package/lib/service/dali/avatar/DaliOrganization.js +23 -20
  57. package/lib/service/dali/avatar/DaliTeam.d.ts +4 -6
  58. package/lib/service/dali/avatar/DaliTeam.js +26 -23
  59. package/lib/service/dali/avatar/DaliUser.d.ts +4 -6
  60. package/lib/service/dali/avatar/DaliUser.js +20 -17
  61. package/lib/service/dali/index.d.ts +4 -5
  62. package/lib/service/dali/index.js +14 -7
  63. package/lib/service/fuse/index.d.ts +8 -7
  64. package/lib/service/fuse/index.js +23 -9
  65. package/lib/service/fuse/internal/index.d.ts +3 -4
  66. package/lib/service/fuse/internal/index.js +5 -3
  67. package/lib/service/fuse/internal/space/cronjob/index.d.ts +3 -4
  68. package/lib/service/fuse/internal/space/cronjob/index.js +5 -3
  69. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +2 -4
  70. package/lib/service/fuse/internal/space/cronjob/log/index.js +11 -12
  71. package/lib/service/fuse/internal/space/index.d.ts +5 -6
  72. package/lib/service/fuse/internal/space/index.js +24 -18
  73. package/lib/service/fuse/space/cronjob/index.d.ts +15 -15
  74. package/lib/service/fuse/space/cronjob/index.js +133 -105
  75. package/lib/service/fuse/space/cronjob/log/index.d.ts +3 -3
  76. package/lib/service/fuse/space/cronjob/log/index.js +24 -23
  77. package/lib/service/fuse/space/index.d.ts +13 -14
  78. package/lib/service/fuse/space/index.js +88 -70
  79. package/lib/service/high5/execution/index.d.ts +13 -5
  80. package/lib/service/high5/execution/index.js +32 -4
  81. package/lib/service/high5/execution/log/index.d.ts +2 -2
  82. package/lib/service/high5/execution/log/index.js +11 -12
  83. package/lib/service/high5/execution/status/index.d.ts +2 -2
  84. package/lib/service/high5/execution/status/index.js +11 -12
  85. package/lib/service/high5/index.d.ts +12 -9
  86. package/lib/service/high5/index.js +36 -12
  87. package/lib/service/high5/internal/index.d.ts +3 -4
  88. package/lib/service/high5/internal/index.js +5 -3
  89. package/lib/service/high5/internal/space/index.d.ts +2 -2
  90. package/lib/service/high5/internal/space/index.js +19 -15
  91. package/lib/service/high5/joinToken/index.d.ts +4 -4
  92. package/lib/service/high5/joinToken/index.js +36 -28
  93. package/lib/service/high5/space/event/index.d.ts +9 -10
  94. package/lib/service/high5/space/event/index.js +58 -46
  95. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +1 -2
  96. package/lib/service/high5/space/event/stream/design/DesignOperations.js +2 -0
  97. package/lib/service/high5/space/event/stream/design/index.d.ts +23 -8
  98. package/lib/service/high5/space/event/stream/design/index.js +60 -25
  99. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +5 -5
  100. package/lib/service/high5/space/event/stream/design/snapshot/index.js +65 -58
  101. package/lib/service/high5/space/event/stream/index.d.ts +14 -15
  102. package/lib/service/high5/space/event/stream/index.js +125 -103
  103. package/lib/service/high5/space/execution/index.d.ts +36 -9
  104. package/lib/service/high5/space/execution/index.js +96 -42
  105. package/lib/service/high5/space/execution/log/index.d.ts +4 -6
  106. package/lib/service/high5/space/execution/log/index.js +22 -21
  107. package/lib/service/high5/space/execution/status/index.d.ts +1 -1
  108. package/lib/service/high5/space/execution/status/index.js +10 -8
  109. package/lib/service/high5/space/index.d.ts +28 -21
  110. package/lib/service/high5/space/index.js +138 -86
  111. package/lib/service/high5/space/pool/index.d.ts +97 -0
  112. package/lib/service/high5/space/pool/index.js +171 -0
  113. package/lib/service/high5/space/secret/index.d.ts +6 -6
  114. package/lib/service/high5/space/secret/index.js +59 -49
  115. package/lib/service/high5/space/wave/index.d.ts +7 -9
  116. package/lib/service/high5/space/wave/index.js +40 -33
  117. package/lib/service/high5/space/webhook/index.d.ts +21 -14
  118. package/lib/service/high5/space/webhook/index.js +106 -73
  119. package/lib/service/high5/space/webhook/log/index.d.ts +2 -4
  120. package/lib/service/high5/space/webhook/log/index.js +11 -12
  121. package/lib/service/high5/wave/s3/index.d.ts +14 -7
  122. package/lib/service/high5/wave/s3/index.js +64 -38
  123. package/lib/service/idp/index.d.ts +17 -15
  124. package/lib/service/idp/index.js +104 -56
  125. package/lib/service/idp/internal/index.d.ts +2 -4
  126. package/lib/service/idp/internal/index.js +10 -11
  127. package/lib/service/idp/oauth/index.d.ts +16 -12
  128. package/lib/service/idp/oauth/index.js +56 -45
  129. package/lib/service/idp/organization/index.d.ts +12 -10
  130. package/lib/service/idp/organization/index.js +63 -28
  131. package/lib/service/idp/organization/license/index.d.ts +2 -2
  132. package/lib/service/idp/organization/license/index.js +5 -4
  133. package/lib/service/idp/organization/member/index.d.ts +10 -11
  134. package/lib/service/idp/organization/member/index.js +62 -48
  135. package/lib/service/idp/organization/member/invitations/index.d.ts +3 -3
  136. package/lib/service/idp/organization/member/invitations/index.js +47 -43
  137. package/lib/service/idp/organization/settings/domain/index.d.ts +7 -8
  138. package/lib/service/idp/organization/settings/domain/index.js +42 -29
  139. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +5 -5
  140. package/lib/service/idp/organization/settings/domain/saml/index.js +58 -48
  141. package/lib/service/idp/organization/settings/index.d.ts +5 -5
  142. package/lib/service/idp/organization/settings/index.js +17 -4
  143. package/lib/service/idp/organization/settings/oauth/index.d.ts +9 -11
  144. package/lib/service/idp/organization/settings/oauth/index.js +67 -56
  145. package/lib/service/idp/organization/team/index.d.ts +8 -8
  146. package/lib/service/idp/organization/team/index.js +64 -55
  147. package/lib/service/idp/registration/index.d.ts +4 -6
  148. package/lib/service/idp/registration/index.js +38 -35
  149. package/lib/service/idp/user/index.d.ts +20 -15
  150. package/lib/service/idp/user/index.js +94 -51
  151. package/lib/service/idp/user/license/index.d.ts +2 -2
  152. package/lib/service/idp/user/license/index.js +5 -4
  153. package/lib/service/idp/user/password/index.d.ts +1 -1
  154. package/lib/service/idp/user/password/index.js +10 -11
  155. package/lib/service/idp/user/settings/connections/index.d.ts +2 -4
  156. package/lib/service/idp/user/settings/connections/index.js +9 -10
  157. package/lib/service/idp/user/settings/general/index.d.ts +10 -6
  158. package/lib/service/idp/user/settings/general/index.js +25 -13
  159. package/lib/service/idp/user/settings/index.d.ts +13 -9
  160. package/lib/service/idp/user/settings/index.js +53 -8
  161. package/lib/service/idp/user/settings/notifications/index.d.ts +3 -5
  162. package/lib/service/idp/user/settings/notifications/index.js +14 -13
  163. package/lib/service/idp/user/settings/oauthApps/index.d.ts +3 -5
  164. package/lib/service/idp/user/settings/oauthApps/index.js +17 -16
  165. package/lib/service/idp/user/settings/pats/index.d.ts +8 -10
  166. package/lib/service/idp/user/settings/pats/index.js +55 -44
  167. package/lib/service/idp/user/settings/twoFactor/index.d.ts +3 -4
  168. package/lib/service/idp/user/settings/twoFactor/index.js +8 -3
  169. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +7 -9
  170. package/lib/service/idp/user/settings/twoFactor/totp/index.js +36 -29
  171. package/lib/service/mailer/index.d.ts +4 -5
  172. package/lib/service/mailer/index.js +12 -8
  173. package/lib/service/mailer/internal/index.d.ts +4 -4
  174. package/lib/service/mailer/internal/index.js +38 -33
  175. package/lib/service/mothership/index.d.ts +12 -12
  176. package/lib/service/mothership/index.js +92 -79
  177. package/lib/service/nats/index.d.ts +1 -3
  178. package/lib/service/nats/index.js +2 -2
  179. package/lib/utils/bouncer/features/Provider.d.ts +3 -0
  180. package/lib/utils/bouncer/features/Provider.js +20 -2
  181. 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
- constructor(options, axios) {
18
- super(options, axios);
19
- /**
20
- * 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.
21
- * @param orgName Name of the Organization
22
- * @param filters (optional) Array of search filters
23
- * @param sorting (optional) Sorting object
24
- * @param limit (optional) Max number of results (1-100; defaults to 25)
25
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
26
- * @returns Object containing an array of OAuth apps and the total number of results found in the database (independent of limit and page)
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
- * 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
- this.getOAuthApp = (orgName, oauthAppId) => __awaiter(this, void 0, void 0, function* () {
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
- * Creates a new OAuth app in the specified Organization.
50
- * @param orgName Name of the Organization
51
- * @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
52
- * @returns The created OAuth app
53
- */
54
- this.createOAuthApp = (orgName, oAuthAppCreate) => __awaiter(this, void 0, void 0, function* () {
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
- * Updates an existing OAuth app.
60
- * @param orgName Name of the Organization
61
- * @param oauthAppId ID of the OAuth app to be updated
62
- * @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
63
- * @returns the updated OAuth app
64
- */
65
- this.updateOAuthApp = (orgName, oauthAppId, oAuthAppCreate) => __awaiter(this, void 0, void 0, function* () {
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
- * Deletes an OAuthApp by its ID.
71
- * @param orgName Name of the Organization
72
- * @param oauthAppId ID of the OAuthApp
73
- */
74
- this.deleteOAuthApp = (orgName, oauthAppId) => __awaiter(this, void 0, void 0, function* () {
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
- * Creates a new secret for an existing OAuthApp.
79
- * @param orgName Name of the Organization
80
- * @param oauthAppId ID of the OAuthApp
81
- * @param secretName Name of the Secret
82
- * @returns the updated OAuth app
83
- */
84
- this.createOAuthAppSecret = (orgName, oauthAppId, secretName) => __awaiter(this, void 0, void 0, function* () {
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
- * Deletes the specified OAuthApp secret.
92
- * @param orgName Name of the Organization
93
- * @param oauthAppId ID of the OAuthApp
94
- * @param secret Name of the secret that shall be deleted
95
- * @returns the updated OAuthApp
96
- */
97
- this.deleteOAuthAppSecret = (orgName, oauthAppId, secret) => __awaiter(this, void 0, void 0, function* () {
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: (orgName: string, teamName: string, userIds: string[]) => Promise<Team>;
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: (orgName: string, teamName: string) => Promise<void>;
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: (orgName: string, teamName: string, newName?: string, userIds?: string[], teamUsersPatchOperation?: TeamUsersPatchOperation) => Promise<Team>;
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: (orgName: string, teamName: string) => Promise<Team>;
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: (params: {
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
- }) => Promise<PaginatedResponse<Team>>;
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: ({ organizationName, teamName, filters, sorting, limit, page, }: SearchParams & {
65
+ searchTeamMembers({ organizationName, teamName, filters, sorting, limit, page, }: SearchParams & {
66
66
  organizationName: string;
67
67
  teamName: string;
68
- }) => Promise<PaginatedResponse<ReducedUser & {
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
- constructor() {
18
- super(...arguments);
19
- /**
20
- * Creates a new Team in the specified Organization.
21
- * @param orgName Name of the Organization
22
- * @param teamName Name of the Team
23
- * @param userIds List of User IDs to be added to the Team
24
- * @returns The created Team
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
- * Deletes a Team.
32
- * @param orgName Name of the Organization
33
- * @param teamName Name of the Team
34
- */
35
- this.deleteTeam = (orgName, teamName) => __awaiter(this, void 0, void 0, function* () {
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
- * Updates an existing Team.
40
- * @param orgName Name of the Organization
41
- * @param teamName Name of the Team
42
- * @param newName (optional) New Team name
43
- * @param userIds (optional) List of user IDs to be added to, deleted from or set to the Team depending on the parameter 'teamUserPatchOperation'
44
- * @param teamUsersPatchOperation (optional) Enum describing what operation shall be executed: Add, set or remove
45
- * @returns The updated Team object
46
- */
47
- this.patchTeam = (orgName, teamName, newName, userIds, teamUsersPatchOperation) => __awaiter(this, void 0, void 0, function* () {
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
- * Retrieve a Team by its name.
57
- * @param orgName Name of the Organization
58
- * @param teamName Name of the Team
59
- * @returns The requested Team
60
- */
61
- this.getTeam = (orgName, teamName) => __awaiter(this, void 0, void 0, function* () {
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
- * Retrieves all Teams of an Organization that match the provided search filter(s). Returns all Teams if no search filter is provided.
67
- * @param organizationName Name of the organization
68
- * @param filters (optional) Array of search filters
69
- * @param sorting (optional) Sorting object
70
- * @param options (optional) Defines query options to retrieve additional properties for the returned Team objects.
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 Teams and the total number of results found in the database (independent of limit and page)
74
- */
75
- this.searchTeams = (params) => __awaiter(this, void 0, void 0, function* () {
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
- * Retrieves all Members of a Team that match the provided search filter(s). Returns all Members if no search filter is provided.
92
- * @param organizationName Name of the organization
93
- * @param teamName Name of the Team
94
- * @param filters (optional) Array of search filters
95
- * @param sorting (optional) Sorting object
96
- * @param limit (optional) Max number of results (1-100; defaults to 25)
97
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
98
- * @returns Object containing an array of Team members and the total number of results found in the database (independent of limit and page)
99
- */
100
- this.searchTeamMembers = (_a) => __awaiter(this, [_a], void 0, function* ({ organizationName, teamName, filters, sorting, limit = 25, page = 0, }) {
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 { AxiosInstance } from "axios";
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: (name: string, email: string, password: string, captcha: string, company?: string, regionId?: string, targetUrl?: string) => Promise<void>;
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: (name: string, email: string, password: string, captcha: string, company?: string, regionId?: string, targetUrl?: string) => Promise<void>;
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: (email: string, verificationCode: string) => Promise<SuccessfulAuth>;
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
- constructor(options, axios) {
16
- super(options, axios);
17
- /**
18
- * Registers a User in the HCloud system. This endpoint will send a verification link (with expiration date) to the Users' email address.
19
- * 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
20
- * validated before the expiration date, the user will be deleted again.
21
- * @param name - Name of the User
22
- * @param email - Email of the User
23
- * @param password - Password
24
- * @param captcha - Captcha
25
- * @param company - Optional company name
26
- * @param regionId - Optional region id
27
- * @param targetUrl Optional url the link in the mail will point to
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
- * 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
- this.resendRegistrationMail = (name, email, password, captcha, company, regionId, targetUrl) => __awaiter(this, void 0, void 0, function* () {
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
- * Validates a previous registration. If successful, the Users account status will be set to 'Active'.
63
- * @param email - Email of the User
64
- * @param verificationCode - Email verification code
65
- * @param regionId - Optional region id
66
- * @returns Bearer Token and User object
67
- */
68
- this.validateRegistration = (email, verificationCode) => __awaiter(this, void 0, void 0, function* () {
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 { AxiosInstance } from "axios";
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
- constructor(options: Options, axios: AxiosInstance);
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: () => Promise<User>;
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: (user: UserPatch) => Promise<User>;
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: (oldPassword: string, newPassword: string, totp?: string) => Promise<User>;
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: () => Promise<void>;
47
+ deleteUserSession(): Promise<void>;
47
48
  /**
48
49
  * Deletes the requesting user.
49
50
  */
50
- deleteUser: () => Promise<void>;
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: (params: {
61
+ searchOrganizations(params: {
61
62
  filters: SearchFilter[];
62
63
  sorting?: Sorting;
63
64
  limit?: number;
64
65
  page?: number;
65
66
  options?: OrganizationQueryOptions;
66
- }) => Promise<PaginatedResponse<Organization>>;
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: (params: {
76
+ searchInvitations(params: {
76
77
  filters: SearchFilter[];
77
78
  sorting?: Sorting;
78
79
  limit?: number;
79
80
  page?: number;
80
- }) => Promise<PaginatedResponse<OrganizationMemberInvitation>>;
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
  }