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
@@ -1,37 +1,35 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../Base";
1
+ import Base from "../../../Base";
3
2
  import { Context } from "../../../interfaces/agent/context";
4
3
  export declare class AgentContext extends Base {
5
- constructor(options: Options, axios: AxiosInstance);
6
4
  /**
7
5
  * Retrieves all contexts.
8
6
  * @returns The requested contexts
9
7
  */
10
- getContexts: () => Promise<Context[]>;
8
+ getContexts(): Promise<Context[]>;
11
9
  /**
12
10
  * Add a new context.
13
11
  * @returns The newly created context
14
12
  */
15
- addContext: (server: string, email: string, token: string, enabled: boolean) => Promise<Context>;
13
+ addContext(server: string, email: string, token: string, enabled: boolean): Promise<Context>;
16
14
  /**
17
15
  * Update an existing context.
18
16
  * @returns The updated context
19
17
  */
20
- updateContext: (uuid: string, server: string, email: string, token: string, enabled: boolean) => Promise<Context>;
18
+ updateContext(uuid: string, server: string, email: string, token: string, enabled: boolean): Promise<Context>;
21
19
  /**
22
20
  * Get an existing context.
23
21
  * @returns The requested context
24
22
  */
25
- getContext: (uuid: string) => Promise<Context>;
23
+ getContext(uuid: string): Promise<Context>;
26
24
  /**
27
25
  * Delete a context.
28
26
  * @returns void
29
27
  */
30
- deleteContext: (uuid: string) => Promise<void>;
28
+ deleteContext(uuid: string): Promise<void>;
31
29
  /**
32
30
  * Patch the enabled property of a Context.
33
31
  * @returns Updated Context
34
32
  */
35
- patchContextEnabled: (uuid: string, enabled: boolean) => Promise<Context>;
33
+ patchContextEnabled(uuid: string, enabled: boolean): Promise<Context>;
36
34
  protected getEndpoint(endpoint: string): string;
37
35
  }
@@ -12,21 +12,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.AgentContext = void 0;
13
13
  const Base_1 = require("../../../Base");
14
14
  class AgentContext extends Base_1.default {
15
- constructor(options, axios) {
16
- super(options, axios);
17
- /**
18
- * Retrieves all contexts.
19
- * @returns The requested contexts
20
- */
21
- this.getContexts = () => __awaiter(this, void 0, void 0, function* () {
15
+ /**
16
+ * Retrieves all contexts.
17
+ * @returns The requested contexts
18
+ */
19
+ getContexts() {
20
+ return __awaiter(this, void 0, void 0, function* () {
22
21
  const resp = yield this.axios.get(this.getEndpoint(`/v1/context`));
23
22
  return resp.data;
24
23
  });
25
- /**
26
- * Add a new context.
27
- * @returns The newly created context
28
- */
29
- this.addContext = (server, email, token, enabled) => __awaiter(this, void 0, void 0, function* () {
24
+ }
25
+ /**
26
+ * Add a new context.
27
+ * @returns The newly created context
28
+ */
29
+ addContext(server, email, token, enabled) {
30
+ return __awaiter(this, void 0, void 0, function* () {
30
31
  const resp = yield this.axios.post(this.getEndpoint(`/v1/context`), {
31
32
  server,
32
33
  email,
@@ -35,11 +36,13 @@ class AgentContext extends Base_1.default {
35
36
  });
36
37
  return resp.data;
37
38
  });
38
- /**
39
- * Update an existing context.
40
- * @returns The updated context
41
- */
42
- this.updateContext = (uuid, server, email, token, enabled) => __awaiter(this, void 0, void 0, function* () {
39
+ }
40
+ /**
41
+ * Update an existing context.
42
+ * @returns The updated context
43
+ */
44
+ updateContext(uuid, server, email, token, enabled) {
45
+ return __awaiter(this, void 0, void 0, function* () {
43
46
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/context/${uuid}`), {
44
47
  server,
45
48
  email,
@@ -48,26 +51,32 @@ class AgentContext extends Base_1.default {
48
51
  });
49
52
  return resp.data;
50
53
  });
51
- /**
52
- * Get an existing context.
53
- * @returns The requested context
54
- */
55
- this.getContext = (uuid) => __awaiter(this, void 0, void 0, function* () {
54
+ }
55
+ /**
56
+ * Get an existing context.
57
+ * @returns The requested context
58
+ */
59
+ getContext(uuid) {
60
+ return __awaiter(this, void 0, void 0, function* () {
56
61
  const resp = yield this.axios.get(this.getEndpoint(`/v1/context/${uuid}`));
57
62
  return resp.data;
58
63
  });
59
- /**
60
- * Delete a context.
61
- * @returns void
62
- */
63
- this.deleteContext = (uuid) => __awaiter(this, void 0, void 0, function* () {
64
+ }
65
+ /**
66
+ * Delete a context.
67
+ * @returns void
68
+ */
69
+ deleteContext(uuid) {
70
+ return __awaiter(this, void 0, void 0, function* () {
64
71
  yield this.axios.delete(this.getEndpoint(`/v1/context/${uuid}`));
65
72
  });
66
- /**
67
- * Patch the enabled property of a Context.
68
- * @returns Updated Context
69
- */
70
- this.patchContextEnabled = (uuid, enabled) => __awaiter(this, void 0, void 0, function* () {
73
+ }
74
+ /**
75
+ * Patch the enabled property of a Context.
76
+ * @returns Updated Context
77
+ */
78
+ patchContextEnabled(uuid, enabled) {
79
+ return __awaiter(this, void 0, void 0, function* () {
71
80
  const res = yield this.axios.patch(this.getEndpoint(`/v1/context/${uuid}/enabled`), {
72
81
  enabled,
73
82
  });
@@ -1,14 +1,16 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../Base";
1
+ import Base from "../../Base";
3
2
  import { AgentBundle } from "./bundle";
4
3
  import { DevBundle } from "./bundle/dev";
5
4
  import { AgentContext } from "./context";
6
5
  import { AgentInstaller } from "./installer";
7
6
  export default class Agent extends Base {
8
- context: AgentContext;
9
- bundle: AgentBundle;
10
- devBundle: DevBundle;
11
- installer: AgentInstaller;
12
- constructor(options: Options, axios: AxiosInstance);
7
+ get context(): AgentContext;
8
+ private _context?;
9
+ get bundle(): AgentBundle;
10
+ private _bundle?;
11
+ get devBundle(): DevBundle;
12
+ private _devBundle?;
13
+ get installer(): AgentInstaller;
14
+ private _installer?;
13
15
  protected getEndpoint(endpoint: string): string;
14
16
  }
@@ -6,12 +6,29 @@ const dev_1 = require("./bundle/dev");
6
6
  const context_1 = require("./context");
7
7
  const installer_1 = require("./installer");
8
8
  class Agent extends Base_1.default {
9
- constructor(options, axios) {
10
- super(options, axios);
11
- this.context = new context_1.AgentContext(this.options, this.axios);
12
- this.bundle = new bundle_1.AgentBundle(this.options, this.axios);
13
- this.devBundle = new dev_1.DevBundle(this.options, this.axios);
14
- this.installer = new installer_1.AgentInstaller(this.options, this.axios);
9
+ get context() {
10
+ if (this._context === undefined) {
11
+ this._context = new context_1.AgentContext(this.options, this.axios);
12
+ }
13
+ return this._context;
14
+ }
15
+ get bundle() {
16
+ if (this._bundle === undefined) {
17
+ this._bundle = new bundle_1.AgentBundle(this.options, this.axios);
18
+ }
19
+ return this._bundle;
20
+ }
21
+ get devBundle() {
22
+ if (this._devBundle === undefined) {
23
+ this._devBundle = new dev_1.DevBundle(this.options, this.axios);
24
+ }
25
+ return this._devBundle;
26
+ }
27
+ get installer() {
28
+ if (this._installer === undefined) {
29
+ this._installer = new installer_1.AgentInstaller(this.options, this.axios);
30
+ }
31
+ return this._installer;
15
32
  }
16
33
  getEndpoint(endpoint) {
17
34
  return `${this.options.server}/api/agent${endpoint}`;
@@ -1,15 +1,14 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../Base";
1
+ import Base from "../../Base";
3
2
  import { AuditLog } from "../../interfaces/auditor";
4
3
  import { PaginatedResponse, SearchParams, Version } from "../../interfaces/global";
5
4
  import { AuditorInternal } from "./internal";
6
5
  export default class Auditor extends Base {
7
- internal: AuditorInternal;
8
- constructor(options: Options, axios: AxiosInstance);
6
+ get internal(): AuditorInternal;
7
+ private _internal?;
9
8
  /**
10
9
  * @returns An object containing the endpoint version as a string
11
10
  */
12
- version: () => Promise<Version>;
11
+ version(): Promise<Version>;
13
12
  /**
14
13
  * Returns all audit logs for an organization which match the search filter
15
14
  * @param organizationName Name of the organization
@@ -19,8 +18,8 @@ export default class Auditor extends Base {
19
18
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
20
19
  * @returns Object containing an array of audit logs and the total number of results found in the database (independent of limit and page)
21
20
  */
22
- searchAuditLogs: ({ organizationName, filters, sorting, limit, page, }: SearchParams & {
21
+ searchAuditLogs({ organizationName, filters, sorting, limit, page, }: SearchParams & {
23
22
  organizationName: string;
24
- }) => Promise<PaginatedResponse<AuditLog>>;
23
+ }): Promise<PaginatedResponse<AuditLog>>;
25
24
  protected getEndpoint(endpoint: string): string;
26
25
  }
@@ -14,25 +14,32 @@ const paginatedResponseHelper_1 = require("../../helper/paginatedResponseHelper"
14
14
  const searchFilter_1 = require("../../helper/searchFilter");
15
15
  const internal_1 = require("./internal");
16
16
  class Auditor extends Base_1.default {
17
- constructor(options, axios) {
18
- super(options, axios);
19
- /**
20
- * @returns An object containing the endpoint version as a string
21
- */
22
- this.version = () => __awaiter(this, void 0, void 0, function* () {
17
+ get internal() {
18
+ if (this._internal === undefined) {
19
+ this._internal = new internal_1.AuditorInternal(this.options, this.axios);
20
+ }
21
+ return this._internal;
22
+ }
23
+ /**
24
+ * @returns An object containing the endpoint version as a string
25
+ */
26
+ version() {
27
+ return __awaiter(this, void 0, void 0, function* () {
23
28
  const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
24
29
  return resp.data;
25
30
  });
26
- /**
27
- * Returns all audit logs for an organization which match the search filter
28
- * @param organizationName Name of the organization
29
- * @param filters (optional) Array of search filters
30
- * @param sorting (optional) Sorting object
31
- * @param limit (optional) Max number of results (1-100; defaults to 25)
32
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
33
- * @returns Object containing an array of audit logs and the total number of results found in the database (independent of limit and page)
34
- */
35
- this.searchAuditLogs = (_a) => __awaiter(this, [_a], void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0, }) {
31
+ }
32
+ /**
33
+ * Returns all audit logs for an organization which match the search filter
34
+ * @param organizationName Name of the organization
35
+ * @param filters (optional) Array of search filters
36
+ * @param sorting (optional) Sorting object
37
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
38
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
39
+ * @returns Object containing an array of audit logs and the total number of results found in the database (independent of limit and page)
40
+ */
41
+ searchAuditLogs(_a) {
42
+ return __awaiter(this, arguments, void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0, }) {
36
43
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
37
44
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${organizationName}/logs/search?page=${page}&limit=${limit}`), {
38
45
  filters: filtersDTO,
@@ -40,7 +47,6 @@ class Auditor extends Base_1.default {
40
47
  });
41
48
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
42
49
  });
43
- this.internal = new internal_1.AuditorInternal(this.options, this.axios);
44
50
  }
45
51
  getEndpoint(endpoint) {
46
52
  return `${this.options.server}/api/auditor${endpoint}`;
@@ -13,7 +13,7 @@ export declare class AuditorInternal extends Base {
13
13
  * Timestamps might differ as much as: this.options.auditor.queue.executionInterval || 500
14
14
  * @param logs array (add multiple logs entries at once)
15
15
  */
16
- queueAuditLogs: (logs: AuditLogCreate[]) => Promise<void>;
16
+ queueAuditLogs(logs: AuditLogCreate[]): Promise<void>;
17
17
  private startQueue;
18
18
  /**
19
19
  * Deletes all audit logs of an organization
@@ -22,6 +22,6 @@ export declare class AuditorInternal extends Base {
22
22
  * @param orgId the organizations's ID
23
23
  * @returns void
24
24
  */
25
- deleteAllAuditLogsOfOrganization: (orgId: string) => Promise<void>;
25
+ deleteAllAuditLogsOfOrganization(orgId: string): Promise<void>;
26
26
  protected getEndpoint(endpoint: string): string;
27
27
  }
@@ -17,31 +17,23 @@ class AuditorInternal extends Base_1.default {
17
17
  super(...arguments);
18
18
  this.queueExecutionInterval = ((_b = (_a = this.options.auditor) === null || _a === void 0 ? void 0 : _a.queue) === null || _b === void 0 ? void 0 : _b.executionInterval) || 500;
19
19
  this.logQueue = [];
20
- /**
21
- * Adds log entries to a queue that will be processed periodically.
22
- *
23
- * No exceptions are thrown in case of an error as this function runs periodically asynchronous.
24
- *
25
- * This also comes with the downside of log timesstamps being inaccurate as they are created by the Auditor Server.
26
- * Timestamps might differ as much as: this.options.auditor.queue.executionInterval || 500
27
- * @param logs array (add multiple logs entries at once)
28
- */
29
- this.queueAuditLogs = (logs) => __awaiter(this, void 0, void 0, function* () {
20
+ }
21
+ /**
22
+ * Adds log entries to a queue that will be processed periodically.
23
+ *
24
+ * No exceptions are thrown in case of an error as this function runs periodically asynchronous.
25
+ *
26
+ * This also comes with the downside of log timesstamps being inaccurate as they are created by the Auditor Server.
27
+ * Timestamps might differ as much as: this.options.auditor.queue.executionInterval || 500
28
+ * @param logs array (add multiple logs entries at once)
29
+ */
30
+ queueAuditLogs(logs) {
31
+ return __awaiter(this, void 0, void 0, function* () {
30
32
  if (!this.logQueueTimer) {
31
33
  this.startQueue();
32
34
  }
33
35
  this.logQueue = this.logQueue.concat(logs);
34
36
  });
35
- /**
36
- * Deletes all audit logs of an organization
37
- *
38
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
39
- * @param orgId the organizations's ID
40
- * @returns void
41
- */
42
- this.deleteAllAuditLogsOfOrganization = (orgId) => __awaiter(this, void 0, void 0, function* () {
43
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgId}/logs`));
44
- });
45
37
  }
46
38
  startQueue() {
47
39
  if (!this.logQueueTimer) {
@@ -54,6 +46,18 @@ class AuditorInternal extends Base_1.default {
54
46
  }, this.queueExecutionInterval);
55
47
  }
56
48
  }
49
+ /**
50
+ * Deletes all audit logs of an organization
51
+ *
52
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
53
+ * @param orgId the organizations's ID
54
+ * @returns void
55
+ */
56
+ deleteAllAuditLogsOfOrganization(orgId) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgId}/logs`));
59
+ });
60
+ }
57
61
  getEndpoint(endpoint) {
58
62
  return `${this.options.server}/api/auditor/internal${endpoint}`;
59
63
  }
@@ -3,6 +3,6 @@ import Base, { Options } from "../../../Base";
3
3
  import { HcloudFeature } from "../../../interfaces/bouncer";
4
4
  export default class BouncerFeatures extends Base {
5
5
  constructor(options: Options, axios: AxiosInstance);
6
- getHcloudFeatures: () => Promise<HcloudFeature[]>;
6
+ getHcloudFeatures(): Promise<HcloudFeature[]>;
7
7
  protected getEndpoint(endpoint: string): string;
8
8
  }
@@ -13,13 +13,15 @@ const Base_1 = require("../../../Base");
13
13
  class BouncerFeatures extends Base_1.default {
14
14
  constructor(options, axios) {
15
15
  super(options, axios);
16
- this.getHcloudFeatures = () => __awaiter(this, void 0, void 0, function* () {
17
- const resp = yield this.axios.get(this.getEndpoint("/v1/feature/hcloud"), {});
16
+ }
17
+ getHcloudFeatures() {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ const resp = yield this.axios.get(this.getEndpoint("/default.json"), {});
18
20
  return resp.data;
19
21
  });
20
22
  }
21
23
  getEndpoint(endpoint) {
22
- return `${this.options.server}/api/bouncer${endpoint}`;
24
+ return `https://config.s3.helmut.cloud/featureflags${endpoint}`;
23
25
  }
24
26
  }
25
27
  exports.default = BouncerFeatures;
@@ -1,14 +1,7 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../Base";
3
- import { Version } from "../../interfaces/global";
1
+ import Base from "../../Base";
4
2
  import BouncerFeatures from "./features";
5
3
  export default class Bouncer extends Base {
6
- features: BouncerFeatures;
7
- constructor(options: Options, axios: AxiosInstance);
8
- /**
9
- * Requests the endpoint version
10
- * @returns Version object
11
- */
12
- version: () => Promise<Version>;
4
+ get features(): BouncerFeatures;
5
+ private _features?;
13
6
  protected getEndpoint(endpoint: string): string;
14
7
  }
@@ -1,31 +1,16 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  const Base_1 = require("../../Base");
13
4
  const features_1 = require("./features");
14
5
  class Bouncer extends Base_1.default {
15
- constructor(options, axios) {
16
- super(options, axios);
17
- /**
18
- * Requests the endpoint version
19
- * @returns Version object
20
- */
21
- this.version = () => __awaiter(this, void 0, void 0, function* () {
22
- const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
23
- return resp.data;
24
- });
25
- this.features = new features_1.default(options, axios);
6
+ get features() {
7
+ if (this._features === undefined) {
8
+ this._features = new features_1.default(this.options, this.axios);
9
+ }
10
+ return this._features;
26
11
  }
27
12
  getEndpoint(endpoint) {
28
- return `${this.options.server}/api/bouncer${endpoint}`;
13
+ return `https://config.s3.helmut.cloud/featureflags${endpoint}`;
29
14
  }
30
15
  }
31
16
  exports.default = Bouncer;
@@ -1,7 +1,7 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../Base";
3
- import { DaliFuse } from "./avatar/DaliFuseSpace";
4
- import { DaliHigh5 } from "./avatar/DaliHigh5Space";
1
+ import Base from "../../Base";
2
+ import { DaliFuseSpace } from "./avatar/DaliFuseSpace";
3
+ import { DaliHigh5Pool } from "./avatar/DaliHigh5Pool";
4
+ import { DaliHigh5Space } from "./avatar/DaliHigh5Space";
5
5
  import { DaliOAuthApp } from "./avatar/DaliOAuthApp";
6
6
  import { DaliOrganization } from "./avatar/DaliOrganization";
7
7
  import { DaliTeam } from "./avatar/DaliTeam";
@@ -10,27 +10,37 @@ export declare class DaliAvatar extends Base {
10
10
  /**
11
11
  * Handles everything around user avatars
12
12
  */
13
- user: DaliUser;
13
+ get user(): DaliUser;
14
+ private _user?;
14
15
  /**
15
16
  * Handles everything around team avatars
16
17
  */
17
- team: DaliTeam;
18
+ get team(): DaliTeam;
19
+ private _team?;
18
20
  /**
19
21
  * Handles everything around organization avatars
20
22
  */
21
- organization: DaliOrganization;
23
+ get organization(): DaliOrganization;
24
+ private _organization?;
22
25
  /**
23
26
  * Handles everything around high5 spaces avatars
24
27
  */
25
- high5Space: DaliHigh5;
28
+ get high5Space(): DaliHigh5Space;
29
+ private _high5Space?;
30
+ /**
31
+ * Handles everything around high5 pools avatars
32
+ */
33
+ get high5Pool(): DaliHigh5Pool;
34
+ private _high5Pool?;
26
35
  /**
27
36
  * Handles everything around fuse spaces avatars
28
37
  */
29
- fuseSpace: DaliFuse;
38
+ get fuseSpace(): DaliFuseSpace;
39
+ private _fuseSpace?;
30
40
  /**
31
41
  * Handles everything around OAuth applications avatars
32
42
  */
33
- oauth: DaliOAuthApp;
34
- constructor(options: Options, axios: AxiosInstance);
43
+ get oauth(): DaliOAuthApp;
44
+ private _oauth?;
35
45
  protected getEndpoint(endpoint: string): string;
36
46
  }
@@ -3,20 +3,75 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DaliAvatar = void 0;
4
4
  const Base_1 = require("../../Base");
5
5
  const DaliFuseSpace_1 = require("./avatar/DaliFuseSpace");
6
+ const DaliHigh5Pool_1 = require("./avatar/DaliHigh5Pool");
6
7
  const DaliHigh5Space_1 = require("./avatar/DaliHigh5Space");
7
8
  const DaliOAuthApp_1 = require("./avatar/DaliOAuthApp");
8
9
  const DaliOrganization_1 = require("./avatar/DaliOrganization");
9
10
  const DaliTeam_1 = require("./avatar/DaliTeam");
10
11
  const DaliUser_1 = require("./avatar/DaliUser");
11
12
  class DaliAvatar extends Base_1.default {
12
- constructor(options, axios) {
13
- super(options, axios);
14
- this.user = new DaliUser_1.DaliUser(this.options, this.axios);
15
- this.team = new DaliTeam_1.DaliTeam(this.options, this.axios);
16
- this.organization = new DaliOrganization_1.DaliOrganization(this.options, this.axios);
17
- this.high5Space = new DaliHigh5Space_1.DaliHigh5(this.options, this.axios);
18
- this.fuseSpace = new DaliFuseSpace_1.DaliFuse(this.options, this.axios);
19
- this.oauth = new DaliOAuthApp_1.DaliOAuthApp(this.options, this.axios);
13
+ /**
14
+ * Handles everything around user avatars
15
+ */
16
+ get user() {
17
+ if (this._user === undefined) {
18
+ this._user = new DaliUser_1.DaliUser(this.options, this.axios);
19
+ }
20
+ return this._user;
21
+ }
22
+ /**
23
+ * Handles everything around team avatars
24
+ */
25
+ get team() {
26
+ if (this._team === undefined) {
27
+ this._team = new DaliTeam_1.DaliTeam(this.options, this.axios);
28
+ }
29
+ return this._team;
30
+ }
31
+ /**
32
+ * Handles everything around organization avatars
33
+ */
34
+ get organization() {
35
+ if (this._organization === undefined) {
36
+ this._organization = new DaliOrganization_1.DaliOrganization(this.options, this.axios);
37
+ }
38
+ return this._organization;
39
+ }
40
+ /**
41
+ * Handles everything around high5 spaces avatars
42
+ */
43
+ get high5Space() {
44
+ if (this._high5Space === undefined) {
45
+ this._high5Space = new DaliHigh5Space_1.DaliHigh5Space(this.options, this.axios);
46
+ }
47
+ return this._high5Space;
48
+ }
49
+ /**
50
+ * Handles everything around high5 pools avatars
51
+ */
52
+ get high5Pool() {
53
+ if (this._high5Pool === undefined) {
54
+ this._high5Pool = new DaliHigh5Pool_1.DaliHigh5Pool(this.options, this.axios);
55
+ }
56
+ return this._high5Pool;
57
+ }
58
+ /**
59
+ * Handles everything around fuse spaces avatars
60
+ */
61
+ get fuseSpace() {
62
+ if (this._fuseSpace === undefined) {
63
+ this._fuseSpace = new DaliFuseSpace_1.DaliFuseSpace(this.options, this.axios);
64
+ }
65
+ return this._fuseSpace;
66
+ }
67
+ /**
68
+ * Handles everything around OAuth applications avatars
69
+ */
70
+ get oauth() {
71
+ if (this._oauth === undefined) {
72
+ this._oauth = new DaliOAuthApp_1.DaliOAuthApp(this.options, this.axios);
73
+ }
74
+ return this._oauth;
20
75
  }
21
76
  getEndpoint(endpoint) {
22
77
  return `${this.options.server}/api/dali${endpoint}`;
@@ -1,21 +1,19 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../Base";
1
+ import Base from "../../../Base";
3
2
  import { AvatarCreated } from "../../../interfaces/dali";
4
- export declare class DaliFuse extends Base {
5
- constructor(options: Options, axios: AxiosInstance);
3
+ export declare class DaliFuseSpace extends Base {
6
4
  /**
7
5
  * Creates a default avatar for the specified Fuse space.
8
6
  * @param orgName Name of the organization
9
7
  * @param spaceName Name of the space
10
8
  * @returns Public URL of the created avatar
11
9
  */
12
- createAvatar: (orgName: string, spaceName: string) => Promise<AvatarCreated>;
10
+ createAvatar(orgName: string, spaceName: string): Promise<AvatarCreated>;
13
11
  /**
14
12
  * Deletes the avatar of the Fuse space from cloud storage. If you want to update it instead, use updateAvatar().
15
13
  * @param orgName Name of the organization
16
14
  * @param spaceName Name of the space
17
15
  */
18
- deleteAvatar: (orgName: string, spaceName: string) => Promise<void>;
16
+ deleteAvatar(orgName: string, spaceName: string): Promise<void>;
19
17
  /**
20
18
  * Updates the avatar of the specified Fuse space
21
19
  * @param orgName Name of the organization
@@ -23,6 +21,6 @@ export declare class DaliFuse extends Base {
23
21
  * @param file Image as Javascript File
24
22
  * @returns Public URL of the new avatar
25
23
  */
26
- updateAvatar: (orgName: string, spaceName: string, file: File) => Promise<AvatarCreated>;
24
+ updateAvatar(orgName: string, spaceName: string, file: File): Promise<AvatarCreated>;
27
25
  protected getEndpoint(endpoint: string): string;
28
26
  }