hcloud-sdk 0.0.16 → 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 (305) 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.d.ts → auditor/index.d.ts} +31 -5
  20. package/lib/interfaces/{Auditor.js → auditor/index.js} +15 -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/{AuditorInternal.js → auditor/internal/index.js} +20 -24
  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.js → mailer/index.js} +9 -12
  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 +37 -29
  286. package/lib/base.d.ts +0 -12
  287. package/lib/base.js +0 -8
  288. package/lib/hcloud.d.ts +0 -13
  289. package/lib/hcloud.js +0 -29
  290. package/lib/interfaces/Global.d.ts +0 -8
  291. package/lib/interfaces/IDP.d.ts +0 -9
  292. package/lib/interfaces/Mail.d.ts +0 -29
  293. package/lib/interfaces/Mail.js +0 -8
  294. package/lib/service/Auditor.d.ts +0 -22
  295. package/lib/service/Auditor.js +0 -61
  296. package/lib/service/AuditorInternal.d.ts +0 -28
  297. package/lib/service/High5.d.ts +0 -4
  298. package/lib/service/High5.js +0 -9
  299. package/lib/service/IDP.d.ts +0 -39
  300. package/lib/service/IDP.js +0 -84
  301. package/lib/service/Mailer.d.ts +0 -13
  302. package/lib/service/MailerInternal.d.ts +0 -32
  303. package/lib/service/MailerInternal.js +0 -64
  304. /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
  305. /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
@@ -0,0 +1,160 @@
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.High5Space = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelper");
15
+ const searchFilter_1 = require("../../../helper/searchFilter");
16
+ const event_1 = require("./event");
17
+ const execution_1 = require("./execution");
18
+ const node_1 = require("./node");
19
+ const secret_1 = require("./secret");
20
+ const wave_1 = require("./wave");
21
+ const webhook_1 = require("./webhook");
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, }) {
35
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
36
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/search?page=${page}&limit=${limit}`), {
37
+ filters: filtersDTO,
38
+ sorting: sorting,
39
+ });
40
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
41
+ });
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, }) {
53
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
54
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
55
+ filters: filtersDTO,
56
+ sorting: sorting,
57
+ });
58
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
59
+ });
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* () {
67
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
68
+ return resp.data;
69
+ });
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* () {
77
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
78
+ return resp.data;
79
+ });
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* () {
86
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
87
+ });
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* () {
97
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
98
+ userId,
99
+ permission,
100
+ });
101
+ return resp.data;
102
+ });
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* () {
112
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
113
+ teamName,
114
+ permission,
115
+ });
116
+ return resp.data;
117
+ });
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, }) {
129
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
130
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/streams/search?page=${page}&limit=${limit}`), {
131
+ filters: filtersDTO,
132
+ sorting: sorting,
133
+ });
134
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
135
+ });
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* () {
144
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
145
+ newSpaceName,
146
+ });
147
+ return resp.data;
148
+ });
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
+ }
156
+ getEndpoint(endpoint) {
157
+ return `${this.options.server}/api/high5${endpoint}`;
158
+ }
159
+ }
160
+ exports.High5Space = High5Space;
@@ -0,0 +1,58 @@
1
+ import Base from "../../../../Base";
2
+ import { Node, NodeCategory } from "../../../../interfaces/high5/space/event/stream/node";
3
+ export default class High5Node extends Base {
4
+ /**
5
+ * Retrieves all Nodes for the specified stream.
6
+ * @param orgName Name of the organization
7
+ * @param spaceName Name of the space
8
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
9
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
10
+ * @returns Array containg the Nodes
11
+ */
12
+ getAllNodes(orgName: string, spaceName: string, limit?: number, page?: number): Promise<Node[]>;
13
+ /**
14
+ * Retrieves a Node by its ID.
15
+ * @param orgName Name of the organization
16
+ * @param spaceName Name of the space
17
+ * @param nodeId Id of the Node
18
+ * @returns The requested Node
19
+ */
20
+ getNode(orgName: string, spaceName: string, nodeId: string): Promise<Node>;
21
+ /**
22
+ * Adds a new Node to a stream.
23
+ * @param orgName Name of the organization
24
+ * @param spaceName Name of the space
25
+ * @param nodeCategory Category of the node
26
+ * @param specification Specification of the node as a base64 string
27
+ * @param typescript Typescript code as a base64 string
28
+ * @returns The created Node
29
+ */
30
+ createNode(orgName: string, spaceName: string, nodeCategory: NodeCategory, specification: string, typescript: string): Promise<Node>;
31
+ /**
32
+ * Deletes a Node by its ID
33
+ * @param orgName Name of the organization
34
+ * @param spaceName Name of the space
35
+ * @param nodeId Id of the node
36
+ */
37
+ deleteNode(orgName: string, spaceName: string, nodeId: string): Promise<void>;
38
+ /**
39
+ * Patches the Typescript code and specification of the Node.
40
+ * @param orgName Name of the organization
41
+ * @param spaceName Name of the space
42
+ * @param nodeId ID of the node
43
+ * @param regenerateSecret Boolean to specify if a new secret shall be created
44
+ * @param specification (optional) Specification of the node as a base64 string
45
+ * @param typescript (optional) Typescript code as a base64 string
46
+ * @return The updated Node
47
+ */
48
+ patchNode(orgName: string, spaceName: string, nodeId: string, regenerateSecret: boolean, specification?: string, typescript?: string): Promise<Node>;
49
+ /**
50
+ * Retrieves the content (raw javascript code) of a Node.
51
+ * @param orgName Name of the organization
52
+ * @param spaceName Name of the space
53
+ * @param secret Secret of the Node (a unique sha512 hash)
54
+ * @rerurns Raw javascript representation of the Node's content
55
+ */
56
+ getNodeContent(orgName: string, spaceName: string, secret: string): Promise<string>;
57
+ protected getEndpoint(endpoint: string): string;
58
+ }
@@ -0,0 +1,116 @@
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
+ const Base_1 = require("../../../../Base");
13
+ class High5Node extends Base_1.default {
14
+ /**
15
+ * Retrieves all Nodes for the specified stream.
16
+ * @param orgName Name of the organization
17
+ * @param spaceName Name of the space
18
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
19
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
20
+ * @returns Array containg the Nodes
21
+ */
22
+ getAllNodes(orgName, spaceName, limit, page) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ limit = limit || 25;
25
+ page = page || 0;
26
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes?page=${page}&limit=${limit}`));
27
+ return resp.data;
28
+ });
29
+ }
30
+ /**
31
+ * Retrieves a Node by its ID.
32
+ * @param orgName Name of the organization
33
+ * @param spaceName Name of the space
34
+ * @param nodeId Id of the Node
35
+ * @returns The requested Node
36
+ */
37
+ getNode(orgName, spaceName, nodeId) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/${nodeId}`));
40
+ return resp.data;
41
+ });
42
+ }
43
+ /**
44
+ * Adds a new Node to a stream.
45
+ * @param orgName Name of the organization
46
+ * @param spaceName Name of the space
47
+ * @param nodeCategory Category of the node
48
+ * @param specification Specification of the node as a base64 string
49
+ * @param typescript Typescript code as a base64 string
50
+ * @returns The created Node
51
+ */
52
+ createNode(orgName, spaceName, nodeCategory, specification, typescript) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes`), {
55
+ category: nodeCategory,
56
+ specification: specification,
57
+ typescript: typescript,
58
+ });
59
+ return resp.data;
60
+ });
61
+ }
62
+ /**
63
+ * Deletes a Node by its ID
64
+ * @param orgName Name of the organization
65
+ * @param spaceName Name of the space
66
+ * @param nodeId Id of the node
67
+ */
68
+ deleteNode(orgName, spaceName, nodeId) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/${nodeId}`));
71
+ });
72
+ }
73
+ /**
74
+ * Patches the Typescript code and specification of the Node.
75
+ * @param orgName Name of the organization
76
+ * @param spaceName Name of the space
77
+ * @param nodeId ID of the node
78
+ * @param regenerateSecret Boolean to specify if a new secret shall be created
79
+ * @param specification (optional) Specification of the node as a base64 string
80
+ * @param typescript (optional) Typescript code as a base64 string
81
+ * @return The updated Node
82
+ */
83
+ patchNode(orgName, spaceName, nodeId, regenerateSecret, specification, typescript) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ const patchNode = {
86
+ specification: specification,
87
+ typescript: typescript,
88
+ };
89
+ if (!specification) {
90
+ delete patchNode.specification;
91
+ }
92
+ if (!typescript) {
93
+ delete patchNode.typescript;
94
+ }
95
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/${nodeId}?regenerateSecret=${regenerateSecret}`), patchNode);
96
+ return resp.data;
97
+ });
98
+ }
99
+ /**
100
+ * Retrieves the content (raw javascript code) of a Node.
101
+ * @param orgName Name of the organization
102
+ * @param spaceName Name of the space
103
+ * @param secret Secret of the Node (a unique sha512 hash)
104
+ * @rerurns Raw javascript representation of the Node's content
105
+ */
106
+ getNodeContent(orgName, spaceName, secret) {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/content/${secret}`));
109
+ return resp.data;
110
+ });
111
+ }
112
+ getEndpoint(endpoint) {
113
+ return `${this.options.server}/api/high5${endpoint}`;
114
+ }
115
+ }
116
+ exports.default = High5Node;
@@ -0,0 +1,60 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../../Base";
3
+ import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
4
+ import { CreateSecret, Secret, UpdateSecret } from "../../../../interfaces/high5/space/secret";
5
+ export default class High5Secret extends Base {
6
+ constructor(options: Options, axios: AxiosInstance);
7
+ /**
8
+ * Requests all secret keys of the provided space which match the search filter(s) (paginated request).
9
+ * Only the keys of the secret are sent back in the response by default, not the actual encrypted values.
10
+ * Will return all secrets of the space if no filter is provided.
11
+ * @param orgName - Name of the organization
12
+ * @param spaceName - Name of the space
13
+ * @param filters (optional) Array of search filters
14
+ * @param sorting (optional) Sorting object
15
+ * @param limit - (optional) Max number of results (1-100; defaults to 25)
16
+ * @param page - (optional) Page number: Skip the first (page * limit) results (defaults to 0)
17
+ * @param encrypted - (optional) Whether to get all secret values only in encrypted form.
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
+ */
20
+ searchSecrets: ({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
21
+ orgName: string;
22
+ spaceName: string;
23
+ }) => Promise<PaginatedResponse<Secret>>;
24
+ /**
25
+ * Adds a secret key-value pair to a space.
26
+ * @param orgName - Name of the organization
27
+ * @param spaceName - Name of the space
28
+ * @param key - Key of the key-value pair
29
+ * @param value - Value of the key-value pair
30
+ * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
31
+ * @returns The created Secret
32
+ */
33
+ addSecret: (orgName: string, spaceName: string, secret: CreateSecret) => Promise<Secret>;
34
+ /**
35
+ * Updates the value for an existent secret key-value pair.
36
+ * @param orgName - Name of the organization
37
+ * @param spaceName - Name of the space
38
+ * @param key - Key of the key-value pair
39
+ * @param value - The new value of the key-value pair
40
+ * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
41
+ * @returns The updated Secret
42
+ */
43
+ updateSecret: (orgName: string, spaceName: string, key: string, secret: UpdateSecret) => Promise<Secret>;
44
+ /**
45
+ * Deletes a key-value pair of the space
46
+ * @param orgName - Name of the organization
47
+ * @param spaceName - Name of the space
48
+ * @param key - Key of the key-value pair
49
+ */
50
+ deleteSecret: (orgName: string, spaceName: string, key: string) => Promise<void>;
51
+ /**
52
+ * Get secret value by its key
53
+ * @param orgName - Name of the organization
54
+ * @param spaceName - Name of the space
55
+ * @param key - Key of the key-value pair
56
+ * @returns Secret details
57
+ */
58
+ getSecret: (orgName: string, spaceName: string, key: string) => Promise<Secret>;
59
+ protected getEndpoint(endpoint: string): string;
60
+ }
@@ -0,0 +1,92 @@
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
+ const Base_1 = require("../../../../Base");
13
+ const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
14
+ const searchFilter_1 = require("../../../../helper/searchFilter");
15
+ class High5Secret extends Base_1.default {
16
+ constructor(options, axios) {
17
+ super(options, axios);
18
+ /**
19
+ * Requests all secret keys of the provided space which match the search filter(s) (paginated request).
20
+ * Only the keys of the secret are sent back in the response by default, not the actual encrypted values.
21
+ * Will return all secrets of the space if no filter is provided.
22
+ * @param orgName - Name of the organization
23
+ * @param spaceName - Name of the space
24
+ * @param filters (optional) Array of search filters
25
+ * @param sorting (optional) Sorting object
26
+ * @param limit - (optional) Max number of results (1-100; defaults to 25)
27
+ * @param page - (optional) Page number: Skip the first (page * limit) results (defaults to 0)
28
+ * @param encrypted - (optional) Whether to get all secret values only in encrypted form.
29
+ * @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)
30
+ */
31
+ this.searchSecrets = (_a) => __awaiter(this, [_a], void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
32
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
33
+ return new searchFilter_1.SearchFilterDTO(f);
34
+ });
35
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/search?limit=${limit}&page=${page}`), {
36
+ filters: filtersDTO,
37
+ sorting,
38
+ });
39
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
40
+ });
41
+ /**
42
+ * Adds a secret key-value pair to a space.
43
+ * @param orgName - Name of the organization
44
+ * @param spaceName - Name of the space
45
+ * @param key - Key of the key-value pair
46
+ * @param value - Value of the key-value pair
47
+ * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
48
+ * @returns The created Secret
49
+ */
50
+ this.addSecret = (orgName, spaceName, secret) => __awaiter(this, void 0, void 0, function* () {
51
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets`), secret);
52
+ return resp.data;
53
+ });
54
+ /**
55
+ * Updates the value for an existent secret key-value pair.
56
+ * @param orgName - Name of the organization
57
+ * @param spaceName - Name of the space
58
+ * @param key - Key of the key-value pair
59
+ * @param value - The new value of the key-value pair
60
+ * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
61
+ * @returns The updated Secret
62
+ */
63
+ this.updateSecret = (orgName, spaceName, key, secret) => __awaiter(this, void 0, void 0, function* () {
64
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`), secret);
65
+ return resp.data;
66
+ });
67
+ /**
68
+ * Deletes a key-value pair of the space
69
+ * @param orgName - Name of the organization
70
+ * @param spaceName - Name of the space
71
+ * @param key - Key of the key-value pair
72
+ */
73
+ this.deleteSecret = (orgName, spaceName, key) => __awaiter(this, void 0, void 0, function* () {
74
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`));
75
+ });
76
+ /**
77
+ * Get secret value by its key
78
+ * @param orgName - Name of the organization
79
+ * @param spaceName - Name of the space
80
+ * @param key - Key of the key-value pair
81
+ * @returns Secret details
82
+ */
83
+ this.getSecret = (orgName, spaceName, key) => __awaiter(this, void 0, void 0, function* () {
84
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`));
85
+ return resp.data;
86
+ });
87
+ }
88
+ getEndpoint(endpoint) {
89
+ return `${this.options.server}/api/high5${endpoint}`;
90
+ }
91
+ }
92
+ exports.default = High5Secret;
@@ -0,0 +1,38 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../../Base";
3
+ import { SpacePatchWaveCatalog, SpacePatchWaveEngine, WaveCatalog, WaveEngine } from "../../../../interfaces/high5";
4
+ export default class High5Wave extends Base {
5
+ constructor(options: Options, axios: AxiosInstance);
6
+ /**
7
+ * Patch wave engine version for a space
8
+ * @param orgName - Name of the organization
9
+ * @param spaceName - Name of the space
10
+ * @param spacePatchWaveEngine - Patch wave engine object holding url and version
11
+ * @returns WaveEngine object
12
+ */
13
+ patchSpaceWaveEngine: (orgName: string, spaceName: string, spacePatchWaveEngine: SpacePatchWaveEngine) => Promise<WaveEngine>;
14
+ /**
15
+ * Get wave engine version currently active for the space
16
+ * @param orgName - Name of the organization
17
+ * @param spaceName - Name of the space
18
+ * @returns WaveEngine object
19
+ */
20
+ getSpaceWaveEngine: (orgName: string, spaceName: string) => Promise<WaveEngine>;
21
+ /**
22
+ * Adds a new wave catalog version for a space or updates existing
23
+ * @param orgName - Name of the organization
24
+ * @param spaceName - Name of the space
25
+ * @param spacePatchWaveCatalog - Patch wave catalog object holding url and version
26
+ * @returns WaveCatalog object
27
+ */
28
+ addUpdateSpaceWaveCatalog: (orgName: string, spaceName: string, spacePatchCatalog: SpacePatchWaveCatalog) => Promise<WaveCatalog>;
29
+ /**
30
+ * Get wave catalogs currently active for the space
31
+ * @param orgName - Name of the organization
32
+ * @param spaceName - Name of the space
33
+ * @returns WaveCatalog array
34
+ */
35
+ getSpaceWaveCatalogs: (orgName: string, spaceName: string) => Promise<WaveCatalog[]>;
36
+ deleteSpaceWaveCatalog: (orgName: string, spaceName: string, catalogId: string) => Promise<void>;
37
+ protected getEndpoint(endpoint: string): string;
38
+ }
@@ -0,0 +1,66 @@
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
+ const Base_1 = require("../../../../Base");
13
+ class High5Wave extends Base_1.default {
14
+ constructor(options, axios) {
15
+ super(options, axios);
16
+ /**
17
+ * Patch wave engine version for a space
18
+ * @param orgName - Name of the organization
19
+ * @param spaceName - Name of the space
20
+ * @param spacePatchWaveEngine - Patch wave engine object holding url and version
21
+ * @returns WaveEngine object
22
+ */
23
+ this.patchSpaceWaveEngine = (orgName, spaceName, spacePatchWaveEngine) => __awaiter(this, void 0, void 0, function* () {
24
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/engine`), spacePatchWaveEngine);
25
+ return resp.data;
26
+ });
27
+ /**
28
+ * Get wave engine version currently active for the space
29
+ * @param orgName - Name of the organization
30
+ * @param spaceName - Name of the space
31
+ * @returns WaveEngine object
32
+ */
33
+ this.getSpaceWaveEngine = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
34
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/engine`));
35
+ return resp.data;
36
+ });
37
+ /**
38
+ * Adds a new wave catalog version for a space or updates existing
39
+ * @param orgName - Name of the organization
40
+ * @param spaceName - Name of the space
41
+ * @param spacePatchWaveCatalog - Patch wave catalog object holding url and version
42
+ * @returns WaveCatalog object
43
+ */
44
+ this.addUpdateSpaceWaveCatalog = (orgName, spaceName, spacePatchCatalog) => __awaiter(this, void 0, void 0, function* () {
45
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog`), spacePatchCatalog);
46
+ return resp.data;
47
+ });
48
+ /**
49
+ * Get wave catalogs currently active for the space
50
+ * @param orgName - Name of the organization
51
+ * @param spaceName - Name of the space
52
+ * @returns WaveCatalog array
53
+ */
54
+ this.getSpaceWaveCatalogs = (orgName, spaceName) => __awaiter(this, void 0, void 0, function* () {
55
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog`));
56
+ return resp.data;
57
+ });
58
+ this.deleteSpaceWaveCatalog = (orgName, spaceName, catalogId) => __awaiter(this, void 0, void 0, function* () {
59
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog/${catalogId}`));
60
+ });
61
+ }
62
+ getEndpoint(endpoint) {
63
+ return `${this.options.server}/api/high5${endpoint}`;
64
+ }
65
+ }
66
+ exports.default = High5Wave;