hcloud-sdk 14.13.2 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/changelog.md +36 -800
  2. package/lib/Hcloud.d.ts +20 -10
  3. package/lib/Hcloud.js +60 -10
  4. package/lib/interfaces/bouncer/features/index.d.ts +3 -6
  5. package/lib/interfaces/frontend/featureflags/index.d.ts +7 -0
  6. package/lib/interfaces/frontend/featureflags/index.js +2 -0
  7. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +2 -0
  8. package/lib/interfaces/high5/space/execution/index.d.ts +11 -0
  9. package/lib/interfaces/high5/wave/changelog.d.ts +30 -0
  10. package/lib/interfaces/high5/wave/changelog.js +18 -0
  11. package/lib/interfaces/high5/wave/index.d.ts +31 -1
  12. package/lib/interfaces/high5/wave/index.js +10 -1
  13. package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
  14. package/lib/interfaces/mothership/index.d.ts +1 -0
  15. package/lib/interfaces/nats/index.d.ts +8 -21
  16. package/lib/interfaces/nats/index.js +72 -90
  17. package/lib/service/agent/bundle/dev/index.d.ts +2 -2
  18. package/lib/service/agent/bundle/dev/index.js +14 -10
  19. package/lib/service/agent/context/index.d.ts +7 -9
  20. package/lib/service/agent/context/index.js +41 -32
  21. package/lib/service/agent/index.d.ts +9 -7
  22. package/lib/service/agent/index.js +23 -6
  23. package/lib/service/auditor/index.d.ts +6 -7
  24. package/lib/service/auditor/index.js +23 -17
  25. package/lib/service/auditor/internal/index.d.ts +2 -2
  26. package/lib/service/auditor/internal/index.js +24 -20
  27. package/lib/service/bouncer/features/index.d.ts +1 -1
  28. package/lib/service/bouncer/features/index.js +5 -3
  29. package/lib/service/bouncer/index.d.ts +3 -10
  30. package/lib/service/bouncer/index.js +6 -21
  31. package/lib/service/dali/DaliAvatar.d.ts +13 -9
  32. package/lib/service/dali/DaliAvatar.js +53 -8
  33. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +4 -6
  34. package/lib/service/dali/avatar/DaliFuseSpace.js +26 -23
  35. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +4 -6
  36. package/lib/service/dali/avatar/DaliHigh5Space.js +26 -23
  37. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +4 -6
  38. package/lib/service/dali/avatar/DaliOAuthApp.js +26 -23
  39. package/lib/service/dali/avatar/DaliOrganization.d.ts +4 -6
  40. package/lib/service/dali/avatar/DaliOrganization.js +23 -20
  41. package/lib/service/dali/avatar/DaliTeam.d.ts +4 -6
  42. package/lib/service/dali/avatar/DaliTeam.js +26 -23
  43. package/lib/service/dali/avatar/DaliUser.d.ts +4 -6
  44. package/lib/service/dali/avatar/DaliUser.js +20 -17
  45. package/lib/service/dali/index.d.ts +4 -5
  46. package/lib/service/dali/index.js +14 -7
  47. package/lib/service/fuse/index.d.ts +8 -7
  48. package/lib/service/fuse/index.js +23 -9
  49. package/lib/service/fuse/internal/index.d.ts +3 -4
  50. package/lib/service/fuse/internal/index.js +5 -3
  51. package/lib/service/fuse/internal/space/cronjob/index.d.ts +3 -4
  52. package/lib/service/fuse/internal/space/cronjob/index.js +5 -3
  53. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +2 -4
  54. package/lib/service/fuse/internal/space/cronjob/log/index.js +11 -12
  55. package/lib/service/fuse/internal/space/index.d.ts +5 -6
  56. package/lib/service/fuse/internal/space/index.js +24 -18
  57. package/lib/service/fuse/space/cronjob/index.d.ts +15 -15
  58. package/lib/service/fuse/space/cronjob/index.js +133 -105
  59. package/lib/service/fuse/space/cronjob/log/index.d.ts +3 -3
  60. package/lib/service/fuse/space/cronjob/log/index.js +24 -23
  61. package/lib/service/fuse/space/index.d.ts +13 -14
  62. package/lib/service/fuse/space/index.js +88 -70
  63. package/lib/service/high5/execution/index.d.ts +5 -5
  64. package/lib/service/high5/execution/index.js +11 -4
  65. package/lib/service/high5/execution/log/index.d.ts +2 -2
  66. package/lib/service/high5/execution/log/index.js +11 -12
  67. package/lib/service/high5/execution/status/index.d.ts +2 -2
  68. package/lib/service/high5/execution/status/index.js +11 -12
  69. package/lib/service/high5/index.d.ts +12 -9
  70. package/lib/service/high5/index.js +36 -12
  71. package/lib/service/high5/internal/index.d.ts +3 -4
  72. package/lib/service/high5/internal/index.js +5 -3
  73. package/lib/service/high5/internal/space/index.d.ts +2 -2
  74. package/lib/service/high5/internal/space/index.js +19 -15
  75. package/lib/service/high5/joinToken/index.d.ts +4 -4
  76. package/lib/service/high5/joinToken/index.js +36 -28
  77. package/lib/service/high5/space/event/index.d.ts +9 -10
  78. package/lib/service/high5/space/event/index.js +58 -46
  79. package/lib/service/high5/space/event/stream/design/index.d.ts +23 -8
  80. package/lib/service/high5/space/event/stream/design/index.js +60 -25
  81. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +5 -5
  82. package/lib/service/high5/space/event/stream/design/snapshot/index.js +65 -58
  83. package/lib/service/high5/space/event/stream/index.d.ts +14 -15
  84. package/lib/service/high5/space/event/stream/index.js +125 -103
  85. package/lib/service/high5/space/execution/index.d.ts +9 -9
  86. package/lib/service/high5/space/execution/index.js +57 -42
  87. package/lib/service/high5/space/execution/log/index.d.ts +4 -6
  88. package/lib/service/high5/space/execution/log/index.js +22 -21
  89. package/lib/service/high5/space/execution/status/index.d.ts +1 -1
  90. package/lib/service/high5/space/execution/status/index.js +10 -8
  91. package/lib/service/high5/space/index.d.ts +25 -21
  92. package/lib/service/high5/space/index.js +131 -86
  93. package/lib/service/high5/space/secret/index.d.ts +6 -6
  94. package/lib/service/high5/space/secret/index.js +59 -49
  95. package/lib/service/high5/space/wave/index.d.ts +7 -9
  96. package/lib/service/high5/space/wave/index.js +40 -33
  97. package/lib/service/high5/space/webhook/index.d.ts +21 -14
  98. package/lib/service/high5/space/webhook/index.js +106 -73
  99. package/lib/service/high5/space/webhook/log/index.d.ts +2 -4
  100. package/lib/service/high5/space/webhook/log/index.js +11 -12
  101. package/lib/service/high5/wave/s3/index.d.ts +6 -6
  102. package/lib/service/high5/wave/s3/index.js +50 -38
  103. package/lib/service/idp/index.d.ts +17 -15
  104. package/lib/service/idp/index.js +104 -56
  105. package/lib/service/idp/internal/index.d.ts +2 -4
  106. package/lib/service/idp/internal/index.js +10 -11
  107. package/lib/service/idp/oauth/index.d.ts +16 -12
  108. package/lib/service/idp/oauth/index.js +55 -43
  109. package/lib/service/idp/organization/index.d.ts +12 -10
  110. package/lib/service/idp/organization/index.js +63 -28
  111. package/lib/service/idp/organization/license/index.d.ts +2 -2
  112. package/lib/service/idp/organization/license/index.js +5 -4
  113. package/lib/service/idp/organization/member/index.d.ts +10 -11
  114. package/lib/service/idp/organization/member/index.js +62 -48
  115. package/lib/service/idp/organization/member/invitations/index.d.ts +3 -3
  116. package/lib/service/idp/organization/member/invitations/index.js +47 -43
  117. package/lib/service/idp/organization/settings/domain/index.d.ts +7 -8
  118. package/lib/service/idp/organization/settings/domain/index.js +42 -29
  119. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +5 -5
  120. package/lib/service/idp/organization/settings/domain/saml/index.js +58 -48
  121. package/lib/service/idp/organization/settings/index.d.ts +5 -5
  122. package/lib/service/idp/organization/settings/index.js +17 -4
  123. package/lib/service/idp/organization/settings/oauth/index.d.ts +9 -11
  124. package/lib/service/idp/organization/settings/oauth/index.js +67 -56
  125. package/lib/service/idp/organization/team/index.d.ts +8 -8
  126. package/lib/service/idp/organization/team/index.js +64 -55
  127. package/lib/service/idp/registration/index.d.ts +4 -6
  128. package/lib/service/idp/registration/index.js +37 -34
  129. package/lib/service/idp/user/index.d.ts +16 -15
  130. package/lib/service/idp/user/index.js +86 -51
  131. package/lib/service/idp/user/license/index.d.ts +2 -2
  132. package/lib/service/idp/user/license/index.js +5 -4
  133. package/lib/service/idp/user/password/index.d.ts +1 -1
  134. package/lib/service/idp/user/password/index.js +10 -11
  135. package/lib/service/idp/user/settings/connections/index.d.ts +2 -4
  136. package/lib/service/idp/user/settings/connections/index.js +9 -10
  137. package/lib/service/idp/user/settings/general/index.d.ts +10 -6
  138. package/lib/service/idp/user/settings/general/index.js +25 -13
  139. package/lib/service/idp/user/settings/index.d.ts +13 -9
  140. package/lib/service/idp/user/settings/index.js +53 -8
  141. package/lib/service/idp/user/settings/notifications/index.d.ts +3 -5
  142. package/lib/service/idp/user/settings/notifications/index.js +14 -13
  143. package/lib/service/idp/user/settings/oauthApps/index.d.ts +3 -5
  144. package/lib/service/idp/user/settings/oauthApps/index.js +17 -16
  145. package/lib/service/idp/user/settings/pats/index.d.ts +8 -10
  146. package/lib/service/idp/user/settings/pats/index.js +55 -44
  147. package/lib/service/idp/user/settings/twoFactor/index.d.ts +3 -4
  148. package/lib/service/idp/user/settings/twoFactor/index.js +8 -3
  149. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +6 -8
  150. package/lib/service/idp/user/settings/twoFactor/totp/index.js +36 -29
  151. package/lib/service/mailer/index.d.ts +4 -5
  152. package/lib/service/mailer/index.js +12 -8
  153. package/lib/service/mailer/internal/index.d.ts +4 -4
  154. package/lib/service/mailer/internal/index.js +38 -33
  155. package/lib/service/mothership/index.d.ts +12 -12
  156. package/lib/service/mothership/index.js +92 -79
  157. package/lib/service/nats/index.d.ts +1 -3
  158. package/lib/service/nats/index.js +2 -2
  159. package/lib/utils/bouncer/features/Provider.d.ts +3 -0
  160. package/lib/utils/bouncer/features/Provider.js +20 -2
  161. package/package.json +1 -1
@@ -15,76 +15,91 @@ const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelp
15
15
  const searchFilter_1 = require("../../../helper/searchFilter");
16
16
  const cronjob_1 = require("./cronjob");
17
17
  class FuseSpace extends Base_1.default {
18
- constructor(options, axios) {
19
- super(options, axios);
20
- /**
21
- * Retrieves a Fuse space by its name
22
- * @param orgName Name of the organization
23
- * @param spaceName Name of the space
24
- * @returns The requested space
25
- */
26
- this.getSpace = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
18
+ get cronjob() {
19
+ if (this._cronjob === undefined) {
20
+ this._cronjob = new cronjob_1.FuseCronjob(this.options, this.axios);
21
+ }
22
+ return this._cronjob;
23
+ }
24
+ /**
25
+ * Retrieves a Fuse space by its name
26
+ * @param orgName Name of the organization
27
+ * @param spaceName Name of the space
28
+ * @returns The requested space
29
+ */
30
+ getSpace(orgName, spaceName) {
31
+ return __awaiter(this, void 0, void 0, function* () {
27
32
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
28
33
  return resp.data;
29
34
  });
30
- /**
31
- * Creates a new Fuse space
32
- * @param orgName Name of the organization
33
- * @param name Name of the space to be created
34
- * @returns The created space
35
- */
36
- this.createSpace = (orgName, name) => __awaiter(this, void 0, void 0, function* () {
35
+ }
36
+ /**
37
+ * Creates a new Fuse space
38
+ * @param orgName Name of the organization
39
+ * @param name Name of the space to be created
40
+ * @returns The created space
41
+ */
42
+ createSpace(orgName, name) {
43
+ return __awaiter(this, void 0, void 0, function* () {
37
44
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
38
45
  return resp.data;
39
46
  });
40
- /**
41
- * Deletes a space by its name
42
- * @param orgName Name of the organization
43
- * @param spaceName Name of the space
44
- */
45
- this.deleteSpace = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
47
+ }
48
+ /**
49
+ * Deletes a space by its name
50
+ * @param orgName Name of the organization
51
+ * @param spaceName Name of the space
52
+ */
53
+ deleteSpace(orgName, spaceName) {
54
+ return __awaiter(this, void 0, void 0, function* () {
46
55
  yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
47
56
  });
48
- /**
49
- * Adds/Updates/Removes the permission a user has in the specified space.
50
- * @param orgName Name of the organization
51
- * @param spaceName Name of the space
52
- * @param userId ID of the user
53
- * @param permission New permission
54
- * @returns The Fuse space with the updated permissions
55
- */
56
- this.updateUserSpacePermission = (orgName, spaceName, userId, permission) => __awaiter(this, void 0, void 0, function* () {
57
+ }
58
+ /**
59
+ * Adds/Updates/Removes the permission a user has in the specified space.
60
+ * @param orgName Name of the organization
61
+ * @param spaceName Name of the space
62
+ * @param userId ID of the user
63
+ * @param permission New permission
64
+ * @returns The Fuse space with the updated permissions
65
+ */
66
+ updateUserSpacePermission(orgName, spaceName, userId, permission) {
67
+ return __awaiter(this, void 0, void 0, function* () {
57
68
  const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
58
69
  userId,
59
70
  permission,
60
71
  });
61
72
  return resp.data;
62
73
  });
63
- /**
64
- * Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
65
- * @param orgName Name of the organization
66
- * @param spaceName Name of the space
67
- * @param teamName Name of the team
68
- * @param permission New permission
69
- * @returns The Fuse space with the updated permissions
70
- */
71
- this.updateTeamSpacePermission = (orgName, spaceName, teamName, permission) => __awaiter(this, void 0, void 0, function* () {
74
+ }
75
+ /**
76
+ * Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
77
+ * @param orgName Name of the organization
78
+ * @param spaceName Name of the space
79
+ * @param teamName Name of the team
80
+ * @param permission New permission
81
+ * @returns The Fuse space with the updated permissions
82
+ */
83
+ updateTeamSpacePermission(orgName, spaceName, teamName, permission) {
84
+ return __awaiter(this, void 0, void 0, function* () {
72
85
  const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
73
86
  teamName,
74
87
  permission,
75
88
  });
76
89
  return resp.data;
77
90
  });
78
- /**
79
- * Retrieves all Fuse spaces of an organization which match the provided search filter(s). Will return all spaces of the organization if no filter is provided.
80
- * @param orgName Name of the organization
81
- * @param filters (optional) Array of search filters
82
- * @param sorting (optional) Sorting object
83
- * @param limit (optional) Max number of results (1-100; defaults to 25)
84
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
85
- * @returns Object containing an array of filtered Fuse spaces as well as the total number of results found in the database (independent of limit and page)
86
- */
87
- this.searchSpaces = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0, }) {
91
+ }
92
+ /**
93
+ * Retrieves all Fuse spaces of an organization which match the provided search filter(s). Will return all spaces of the organization if no filter is provided.
94
+ * @param orgName Name of the organization
95
+ * @param filters (optional) Array of search filters
96
+ * @param sorting (optional) Sorting object
97
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
98
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
99
+ * @returns Object containing an array of filtered Fuse spaces as well as the total number of results found in the database (independent of limit and page)
100
+ */
101
+ searchSpaces(_a) {
102
+ return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0, }) {
88
103
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
89
104
  return new searchFilter_1.SearchFilterDTO(f);
90
105
  });
@@ -94,17 +109,19 @@ class FuseSpace extends Base_1.default {
94
109
  });
95
110
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
96
111
  });
97
- /**
98
- * Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
99
- * @param orgName Name of the organization
100
- * @param spaceName Name of the space
101
- * @param filters (optional) Array of search filters
102
- * @param sorting (optional) Sorting object
103
- * @param limit (optional) Max number of results (1-100; defaults to 25)
104
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
105
- * @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
106
- */
107
- this.searchSpacePermissions = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
112
+ }
113
+ /**
114
+ * Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
115
+ * @param orgName Name of the organization
116
+ * @param spaceName Name of the space
117
+ * @param filters (optional) Array of search filters
118
+ * @param sorting (optional) Sorting object
119
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
120
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
121
+ * @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
122
+ */
123
+ searchSpacePermissions(_a) {
124
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
108
125
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
109
126
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
110
127
  filters: filtersDTO,
@@ -112,20 +129,21 @@ class FuseSpace extends Base_1.default {
112
129
  });
113
130
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
114
131
  });
115
- /**
116
- * Updates the name of a space.
117
- * @param orgName Name of the organization
118
- * @param spaceName Current name of the space
119
- * @param newSpaceName New name for the space
120
- * @returns The updated space
121
- */
122
- this.renameSpace = (orgName, spaceName, newSpaceName) => __awaiter(this, void 0, void 0, function* () {
132
+ }
133
+ /**
134
+ * Updates the name of a space.
135
+ * @param orgName Name of the organization
136
+ * @param spaceName Current name of the space
137
+ * @param newSpaceName New name for the space
138
+ * @returns The updated space
139
+ */
140
+ renameSpace(orgName, spaceName, newSpaceName) {
141
+ return __awaiter(this, void 0, void 0, function* () {
123
142
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
124
143
  newSpaceName,
125
144
  });
126
145
  return resp.data;
127
146
  });
128
- this.cronjob = new cronjob_1.FuseCronjob(this.options, this.axios);
129
147
  }
130
148
  getEndpoint(endpoint) {
131
149
  return `${this.options.server}/api/fuse${endpoint}`;
@@ -1,10 +1,10 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../Base";
1
+ import Base from "../../../Base";
3
2
  import { High5OrganizationExecutionLogs } from "./log/index";
4
3
  import { High5OrganizationExecutionStates } from "./status/index";
5
4
  export declare class High5OrganizationExecute extends Base {
6
- logs: High5OrganizationExecutionLogs;
7
- status: High5OrganizationExecutionStates;
8
- constructor(options: Options, axios: AxiosInstance);
5
+ get logs(): High5OrganizationExecutionLogs;
6
+ private _logs?;
7
+ get status(): High5OrganizationExecutionStates;
8
+ private _status?;
9
9
  protected getEndpoint(endpoint: string): string;
10
10
  }
@@ -5,10 +5,17 @@ const Base_1 = require("../../../Base");
5
5
  const index_1 = require("./log/index");
6
6
  const index_2 = require("./status/index");
7
7
  class High5OrganizationExecute extends Base_1.default {
8
- constructor(options, axios) {
9
- super(options, axios);
10
- this.logs = new index_1.High5OrganizationExecutionLogs(options, axios);
11
- this.status = new index_2.High5OrganizationExecutionStates(options, axios);
8
+ get logs() {
9
+ if (this._logs === undefined) {
10
+ this._logs = new index_1.High5OrganizationExecutionLogs(this.options, this.axios);
11
+ }
12
+ return this._logs;
13
+ }
14
+ get status() {
15
+ if (this._status === undefined) {
16
+ this._status = new index_2.High5OrganizationExecutionStates(this.options, this.axios);
17
+ }
18
+ return this._status;
12
19
  }
13
20
  getEndpoint(endpoint) {
14
21
  return `${this.options.server}/api/high5${endpoint}`;
@@ -11,9 +11,9 @@ export declare class High5OrganizationExecutionLogs extends Base {
11
11
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
12
12
  * @returns Object containing an array of Stream execution logs as well as the total number of results
13
13
  */
14
- searchExecutionLogs: ({ orgName, payload, filters, sorting, limit, page, }: SearchParams & {
14
+ searchExecutionLogs({ orgName, payload, filters, sorting, limit, page, }: SearchParams & {
15
15
  orgName: string;
16
16
  payload?: boolean;
17
- }) => Promise<PaginatedResponse<High5ExecutionLog>>;
17
+ }): Promise<PaginatedResponse<High5ExecutionLog>>;
18
18
  protected getEndpoint(endpoint: string): string;
19
19
  }
@@ -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 High5OrganizationExecutionLogs extends Base_1.default {
17
- constructor() {
18
- super(...arguments);
19
- /**
20
- * Retrieves all stream execution logs for a given execution inside an organization.
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 Stream execution logs as well as the total number of results
27
- */
28
- this.searchExecutionLogs = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, payload = false, filters, sorting, limit = 25, page = 0, }) {
17
+ /**
18
+ * Retrieves all stream execution logs for a given execution inside an organization.
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 Stream execution logs as well as the total number of results
25
+ */
26
+ searchExecutionLogs(_a) {
27
+ return __awaiter(this, arguments, void 0, function* ({ orgName, payload = false, filters, sorting, limit = 25, page = 0, }) {
29
28
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
30
29
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/execution/logs/search?page=${page}&limit=${limit}&payload=${payload}`), {
31
30
  filters: filtersDTO,
@@ -11,8 +11,8 @@ export declare class High5OrganizationExecutionStates extends Base {
11
11
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
12
12
  * @returns Object containing an array of Stream execution logs as well as the total number of results
13
13
  */
14
- searchExecutionStates: ({ orgName, filters, sorting, limit, page, }: SearchParams & {
14
+ searchExecutionStates({ orgName, filters, sorting, limit, page, }: SearchParams & {
15
15
  orgName: string;
16
- }) => Promise<PaginatedResponse<High5ExecutionStatus>>;
16
+ }): Promise<PaginatedResponse<High5ExecutionStatus>>;
17
17
  protected getEndpoint(endpoint: string): string;
18
18
  }
@@ -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 High5OrganizationExecutionStates extends Base_1.default {
17
- constructor() {
18
- super(...arguments);
19
- /**
20
- * Retrieves all stream execution logs for a given execution inside an organization.
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 Stream execution logs as well as the total number of results
27
- */
28
- this.searchExecutionStates = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0, }) {
17
+ /**
18
+ * Retrieves all stream execution logs for a given execution inside an organization.
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 Stream execution logs as well as the total number of results
25
+ */
26
+ searchExecutionStates(_a) {
27
+ return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0, }) {
29
28
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
30
29
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/execution/status/search?page=${page}&limit=${limit}`), {
31
30
  filters: filtersDTO,
@@ -1,5 +1,4 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../Base";
1
+ import Base from "../../Base";
3
2
  import { Version } from "../../interfaces/global";
4
3
  import { High5OrganizationExecute } from "./execution";
5
4
  import { High5Internal } from "./internal";
@@ -7,16 +6,20 @@ import { High5JoinToken } from "./joinToken";
7
6
  import { High5Space } from "./space";
8
7
  import { High5Wave } from "./wave";
9
8
  export default class High5 extends Base {
10
- space: High5Space;
11
- internal: High5Internal;
12
- wave: High5Wave;
13
- joinToken: High5JoinToken;
14
- execution: High5OrganizationExecute;
15
- constructor(options: Options, axios: AxiosInstance);
9
+ get space(): High5Space;
10
+ private _space?;
11
+ get internal(): High5Internal;
12
+ private _internal?;
13
+ get wave(): High5Wave;
14
+ private _wave?;
15
+ get joinToken(): High5JoinToken;
16
+ private _joinToken?;
17
+ get execution(): High5OrganizationExecute;
18
+ private _execution?;
16
19
  /**
17
20
  * Requests the endpoint version
18
21
  * @returns Version object
19
22
  */
20
- version: () => Promise<Version>;
23
+ version(): Promise<Version>;
21
24
  protected getEndpoint(endpoint: string): string;
22
25
  }
@@ -16,21 +16,45 @@ const joinToken_1 = require("./joinToken");
16
16
  const space_1 = require("./space");
17
17
  const wave_1 = require("./wave");
18
18
  class High5 extends Base_1.default {
19
- constructor(options, axios) {
20
- super(options, axios);
21
- /**
22
- * Requests the endpoint version
23
- * @returns Version object
24
- */
25
- this.version = () => __awaiter(this, void 0, void 0, function* () {
19
+ get space() {
20
+ if (this._space === undefined) {
21
+ this._space = new space_1.High5Space(this.options, this.axios);
22
+ }
23
+ return this._space;
24
+ }
25
+ get internal() {
26
+ if (this._internal === undefined) {
27
+ this._internal = new internal_1.High5Internal(this.options, this.axios);
28
+ }
29
+ return this._internal;
30
+ }
31
+ get wave() {
32
+ if (this._wave === undefined) {
33
+ this._wave = new wave_1.High5Wave(this.options, this.axios);
34
+ }
35
+ return this._wave;
36
+ }
37
+ get joinToken() {
38
+ if (this._joinToken === undefined) {
39
+ this._joinToken = new joinToken_1.High5JoinToken(this.options, this.axios);
40
+ }
41
+ return this._joinToken;
42
+ }
43
+ get execution() {
44
+ if (this._execution === undefined) {
45
+ this._execution = new execution_1.High5OrganizationExecute(this.options, this.axios);
46
+ }
47
+ return this._execution;
48
+ }
49
+ /**
50
+ * Requests the endpoint version
51
+ * @returns Version object
52
+ */
53
+ version() {
54
+ return __awaiter(this, void 0, void 0, function* () {
26
55
  const resp = yield this.axios.get(this.getEndpoint("/v1/version"));
27
56
  return resp.data;
28
57
  });
29
- this.space = new space_1.High5Space(this.options, this.axios);
30
- this.internal = new internal_1.High5Internal(this.options, this.axios);
31
- this.wave = new wave_1.High5Wave(this.options, this.axios);
32
- this.joinToken = new joinToken_1.High5JoinToken(this.options, this.axios);
33
- this.execution = new execution_1.High5OrganizationExecute(this.options, this.axios);
34
58
  }
35
59
  getEndpoint(endpoint) {
36
60
  return `${this.options.server}/api/high5${endpoint}`;
@@ -1,9 +1,8 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../Base";
1
+ import Base from "../../../Base";
3
2
  import { High5SpaceInternal } from "./space";
4
3
  export declare class High5Internal extends Base {
5
- space: High5SpaceInternal;
6
- constructor(options: Options, axios: AxiosInstance);
4
+ get space(): High5SpaceInternal;
5
+ private _space?;
7
6
  deleteUsers(userIds: string[]): Promise<void>;
8
7
  protected getEndpoint(endpoint: string): string;
9
8
  }
@@ -13,9 +13,11 @@ exports.High5Internal = void 0;
13
13
  const Base_1 = require("../../../Base");
14
14
  const space_1 = require("./space");
15
15
  class High5Internal extends Base_1.default {
16
- constructor(options, axios) {
17
- super(options, axios);
18
- this.space = new space_1.High5SpaceInternal(options, axios);
16
+ get space() {
17
+ if (this._space === undefined) {
18
+ this._space = new space_1.High5SpaceInternal(this.options, this.axios);
19
+ }
20
+ return this._space;
19
21
  }
20
22
  deleteUsers(userIds) {
21
23
  return __awaiter(this, void 0, void 0, function* () {
@@ -8,7 +8,7 @@ export declare class High5SpaceInternal extends Base {
8
8
  * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
9
9
  * @param orgName Name of the organization
10
10
  */
11
- deleteAllSpacesOfOrganization: (orgName: string) => Promise<void>;
11
+ deleteAllSpacesOfOrganization(orgName: string): Promise<void>;
12
12
  /**
13
13
  * Removes the user from all spaces of an organization.
14
14
  *
@@ -16,6 +16,6 @@ export declare class High5SpaceInternal extends Base {
16
16
  * @param orgName Name of the organization
17
17
  * @param userId ID of the user
18
18
  */
19
- removeUserFromAllSpacesOfOrganization: (orgName: string, userId: string) => Promise<void>;
19
+ removeUserFromAllSpacesOfOrganization(orgName: string, userId: string): Promise<void>;
20
20
  protected getEndpoint(endpoint: string): string;
21
21
  }
@@ -14,23 +14,27 @@ const Base_1 = require("../../../../Base");
14
14
  class High5SpaceInternal extends Base_1.default {
15
15
  constructor(options, axios) {
16
16
  super(options, axios);
17
- /**
18
- * Deletes all spaces of an organization.
19
- *
20
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
21
- * @param orgName Name of the organization
22
- */
23
- this.deleteAllSpacesOfOrganization = (orgName) => __awaiter(this, void 0, void 0, function* () {
17
+ }
18
+ /**
19
+ * Deletes all spaces of an organization.
20
+ *
21
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
22
+ * @param orgName Name of the organization
23
+ */
24
+ deleteAllSpacesOfOrganization(orgName) {
25
+ return __awaiter(this, void 0, void 0, function* () {
24
26
  yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}`));
25
27
  });
26
- /**
27
- * Removes the user from all spaces of an organization.
28
- *
29
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
30
- * @param orgName Name of the organization
31
- * @param userId ID of the user
32
- */
33
- this.removeUserFromAllSpacesOfOrganization = (orgName, userId) => __awaiter(this, void 0, void 0, function* () {
28
+ }
29
+ /**
30
+ * Removes the user from all spaces of an organization.
31
+ *
32
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
33
+ * @param orgName Name of the organization
34
+ * @param userId ID of the user
35
+ */
36
+ removeUserFromAllSpacesOfOrganization(orgName, userId) {
37
+ return __awaiter(this, void 0, void 0, function* () {
34
38
  yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/user/${userId}`));
35
39
  });
36
40
  }
@@ -12,27 +12,27 @@ export declare class High5JoinToken extends Base {
12
12
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
13
13
  * @returns Object containing an array of join tokens and the total number of results found in the database (independent of limit and page)
14
14
  */
15
- get: (orgName: string, limit?: number, page?: number) => Promise<PaginatedResponse<JoinToken>>;
15
+ get(orgName: string, limit?: number, page?: number): Promise<PaginatedResponse<JoinToken>>;
16
16
  /**
17
17
  * Creates a join token for the specified organization
18
18
  * @param orgName Name of the Organization
19
19
  * @param name Name of the Join Token
20
20
  * @returns Created join token
21
21
  */
22
- create: (orgName: string, name: string) => Promise<JoinToken>;
22
+ create(orgName: string, name: string): Promise<JoinToken>;
23
23
  /**
24
24
  * Revokes a join token of the specified organization
25
25
  * @param orgName Name of the Organization
26
26
  * @param tokenId ID of the Join Token
27
27
  */
28
- revoke: (orgName: string, tokenId: string) => Promise<void>;
28
+ revoke(orgName: string, tokenId: string): Promise<void>;
29
29
  /**
30
30
  * Exchanges a join token for an agent user
31
31
  *
32
32
  * @param joinToken Join token
33
33
  * @returns An object containing the User object and the PAT that represents the agent user
34
34
  */
35
- exchange: (joinToken: string) => Promise<{
35
+ exchange(joinToken: string): Promise<{
36
36
  user: User;
37
37
  pat: string;
38
38
  }>;