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
@@ -14,19 +14,18 @@ const Base_1 = require("../../../../../Base");
14
14
  const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
15
  const searchFilter_1 = require("../../../../../helper/searchFilter");
16
16
  class High5SpaceExecutionLogs extends Base_1.default {
17
- constructor(options, axios) {
18
- super(options, axios);
19
- /**
20
- * Retrieves all stream execution logs for a given execution inside a space.
21
- * @param orgName Name of the Organization
22
- * @param spaceName Name of the Space
23
- * @param filters (optional) Array of search filters
24
- * @param sorting (optional) Sorting object
25
- * @param limit (optional) Max number of results (1-100; defaults to 25)
26
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
27
- * @returns Object containing an array of Stream execution logs as well as the total number of results
28
- */
29
- this.searchExecutionLogs = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, spaceName, payload = false, filters, sorting, limit = 25, page = 0, }) {
17
+ /**
18
+ * Retrieves all stream execution logs for a given execution inside a space.
19
+ * @param orgName Name of the Organization
20
+ * @param spaceName Name of the Space
21
+ * @param filters (optional) Array of search filters
22
+ * @param sorting (optional) Sorting object
23
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
24
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
25
+ * @returns Object containing an array of Stream execution logs as well as the total number of results
26
+ */
27
+ searchExecutionLogs(_a) {
28
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, payload = false, filters, sorting, limit = 25, page = 0, }) {
30
29
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
31
30
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/logs/search?page=${page}&limit=${limit}&payload=${payload}`), {
32
31
  filters: filtersDTO,
@@ -34,14 +33,16 @@ class High5SpaceExecutionLogs extends Base_1.default {
34
33
  });
35
34
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
36
35
  });
37
- /**
38
- * Retrieves the execution log of a stream.
39
- * @param orgName Name of the Organization
40
- * @param spaceName Name of the Space
41
- * @param streamLogId ID of the stream log
42
- * @returns Stream execution log
43
- */
44
- this.getStreamExecutionLog = (orgName_1, spaceName_1, streamLogId_1, ...args_1) => __awaiter(this, [orgName_1, spaceName_1, streamLogId_1, ...args_1], void 0, function* (orgName, spaceName, streamLogId, payload = false) {
36
+ }
37
+ /**
38
+ * Retrieves the execution log of a stream.
39
+ * @param orgName Name of the Organization
40
+ * @param spaceName Name of the Space
41
+ * @param streamLogId ID of the stream log
42
+ * @returns Stream execution log
43
+ */
44
+ getStreamExecutionLog(orgName_1, spaceName_1, streamLogId_1) {
45
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamLogId, payload = false) {
45
46
  const resp = yield this.axios
46
47
  .get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/logs/${streamLogId}?payload=${payload}`))
47
48
  .catch((err) => {
@@ -11,6 +11,6 @@ export declare class High5SpaceExecutionStates extends Base {
11
11
  * @param streamStatusId ID of the stream status
12
12
  * @returns Object containing an array of Stream execution logs as well as the total number of results
13
13
  */
14
- getStreamExecutionStatus: (orgName: string, spaceName: string, streamStatusId: string, limit?: number, page?: number) => Promise<PaginatedResponse<High5ExecutionStatus>>;
14
+ getStreamExecutionStatus(orgName: string, spaceName: string, streamStatusId: string, limit?: number, page?: number): Promise<PaginatedResponse<High5ExecutionStatus>>;
15
15
  protected getEndpoint(endpoint: string): string;
16
16
  }
@@ -15,14 +15,16 @@ const paginatedResponseHelper_1 = require("../../../../../helper/paginatedRespon
15
15
  class High5SpaceExecutionStates extends Base_1.default {
16
16
  constructor(options, axios) {
17
17
  super(options, axios);
18
- /**
19
- * Retrieves all stream execution logs for a given stream.
20
- * @param orgName Name of the Organization
21
- * @param spaceName Name of the Space
22
- * @param streamStatusId ID of the stream status
23
- * @returns Object containing an array of Stream execution logs as well as the total number of results
24
- */
25
- this.getStreamExecutionStatus = (orgName_1, spaceName_1, streamStatusId_1, ...args_1) => __awaiter(this, [orgName_1, spaceName_1, streamStatusId_1, ...args_1], void 0, function* (orgName, spaceName, streamStatusId, limit = 25, page = 0) {
18
+ }
19
+ /**
20
+ * Retrieves all stream execution logs for a given stream.
21
+ * @param orgName Name of the Organization
22
+ * @param spaceName Name of the Space
23
+ * @param streamStatusId ID of the stream status
24
+ * @returns Object containing an array of Stream execution logs as well as the total number of results
25
+ */
26
+ getStreamExecutionStatus(orgName_1, spaceName_1, streamStatusId_1) {
27
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamStatusId, limit = 25, page = 0) {
26
28
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/status/${streamStatusId}?page=${page}&limit=${limit}`));
27
29
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
28
30
  });
@@ -1,5 +1,4 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../Base";
1
+ import Base from "../../../Base";
3
2
  import { PaginatedResponse, SearchParams } from "../../../interfaces/global";
4
3
  import { Stream } from "../../../interfaces/high5";
5
4
  import { High5Space as Space, High5SpaceEntityPermission as SpaceEntityPermission, High5SpacePermission as SpacePermission } from "../../../interfaces/high5/space";
@@ -10,13 +9,18 @@ import High5Secret from "./secret";
10
9
  import High5Wave from "./wave";
11
10
  import { High5Webhook } from "./webhook";
12
11
  export declare class High5Space extends Base {
13
- event: High5Event;
14
- execute: High5SpaceExecute;
15
- webhook: High5Webhook;
16
- secret: High5Secret;
17
- wave: High5Wave;
18
- node: High5Node;
19
- constructor(options: Options, axios: AxiosInstance);
12
+ get event(): High5Event;
13
+ private _event?;
14
+ get execute(): High5SpaceExecute;
15
+ private _execute?;
16
+ get webhook(): High5Webhook;
17
+ private _webhook?;
18
+ get secret(): High5Secret;
19
+ private _secret?;
20
+ get wave(): High5Wave;
21
+ private _wave?;
22
+ get node(): High5Node;
23
+ private _node?;
20
24
  /**
21
25
  * Retrieves all High5 Spaces of the specified Organization matching the search filter(s). Will return all Spaces if no search filter is provided.
22
26
  * @param orgName Name of the organization
@@ -26,9 +30,9 @@ export declare class High5Space extends Base {
26
30
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
27
31
  * @returns Object containing an array of High5 Spaces and the total number of results found in the database (independent of limit and page)
28
32
  */
29
- searchSpaces: ({ orgName, filters, sorting, limit, page, }: SearchParams & {
33
+ searchSpaces({ orgName, filters, sorting, limit, page }: SearchParams & {
30
34
  orgName: string;
31
- }) => Promise<PaginatedResponse<Space>>;
35
+ }): Promise<PaginatedResponse<Space>>;
32
36
  /**
33
37
  * Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
34
38
  * @param orgName Name of the organization
@@ -39,30 +43,30 @@ export declare class High5Space extends Base {
39
43
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
40
44
  * @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
41
45
  */
42
- searchSpacePermissions: ({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
46
+ searchSpacePermissions({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
43
47
  orgName: string;
44
48
  spaceName: string;
45
- }) => Promise<PaginatedResponse<SpaceEntityPermission>>;
49
+ }): Promise<PaginatedResponse<SpaceEntityPermission>>;
46
50
  /**
47
51
  * Retrieves a High5 Space by its name.
48
52
  * @param orgName Name of the Organization
49
53
  * @param spaceId ID of the High5 Space
50
54
  * @returns The requested Space
51
55
  */
52
- getSpace: (orgName: string, spaceName: string) => Promise<Space>;
56
+ getSpace(orgName: string, spaceName: string): Promise<Space>;
53
57
  /**
54
58
  * Creates a new High5 Space in the specified Organization.
55
59
  * @param orgName Name of the Organization
56
60
  * @param name Name for the new Space
57
61
  * @returns The created Space
58
62
  */
59
- createSpace: (orgName: string, name: string) => Promise<Space>;
63
+ createSpace(orgName: string, name: string): Promise<Space>;
60
64
  /**
61
65
  * Delete a space by its name.
62
66
  * @param orgName Name of the Organization
63
67
  * @param spaceName Name of the Space
64
68
  */
65
- deleteSpace: (orgName: string, spaceName: string) => Promise<void>;
69
+ deleteSpace(orgName: string, spaceName: string): Promise<void>;
66
70
  /**
67
71
  * Adds/Updates/Removes the permission a user has in the specified space.
68
72
  * @param orgName Name of the Organization
@@ -71,7 +75,7 @@ export declare class High5Space extends Base {
71
75
  * @param permission New permission
72
76
  * @returns The Space with updated permissions
73
77
  */
74
- updateUserSpacePermission: (orgName: string, spaceName: string, userId: string, permission: SpacePermission) => Promise<SpaceEntityPermission>;
78
+ updateUserSpacePermission(orgName: string, spaceName: string, userId: string, permission: SpacePermission): Promise<SpaceEntityPermission>;
75
79
  /**
76
80
  * Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
77
81
  * @param orgName Name of the Organization
@@ -80,7 +84,7 @@ export declare class High5Space extends Base {
80
84
  * @param permission New permission
81
85
  * @returns The Space with updated permissions
82
86
  */
83
- updateTeamSpacePermission: (orgName: string, spaceName: string, teamName: string, permission: SpacePermission) => Promise<SpaceEntityPermission>;
87
+ updateTeamSpacePermission(orgName: string, spaceName: string, teamName: string, permission: SpacePermission): Promise<SpaceEntityPermission>;
84
88
  /**
85
89
  * Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
86
90
  * @param orgName Name of the organization
@@ -91,10 +95,10 @@ export declare class High5Space extends Base {
91
95
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
92
96
  * @returns Object containing an array of streams and the total number of results found in the database (independent of limit and page)
93
97
  */
94
- searchStreamsOfSpace: ({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
98
+ searchStreamsOfSpace({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
95
99
  orgName: string;
96
100
  spaceName: string;
97
- }) => Promise<PaginatedResponse<Stream>>;
101
+ }): Promise<PaginatedResponse<Stream>>;
98
102
  /**
99
103
  * Updates the name of a space.
100
104
  * @param orgName Name of the organization
@@ -102,6 +106,6 @@ export declare class High5Space extends Base {
102
106
  * @param newName New name for the space
103
107
  * @returns The updated space
104
108
  */
105
- renameSpace: (orgName: string, spaceName: string, newSpaceName: string) => Promise<Space>;
109
+ renameSpace(orgName: string, spaceName: string, newSpaceName: string): Promise<Space>;
106
110
  protected getEndpoint(endpoint: string): string;
107
111
  }
@@ -20,18 +20,53 @@ const secret_1 = require("./secret");
20
20
  const wave_1 = require("./wave");
21
21
  const webhook_1 = require("./webhook");
22
22
  class High5Space extends Base_1.default {
23
- constructor(options, axios) {
24
- super(options, axios);
25
- /**
26
- * Retrieves all High5 Spaces of the specified Organization matching the search filter(s). Will return all Spaces if no search filter is provided.
27
- * @param orgName Name of the organization
28
- * @param filters (optional) Array of search filters
29
- * @param sorting (optional) Sorting object
30
- * @param limit (optional) Max number of results (1-100; defaults to 25)
31
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
32
- * @returns Object containing an array of High5 Spaces and the total number of results found in the database (independent of limit and page)
33
- */
34
- this.searchSpaces = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0, }) {
23
+ get event() {
24
+ if (this._event === undefined) {
25
+ this._event = new event_1.High5Event(this.options, this.axios);
26
+ }
27
+ return this._event;
28
+ }
29
+ get execute() {
30
+ if (this._execute === undefined) {
31
+ this._execute = new execution_1.High5SpaceExecute(this.options, this.axios);
32
+ }
33
+ return this._execute;
34
+ }
35
+ get webhook() {
36
+ if (this._webhook === undefined) {
37
+ this._webhook = new webhook_1.High5Webhook(this.options, this.axios);
38
+ }
39
+ return this._webhook;
40
+ }
41
+ get secret() {
42
+ if (this._secret === undefined) {
43
+ this._secret = new secret_1.default(this.options, this.axios);
44
+ }
45
+ return this._secret;
46
+ }
47
+ get wave() {
48
+ if (this._wave === undefined) {
49
+ this._wave = new wave_1.default(this.options, this.axios);
50
+ }
51
+ return this._wave;
52
+ }
53
+ get node() {
54
+ if (this._node === undefined) {
55
+ this._node = new node_1.default(this.options, this.axios);
56
+ }
57
+ return this._node;
58
+ }
59
+ /**
60
+ * Retrieves all High5 Spaces of the specified Organization matching the search filter(s). Will return all Spaces if no search filter is provided.
61
+ * @param orgName Name of the organization
62
+ * @param filters (optional) Array of search filters
63
+ * @param sorting (optional) Sorting object
64
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
65
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
66
+ * @returns Object containing an array of High5 Spaces and the total number of results found in the database (independent of limit and page)
67
+ */
68
+ searchSpaces(_a) {
69
+ return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }) {
35
70
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
36
71
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/search?page=${page}&limit=${limit}`), {
37
72
  filters: filtersDTO,
@@ -39,17 +74,19 @@ class High5Space extends Base_1.default {
39
74
  });
40
75
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
41
76
  });
42
- /**
43
- * Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
44
- * @param orgName Name of the organization
45
- * @param spaceName Name of the space
46
- * @param filters (optional) Array of search filters
47
- * @param sorting (optional) Sorting object
48
- * @param limit (optional) Max number of results (1-100; defaults to 25)
49
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
50
- * @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
51
- */
52
- this.searchSpacePermissions = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
77
+ }
78
+ /**
79
+ * Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
80
+ * @param orgName Name of the organization
81
+ * @param spaceName Name of the space
82
+ * @param filters (optional) Array of search filters
83
+ * @param sorting (optional) Sorting object
84
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
85
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
86
+ * @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
87
+ */
88
+ searchSpacePermissions(_a) {
89
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
53
90
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
54
91
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
55
92
  filters: filtersDTO,
@@ -57,75 +94,87 @@ class High5Space extends Base_1.default {
57
94
  });
58
95
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
59
96
  });
60
- /**
61
- * Retrieves a High5 Space by its name.
62
- * @param orgName Name of the Organization
63
- * @param spaceId ID of the High5 Space
64
- * @returns The requested Space
65
- */
66
- this.getSpace = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
97
+ }
98
+ /**
99
+ * Retrieves a High5 Space by its name.
100
+ * @param orgName Name of the Organization
101
+ * @param spaceId ID of the High5 Space
102
+ * @returns The requested Space
103
+ */
104
+ getSpace(orgName, spaceName) {
105
+ return __awaiter(this, void 0, void 0, function* () {
67
106
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
68
107
  return resp.data;
69
108
  });
70
- /**
71
- * Creates a new High5 Space in the specified Organization.
72
- * @param orgName Name of the Organization
73
- * @param name Name for the new Space
74
- * @returns The created Space
75
- */
76
- this.createSpace = (orgName, name) => __awaiter(this, void 0, void 0, function* () {
109
+ }
110
+ /**
111
+ * Creates a new High5 Space in the specified Organization.
112
+ * @param orgName Name of the Organization
113
+ * @param name Name for the new Space
114
+ * @returns The created Space
115
+ */
116
+ createSpace(orgName, name) {
117
+ return __awaiter(this, void 0, void 0, function* () {
77
118
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
78
119
  return resp.data;
79
120
  });
80
- /**
81
- * Delete a space by its name.
82
- * @param orgName Name of the Organization
83
- * @param spaceName Name of the Space
84
- */
85
- this.deleteSpace = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
121
+ }
122
+ /**
123
+ * Delete a space by its name.
124
+ * @param orgName Name of the Organization
125
+ * @param spaceName Name of the Space
126
+ */
127
+ deleteSpace(orgName, spaceName) {
128
+ return __awaiter(this, void 0, void 0, function* () {
86
129
  yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
87
130
  });
88
- /**
89
- * Adds/Updates/Removes the permission a user has in the specified space.
90
- * @param orgName Name of the Organization
91
- * @param spaceName Name of the Space
92
- * @param userId ID of the User
93
- * @param permission New permission
94
- * @returns The Space with updated permissions
95
- */
96
- this.updateUserSpacePermission = (orgName, spaceName, userId, permission) => __awaiter(this, void 0, void 0, function* () {
131
+ }
132
+ /**
133
+ * Adds/Updates/Removes the permission a user has in the specified space.
134
+ * @param orgName Name of the Organization
135
+ * @param spaceName Name of the Space
136
+ * @param userId ID of the User
137
+ * @param permission New permission
138
+ * @returns The Space with updated permissions
139
+ */
140
+ updateUserSpacePermission(orgName, spaceName, userId, permission) {
141
+ return __awaiter(this, void 0, void 0, function* () {
97
142
  const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
98
143
  userId,
99
144
  permission,
100
145
  });
101
146
  return resp.data;
102
147
  });
103
- /**
104
- * Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
105
- * @param orgName Name of the Organization
106
- * @param spaceName Name of the Space
107
- * @param teamName Name of the Team
108
- * @param permission New permission
109
- * @returns The Space with updated permissions
110
- */
111
- this.updateTeamSpacePermission = (orgName, spaceName, teamName, permission) => __awaiter(this, void 0, void 0, function* () {
148
+ }
149
+ /**
150
+ * Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
151
+ * @param orgName Name of the Organization
152
+ * @param spaceName Name of the Space
153
+ * @param teamName Name of the Team
154
+ * @param permission New permission
155
+ * @returns The Space with updated permissions
156
+ */
157
+ updateTeamSpacePermission(orgName, spaceName, teamName, permission) {
158
+ return __awaiter(this, void 0, void 0, function* () {
112
159
  const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
113
160
  teamName,
114
161
  permission,
115
162
  });
116
163
  return resp.data;
117
164
  });
118
- /**
119
- * Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
120
- * @param orgName Name of the organization
121
- * @param orgName Name of the space
122
- * @param filters (optional) Array of search filters
123
- * @param sorting (optional) Sorting object
124
- * @param limit (optional) Max number of results (1-100; defaults to 25)
125
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
126
- * @returns Object containing an array of streams and the total number of results found in the database (independent of limit and page)
127
- */
128
- this.searchStreamsOfSpace = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
165
+ }
166
+ /**
167
+ * Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
168
+ * @param orgName Name of the organization
169
+ * @param orgName Name of the space
170
+ * @param filters (optional) Array of search filters
171
+ * @param sorting (optional) Sorting object
172
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
173
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
174
+ * @returns Object containing an array of streams and the total number of results found in the database (independent of limit and page)
175
+ */
176
+ searchStreamsOfSpace(_a) {
177
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
129
178
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
130
179
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/streams/search?page=${page}&limit=${limit}`), {
131
180
  filters: filtersDTO,
@@ -133,25 +182,21 @@ class High5Space extends Base_1.default {
133
182
  });
134
183
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
135
184
  });
136
- /**
137
- * Updates the name of a space.
138
- * @param orgName Name of the organization
139
- * @param newSpaceName Current name of the space
140
- * @param newName New name for the space
141
- * @returns The updated space
142
- */
143
- this.renameSpace = (orgName, spaceName, newSpaceName) => __awaiter(this, void 0, void 0, function* () {
185
+ }
186
+ /**
187
+ * Updates the name of a space.
188
+ * @param orgName Name of the organization
189
+ * @param newSpaceName Current name of the space
190
+ * @param newName New name for the space
191
+ * @returns The updated space
192
+ */
193
+ renameSpace(orgName, spaceName, newSpaceName) {
194
+ return __awaiter(this, void 0, void 0, function* () {
144
195
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
145
196
  newSpaceName,
146
197
  });
147
198
  return resp.data;
148
199
  });
149
- this.event = new event_1.High5Event(this.options, this.axios);
150
- this.execute = new execution_1.High5SpaceExecute(this.options, this.axios);
151
- this.webhook = new webhook_1.High5Webhook(this.options, this.axios);
152
- this.secret = new secret_1.default(this.options, this.axios);
153
- this.wave = new wave_1.default(this.options, this.axios);
154
- this.node = new node_1.default(this.options, this.axios);
155
200
  }
156
201
  getEndpoint(endpoint) {
157
202
  return `${this.options.server}/api/high5${endpoint}`;
@@ -17,10 +17,10 @@ export default class High5Secret extends Base {
17
17
  * @param encrypted - (optional) Whether to get all secret values only in encrypted form.
18
18
  * @returns Object containing an array of secret keys as well as the total number of results found in the database (independent of limit and page)
19
19
  */
20
- searchSecrets: ({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
20
+ searchSecrets({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
21
21
  orgName: string;
22
22
  spaceName: string;
23
- }) => Promise<PaginatedResponse<Secret>>;
23
+ }): Promise<PaginatedResponse<Secret>>;
24
24
  /**
25
25
  * Adds a secret key-value pair to a space.
26
26
  * @param orgName - Name of the organization
@@ -30,7 +30,7 @@ export default class High5Secret extends Base {
30
30
  * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
31
31
  * @returns The created Secret
32
32
  */
33
- addSecret: (orgName: string, spaceName: string, secret: CreateSecret) => Promise<Secret>;
33
+ addSecret(orgName: string, spaceName: string, secret: CreateSecret): Promise<Secret>;
34
34
  /**
35
35
  * Updates the value for an existent secret key-value pair.
36
36
  * @param orgName - Name of the organization
@@ -40,14 +40,14 @@ export default class High5Secret extends Base {
40
40
  * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
41
41
  * @returns The updated Secret
42
42
  */
43
- updateSecret: (orgName: string, spaceName: string, key: string, secret: UpdateSecret) => Promise<Secret>;
43
+ updateSecret(orgName: string, spaceName: string, key: string, secret: UpdateSecret): Promise<Secret>;
44
44
  /**
45
45
  * Deletes a key-value pair of the space
46
46
  * @param orgName - Name of the organization
47
47
  * @param spaceName - Name of the space
48
48
  * @param key - Key of the key-value pair
49
49
  */
50
- deleteSecret: (orgName: string, spaceName: string, key: string) => Promise<void>;
50
+ deleteSecret(orgName: string, spaceName: string, key: string): Promise<void>;
51
51
  /**
52
52
  * Get secret value by its key
53
53
  * @param orgName - Name of the organization
@@ -55,6 +55,6 @@ export default class High5Secret extends Base {
55
55
  * @param key - Key of the key-value pair
56
56
  * @returns Secret details
57
57
  */
58
- getSecret: (orgName: string, spaceName: string, key: string) => Promise<Secret>;
58
+ getSecret(orgName: string, spaceName: string, key: string): Promise<Secret>;
59
59
  protected getEndpoint(endpoint: string): string;
60
60
  }