hcloud-sdk 0.0.16 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/README.md +1 -0
  2. package/changelog.md +45 -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 +90 -0
  8. package/lib/Hcloud.js +184 -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 +7 -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/frontend/featureflags/index.d.ts +7 -0
  32. package/lib/interfaces/frontend/featureflags/index.js +2 -0
  33. package/lib/interfaces/fuse/index.d.ts +3 -0
  34. package/lib/interfaces/fuse/index.js +19 -0
  35. package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +38 -0
  36. package/lib/interfaces/fuse/space/cronjob/Cronjob.js +8 -0
  37. package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +16 -0
  38. package/lib/interfaces/fuse/space/cronjob/CronjobLog.js +2 -0
  39. package/lib/interfaces/fuse/space/index.d.ts +21 -0
  40. package/lib/interfaces/fuse/space/index.js +11 -0
  41. package/lib/interfaces/global/HCloudError.d.ts +8 -0
  42. package/lib/interfaces/global/HCloudError.js +13 -0
  43. package/lib/interfaces/global/Header.d.ts +4 -0
  44. package/lib/interfaces/global/Header.js +2 -0
  45. package/lib/interfaces/global/HttpMethod.d.ts +7 -0
  46. package/lib/interfaces/global/HttpMethod.js +11 -0
  47. package/lib/interfaces/global/PaginatedResponse.d.ts +4 -0
  48. package/lib/interfaces/global/PaginatedResponse.js +2 -0
  49. package/lib/interfaces/global/Products.d.ts +11 -0
  50. package/lib/interfaces/global/Products.js +15 -0
  51. package/lib/interfaces/global/SearchFilters.d.ts +86 -0
  52. package/lib/interfaces/global/SearchFilters.js +49 -0
  53. package/lib/interfaces/global/Space.d.ts +20 -0
  54. package/lib/interfaces/global/Space.js +8 -0
  55. package/lib/interfaces/global/Version.d.ts +3 -0
  56. package/lib/interfaces/global/Version.js +2 -0
  57. package/lib/interfaces/global/Views.d.ts +8 -0
  58. package/lib/interfaces/global/Views.js +12 -0
  59. package/lib/interfaces/global/index.d.ts +9 -0
  60. package/lib/interfaces/global/index.js +25 -0
  61. package/lib/interfaces/high5/index.d.ts +16 -0
  62. package/lib/interfaces/high5/index.js +32 -0
  63. package/lib/interfaces/high5/joinToken/index.d.ts +10 -0
  64. package/lib/interfaces/high5/joinToken/index.js +2 -0
  65. package/lib/interfaces/high5/space/event/index.d.ts +15 -0
  66. package/lib/interfaces/high5/space/event/index.js +2 -0
  67. package/lib/interfaces/high5/space/event/stream/design/DesignOperation.d.ts +68 -0
  68. package/lib/interfaces/high5/space/event/stream/design/DesignOperation.js +20 -0
  69. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +92 -0
  70. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.js +20 -0
  71. package/lib/interfaces/high5/space/event/stream/design/index.d.ts +22 -0
  72. package/lib/interfaces/high5/space/event/stream/design/index.js +2 -0
  73. package/lib/interfaces/high5/space/event/stream/design/snapshot/index.d.ts +30 -0
  74. package/lib/interfaces/high5/space/event/stream/design/snapshot/index.js +8 -0
  75. package/lib/interfaces/high5/space/event/stream/index.d.ts +77 -0
  76. package/lib/interfaces/high5/space/event/stream/index.js +13 -0
  77. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +62 -0
  78. package/lib/interfaces/high5/space/event/stream/node/index.js +7 -0
  79. package/lib/interfaces/high5/space/execution/index.d.ts +148 -0
  80. package/lib/interfaces/high5/space/execution/index.js +21 -0
  81. package/lib/interfaces/high5/space/index.d.ts +23 -0
  82. package/lib/interfaces/high5/space/index.js +12 -0
  83. package/lib/interfaces/high5/space/secret/index.d.ts +12 -0
  84. package/lib/interfaces/high5/space/secret/index.js +2 -0
  85. package/lib/interfaces/high5/space/webhook/index.d.ts +75 -0
  86. package/lib/interfaces/high5/space/webhook/index.js +9 -0
  87. package/lib/interfaces/high5/wave/changelog.d.ts +30 -0
  88. package/lib/interfaces/high5/wave/changelog.js +18 -0
  89. package/lib/interfaces/high5/wave/index.d.ts +201 -0
  90. package/lib/interfaces/high5/wave/index.js +61 -0
  91. package/lib/interfaces/idp/index.d.ts +26 -0
  92. package/lib/interfaces/idp/index.js +38 -0
  93. package/lib/interfaces/idp/oauth/index.d.ts +19 -0
  94. package/lib/interfaces/idp/oauth/index.js +8 -0
  95. package/lib/interfaces/idp/organization/index.d.ts +32 -0
  96. package/lib/interfaces/idp/organization/index.js +25 -0
  97. package/lib/interfaces/idp/organization/license/index.d.ts +84 -0
  98. package/lib/interfaces/idp/organization/license/index.js +15 -0
  99. package/lib/interfaces/idp/organization/member/index.d.ts +15 -0
  100. package/lib/interfaces/idp/organization/member/index.js +2 -0
  101. package/lib/interfaces/idp/organization/member/invitations/index.d.ts +26 -0
  102. package/lib/interfaces/idp/organization/member/invitations/index.js +18 -0
  103. package/lib/interfaces/idp/organization/settings/domain/index.d.ts +19 -0
  104. package/lib/interfaces/idp/organization/settings/domain/index.js +8 -0
  105. package/lib/interfaces/idp/organization/settings/domain/saml/index.d.ts +10 -0
  106. package/lib/interfaces/idp/organization/settings/domain/saml/index.js +2 -0
  107. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +37 -0
  108. package/lib/interfaces/idp/organization/settings/oauthApp/index.js +2 -0
  109. package/lib/interfaces/idp/organization/team/index.d.ts +24 -0
  110. package/lib/interfaces/idp/organization/team/index.js +9 -0
  111. package/lib/interfaces/idp/user/ConnectionSettings.d.ts +6 -0
  112. package/lib/interfaces/idp/user/ConnectionSettings.js +2 -0
  113. package/lib/interfaces/idp/user/GeneralSettings.d.ts +45 -0
  114. package/lib/interfaces/idp/user/GeneralSettings.js +38 -0
  115. package/lib/interfaces/idp/user/NotificationSettings.d.ts +8 -0
  116. package/lib/interfaces/idp/user/NotificationSettings.js +2 -0
  117. package/lib/interfaces/idp/user/Pat.d.ts +19 -0
  118. package/lib/interfaces/idp/user/Pat.js +2 -0
  119. package/lib/interfaces/idp/user/Scopes.d.ts +40 -0
  120. package/lib/interfaces/idp/user/Scopes.js +50 -0
  121. package/lib/interfaces/idp/user/SuccessfulAuth.d.ts +5 -0
  122. package/lib/interfaces/idp/user/SuccessfulAuth.js +2 -0
  123. package/lib/interfaces/idp/user/Totp.d.ts +20 -0
  124. package/lib/interfaces/idp/user/Totp.js +2 -0
  125. package/lib/interfaces/idp/user/index.d.ts +23 -0
  126. package/lib/interfaces/idp/user/index.js +2 -0
  127. package/lib/interfaces/mailer/index.d.ts +66 -0
  128. package/lib/interfaces/mailer/index.js +81 -0
  129. package/lib/interfaces/mothership/index.d.ts +28 -0
  130. package/lib/interfaces/mothership/index.js +8 -0
  131. package/lib/interfaces/nats/index.d.ts +239 -0
  132. package/lib/interfaces/nats/index.js +316 -0
  133. package/lib/service/agent/bundle/dev/index.d.ts +17 -0
  134. package/lib/service/agent/bundle/dev/index.js +44 -0
  135. package/lib/service/agent/bundle/index.d.ts +11 -0
  136. package/lib/service/agent/bundle/index.js +55 -0
  137. package/lib/service/agent/context/index.d.ts +35 -0
  138. package/lib/service/agent/context/index.js +90 -0
  139. package/lib/service/agent/index.d.ts +16 -0
  140. package/lib/service/agent/index.js +37 -0
  141. package/lib/service/agent/installer/index.d.ts +15 -0
  142. package/lib/service/agent/installer/index.js +97 -0
  143. package/lib/service/auditor/index.d.ts +25 -0
  144. package/lib/service/auditor/index.js +55 -0
  145. package/lib/service/auditor/internal/index.d.ts +27 -0
  146. package/lib/service/auditor/internal/index.js +65 -0
  147. package/lib/service/bouncer/features/index.d.ts +8 -0
  148. package/lib/service/bouncer/features/index.js +27 -0
  149. package/lib/service/bouncer/index.d.ts +7 -0
  150. package/lib/service/bouncer/index.js +16 -0
  151. package/lib/service/dali/DaliAvatar.d.ts +40 -0
  152. package/lib/service/dali/DaliAvatar.js +70 -0
  153. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +26 -0
  154. package/lib/service/dali/avatar/DaliFuseSpace.js +58 -0
  155. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +26 -0
  156. package/lib/service/dali/avatar/DaliHigh5Space.js +58 -0
  157. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +26 -0
  158. package/lib/service/dali/avatar/DaliOAuthApp.js +58 -0
  159. package/lib/service/dali/avatar/DaliOrganization.d.ts +23 -0
  160. package/lib/service/dali/avatar/DaliOrganization.js +55 -0
  161. package/lib/service/dali/avatar/DaliTeam.d.ts +26 -0
  162. package/lib/service/dali/avatar/DaliTeam.js +58 -0
  163. package/lib/service/dali/avatar/DaliUser.d.ts +20 -0
  164. package/lib/service/dali/avatar/DaliUser.js +52 -0
  165. package/lib/service/dali/index.d.ts +15 -0
  166. package/lib/service/dali/index.js +37 -0
  167. package/lib/service/fuse/index.d.ts +18 -0
  168. package/lib/service/fuse/index.js +48 -0
  169. package/lib/service/fuse/internal/index.d.ts +8 -0
  170. package/lib/service/fuse/internal/index.js +31 -0
  171. package/lib/service/fuse/internal/space/cronjob/index.d.ts +7 -0
  172. package/lib/service/fuse/internal/space/cronjob/index.js +17 -0
  173. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +15 -0
  174. package/lib/service/fuse/internal/space/cronjob/log/index.js +34 -0
  175. package/lib/service/fuse/internal/space/index.d.ts +22 -0
  176. package/lib/service/fuse/internal/space/index.js +49 -0
  177. package/lib/service/fuse/space/cronjob/index.d.ts +123 -0
  178. package/lib/service/fuse/space/cronjob/index.js +203 -0
  179. package/lib/service/fuse/space/cronjob/log/index.d.ts +31 -0
  180. package/lib/service/fuse/space/cronjob/log/index.js +58 -0
  181. package/lib/service/fuse/space/index.d.ts +81 -0
  182. package/lib/service/fuse/space/index.js +152 -0
  183. package/lib/service/high5/execution/index.d.ts +10 -0
  184. package/lib/service/high5/execution/index.js +24 -0
  185. package/lib/service/high5/execution/log/index.d.ts +19 -0
  186. package/lib/service/high5/execution/log/index.js +40 -0
  187. package/lib/service/high5/execution/status/index.d.ts +18 -0
  188. package/lib/service/high5/execution/status/index.js +40 -0
  189. package/lib/service/high5/index.d.ts +25 -0
  190. package/lib/service/high5/index.js +63 -0
  191. package/lib/service/high5/internal/index.d.ts +8 -0
  192. package/lib/service/high5/internal/index.js +31 -0
  193. package/lib/service/high5/internal/space/index.d.ts +21 -0
  194. package/lib/service/high5/internal/space/index.js +45 -0
  195. package/lib/service/high5/joinToken/index.d.ts +40 -0
  196. package/lib/service/high5/joinToken/index.js +72 -0
  197. package/lib/service/high5/space/event/index.d.ts +55 -0
  198. package/lib/service/high5/space/event/index.js +101 -0
  199. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +31 -0
  200. package/lib/service/high5/space/event/stream/design/DesignOperations.js +117 -0
  201. package/lib/service/high5/space/event/stream/design/index.d.ts +53 -0
  202. package/lib/service/high5/space/event/stream/design/index.js +91 -0
  203. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +62 -0
  204. package/lib/service/high5/space/event/stream/design/snapshot/index.js +107 -0
  205. package/lib/service/high5/space/event/stream/index.d.ts +113 -0
  206. package/lib/service/high5/space/event/stream/index.js +186 -0
  207. package/lib/service/high5/space/execution/index.d.ts +48 -0
  208. package/lib/service/high5/space/execution/index.js +89 -0
  209. package/lib/service/high5/space/execution/log/index.d.ts +29 -0
  210. package/lib/service/high5/space/execution/log/index.js +58 -0
  211. package/lib/service/high5/space/execution/status/index.d.ts +16 -0
  212. package/lib/service/high5/space/execution/status/index.js +36 -0
  213. package/lib/service/high5/space/index.d.ts +111 -0
  214. package/lib/service/high5/space/index.js +205 -0
  215. package/lib/service/high5/space/node/index.d.ts +58 -0
  216. package/lib/service/high5/space/node/index.js +116 -0
  217. package/lib/service/high5/space/secret/index.d.ts +60 -0
  218. package/lib/service/high5/space/secret/index.js +102 -0
  219. package/lib/service/high5/space/wave/index.d.ts +36 -0
  220. package/lib/service/high5/space/wave/index.js +73 -0
  221. package/lib/service/high5/space/webhook/index.d.ts +90 -0
  222. package/lib/service/high5/space/webhook/index.js +165 -0
  223. package/lib/service/high5/space/webhook/log/index.d.ts +16 -0
  224. package/lib/service/high5/space/webhook/log/index.js +37 -0
  225. package/lib/service/high5/wave/index.d.ts +8 -0
  226. package/lib/service/high5/wave/index.js +15 -0
  227. package/lib/service/high5/wave/s3/index.d.ts +48 -0
  228. package/lib/service/high5/wave/s3/index.js +100 -0
  229. package/lib/service/idp/index.d.ts +84 -0
  230. package/lib/service/idp/index.js +185 -0
  231. package/lib/service/idp/internal/index.d.ts +17 -0
  232. package/lib/service/idp/internal/index.js +33 -0
  233. package/lib/service/idp/oauth/index.d.ts +49 -0
  234. package/lib/service/idp/oauth/index.js +117 -0
  235. package/lib/service/idp/organization/index.d.ts +56 -0
  236. package/lib/service/idp/organization/index.js +114 -0
  237. package/lib/service/idp/organization/license/index.d.ts +7 -0
  238. package/lib/service/idp/organization/license/index.js +31 -0
  239. package/lib/service/idp/organization/member/index.d.ts +57 -0
  240. package/lib/service/idp/organization/member/index.js +110 -0
  241. package/lib/service/idp/organization/member/invitations/index.d.ts +79 -0
  242. package/lib/service/idp/organization/member/invitations/index.js +122 -0
  243. package/lib/service/idp/organization/settings/domain/index.d.ts +37 -0
  244. package/lib/service/idp/organization/settings/domain/index.js +76 -0
  245. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +43 -0
  246. package/lib/service/idp/organization/settings/domain/saml/index.js +98 -0
  247. package/lib/service/idp/organization/settings/index.d.ts +16 -0
  248. package/lib/service/idp/organization/settings/index.js +29 -0
  249. package/lib/service/idp/organization/settings/oauth/index.d.ts +62 -0
  250. package/lib/service/idp/organization/settings/oauth/index.js +117 -0
  251. package/lib/service/idp/organization/team/index.d.ts +72 -0
  252. package/lib/service/idp/organization/team/index.js +124 -0
  253. package/lib/service/idp/registration/index.d.ts +37 -0
  254. package/lib/service/idp/registration/index.js +87 -0
  255. package/lib/service/idp/user/index.d.ts +83 -0
  256. package/lib/service/idp/user/index.js +160 -0
  257. package/lib/service/idp/user/license/index.d.ts +7 -0
  258. package/lib/service/idp/user/license/index.js +31 -0
  259. package/lib/service/idp/user/password/index.d.ts +19 -0
  260. package/lib/service/idp/user/password/index.js +51 -0
  261. package/lib/service/idp/user/settings/connections/index.d.ts +13 -0
  262. package/lib/service/idp/user/settings/connections/index.js +32 -0
  263. package/lib/service/idp/user/settings/general/index.d.ts +22 -0
  264. package/lib/service/idp/user/settings/general/index.js +51 -0
  265. package/lib/service/idp/user/settings/index.d.ts +40 -0
  266. package/lib/service/idp/user/settings/index.js +70 -0
  267. package/lib/service/idp/user/settings/notifications/index.d.ts +16 -0
  268. package/lib/service/idp/user/settings/notifications/index.js +40 -0
  269. package/lib/service/idp/user/settings/oauthApps/index.d.ts +20 -0
  270. package/lib/service/idp/user/settings/oauthApps/index.js +55 -0
  271. package/lib/service/idp/user/settings/pats/index.d.ts +48 -0
  272. package/lib/service/idp/user/settings/pats/index.js +104 -0
  273. package/lib/service/idp/user/settings/twoFactor/index.d.ts +10 -0
  274. package/lib/service/idp/user/settings/twoFactor/index.js +20 -0
  275. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +32 -0
  276. package/lib/service/idp/user/settings/twoFactor/totp/index.js +72 -0
  277. package/lib/service/mailer/index.d.ts +13 -0
  278. package/lib/service/{Mailer.js → mailer/index.js} +17 -16
  279. package/lib/service/mailer/internal/index.d.ts +36 -0
  280. package/lib/service/mailer/internal/index.js +69 -0
  281. package/lib/service/mothership/index.d.ts +97 -0
  282. package/lib/service/mothership/index.js +149 -0
  283. package/lib/service/nats/index.d.ts +49 -0
  284. package/lib/service/nats/index.js +138 -0
  285. package/lib/utils/Types.d.ts +1 -0
  286. package/lib/utils/Types.js +2 -0
  287. package/lib/utils/bouncer/features/Provider.d.ts +19 -0
  288. package/lib/utils/bouncer/features/Provider.js +101 -0
  289. package/package.json +37 -29
  290. package/lib/base.d.ts +0 -12
  291. package/lib/base.js +0 -8
  292. package/lib/hcloud.d.ts +0 -13
  293. package/lib/hcloud.js +0 -29
  294. package/lib/interfaces/Global.d.ts +0 -8
  295. package/lib/interfaces/IDP.d.ts +0 -9
  296. package/lib/interfaces/Mail.d.ts +0 -29
  297. package/lib/interfaces/Mail.js +0 -8
  298. package/lib/service/Auditor.d.ts +0 -22
  299. package/lib/service/Auditor.js +0 -61
  300. package/lib/service/AuditorInternal.d.ts +0 -28
  301. package/lib/service/AuditorInternal.js +0 -65
  302. package/lib/service/High5.d.ts +0 -4
  303. package/lib/service/High5.js +0 -9
  304. package/lib/service/IDP.d.ts +0 -39
  305. package/lib/service/IDP.js +0 -84
  306. package/lib/service/Mailer.d.ts +0 -13
  307. package/lib/service/MailerInternal.d.ts +0 -32
  308. package/lib/service/MailerInternal.js +0 -64
  309. /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
  310. /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
@@ -0,0 +1,102 @@
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
+ /**
20
+ * Requests all secret keys of the provided space which match the search filter(s) (paginated request).
21
+ * Only the keys of the secret are sent back in the response by default, not the actual encrypted values.
22
+ * Will return all secrets of the space if no filter is provided.
23
+ * @param orgName - Name of the organization
24
+ * @param spaceName - Name of the space
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
+ * @param encrypted - (optional) Whether to get all secret values only in encrypted form.
30
+ * @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)
31
+ */
32
+ searchSecrets(_a) {
33
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
34
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
35
+ return new searchFilter_1.SearchFilterDTO(f);
36
+ });
37
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/search?limit=${limit}&page=${page}`), {
38
+ filters: filtersDTO,
39
+ sorting,
40
+ });
41
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
42
+ });
43
+ }
44
+ /**
45
+ * Adds a secret key-value pair to a 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
+ * @param value - Value of the key-value pair
50
+ * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
51
+ * @returns The created Secret
52
+ */
53
+ addSecret(orgName, spaceName, secret) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets`), secret);
56
+ return resp.data;
57
+ });
58
+ }
59
+ /**
60
+ * Updates the value for an existent secret key-value pair.
61
+ * @param orgName - Name of the organization
62
+ * @param spaceName - Name of the space
63
+ * @param key - Key of the key-value pair
64
+ * @param value - The new value of the key-value pair
65
+ * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
66
+ * @returns The updated Secret
67
+ */
68
+ updateSecret(orgName, spaceName, key, secret) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`), secret);
71
+ return resp.data;
72
+ });
73
+ }
74
+ /**
75
+ * Deletes a key-value pair of the space
76
+ * @param orgName - Name of the organization
77
+ * @param spaceName - Name of the space
78
+ * @param key - Key of the key-value pair
79
+ */
80
+ deleteSecret(orgName, spaceName, key) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`));
83
+ });
84
+ }
85
+ /**
86
+ * Get secret value by its key
87
+ * @param orgName - Name of the organization
88
+ * @param spaceName - Name of the space
89
+ * @param key - Key of the key-value pair
90
+ * @returns Secret details
91
+ */
92
+ getSecret(orgName, spaceName, key) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`));
95
+ return resp.data;
96
+ });
97
+ }
98
+ getEndpoint(endpoint) {
99
+ return `${this.options.server}/api/high5${endpoint}`;
100
+ }
101
+ }
102
+ exports.default = High5Secret;
@@ -0,0 +1,36 @@
1
+ import Base from "../../../../Base";
2
+ import { SpacePatchWaveCatalog, SpacePatchWaveEngine, WaveCatalog, WaveEngine } from "../../../../interfaces/high5";
3
+ export default class High5Wave extends Base {
4
+ /**
5
+ * Patch wave engine version for a space
6
+ * @param orgName - Name of the organization
7
+ * @param spaceName - Name of the space
8
+ * @param spacePatchWaveEngine - Patch wave engine object holding url and version
9
+ * @returns WaveEngine object
10
+ */
11
+ patchSpaceWaveEngine(orgName: string, spaceName: string, spacePatchWaveEngine: SpacePatchWaveEngine): Promise<WaveEngine>;
12
+ /**
13
+ * Get wave engine version currently active for the space
14
+ * @param orgName - Name of the organization
15
+ * @param spaceName - Name of the space
16
+ * @returns WaveEngine object
17
+ */
18
+ getSpaceWaveEngine(orgName: string, spaceName: string): Promise<WaveEngine>;
19
+ /**
20
+ * Adds a new wave catalog version for a space or updates existing
21
+ * @param orgName - Name of the organization
22
+ * @param spaceName - Name of the space
23
+ * @param spacePatchWaveCatalog - Patch wave catalog object holding url, version and optionally a minimumEngineVersion
24
+ * @returns WaveCatalog object
25
+ */
26
+ addUpdateSpaceWaveCatalog(orgName: string, spaceName: string, spacePatchCatalog: SpacePatchWaveCatalog): Promise<WaveCatalog>;
27
+ /**
28
+ * Get wave catalogs currently active for the space
29
+ * @param orgName - Name of the organization
30
+ * @param spaceName - Name of the space
31
+ * @returns WaveCatalog array
32
+ */
33
+ getSpaceWaveCatalogs(orgName: string, spaceName: string): Promise<WaveCatalog[]>;
34
+ deleteSpaceWaveCatalog(orgName: string, spaceName: string, catalogId: string): Promise<void>;
35
+ protected getEndpoint(endpoint: string): string;
36
+ }
@@ -0,0 +1,73 @@
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
+ /**
15
+ * Patch wave engine version for a space
16
+ * @param orgName - Name of the organization
17
+ * @param spaceName - Name of the space
18
+ * @param spacePatchWaveEngine - Patch wave engine object holding url and version
19
+ * @returns WaveEngine object
20
+ */
21
+ patchSpaceWaveEngine(orgName, spaceName, spacePatchWaveEngine) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/engine`), spacePatchWaveEngine);
24
+ return resp.data;
25
+ });
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
+ getSpaceWaveEngine(orgName, spaceName) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/engine`));
36
+ return resp.data;
37
+ });
38
+ }
39
+ /**
40
+ * Adds a new wave catalog version for a space or updates existing
41
+ * @param orgName - Name of the organization
42
+ * @param spaceName - Name of the space
43
+ * @param spacePatchWaveCatalog - Patch wave catalog object holding url, version and optionally a minimumEngineVersion
44
+ * @returns WaveCatalog object
45
+ */
46
+ addUpdateSpaceWaveCatalog(orgName, spaceName, spacePatchCatalog) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog`), spacePatchCatalog);
49
+ return resp.data;
50
+ });
51
+ }
52
+ /**
53
+ * Get wave catalogs currently active for the space
54
+ * @param orgName - Name of the organization
55
+ * @param spaceName - Name of the space
56
+ * @returns WaveCatalog array
57
+ */
58
+ getSpaceWaveCatalogs(orgName, spaceName) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog`));
61
+ return resp.data;
62
+ });
63
+ }
64
+ deleteSpaceWaveCatalog(orgName, spaceName, catalogId) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog/${catalogId}`));
67
+ });
68
+ }
69
+ getEndpoint(endpoint) {
70
+ return `${this.options.server}/api/high5${endpoint}`;
71
+ }
72
+ }
73
+ exports.default = High5Wave;
@@ -0,0 +1,90 @@
1
+ import Base from "../../../../Base";
2
+ import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
3
+ import { KeyValuePair, Webhook, WebhookCreate, WebhookUpdate } from "../../../../interfaces/high5/space/webhook";
4
+ import { High5WebhookLog } from "./log";
5
+ export declare class High5Webhook extends Base {
6
+ get log(): High5WebhookLog;
7
+ private _log?;
8
+ /**
9
+ * Retrieves all Webhooks of the specified space that match the provided search filter(s). Will return all Webhooks if no search filter is provided.
10
+ * @param orgName Name of the organization
11
+ * @param spaceName Name of the space
12
+ * @param filters (optional) Array of search filters
13
+ * @param sorting (optional) Sorting object
14
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
15
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
16
+ * @returns Object containing an array of Webhooks and the total number of results found in the database (independent of limit and page)
17
+ */
18
+ searchWebhooks({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
19
+ orgName: string;
20
+ spaceName: string;
21
+ }): Promise<PaginatedResponse<Webhook>>;
22
+ /**
23
+ * Requests a Webhhok by its ID.
24
+ * @param orgName Name of the Organization
25
+ * @param spaceName Name of the Space
26
+ * @param webhookId ID of the Webhook
27
+ * @returns The requested Webhook
28
+ */
29
+ getWebhook(orgName: string, spaceName: string, webhookId: string): Promise<Webhook>;
30
+ /**
31
+ * Generates a new URL for the specified Webhook. This is suggested if a leak of the current URL is likely.
32
+ * @param orgName Name of the Organization
33
+ * @param spaceName Name of the Space
34
+ * @param webhookId ID of the Webhook
35
+ * @returns The updated Webhook
36
+ */
37
+ regenerateWebhookUrl(orgName: string, spaceName: string, webhookId: string): Promise<Webhook>;
38
+ /**
39
+ * Creates a new Webhook in the specified High5 space.
40
+ * @param orgName Name of the Organization
41
+ * @param spaceName Name of the Space
42
+ * @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the new webhook
43
+ * @returns The created Webhook
44
+ */
45
+ createWebhook(orgName: string, spaceName: string, WebhookCreate: WebhookCreate): Promise<Webhook>;
46
+ /**
47
+ * Updates an existing Webhook.
48
+ * @param orgName Name of the Organization
49
+ * @param spaceName Name of the Space
50
+ * @param webhookId ID of the Webhook to be updated
51
+ * @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the updated webhook
52
+ * @returns the updated Webhook
53
+ */
54
+ updateWebhook(orgName: string, spaceName: string, webhookId: string, webhookUpdate: WebhookUpdate): Promise<Webhook>;
55
+ /**
56
+ * Deletes a Webhook by its ID.
57
+ * @param orgName Name of the Organization
58
+ * @param spaceName Name of the Space
59
+ * @param webhookId ID of the webhook to be deleted
60
+ */
61
+ deleteWebhook(orgName: string, spaceName: string, webhookId: string): Promise<void>;
62
+ /**
63
+ * Executes all Events and Streams connected to the specified Webhook.
64
+ * @param webhookUrl URL of the webhook to be triggered / executed
65
+ */
66
+ triggerWebhook(webhookUrl: string): Promise<void>;
67
+ /**
68
+ * Executes a webhook by its URL.
69
+ * @param webhookUrl Webhook URL to be triggered / executed (your hcloud domain + webhook.relativeUrl)
70
+ * @param payload Payload to be used in the event execution that will be triggered by the webhook, as JSON.
71
+ * @param headers (optional) Security headers.
72
+ */
73
+ executeWebhookByUrl(webhookUrl: string, payload: unknown, headers?: KeyValuePair<string>): Promise<void>;
74
+ /**
75
+ * Respond to a webhook via callback.
76
+ * @param callbackURL Full or partial URL callback URL. This URL is unique per webhook execution
77
+ * @param status HTTP status code to send in the response
78
+ * @param headers (optional) HTTP headers to send in the response
79
+ * @param body (optional) Body to send in the HTTP response
80
+ */
81
+ respondToWebhook(callbackURL: string, status: number, headers?: Record<string, string | string[]>, body?: string): Promise<void>;
82
+ /**
83
+ * Validates the provided webhook URL by sending a challenge query parameter.
84
+ * @param url Webhook URL to be validated (your hcloud domain + webhook.relativeUrl)
85
+ * @param challenge String to be returned
86
+ * @returns The provided challenge string as plaint text
87
+ */
88
+ validateWebhookUrl(webhookUrl: string, challenge: string): Promise<string>;
89
+ protected getEndpoint(endpoint: string): string;
90
+ }
@@ -0,0 +1,165 @@
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.High5Webhook = void 0;
13
+ const Base_1 = require("../../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
15
+ const searchFilter_1 = require("../../../../helper/searchFilter");
16
+ const log_1 = require("./log");
17
+ class High5Webhook extends Base_1.default {
18
+ get log() {
19
+ if (this._log === undefined) {
20
+ this._log = new log_1.High5WebhookLog(this.options, this.axios);
21
+ }
22
+ return this._log;
23
+ }
24
+ /**
25
+ * Retrieves all Webhooks of the specified space that match the provided search filter(s). Will return all Webhooks if no search filter is provided.
26
+ * @param orgName Name of the organization
27
+ * @param spaceName Name of the space
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 Webhooks and the total number of results found in the database (independent of limit and page)
33
+ */
34
+ searchWebhooks(_a) {
35
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
36
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
37
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/search?limit=${limit}&page=${page}`), {
38
+ filters: filtersDTO,
39
+ sorting: sorting,
40
+ });
41
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
42
+ });
43
+ }
44
+ /**
45
+ * Requests a Webhhok by its ID.
46
+ * @param orgName Name of the Organization
47
+ * @param spaceName Name of the Space
48
+ * @param webhookId ID of the Webhook
49
+ * @returns The requested Webhook
50
+ */
51
+ getWebhook(orgName, spaceName, webhookId) {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}`));
54
+ return resp.data;
55
+ });
56
+ }
57
+ /**
58
+ * Generates a new URL for the specified Webhook. This is suggested if a leak of the current URL is likely.
59
+ * @param orgName Name of the Organization
60
+ * @param spaceName Name of the Space
61
+ * @param webhookId ID of the Webhook
62
+ * @returns The updated Webhook
63
+ */
64
+ regenerateWebhookUrl(orgName, spaceName, webhookId) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}/regenerateUrl`));
67
+ return resp.data;
68
+ });
69
+ }
70
+ /**
71
+ * Creates a new Webhook in the specified High5 space.
72
+ * @param orgName Name of the Organization
73
+ * @param spaceName Name of the Space
74
+ * @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the new webhook
75
+ * @returns The created Webhook
76
+ */
77
+ createWebhook(orgName, spaceName, WebhookCreate) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks`), WebhookCreate);
80
+ return resp.data;
81
+ });
82
+ }
83
+ /**
84
+ * Updates an existing Webhook.
85
+ * @param orgName Name of the Organization
86
+ * @param spaceName Name of the Space
87
+ * @param webhookId ID of the Webhook to be updated
88
+ * @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the updated webhook
89
+ * @returns the updated Webhook
90
+ */
91
+ updateWebhook(orgName, spaceName, webhookId, webhookUpdate) {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}`), webhookUpdate);
94
+ return resp.data;
95
+ });
96
+ }
97
+ /**
98
+ * Deletes a Webhook by its ID.
99
+ * @param orgName Name of the Organization
100
+ * @param spaceName Name of the Space
101
+ * @param webhookId ID of the webhook to be deleted
102
+ */
103
+ deleteWebhook(orgName, spaceName, webhookId) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}`));
106
+ });
107
+ }
108
+ /**
109
+ * Executes all Events and Streams connected to the specified Webhook.
110
+ * @param webhookUrl URL of the webhook to be triggered / executed
111
+ */
112
+ triggerWebhook(webhookUrl) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ yield this.axios.post(this.getEndpoint(webhookUrl));
115
+ });
116
+ }
117
+ /**
118
+ * Executes a webhook by its URL.
119
+ * @param webhookUrl Webhook URL to be triggered / executed (your hcloud domain + webhook.relativeUrl)
120
+ * @param payload Payload to be used in the event execution that will be triggered by the webhook, as JSON.
121
+ * @param headers (optional) Security headers.
122
+ */
123
+ executeWebhookByUrl(webhookUrl, payload, headers) {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ const h = {};
126
+ if (headers) {
127
+ Object.keys(headers).forEach((key) => {
128
+ h[key] = headers[key];
129
+ });
130
+ }
131
+ yield this.axios.post(this.getEndpoint(webhookUrl), payload, {
132
+ headers: h,
133
+ });
134
+ });
135
+ }
136
+ /**
137
+ * Respond to a webhook via callback.
138
+ * @param callbackURL Full or partial URL callback URL. This URL is unique per webhook execution
139
+ * @param status HTTP status code to send in the response
140
+ * @param headers (optional) HTTP headers to send in the response
141
+ * @param body (optional) Body to send in the HTTP response
142
+ */
143
+ respondToWebhook(callbackURL, status, headers, body) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ const url = callbackURL.startsWith("http") ? callbackURL : this.getEndpoint(callbackURL);
146
+ yield this.axios.post(url, { status, headers: headers !== null && headers !== void 0 ? headers : {}, body }, { headers: { "Content-Type": "application/json" } });
147
+ });
148
+ }
149
+ /**
150
+ * Validates the provided webhook URL by sending a challenge query parameter.
151
+ * @param url Webhook URL to be validated (your hcloud domain + webhook.relativeUrl)
152
+ * @param challenge String to be returned
153
+ * @returns The provided challenge string as plaint text
154
+ */
155
+ validateWebhookUrl(webhookUrl, challenge) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const resp = yield this.axios.get(this.getEndpoint(`${webhookUrl}?challenge=${challenge}`));
158
+ return resp.data;
159
+ });
160
+ }
161
+ getEndpoint(endpoint) {
162
+ return `${this.options.server}/api/high5${endpoint}`;
163
+ }
164
+ }
165
+ exports.High5Webhook = High5Webhook;
@@ -0,0 +1,16 @@
1
+ import Base from "../../../../../Base";
2
+ import { PaginatedResponse } from "../../../../../interfaces/global";
3
+ import { WebhookLog } from "../../../../../interfaces/high5/space/webhook";
4
+ export declare class High5WebhookLog extends Base {
5
+ /**
6
+ * Retrieves all Webhook logs for the specified Webhook.
7
+ * @param orgName Name of the Organization
8
+ * @param spaceName Name of the Space
9
+ * @param webhookId ID of the Webhook
10
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
11
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
12
+ * @returns Object containing an array of Webhook logs and the total number of results found in the database (independent of limit and page)
13
+ */
14
+ getWebhookLogs(orgName: string, spaceName: string, webhookId: string, limit?: number, page?: number): Promise<PaginatedResponse<WebhookLog>>;
15
+ protected getEndpoint(endpoint: string): string;
16
+ }
@@ -0,0 +1,37 @@
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.High5WebhookLog = void 0;
13
+ const Base_1 = require("../../../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
+ class High5WebhookLog extends Base_1.default {
16
+ /**
17
+ * Retrieves all Webhook logs for the specified Webhook.
18
+ * @param orgName Name of the Organization
19
+ * @param spaceName Name of the Space
20
+ * @param webhookId ID of the Webhook
21
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
22
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
23
+ * @returns Object containing an array of Webhook logs and the total number of results found in the database (independent of limit and page)
24
+ */
25
+ getWebhookLogs(orgName, spaceName, webhookId, limit, page) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ limit = limit || 25;
28
+ page = page || 0;
29
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}/logs?limit=${limit}&page=${page}`));
30
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
31
+ });
32
+ }
33
+ getEndpoint(endpoint) {
34
+ return `${this.options.server}/api/high5${endpoint}`;
35
+ }
36
+ }
37
+ exports.High5WebhookLog = High5WebhookLog;
@@ -0,0 +1,8 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../Base";
3
+ import { S3 } from "./s3";
4
+ export declare class High5Wave extends Base {
5
+ s3: S3;
6
+ constructor(options: Options, axios: AxiosInstance);
7
+ protected getEndpoint(endpoint: string): string;
8
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.High5Wave = void 0;
4
+ const Base_1 = require("../../../Base");
5
+ const s3_1 = require("./s3");
6
+ class High5Wave extends Base_1.default {
7
+ constructor(options, axios) {
8
+ super(options, axios);
9
+ this.s3 = new s3_1.S3(this.options, this.axios);
10
+ }
11
+ getEndpoint(endpoint) {
12
+ return `${this.options.server}/api/high5${endpoint}`;
13
+ }
14
+ }
15
+ exports.High5Wave = High5Wave;
@@ -0,0 +1,48 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../../Base";
3
+ import { Catalog, CatalogRegistry, Engine, EngineRegistry, StreamNodeSpecifications, StreamNodeSpecificationWrappedWithEngineVersion } from "../../../../interfaces/high5";
4
+ /**
5
+ * Class for reading the S3 bucket of a wave engine and catalogs
6
+ */
7
+ export declare class S3 extends Base {
8
+ constructor(options: Options, axios: AxiosInstance);
9
+ /**
10
+ * Get the registry.json of the default wave catalog from the S3 bucket
11
+ * @param waveBucketUrl Public base url to S3 bucket
12
+ * @returns registry.json
13
+ */
14
+ getCatalogRegistry(waveBucketUrl: string): Promise<CatalogRegistry>;
15
+ /**
16
+ * Get the registry.json of the default wave engine from the S3 bucket
17
+ * @param waveBucketUrl Public base url to S3 bucket
18
+ * @returns registry.json
19
+ */
20
+ getEngineRegistry(waveBucketUrl: string): Promise<EngineRegistry>;
21
+ /**
22
+ * Get the catalog.json from the S3 bucket
23
+ * @param catalogUrl Public url of the catalog
24
+ * @returns index.json of catalog
25
+ */
26
+ getCatalog(catalogUrl: string): Promise<Catalog>;
27
+ /**
28
+ * Get the catalog.json from the S3 bucket
29
+ * @param catalogUrl Public url of the catalog
30
+ * @returns index.json of catalog
31
+ */
32
+ getEngine(engineUrl: string): Promise<Engine>;
33
+ /**
34
+ * Get the node specifications of all nodes of a specific catalog version from the S3 bucket
35
+ * @param catalogUrl Public url of the catalog
36
+ * @param version The catalog version
37
+ * @returns StreamNodeSpecification[] | StreamNodeSpecificationWrappedWithEngineVersion an array of all node specification of that catalog version, maybe wrapped in an object with the engine version
38
+ */
39
+ getCatalogVersion(catalogUrl: string, version: string): Promise<StreamNodeSpecifications[] | StreamNodeSpecificationWrappedWithEngineVersion>;
40
+ /**
41
+ * Get the node documentation from the S3 bucket
42
+ * @param catalogUrl Public url of the catalog
43
+ * @param version The catalog version
44
+ * @returns string the markdown documentation of the node
45
+ */
46
+ getNodeDocumentation(catalogUrl: string, version: string, nodeName: string): Promise<string>;
47
+ protected getEndpoint(): string;
48
+ }