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
@@ -1,11 +1,10 @@
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 { SingleStreamPatchOrder, Stream, StreamPatchActive, StreamPatchOrder } from "../../../../../interfaces/high5/space/event/stream";
5
4
  import { High5Design } from "./design";
6
5
  export declare class High5Stream extends Base {
7
- design: High5Design;
8
- constructor(options: Options, axios: AxiosInstance);
6
+ get design(): High5Design;
7
+ private _design?;
9
8
  /**
10
9
  * Retrieves all Streams of an Event which match the provided search filter(s). Will return all Streams if no filter is provided.
11
10
  * @param orgName Name of the organization
@@ -17,11 +16,11 @@ export declare class High5Stream extends Base {
17
16
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
18
17
  * @returns Object containing an array of streams as well as the total number of results found in the database (independent of limit and page)
19
18
  */
20
- searchStreams: ({ orgName, spaceName, eventName, filters, sorting, limit, page, }: SearchParams & {
19
+ searchStreams({ orgName, spaceName, eventName, filters, sorting, limit, page, }: SearchParams & {
21
20
  orgName: string;
22
21
  spaceName: string;
23
22
  eventName: string;
24
- }) => Promise<PaginatedResponse<Stream>>;
23
+ }): Promise<PaginatedResponse<Stream>>;
25
24
  /**
26
25
  * Retrieves a Stream by its ID.
27
26
  * @param orgName Name of the organization
@@ -30,7 +29,7 @@ export declare class High5Stream extends Base {
30
29
  * @param streamId ID of the stream
31
30
  * @returns The requested stream
32
31
  */
33
- getStream: (orgName: string, spaceName: string, eventName: string, streamId: string) => Promise<Stream>;
32
+ getStream(orgName: string, spaceName: string, eventName: string, streamId: string): Promise<Stream>;
34
33
  /**
35
34
  * Creates a new Stream for the specified Event.
36
35
  * @param orgName Name of the organization
@@ -39,7 +38,7 @@ export declare class High5Stream extends Base {
39
38
  * @param name Name for the new stream
40
39
  * @returns The created stream
41
40
  */
42
- createStream: (orgName: string, spaceName: string, eventName: string, name: string) => Promise<Stream>;
41
+ createStream(orgName: string, spaceName: string, eventName: string, name: string): Promise<Stream>;
43
42
  /**
44
43
  * Duplicate a Stream for the specified Event.
45
44
  * @param orgName Name of the organization
@@ -49,7 +48,7 @@ export declare class High5Stream extends Base {
49
48
  * @param sourceStreamId ID for the stream to duplicate
50
49
  * @returns The created stream
51
50
  */
52
- duplicateStream: (orgName: string, spaceName: string, eventName: string, name: string, sourceStreamId: string) => Promise<Stream>;
51
+ duplicateStream(orgName: string, spaceName: string, eventName: string, name: string, sourceStreamId: string): Promise<Stream>;
53
52
  /**
54
53
  * Patches the order of Streams for an Event.
55
54
  * @param orgName Name of the organization
@@ -58,7 +57,7 @@ export declare class High5Stream extends Base {
58
57
  * @param StreamPatchOrder List of all event streams with their new order
59
58
  * @returns Array of updated Streams
60
59
  */
61
- patchStreamOrderMulti: (orgName: string, spaceName: string, eventName: string, streamList: StreamPatchOrder[]) => Promise<Stream[]>;
60
+ patchStreamOrderMulti(orgName: string, spaceName: string, eventName: string, streamList: StreamPatchOrder[]): Promise<Stream[]>;
62
61
  /**
63
62
  * Activate or deactivate a stream
64
63
  * @param orgName Name of the organization
@@ -68,7 +67,7 @@ export declare class High5Stream extends Base {
68
67
  * @param StreamPatchActive Object defining if stream should be active or inactive
69
68
  * @returns Details of the updated stream
70
69
  */
71
- patchStreamState: (orgName: string, spaceName: string, eventName: string, streamId: string, streamPatchActive: StreamPatchActive) => Promise<Stream>;
70
+ patchStreamState(orgName: string, spaceName: string, eventName: string, streamId: string, streamPatchActive: StreamPatchActive): Promise<Stream>;
72
71
  /**
73
72
  * Moves a Stream up or down in the existing Streams order.
74
73
  * @param orgName Name of the organization
@@ -78,7 +77,7 @@ export declare class High5Stream extends Base {
78
77
  * @param SingleStreamPatchOrder Object defining if stream should move up or down
79
78
  * @returns Array of updated Streams
80
79
  */
81
- patchStreamOrder: (orgName: string, spaceName: string, eventName: string, streamId: string, singleStreamPatchOrder: SingleStreamPatchOrder) => Promise<Stream[]>;
80
+ patchStreamOrder(orgName: string, spaceName: string, eventName: string, streamId: string, singleStreamPatchOrder: SingleStreamPatchOrder): Promise<Stream[]>;
82
81
  /**
83
82
  * Rename a stream
84
83
  * @param orgName Name of the organization
@@ -88,7 +87,7 @@ export declare class High5Stream extends Base {
88
87
  * @param name New name of the stream
89
88
  * @returns Updated stream
90
89
  */
91
- renameStream: (orgName: string, spaceName: string, eventName: string, streamId: string, name: string) => Promise<Stream>;
90
+ renameStream(orgName: string, spaceName: string, eventName: string, streamId: string, name: string): Promise<Stream>;
92
91
  /**
93
92
  * Moves a Stream to another event.
94
93
  *
@@ -101,7 +100,7 @@ export declare class High5Stream extends Base {
101
100
  * @param [order] (optional) Order the stream should have in the new event
102
101
  * @returns Updated Stream
103
102
  */
104
- moveStream: (orgName: string, spaceName: string, eventName: string, streamId: string, newEventName: string, name?: string, order?: number) => Promise<Stream>;
103
+ moveStream(orgName: string, spaceName: string, eventName: string, streamId: string, newEventName: string, name?: string, order?: number): Promise<Stream>;
105
104
  /**
106
105
  * Deletes a Stream by its ID.
107
106
  * @param orgName Name of the organization
@@ -109,6 +108,6 @@ export declare class High5Stream extends Base {
109
108
  * @param eventName Name of the event
110
109
  * @param streamId ID of the stream
111
110
  */
112
- deleteStream: (orgName: string, spaceName: string, eventName: string, streamId: string) => Promise<void>;
111
+ deleteStream(orgName: string, spaceName: string, eventName: string, streamId: string): Promise<void>;
113
112
  protected getEndpoint(endpoint: string): string;
114
113
  }
@@ -15,20 +15,25 @@ const paginatedResponseHelper_1 = require("../../../../../helper/paginatedRespon
15
15
  const searchFilter_1 = require("../../../../../helper/searchFilter");
16
16
  const design_1 = require("./design");
17
17
  class High5Stream extends Base_1.default {
18
- constructor(options, axios) {
19
- super(options, axios);
20
- /**
21
- * Retrieves all Streams of an Event which match the provided search filter(s). Will return all Streams if no filter is provided.
22
- * @param orgName Name of the organization
23
- * @param spaceName Name of the space
24
- * @param eventName Name of the event
25
- * @param filters (optional) Array of search filters
26
- * @param sorting (optional) Sorting object
27
- * @param limit (optional) Max number of results (1-100; defaults to 25)
28
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
29
- * @returns Object containing an array of streams as well as the total number of results found in the database (independent of limit and page)
30
- */
31
- this.searchStreams = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, spaceName, eventName, filters, sorting, limit = 25, page = 0, }) {
18
+ get design() {
19
+ if (this._design === undefined) {
20
+ this._design = new design_1.High5Design(this.options, this.axios);
21
+ }
22
+ return this._design;
23
+ }
24
+ /**
25
+ * Retrieves all Streams of an Event which match the provided search filter(s). Will return all Streams if no filter is provided.
26
+ * @param orgName Name of the organization
27
+ * @param spaceName Name of the space
28
+ * @param eventName Name of the event
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 streams as well as the total number of results found in the database (independent of limit and page)
34
+ */
35
+ searchStreams(_a) {
36
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, eventName, filters, sorting, limit = 25, page = 0, }) {
32
37
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
33
38
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/search?page=${page}&limit=${limit}`), {
34
39
  filters: filtersDTO,
@@ -36,126 +41,143 @@ class High5Stream extends Base_1.default {
36
41
  });
37
42
  return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
38
43
  });
39
- /**
40
- * Retrieves a Stream by its ID.
41
- * @param orgName Name of the organization
42
- * @param spaceName Name of the space
43
- * @param eventName Name of the event
44
- * @param streamId ID of the stream
45
- * @returns The requested stream
46
- */
47
- this.getStream = (orgName, spaceName, eventName, streamId) => __awaiter(this, void 0, void 0, function* () {
44
+ }
45
+ /**
46
+ * Retrieves a Stream by its ID.
47
+ * @param orgName Name of the organization
48
+ * @param spaceName Name of the space
49
+ * @param eventName Name of the event
50
+ * @param streamId ID of the stream
51
+ * @returns The requested stream
52
+ */
53
+ getStream(orgName, spaceName, eventName, streamId) {
54
+ return __awaiter(this, void 0, void 0, function* () {
48
55
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}`));
49
56
  return resp.data;
50
57
  });
51
- /**
52
- * Creates a new Stream for the specified Event.
53
- * @param orgName Name of the organization
54
- * @param spaceName Name of the space
55
- * @param eventName Name of the event
56
- * @param name Name for the new stream
57
- * @returns The created stream
58
- */
59
- this.createStream = (orgName, spaceName, eventName, name) => __awaiter(this, void 0, void 0, function* () {
58
+ }
59
+ /**
60
+ * Creates a new Stream for the specified Event.
61
+ * @param orgName Name of the organization
62
+ * @param spaceName Name of the space
63
+ * @param eventName Name of the event
64
+ * @param name Name for the new stream
65
+ * @returns The created stream
66
+ */
67
+ createStream(orgName, spaceName, eventName, name) {
68
+ return __awaiter(this, void 0, void 0, function* () {
60
69
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams`), {
61
70
  name: name,
62
71
  });
63
72
  return resp.data;
64
73
  });
65
- /**
66
- * Duplicate a Stream for the specified Event.
67
- * @param orgName Name of the organization
68
- * @param spaceName Name of the space
69
- * @param eventName Name of the event
70
- * @param name Name for the new stream
71
- * @param sourceStreamId ID for the stream to duplicate
72
- * @returns The created stream
73
- */
74
- this.duplicateStream = (orgName, spaceName, eventName, name, sourceStreamId) => __awaiter(this, void 0, void 0, function* () {
74
+ }
75
+ /**
76
+ * Duplicate a Stream for the specified Event.
77
+ * @param orgName Name of the organization
78
+ * @param spaceName Name of the space
79
+ * @param eventName Name of the event
80
+ * @param name Name for the new stream
81
+ * @param sourceStreamId ID for the stream to duplicate
82
+ * @returns The created stream
83
+ */
84
+ duplicateStream(orgName, spaceName, eventName, name, sourceStreamId) {
85
+ return __awaiter(this, void 0, void 0, function* () {
75
86
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams`), {
76
87
  name: name,
77
88
  streamId: sourceStreamId,
78
89
  });
79
90
  return resp.data;
80
91
  });
81
- /**
82
- * Patches the order of Streams for an Event.
83
- * @param orgName Name of the organization
84
- * @param spaceName Name of the space
85
- * @param eventName Name of the event
86
- * @param StreamPatchOrder List of all event streams with their new order
87
- * @returns Array of updated Streams
88
- */
89
- this.patchStreamOrderMulti = (orgName, spaceName, eventName, streamList) => __awaiter(this, void 0, void 0, function* () {
92
+ }
93
+ /**
94
+ * Patches the order of Streams for an Event.
95
+ * @param orgName Name of the organization
96
+ * @param spaceName Name of the space
97
+ * @param eventName Name of the event
98
+ * @param StreamPatchOrder List of all event streams with their new order
99
+ * @returns Array of updated Streams
100
+ */
101
+ patchStreamOrderMulti(orgName, spaceName, eventName, streamList) {
102
+ return __awaiter(this, void 0, void 0, function* () {
90
103
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/order`), streamList);
91
104
  return resp.data;
92
105
  });
93
- /**
94
- * Activate or deactivate a stream
95
- * @param orgName Name of the organization
96
- * @param spaceName Name of the space
97
- * @param eventName Name of the event
98
- * @param streamId ID of the stream
99
- * @param StreamPatchActive Object defining if stream should be active or inactive
100
- * @returns Details of the updated stream
101
- */
102
- this.patchStreamState = (orgName, spaceName, eventName, streamId, streamPatchActive) => __awaiter(this, void 0, void 0, function* () {
106
+ }
107
+ /**
108
+ * Activate or deactivate a stream
109
+ * @param orgName Name of the organization
110
+ * @param spaceName Name of the space
111
+ * @param eventName Name of the event
112
+ * @param streamId ID of the stream
113
+ * @param StreamPatchActive Object defining if stream should be active or inactive
114
+ * @returns Details of the updated stream
115
+ */
116
+ patchStreamState(orgName, spaceName, eventName, streamId, streamPatchActive) {
117
+ return __awaiter(this, void 0, void 0, function* () {
103
118
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/active`), streamPatchActive);
104
119
  return resp.data;
105
120
  });
106
- /**
107
- * Moves a Stream up or down in the existing Streams order.
108
- * @param orgName Name of the organization
109
- * @param spaceName Name of the space
110
- * @param eventName Name of the event
111
- * @param streamId ID of the stream
112
- * @param SingleStreamPatchOrder Object defining if stream should move up or down
113
- * @returns Array of updated Streams
114
- */
115
- this.patchStreamOrder = (orgName, spaceName, eventName, streamId, singleStreamPatchOrder) => __awaiter(this, void 0, void 0, function* () {
121
+ }
122
+ /**
123
+ * Moves a Stream up or down in the existing Streams order.
124
+ * @param orgName Name of the organization
125
+ * @param spaceName Name of the space
126
+ * @param eventName Name of the event
127
+ * @param streamId ID of the stream
128
+ * @param SingleStreamPatchOrder Object defining if stream should move up or down
129
+ * @returns Array of updated Streams
130
+ */
131
+ patchStreamOrder(orgName, spaceName, eventName, streamId, singleStreamPatchOrder) {
132
+ return __awaiter(this, void 0, void 0, function* () {
116
133
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/order`), singleStreamPatchOrder);
117
134
  return resp.data;
118
135
  });
119
- /**
120
- * Rename a stream
121
- * @param orgName Name of the organization
122
- * @param spaceName Name of the space
123
- * @param eventName Name of the event
124
- * @param streamId ID of the stream
125
- * @param name New name of the stream
126
- * @returns Updated stream
127
- */
128
- this.renameStream = (orgName, spaceName, eventName, streamId, name) => __awaiter(this, void 0, void 0, function* () {
136
+ }
137
+ /**
138
+ * Rename a stream
139
+ * @param orgName Name of the organization
140
+ * @param spaceName Name of the space
141
+ * @param eventName Name of the event
142
+ * @param streamId ID of the stream
143
+ * @param name New name of the stream
144
+ * @returns Updated stream
145
+ */
146
+ renameStream(orgName, spaceName, eventName, streamId, name) {
147
+ return __awaiter(this, void 0, void 0, function* () {
129
148
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/name`), { name });
130
149
  return resp.data;
131
150
  });
132
- /**
133
- * Moves a Stream to another event.
134
- *
135
- * @param orgName Name of the organization
136
- * @param spaceName Name of the space
137
- * @param eventName Name of the event
138
- * @param streamId ID of the stream
139
- * @param newEventName Name of the new event
140
- * @param [name] (optional) New name for stream. Is the new event already has a stream with the same name as this one, this parameter is mandatory.
141
- * @param [order] (optional) Order the stream should have in the new event
142
- * @returns Updated Stream
143
- */
144
- this.moveStream = (orgName, spaceName, eventName, streamId, newEventName, name, order) => __awaiter(this, void 0, void 0, function* () {
151
+ }
152
+ /**
153
+ * Moves a Stream to another event.
154
+ *
155
+ * @param orgName Name of the organization
156
+ * @param spaceName Name of the space
157
+ * @param eventName Name of the event
158
+ * @param streamId ID of the stream
159
+ * @param newEventName Name of the new event
160
+ * @param [name] (optional) New name for stream. Is the new event already has a stream with the same name as this one, this parameter is mandatory.
161
+ * @param [order] (optional) Order the stream should have in the new event
162
+ * @returns Updated Stream
163
+ */
164
+ moveStream(orgName, spaceName, eventName, streamId, newEventName, name, order) {
165
+ return __awaiter(this, void 0, void 0, function* () {
145
166
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/event`), { eventName: newEventName, name, order });
146
167
  return resp.data;
147
168
  });
148
- /**
149
- * Deletes a Stream by its ID.
150
- * @param orgName Name of the organization
151
- * @param spaceName Name of the space
152
- * @param eventName Name of the event
153
- * @param streamId ID of the stream
154
- */
155
- this.deleteStream = (orgName, spaceName, eventName, streamId) => __awaiter(this, void 0, void 0, function* () {
169
+ }
170
+ /**
171
+ * Deletes a Stream by its ID.
172
+ * @param orgName Name of the organization
173
+ * @param spaceName Name of the space
174
+ * @param eventName Name of the event
175
+ * @param streamId ID of the stream
176
+ */
177
+ deleteStream(orgName, spaceName, eventName, streamId) {
178
+ return __awaiter(this, void 0, void 0, function* () {
156
179
  yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}`));
157
180
  });
158
- this.design = new design_1.High5Design(this.options, this.axios);
159
181
  }
160
182
  getEndpoint(endpoint) {
161
183
  return `${this.options.server}/api/high5${endpoint}`;
@@ -1,12 +1,12 @@
1
- import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../../Base";
1
+ import Base from "../../../../Base";
3
2
  import { High5ExecutionPackage, High5ExecutionPatch, High5ExecutionRequest, High5ExecutionResponse } from "../../../../interfaces/high5/space/execution";
4
3
  import { High5SpaceExecutionLogs } from "./log/index";
5
4
  import { High5SpaceExecutionStates } from "./status/index";
6
5
  export declare class High5SpaceExecute extends Base {
7
- high5ExecutionLogs: High5SpaceExecutionLogs;
8
- high5ExecutionStates: High5SpaceExecutionStates;
9
- constructor(options: Options, axios: AxiosInstance);
6
+ get high5ExecutionLogs(): High5SpaceExecutionLogs;
7
+ private _high5ExecutionLogs?;
8
+ get high5ExecutionStates(): High5SpaceExecutionStates;
9
+ private _high5ExecutionStates?;
10
10
  /**
11
11
  * executeStream executes a single stream by its ID and an execution request
12
12
  * @param orgName the organizations's name
@@ -15,7 +15,7 @@ export declare class High5SpaceExecute extends Base {
15
15
  * @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
16
16
  * @returns the stream result
17
17
  */
18
- executeHigh5Stream: (orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest) => Promise<High5ExecutionResponse>;
18
+ executeHigh5Stream(orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest, design?: boolean): Promise<High5ExecutionResponse>;
19
19
  /**
20
20
  * Executes all streams within an event.
21
21
  * @param orgName Name of the Organization
@@ -24,7 +24,7 @@ export declare class High5SpaceExecute extends Base {
24
24
  * @param eventExecutionRequest Event execution request containing payload, target and a boolean specifying if it should be a dry run
25
25
  * @returns Array of stream results
26
26
  */
27
- executeHigh5Event: (orgName: string, spaceName: string, eventName: string, high5EventExecutionRequest: High5ExecutionRequest) => Promise<High5ExecutionResponse[]>;
27
+ executeHigh5Event(orgName: string, spaceName: string, eventName: string, high5EventExecutionRequest: High5ExecutionRequest): Promise<High5ExecutionResponse[]>;
28
28
  /**
29
29
  * Requests the StreamExecutionPackage for the provided Stream, which will hold all informations required to execute the Stream.
30
30
  * @param orgName Name of the Organization
@@ -33,7 +33,7 @@ export declare class High5SpaceExecute extends Base {
33
33
  * @param secret Secret of the Stream execution object
34
34
  * @returns StreamExecutionPackage
35
35
  */
36
- getStreamExecutionPackage: (orgName: string, spaceName: string, streamId: string, secret: string) => Promise<High5ExecutionPackage>;
36
+ getStreamExecutionPackage(orgName: string, spaceName: string, streamId: string, secret: string): Promise<High5ExecutionPackage>;
37
37
  /**
38
38
  * Publishes the stream status and logs to high5
39
39
  * @param orgName the organizations's name
@@ -43,6 +43,6 @@ export declare class High5SpaceExecute extends Base {
43
43
  * @param streamResult the result of the stream
44
44
  * @returns StreamLog
45
45
  */
46
- high5ExecutionStatusAndLogResponse: (orgName: string, spaceName: string, secret: string, high5ExecutionResponse: High5ExecutionPatch) => Promise<void>;
46
+ high5ExecutionStatusAndLogResponse(orgName: string, spaceName: string, secret: string, high5ExecutionResponse: High5ExecutionPatch): Promise<void>;
47
47
  protected getEndpoint(endpoint: string): string;
48
48
  }
@@ -14,58 +14,73 @@ const Base_1 = require("../../../../Base");
14
14
  const index_1 = require("./log/index");
15
15
  const index_2 = require("./status/index");
16
16
  class High5SpaceExecute extends Base_1.default {
17
- constructor(options, axios) {
18
- super(options, axios);
19
- /**
20
- * executeStream executes a single stream by its ID and an execution request
21
- * @param orgName the organizations's name
22
- * @param spaceName the spaces's name
23
- * @param streamId to identify the stream
24
- * @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
25
- * @returns the stream result
26
- */
27
- this.executeHigh5Stream = (orgName, spaceName, streamId, high5ExecutionRequest) => __awaiter(this, void 0, void 0, function* () {
28
- const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}`), high5ExecutionRequest);
17
+ get high5ExecutionLogs() {
18
+ if (this._high5ExecutionLogs === undefined) {
19
+ this._high5ExecutionLogs = new index_1.High5SpaceExecutionLogs(this.options, this.axios);
20
+ }
21
+ return this._high5ExecutionLogs;
22
+ }
23
+ get high5ExecutionStates() {
24
+ if (this._high5ExecutionStates === undefined) {
25
+ this._high5ExecutionStates = new index_2.High5SpaceExecutionStates(this.options, this.axios);
26
+ }
27
+ return this._high5ExecutionStates;
28
+ }
29
+ /**
30
+ * executeStream executes a single stream by its ID and an execution request
31
+ * @param orgName the organizations's name
32
+ * @param spaceName the spaces's name
33
+ * @param streamId to identify the stream
34
+ * @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
35
+ * @returns the stream result
36
+ */
37
+ executeHigh5Stream(orgName_1, spaceName_1, streamId_1, high5ExecutionRequest_1) {
38
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, streamId, high5ExecutionRequest, design = false) {
39
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}${design ? "&design=true" : ""}`), high5ExecutionRequest);
29
40
  return resp.data;
30
41
  });
31
- /**
32
- * Executes all streams within an event.
33
- * @param orgName Name of the Organization
34
- * @param spaceName Name of the Space
35
- * @param eventName Name of the Event
36
- * @param eventExecutionRequest Event execution request containing payload, target and a boolean specifying if it should be a dry run
37
- * @returns Array of stream results
38
- */
39
- this.executeHigh5Event = (orgName, spaceName, eventName, high5EventExecutionRequest) => __awaiter(this, void 0, void 0, function* () {
42
+ }
43
+ /**
44
+ * Executes all streams within an event.
45
+ * @param orgName Name of the Organization
46
+ * @param spaceName Name of the Space
47
+ * @param eventName Name of the Event
48
+ * @param eventExecutionRequest Event execution request containing payload, target and a boolean specifying if it should be a dry run
49
+ * @returns Array of stream results
50
+ */
51
+ executeHigh5Event(orgName, spaceName, eventName, high5EventExecutionRequest) {
52
+ return __awaiter(this, void 0, void 0, function* () {
40
53
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/event/name/${eventName}`), high5EventExecutionRequest);
41
54
  return resp.data;
42
55
  });
43
- /**
44
- * Requests the StreamExecutionPackage for the provided Stream, which will hold all informations required to execute the Stream.
45
- * @param orgName Name of the Organization
46
- * @param spaceName Name of the Space
47
- * @param streamId ID of the Stream
48
- * @param secret Secret of the Stream execution object
49
- * @returns StreamExecutionPackage
50
- */
51
- this.getStreamExecutionPackage = (orgName, spaceName, streamId, secret) => __awaiter(this, void 0, void 0, function* () {
56
+ }
57
+ /**
58
+ * Requests the StreamExecutionPackage for the provided Stream, which will hold all informations required to execute the Stream.
59
+ * @param orgName Name of the Organization
60
+ * @param spaceName Name of the Space
61
+ * @param streamId ID of the Stream
62
+ * @param secret Secret of the Stream execution object
63
+ * @returns StreamExecutionPackage
64
+ */
65
+ getStreamExecutionPackage(orgName, spaceName, streamId, secret) {
66
+ return __awaiter(this, void 0, void 0, function* () {
52
67
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}/package/${secret}`));
53
68
  return resp.data;
54
69
  });
55
- /**
56
- * Publishes the stream status and logs to high5
57
- * @param orgName the organizations's name
58
- * @param spaceName the spaces's name
59
- * @param streamId the id of the stream
60
- * @param secret the secret of the stream execution object
61
- * @param streamResult the result of the stream
62
- * @returns StreamLog
63
- */
64
- this.high5ExecutionStatusAndLogResponse = (orgName, spaceName, secret, high5ExecutionResponse) => __awaiter(this, void 0, void 0, function* () {
70
+ }
71
+ /**
72
+ * Publishes the stream status and logs to high5
73
+ * @param orgName the organizations's name
74
+ * @param spaceName the spaces's name
75
+ * @param streamId the id of the stream
76
+ * @param secret the secret of the stream execution object
77
+ * @param streamResult the result of the stream
78
+ * @returns StreamLog
79
+ */
80
+ high5ExecutionStatusAndLogResponse(orgName, spaceName, secret, high5ExecutionResponse) {
81
+ return __awaiter(this, void 0, void 0, function* () {
65
82
  yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/${secret}`), high5ExecutionResponse);
66
83
  });
67
- this.high5ExecutionLogs = new index_1.High5SpaceExecutionLogs(options, axios);
68
- this.high5ExecutionStates = new index_2.High5SpaceExecutionStates(options, axios);
69
84
  }
70
85
  getEndpoint(endpoint) {
71
86
  return `${this.options.server}/api/high5${endpoint}`;
@@ -1,9 +1,7 @@
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 { High5ExecutionLog } from "../../../../../interfaces/high5/space/execution";
5
4
  export declare class High5SpaceExecutionLogs extends Base {
6
- constructor(options: Options, axios: AxiosInstance);
7
5
  /**
8
6
  * Retrieves all stream execution logs for a given execution inside a space.
9
7
  * @param orgName Name of the Organization
@@ -14,11 +12,11 @@ export declare class High5SpaceExecutionLogs extends Base {
14
12
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
15
13
  * @returns Object containing an array of Stream execution logs as well as the total number of results
16
14
  */
17
- searchExecutionLogs: ({ orgName, spaceName, payload, filters, sorting, limit, page, }: SearchParams & {
15
+ searchExecutionLogs({ orgName, spaceName, payload, filters, sorting, limit, page, }: SearchParams & {
18
16
  orgName: string;
19
17
  spaceName: string;
20
18
  payload?: boolean;
21
- }) => Promise<PaginatedResponse<High5ExecutionLog>>;
19
+ }): Promise<PaginatedResponse<High5ExecutionLog>>;
22
20
  /**
23
21
  * Retrieves the execution log of a stream.
24
22
  * @param orgName Name of the Organization
@@ -26,6 +24,6 @@ export declare class High5SpaceExecutionLogs extends Base {
26
24
  * @param streamLogId ID of the stream log
27
25
  * @returns Stream execution log
28
26
  */
29
- getStreamExecutionLog: (orgName: string, spaceName: string, streamLogId: string, payload?: boolean) => Promise<High5ExecutionLog>;
27
+ getStreamExecutionLog(orgName: string, spaceName: string, streamLogId: string, payload?: boolean): Promise<High5ExecutionLog>;
30
28
  protected getEndpoint(endpoint: string): string;
31
29
  }