hcloud-sdk 0.0.15 → 14.13.2

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 (300) hide show
  1. package/README.md +1 -0
  2. package/changelog.md +809 -0
  3. package/index.d.ts +3 -2
  4. package/index.js +5 -2
  5. package/lib/Base.d.ts +26 -0
  6. package/lib/Base.js +12 -0
  7. package/lib/Hcloud.d.ts +80 -0
  8. package/lib/Hcloud.js +134 -0
  9. package/lib/helper/ErrorHelper.d.ts +7 -0
  10. package/lib/helper/ErrorHelper.js +19 -0
  11. package/lib/helper/paginatedResponseHelper.d.ts +3 -0
  12. package/lib/helper/paginatedResponseHelper.js +9 -0
  13. package/lib/helper/searchFilter.d.ts +9 -0
  14. package/lib/helper/searchFilter.js +12 -0
  15. package/lib/interfaces/agent/bundle/dev/index.d.ts +3 -0
  16. package/lib/interfaces/agent/context/index.d.ts +19 -0
  17. package/lib/interfaces/agent/index.d.ts +21 -0
  18. package/lib/interfaces/agent/index.js +2 -0
  19. package/lib/interfaces/auditor/index.d.ts +72 -0
  20. package/lib/interfaces/{Auditor.js → auditor/index.js} +21 -5
  21. package/lib/interfaces/axios/index.d.ts +5 -0
  22. package/lib/interfaces/axios/index.js +8 -0
  23. package/lib/interfaces/bouncer/features/index.d.ts +10 -0
  24. package/lib/interfaces/bouncer/features/index.js +2 -0
  25. package/lib/interfaces/bouncer/index.d.ts +6 -0
  26. package/lib/interfaces/bouncer/index.js +17 -0
  27. package/lib/interfaces/dali/index.d.ts +3 -0
  28. package/lib/interfaces/dali/index.js +2 -0
  29. package/lib/interfaces/frontend/config/index.d.ts +33 -0
  30. package/lib/interfaces/frontend/config/index.js +10 -0
  31. package/lib/interfaces/fuse/index.d.ts +3 -0
  32. package/lib/interfaces/fuse/index.js +19 -0
  33. package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +38 -0
  34. package/lib/interfaces/fuse/space/cronjob/Cronjob.js +8 -0
  35. package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +16 -0
  36. package/lib/interfaces/fuse/space/cronjob/CronjobLog.js +2 -0
  37. package/lib/interfaces/fuse/space/index.d.ts +21 -0
  38. package/lib/interfaces/fuse/space/index.js +11 -0
  39. package/lib/interfaces/global/HCloudError.d.ts +8 -0
  40. package/lib/interfaces/global/HCloudError.js +13 -0
  41. package/lib/interfaces/global/Header.d.ts +4 -0
  42. package/lib/interfaces/global/Header.js +2 -0
  43. package/lib/interfaces/global/HttpMethod.d.ts +7 -0
  44. package/lib/interfaces/global/HttpMethod.js +11 -0
  45. package/lib/interfaces/global/PaginatedResponse.d.ts +4 -0
  46. package/lib/interfaces/global/PaginatedResponse.js +2 -0
  47. package/lib/interfaces/global/Products.d.ts +11 -0
  48. package/lib/interfaces/global/Products.js +15 -0
  49. package/lib/interfaces/global/SearchFilters.d.ts +86 -0
  50. package/lib/interfaces/global/SearchFilters.js +49 -0
  51. package/lib/interfaces/global/Space.d.ts +20 -0
  52. package/lib/interfaces/global/Space.js +8 -0
  53. package/lib/interfaces/global/Version.d.ts +3 -0
  54. package/lib/interfaces/global/Version.js +2 -0
  55. package/lib/interfaces/global/Views.d.ts +8 -0
  56. package/lib/interfaces/global/Views.js +12 -0
  57. package/lib/interfaces/global/index.d.ts +9 -0
  58. package/lib/interfaces/global/index.js +25 -0
  59. package/lib/interfaces/high5/index.d.ts +16 -0
  60. package/lib/interfaces/high5/index.js +32 -0
  61. package/lib/interfaces/high5/joinToken/index.d.ts +10 -0
  62. package/lib/interfaces/high5/joinToken/index.js +2 -0
  63. package/lib/interfaces/high5/space/event/index.d.ts +15 -0
  64. package/lib/interfaces/high5/space/event/index.js +2 -0
  65. package/lib/interfaces/high5/space/event/stream/design/DesignOperation.d.ts +68 -0
  66. package/lib/interfaces/high5/space/event/stream/design/DesignOperation.js +20 -0
  67. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +92 -0
  68. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.js +20 -0
  69. package/lib/interfaces/high5/space/event/stream/design/index.d.ts +22 -0
  70. package/lib/interfaces/high5/space/event/stream/design/index.js +2 -0
  71. package/lib/interfaces/high5/space/event/stream/design/snapshot/index.d.ts +30 -0
  72. package/lib/interfaces/high5/space/event/stream/design/snapshot/index.js +8 -0
  73. package/lib/interfaces/high5/space/event/stream/index.d.ts +77 -0
  74. package/lib/interfaces/high5/space/event/stream/index.js +13 -0
  75. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +60 -0
  76. package/lib/interfaces/high5/space/event/stream/node/index.js +7 -0
  77. package/lib/interfaces/high5/space/execution/index.d.ts +137 -0
  78. package/lib/interfaces/high5/space/execution/index.js +21 -0
  79. package/lib/interfaces/high5/space/index.d.ts +23 -0
  80. package/lib/interfaces/high5/space/index.js +12 -0
  81. package/lib/interfaces/high5/space/secret/index.d.ts +12 -0
  82. package/lib/interfaces/high5/space/secret/index.js +2 -0
  83. package/lib/interfaces/high5/space/webhook/index.d.ts +75 -0
  84. package/lib/interfaces/high5/space/webhook/index.js +9 -0
  85. package/lib/interfaces/high5/wave/index.d.ts +171 -0
  86. package/lib/interfaces/high5/wave/index.js +52 -0
  87. package/lib/interfaces/idp/index.d.ts +26 -0
  88. package/lib/interfaces/idp/index.js +38 -0
  89. package/lib/interfaces/idp/oauth/index.d.ts +19 -0
  90. package/lib/interfaces/idp/oauth/index.js +8 -0
  91. package/lib/interfaces/idp/organization/index.d.ts +32 -0
  92. package/lib/interfaces/idp/organization/index.js +25 -0
  93. package/lib/interfaces/idp/organization/license/index.d.ts +84 -0
  94. package/lib/interfaces/idp/organization/license/index.js +15 -0
  95. package/lib/interfaces/idp/organization/member/index.d.ts +15 -0
  96. package/lib/interfaces/idp/organization/member/index.js +2 -0
  97. package/lib/interfaces/idp/organization/member/invitations/index.d.ts +26 -0
  98. package/lib/interfaces/idp/organization/member/invitations/index.js +18 -0
  99. package/lib/interfaces/idp/organization/settings/domain/index.d.ts +19 -0
  100. package/lib/interfaces/idp/organization/settings/domain/index.js +8 -0
  101. package/lib/interfaces/idp/organization/settings/domain/saml/index.d.ts +10 -0
  102. package/lib/interfaces/idp/organization/settings/domain/saml/index.js +2 -0
  103. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +37 -0
  104. package/lib/interfaces/idp/organization/settings/oauthApp/index.js +2 -0
  105. package/lib/interfaces/idp/organization/team/index.d.ts +24 -0
  106. package/lib/interfaces/idp/organization/team/index.js +9 -0
  107. package/lib/interfaces/idp/user/ConnectionSettings.d.ts +6 -0
  108. package/lib/interfaces/idp/user/ConnectionSettings.js +2 -0
  109. package/lib/interfaces/idp/user/GeneralSettings.d.ts +44 -0
  110. package/lib/interfaces/idp/user/GeneralSettings.js +38 -0
  111. package/lib/interfaces/idp/user/NotificationSettings.d.ts +8 -0
  112. package/lib/interfaces/idp/user/NotificationSettings.js +2 -0
  113. package/lib/interfaces/idp/user/Pat.d.ts +19 -0
  114. package/lib/interfaces/idp/user/Pat.js +2 -0
  115. package/lib/interfaces/idp/user/Scopes.d.ts +40 -0
  116. package/lib/interfaces/idp/user/Scopes.js +50 -0
  117. package/lib/interfaces/idp/user/SuccessfulAuth.d.ts +5 -0
  118. package/lib/interfaces/idp/user/SuccessfulAuth.js +2 -0
  119. package/lib/interfaces/idp/user/Totp.d.ts +20 -0
  120. package/lib/interfaces/idp/user/Totp.js +2 -0
  121. package/lib/interfaces/idp/user/index.d.ts +23 -0
  122. package/lib/interfaces/idp/user/index.js +2 -0
  123. package/lib/interfaces/mailer/index.d.ts +66 -0
  124. package/lib/interfaces/mailer/index.js +81 -0
  125. package/lib/interfaces/mothership/index.d.ts +27 -0
  126. package/lib/interfaces/mothership/index.js +8 -0
  127. package/lib/interfaces/nats/index.d.ts +252 -0
  128. package/lib/interfaces/nats/index.js +334 -0
  129. package/lib/service/agent/bundle/dev/index.d.ts +17 -0
  130. package/lib/service/agent/bundle/dev/index.js +40 -0
  131. package/lib/service/agent/bundle/index.d.ts +11 -0
  132. package/lib/service/agent/bundle/index.js +55 -0
  133. package/lib/service/agent/context/index.d.ts +37 -0
  134. package/lib/service/agent/context/index.js +81 -0
  135. package/lib/service/agent/index.d.ts +14 -0
  136. package/lib/service/agent/index.js +20 -0
  137. package/lib/service/agent/installer/index.d.ts +15 -0
  138. package/lib/service/agent/installer/index.js +97 -0
  139. package/lib/service/auditor/index.d.ts +26 -0
  140. package/lib/service/auditor/index.js +49 -0
  141. package/lib/service/auditor/internal/index.d.ts +27 -0
  142. package/lib/service/auditor/internal/index.js +61 -0
  143. package/lib/service/bouncer/features/index.d.ts +8 -0
  144. package/lib/service/bouncer/features/index.js +25 -0
  145. package/lib/service/bouncer/index.d.ts +14 -0
  146. package/lib/service/bouncer/index.js +31 -0
  147. package/lib/service/dali/DaliAvatar.d.ts +36 -0
  148. package/lib/service/dali/DaliAvatar.js +25 -0
  149. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +28 -0
  150. package/lib/service/dali/avatar/DaliFuseSpace.js +55 -0
  151. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +28 -0
  152. package/lib/service/dali/avatar/DaliHigh5Space.js +55 -0
  153. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +28 -0
  154. package/lib/service/dali/avatar/DaliOAuthApp.js +55 -0
  155. package/lib/service/dali/avatar/DaliOrganization.d.ts +25 -0
  156. package/lib/service/dali/avatar/DaliOrganization.js +52 -0
  157. package/lib/service/dali/avatar/DaliTeam.d.ts +28 -0
  158. package/lib/service/dali/avatar/DaliTeam.js +55 -0
  159. package/lib/service/dali/avatar/DaliUser.d.ts +22 -0
  160. package/lib/service/dali/avatar/DaliUser.js +49 -0
  161. package/lib/service/dali/index.d.ts +16 -0
  162. package/lib/service/dali/index.js +30 -0
  163. package/lib/service/fuse/index.d.ts +17 -0
  164. package/lib/service/fuse/index.js +34 -0
  165. package/lib/service/fuse/internal/index.d.ts +9 -0
  166. package/lib/service/fuse/internal/index.js +29 -0
  167. package/lib/service/fuse/internal/space/cronjob/index.d.ts +8 -0
  168. package/lib/service/fuse/internal/space/cronjob/index.js +15 -0
  169. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +17 -0
  170. package/lib/service/fuse/internal/space/cronjob/log/index.js +35 -0
  171. package/lib/service/fuse/internal/space/index.d.ts +23 -0
  172. package/lib/service/fuse/internal/space/index.js +43 -0
  173. package/lib/service/fuse/space/cronjob/index.d.ts +123 -0
  174. package/lib/service/fuse/space/cronjob/index.js +175 -0
  175. package/lib/service/fuse/space/cronjob/log/index.d.ts +31 -0
  176. package/lib/service/fuse/space/cronjob/log/index.js +57 -0
  177. package/lib/service/fuse/space/index.d.ts +82 -0
  178. package/lib/service/fuse/space/index.js +134 -0
  179. package/lib/service/high5/execution/index.d.ts +10 -0
  180. package/lib/service/high5/execution/index.js +17 -0
  181. package/lib/service/high5/execution/log/index.d.ts +19 -0
  182. package/lib/service/high5/execution/log/index.js +41 -0
  183. package/lib/service/high5/execution/status/index.d.ts +18 -0
  184. package/lib/service/high5/execution/status/index.js +41 -0
  185. package/lib/service/high5/index.d.ts +22 -0
  186. package/lib/service/high5/index.js +39 -0
  187. package/lib/service/high5/internal/index.d.ts +9 -0
  188. package/lib/service/high5/internal/index.js +29 -0
  189. package/lib/service/high5/internal/space/index.d.ts +21 -0
  190. package/lib/service/high5/internal/space/index.js +41 -0
  191. package/lib/service/high5/joinToken/index.d.ts +40 -0
  192. package/lib/service/high5/joinToken/index.js +64 -0
  193. package/lib/service/high5/space/event/index.d.ts +56 -0
  194. package/lib/service/high5/space/event/index.js +89 -0
  195. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +31 -0
  196. package/lib/service/high5/space/event/stream/design/DesignOperations.js +117 -0
  197. package/lib/service/high5/space/event/stream/design/index.d.ts +38 -0
  198. package/lib/service/high5/space/event/stream/design/index.js +56 -0
  199. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +62 -0
  200. package/lib/service/high5/space/event/stream/design/snapshot/index.js +100 -0
  201. package/lib/service/high5/space/event/stream/index.d.ts +114 -0
  202. package/lib/service/high5/space/event/stream/index.js +164 -0
  203. package/lib/service/high5/space/execution/index.d.ts +48 -0
  204. package/lib/service/high5/space/execution/index.js +74 -0
  205. package/lib/service/high5/space/execution/log/index.d.ts +31 -0
  206. package/lib/service/high5/space/execution/log/index.js +57 -0
  207. package/lib/service/high5/space/execution/status/index.d.ts +16 -0
  208. package/lib/service/high5/space/execution/status/index.js +34 -0
  209. package/lib/service/high5/space/index.d.ts +107 -0
  210. package/lib/service/high5/space/index.js +160 -0
  211. package/lib/service/high5/space/node/index.d.ts +58 -0
  212. package/lib/service/high5/space/node/index.js +116 -0
  213. package/lib/service/high5/space/secret/index.d.ts +60 -0
  214. package/lib/service/high5/space/secret/index.js +92 -0
  215. package/lib/service/high5/space/wave/index.d.ts +38 -0
  216. package/lib/service/high5/space/wave/index.js +66 -0
  217. package/lib/service/high5/space/webhook/index.d.ts +83 -0
  218. package/lib/service/high5/space/webhook/index.js +132 -0
  219. package/lib/service/high5/space/webhook/log/index.d.ts +18 -0
  220. package/lib/service/high5/space/webhook/log/index.js +38 -0
  221. package/lib/service/high5/wave/index.d.ts +8 -0
  222. package/lib/service/high5/wave/index.js +15 -0
  223. package/lib/service/high5/wave/s3/index.d.ts +48 -0
  224. package/lib/service/high5/wave/s3/index.js +88 -0
  225. package/lib/service/idp/index.d.ts +82 -0
  226. package/lib/service/idp/index.js +137 -0
  227. package/lib/service/idp/internal/index.d.ts +19 -0
  228. package/lib/service/idp/internal/index.js +34 -0
  229. package/lib/service/idp/oauth/index.d.ts +45 -0
  230. package/lib/service/idp/oauth/index.js +105 -0
  231. package/lib/service/idp/organization/index.d.ts +54 -0
  232. package/lib/service/idp/organization/index.js +79 -0
  233. package/lib/service/idp/organization/license/index.d.ts +7 -0
  234. package/lib/service/idp/organization/license/index.js +30 -0
  235. package/lib/service/idp/organization/member/index.d.ts +58 -0
  236. package/lib/service/idp/organization/member/index.js +96 -0
  237. package/lib/service/idp/organization/member/invitations/index.d.ts +79 -0
  238. package/lib/service/idp/organization/member/invitations/index.js +118 -0
  239. package/lib/service/idp/organization/settings/domain/index.d.ts +38 -0
  240. package/lib/service/idp/organization/settings/domain/index.js +63 -0
  241. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +43 -0
  242. package/lib/service/idp/organization/settings/domain/saml/index.js +88 -0
  243. package/lib/service/idp/organization/settings/index.d.ts +16 -0
  244. package/lib/service/idp/organization/settings/index.js +16 -0
  245. package/lib/service/idp/organization/settings/oauth/index.d.ts +64 -0
  246. package/lib/service/idp/organization/settings/oauth/index.js +106 -0
  247. package/lib/service/idp/organization/team/index.d.ts +72 -0
  248. package/lib/service/idp/organization/team/index.js +115 -0
  249. package/lib/service/idp/registration/index.d.ts +39 -0
  250. package/lib/service/idp/registration/index.js +84 -0
  251. package/lib/service/idp/user/index.d.ts +82 -0
  252. package/lib/service/idp/user/index.js +125 -0
  253. package/lib/service/idp/user/license/index.d.ts +7 -0
  254. package/lib/service/idp/user/license/index.js +30 -0
  255. package/lib/service/idp/user/password/index.d.ts +19 -0
  256. package/lib/service/idp/user/password/index.js +52 -0
  257. package/lib/service/idp/user/settings/connections/index.d.ts +15 -0
  258. package/lib/service/idp/user/settings/connections/index.js +33 -0
  259. package/lib/service/idp/user/settings/general/index.d.ts +18 -0
  260. package/lib/service/idp/user/settings/general/index.js +39 -0
  261. package/lib/service/idp/user/settings/index.d.ts +36 -0
  262. package/lib/service/idp/user/settings/index.js +25 -0
  263. package/lib/service/idp/user/settings/notifications/index.d.ts +18 -0
  264. package/lib/service/idp/user/settings/notifications/index.js +39 -0
  265. package/lib/service/idp/user/settings/oauthApps/index.d.ts +22 -0
  266. package/lib/service/idp/user/settings/oauthApps/index.js +54 -0
  267. package/lib/service/idp/user/settings/pats/index.d.ts +50 -0
  268. package/lib/service/idp/user/settings/pats/index.js +93 -0
  269. package/lib/service/idp/user/settings/twoFactor/index.d.ts +11 -0
  270. package/lib/service/idp/user/settings/twoFactor/index.js +15 -0
  271. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +34 -0
  272. package/lib/service/idp/user/settings/twoFactor/totp/index.js +65 -0
  273. package/lib/service/mailer/index.d.ts +14 -0
  274. package/lib/service/mailer/index.js +31 -0
  275. package/lib/service/mailer/internal/index.d.ts +36 -0
  276. package/lib/service/mailer/internal/index.js +64 -0
  277. package/lib/service/mothership/index.d.ts +97 -0
  278. package/lib/service/mothership/index.js +136 -0
  279. package/lib/service/nats/index.d.ts +51 -0
  280. package/lib/service/nats/index.js +138 -0
  281. package/lib/utils/Types.d.ts +1 -0
  282. package/lib/utils/Types.js +2 -0
  283. package/lib/utils/bouncer/features/Provider.d.ts +16 -0
  284. package/lib/utils/bouncer/features/Provider.js +83 -0
  285. package/package.json +36 -27
  286. package/lib/base.d.ts +0 -12
  287. package/lib/base.js +0 -8
  288. package/lib/hcloud.d.ts +0 -11
  289. package/lib/hcloud.js +0 -27
  290. package/lib/interfaces/Auditor.d.ts +0 -40
  291. package/lib/interfaces/Global.d.ts +0 -8
  292. package/lib/interfaces/IDP.d.ts +0 -9
  293. package/lib/service/Auditor.d.ts +0 -42
  294. package/lib/service/Auditor.js +0 -101
  295. package/lib/service/High5.d.ts +0 -4
  296. package/lib/service/High5.js +0 -9
  297. package/lib/service/IDP.d.ts +0 -39
  298. package/lib/service/IDP.js +0 -84
  299. /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
  300. /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.High5Stream = void 0;
13
+ const Base_1 = require("../../../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
+ const searchFilter_1 = require("../../../../../helper/searchFilter");
16
+ const design_1 = require("./design");
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, }) {
32
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
33
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/search?page=${page}&limit=${limit}`), {
34
+ filters: filtersDTO,
35
+ sorting: sorting,
36
+ });
37
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
38
+ });
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* () {
48
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}`));
49
+ return resp.data;
50
+ });
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* () {
60
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams`), {
61
+ name: name,
62
+ });
63
+ return resp.data;
64
+ });
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* () {
75
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams`), {
76
+ name: name,
77
+ streamId: sourceStreamId,
78
+ });
79
+ return resp.data;
80
+ });
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* () {
90
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/order`), streamList);
91
+ return resp.data;
92
+ });
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* () {
103
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/active`), streamPatchActive);
104
+ return resp.data;
105
+ });
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* () {
116
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/order`), singleStreamPatchOrder);
117
+ return resp.data;
118
+ });
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* () {
129
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/name`), { name });
130
+ return resp.data;
131
+ });
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* () {
145
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}/event`), { eventName: newEventName, name, order });
146
+ return resp.data;
147
+ });
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* () {
156
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/events/${eventName}/streams/${streamId}`));
157
+ });
158
+ this.design = new design_1.High5Design(this.options, this.axios);
159
+ }
160
+ getEndpoint(endpoint) {
161
+ return `${this.options.server}/api/high5${endpoint}`;
162
+ }
163
+ }
164
+ exports.High5Stream = High5Stream;
@@ -0,0 +1,48 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../../Base";
3
+ import { High5ExecutionPackage, High5ExecutionPatch, High5ExecutionRequest, High5ExecutionResponse } from "../../../../interfaces/high5/space/execution";
4
+ import { High5SpaceExecutionLogs } from "./log/index";
5
+ import { High5SpaceExecutionStates } from "./status/index";
6
+ export declare class High5SpaceExecute extends Base {
7
+ high5ExecutionLogs: High5SpaceExecutionLogs;
8
+ high5ExecutionStates: High5SpaceExecutionStates;
9
+ constructor(options: Options, axios: AxiosInstance);
10
+ /**
11
+ * executeStream executes a single stream by its ID and an execution request
12
+ * @param orgName the organizations's name
13
+ * @param spaceName the spaces's name
14
+ * @param streamId to identify the stream
15
+ * @param high5ExecutionRequest the stream execution request, containing the data, target, wait boolean and timeout
16
+ * @returns the stream result
17
+ */
18
+ executeHigh5Stream: (orgName: string, spaceName: string, streamId: string, high5ExecutionRequest: High5ExecutionRequest) => Promise<High5ExecutionResponse>;
19
+ /**
20
+ * Executes all streams within an event.
21
+ * @param orgName Name of the Organization
22
+ * @param spaceName Name of the Space
23
+ * @param eventName Name of the Event
24
+ * @param eventExecutionRequest Event execution request containing payload, target and a boolean specifying if it should be a dry run
25
+ * @returns Array of stream results
26
+ */
27
+ executeHigh5Event: (orgName: string, spaceName: string, eventName: string, high5EventExecutionRequest: High5ExecutionRequest) => Promise<High5ExecutionResponse[]>;
28
+ /**
29
+ * Requests the StreamExecutionPackage for the provided Stream, which will hold all informations required to execute the Stream.
30
+ * @param orgName Name of the Organization
31
+ * @param spaceName Name of the Space
32
+ * @param streamId ID of the Stream
33
+ * @param secret Secret of the Stream execution object
34
+ * @returns StreamExecutionPackage
35
+ */
36
+ getStreamExecutionPackage: (orgName: string, spaceName: string, streamId: string, secret: string) => Promise<High5ExecutionPackage>;
37
+ /**
38
+ * Publishes the stream status and logs to high5
39
+ * @param orgName the organizations's name
40
+ * @param spaceName the spaces's name
41
+ * @param streamId the id of the stream
42
+ * @param secret the secret of the stream execution object
43
+ * @param streamResult the result of the stream
44
+ * @returns StreamLog
45
+ */
46
+ high5ExecutionStatusAndLogResponse: (orgName: string, spaceName: string, secret: string, high5ExecutionResponse: High5ExecutionPatch) => Promise<void>;
47
+ protected getEndpoint(endpoint: string): string;
48
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.High5SpaceExecute = void 0;
13
+ const Base_1 = require("../../../../Base");
14
+ const index_1 = require("./log/index");
15
+ const index_2 = require("./status/index");
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);
29
+ return resp.data;
30
+ });
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* () {
40
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/event/name/${eventName}`), high5EventExecutionRequest);
41
+ return resp.data;
42
+ });
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* () {
52
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execute/stream/id/${streamId}/package/${secret}`));
53
+ return resp.data;
54
+ });
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* () {
65
+ yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/${secret}`), high5ExecutionResponse);
66
+ });
67
+ this.high5ExecutionLogs = new index_1.High5SpaceExecutionLogs(options, axios);
68
+ this.high5ExecutionStates = new index_2.High5SpaceExecutionStates(options, axios);
69
+ }
70
+ getEndpoint(endpoint) {
71
+ return `${this.options.server}/api/high5${endpoint}`;
72
+ }
73
+ }
74
+ exports.High5SpaceExecute = High5SpaceExecute;
@@ -0,0 +1,31 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../../../Base";
3
+ import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
4
+ import { High5ExecutionLog } from "../../../../../interfaces/high5/space/execution";
5
+ export declare class High5SpaceExecutionLogs extends Base {
6
+ constructor(options: Options, axios: AxiosInstance);
7
+ /**
8
+ * Retrieves all stream execution logs for a given execution inside a space.
9
+ * @param orgName Name of the Organization
10
+ * @param spaceName Name of the Space
11
+ * @param filters (optional) Array of search filters
12
+ * @param sorting (optional) Sorting object
13
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
14
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
15
+ * @returns Object containing an array of Stream execution logs as well as the total number of results
16
+ */
17
+ searchExecutionLogs: ({ orgName, spaceName, payload, filters, sorting, limit, page, }: SearchParams & {
18
+ orgName: string;
19
+ spaceName: string;
20
+ payload?: boolean;
21
+ }) => Promise<PaginatedResponse<High5ExecutionLog>>;
22
+ /**
23
+ * Retrieves the execution log of a stream.
24
+ * @param orgName Name of the Organization
25
+ * @param spaceName Name of the Space
26
+ * @param streamLogId ID of the stream log
27
+ * @returns Stream execution log
28
+ */
29
+ getStreamExecutionLog: (orgName: string, spaceName: string, streamLogId: string, payload?: boolean) => Promise<High5ExecutionLog>;
30
+ protected getEndpoint(endpoint: string): string;
31
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.High5SpaceExecutionLogs = void 0;
13
+ const Base_1 = require("../../../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
+ const searchFilter_1 = require("../../../../../helper/searchFilter");
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, }) {
30
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
31
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/logs/search?page=${page}&limit=${limit}&payload=${payload}`), {
32
+ filters: filtersDTO,
33
+ sorting: sorting,
34
+ });
35
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
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
+ 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) {
45
+ const resp = yield this.axios
46
+ .get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/logs/${streamLogId}?payload=${payload}`))
47
+ .catch((err) => {
48
+ throw err;
49
+ });
50
+ return resp.data;
51
+ });
52
+ }
53
+ getEndpoint(endpoint) {
54
+ return `${this.options.server}/api/high5${endpoint}`;
55
+ }
56
+ }
57
+ exports.High5SpaceExecutionLogs = High5SpaceExecutionLogs;
@@ -0,0 +1,16 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../../../Base";
3
+ import { PaginatedResponse } from "../../../../../interfaces/global";
4
+ import { High5ExecutionStatus } from "../../../../../interfaces/high5/space/execution";
5
+ export declare class High5SpaceExecutionStates extends Base {
6
+ constructor(options: Options, axios: AxiosInstance);
7
+ /**
8
+ * Retrieves all stream execution logs for a given stream.
9
+ * @param orgName Name of the Organization
10
+ * @param spaceName Name of the Space
11
+ * @param streamStatusId ID of the stream status
12
+ * @returns Object containing an array of Stream execution logs as well as the total number of results
13
+ */
14
+ getStreamExecutionStatus: (orgName: string, spaceName: string, streamStatusId: string, limit?: number, page?: number) => Promise<PaginatedResponse<High5ExecutionStatus>>;
15
+ protected getEndpoint(endpoint: string): string;
16
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.High5SpaceExecutionStates = void 0;
13
+ const Base_1 = require("../../../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
+ class High5SpaceExecutionStates extends Base_1.default {
16
+ constructor(options, axios) {
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) {
26
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/streams/status/${streamStatusId}?page=${page}&limit=${limit}`));
27
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
28
+ });
29
+ }
30
+ getEndpoint(endpoint) {
31
+ return `${this.options.server}/api/high5${endpoint}`;
32
+ }
33
+ }
34
+ exports.High5SpaceExecutionStates = High5SpaceExecutionStates;
@@ -0,0 +1,107 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../Base";
3
+ import { PaginatedResponse, SearchParams } from "../../../interfaces/global";
4
+ import { Stream } from "../../../interfaces/high5";
5
+ import { High5Space as Space, High5SpaceEntityPermission as SpaceEntityPermission, High5SpacePermission as SpacePermission } from "../../../interfaces/high5/space";
6
+ import { High5Event } from "./event";
7
+ import { High5SpaceExecute } from "./execution";
8
+ import High5Node from "./node";
9
+ import High5Secret from "./secret";
10
+ import High5Wave from "./wave";
11
+ import { High5Webhook } from "./webhook";
12
+ 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);
20
+ /**
21
+ * Retrieves all High5 Spaces of the specified Organization matching the search filter(s). Will return all Spaces if no search filter is provided.
22
+ * @param orgName Name of the organization
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 High5 Spaces and the total number of results found in the database (independent of limit and page)
28
+ */
29
+ searchSpaces: ({ orgName, filters, sorting, limit, page, }: SearchParams & {
30
+ orgName: string;
31
+ }) => Promise<PaginatedResponse<Space>>;
32
+ /**
33
+ * Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
34
+ * @param orgName Name of the organization
35
+ * @param spaceName Name of the space
36
+ * @param filters (optional) Array of search filters
37
+ * @param sorting (optional) Sorting object
38
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
39
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
40
+ * @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
+ */
42
+ searchSpacePermissions: ({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
43
+ orgName: string;
44
+ spaceName: string;
45
+ }) => Promise<PaginatedResponse<SpaceEntityPermission>>;
46
+ /**
47
+ * Retrieves a High5 Space by its name.
48
+ * @param orgName Name of the Organization
49
+ * @param spaceId ID of the High5 Space
50
+ * @returns The requested Space
51
+ */
52
+ getSpace: (orgName: string, spaceName: string) => Promise<Space>;
53
+ /**
54
+ * Creates a new High5 Space in the specified Organization.
55
+ * @param orgName Name of the Organization
56
+ * @param name Name for the new Space
57
+ * @returns The created Space
58
+ */
59
+ createSpace: (orgName: string, name: string) => Promise<Space>;
60
+ /**
61
+ * Delete a space by its name.
62
+ * @param orgName Name of the Organization
63
+ * @param spaceName Name of the Space
64
+ */
65
+ deleteSpace: (orgName: string, spaceName: string) => Promise<void>;
66
+ /**
67
+ * Adds/Updates/Removes the permission a user has in the specified space.
68
+ * @param orgName Name of the Organization
69
+ * @param spaceName Name of the Space
70
+ * @param userId ID of the User
71
+ * @param permission New permission
72
+ * @returns The Space with updated permissions
73
+ */
74
+ updateUserSpacePermission: (orgName: string, spaceName: string, userId: string, permission: SpacePermission) => Promise<SpaceEntityPermission>;
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 Space with updated permissions
82
+ */
83
+ updateTeamSpacePermission: (orgName: string, spaceName: string, teamName: string, permission: SpacePermission) => Promise<SpaceEntityPermission>;
84
+ /**
85
+ * Retrieves all streams of a space matching the search filter(s). Will return all streams if no search filter is provided.
86
+ * @param orgName Name of the organization
87
+ * @param orgName Name of the space
88
+ * @param filters (optional) Array of search filters
89
+ * @param sorting (optional) Sorting object
90
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
91
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
92
+ * @returns Object containing an array of streams and the total number of results found in the database (independent of limit and page)
93
+ */
94
+ searchStreamsOfSpace: ({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
95
+ orgName: string;
96
+ spaceName: string;
97
+ }) => Promise<PaginatedResponse<Stream>>;
98
+ /**
99
+ * Updates the name of a space.
100
+ * @param orgName Name of the organization
101
+ * @param newSpaceName Current name of the space
102
+ * @param newName New name for the space
103
+ * @returns The updated space
104
+ */
105
+ renameSpace: (orgName: string, spaceName: string, newSpaceName: string) => Promise<Space>;
106
+ protected getEndpoint(endpoint: string): string;
107
+ }