hcloud-sdk 16.0.0 → 18.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 (291) hide show
  1. package/changelog.md +178 -51
  2. package/lib/Base.d.ts +2 -1
  3. package/lib/Hcloud.d.ts +6 -0
  4. package/lib/Hcloud.js +18 -0
  5. package/lib/helper/ValidationHelper.d.ts +74 -0
  6. package/lib/helper/ValidationHelper.js +360 -0
  7. package/lib/interfaces/auditor/index.d.ts +17 -2
  8. package/lib/interfaces/auditor/index.js +12 -0
  9. package/lib/interfaces/cosmo/asset/index.d.ts +185 -0
  10. package/lib/interfaces/cosmo/asset/index.js +82 -0
  11. package/lib/interfaces/cosmo/comment/index.d.ts +38 -0
  12. package/lib/interfaces/cosmo/comment/index.js +8 -0
  13. package/lib/interfaces/cosmo/event/index.d.ts +31 -0
  14. package/lib/interfaces/cosmo/event/index.js +17 -0
  15. package/lib/interfaces/cosmo/location/index.d.ts +4 -0
  16. package/lib/interfaces/cosmo/location/index.js +2 -0
  17. package/lib/interfaces/cosmo/namespace/index.d.ts +9 -0
  18. package/lib/interfaces/cosmo/namespace/index.js +9 -0
  19. package/lib/interfaces/cosmo/permissions.d.ts +96 -0
  20. package/lib/interfaces/cosmo/permissions.js +58 -0
  21. package/lib/interfaces/cosmo/share/index.d.ts +28 -0
  22. package/lib/interfaces/cosmo/share/index.js +2 -0
  23. package/lib/interfaces/cosmo/space/index.d.ts +25 -0
  24. package/lib/interfaces/cosmo/space/index.js +2 -0
  25. package/lib/interfaces/cosmo/tag/tag.d.ts +12 -0
  26. package/lib/interfaces/cosmo/tag/tag.js +2 -0
  27. package/lib/interfaces/frontend/config/index.d.ts +1 -0
  28. package/lib/interfaces/fuse/space/index.d.ts +1 -0
  29. package/lib/interfaces/global/Products.d.ts +3 -1
  30. package/lib/interfaces/global/Products.js +2 -0
  31. package/lib/interfaces/global/Views.d.ts +2 -1
  32. package/lib/interfaces/global/Views.js +1 -0
  33. package/lib/interfaces/high5/execution/index.d.ts +23 -2
  34. package/lib/interfaces/high5/execution/index.js +2 -0
  35. package/lib/interfaces/high5/index.d.ts +7 -7
  36. package/lib/interfaces/high5/index.js +7 -7
  37. package/lib/interfaces/high5/space/database/document/index.d.ts +34 -0
  38. package/lib/interfaces/high5/space/database/document/index.js +14 -0
  39. package/lib/interfaces/high5/space/database/index.d.ts +12 -0
  40. package/lib/interfaces/high5/space/database/index.js +2 -0
  41. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +9 -2
  42. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +10 -2
  43. package/lib/interfaces/high5/space/event/stream/node/index.js +6 -1
  44. package/lib/interfaces/high5/space/execution/index.d.ts +56 -2
  45. package/lib/interfaces/high5/space/execution/index.js +8 -0
  46. package/lib/interfaces/high5/space/index.d.ts +2 -0
  47. package/lib/interfaces/high5/space/job/JobLog.d.ts +16 -0
  48. package/lib/interfaces/high5/space/job/JobLog.js +2 -0
  49. package/lib/interfaces/high5/space/job/index.d.ts +38 -0
  50. package/lib/interfaces/high5/space/job/index.js +8 -0
  51. package/lib/interfaces/high5/space/pool/index.d.ts +5 -7
  52. package/lib/interfaces/high5/space/pool/index.js +0 -7
  53. package/lib/interfaces/high5/space/webhook/index.d.ts +3 -1
  54. package/lib/interfaces/high5/stats.d.ts +21 -0
  55. package/lib/interfaces/high5/stats.js +2 -0
  56. package/lib/interfaces/high5/wave/index.d.ts +8 -3
  57. package/lib/interfaces/idp/index.d.ts +1 -0
  58. package/lib/interfaces/idp/index.js +1 -0
  59. package/lib/interfaces/idp/oauth/index.d.ts +4 -3
  60. package/lib/interfaces/idp/organization/index.d.ts +1 -0
  61. package/lib/interfaces/idp/organization/index.js +1 -0
  62. package/lib/interfaces/idp/organization/license/index.d.ts +13 -0
  63. package/lib/interfaces/idp/organization/member/index.d.ts +2 -0
  64. package/lib/interfaces/idp/organization/service-accounts.d.ts +8 -0
  65. package/lib/interfaces/idp/organization/service-accounts.js +2 -0
  66. package/lib/interfaces/idp/organization/stats.d.ts +7 -0
  67. package/lib/interfaces/idp/organization/stats.js +2 -0
  68. package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
  69. package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
  70. package/lib/interfaces/idp/user/GeneralSettings.js +1 -0
  71. package/lib/interfaces/idp/user/Message.d.ts +21 -0
  72. package/lib/interfaces/idp/user/Message.js +14 -0
  73. package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
  74. package/lib/interfaces/idp/user/Scopes.d.ts +8 -2
  75. package/lib/interfaces/idp/user/Scopes.js +9 -0
  76. package/lib/interfaces/idp/user/index.d.ts +2 -1
  77. package/lib/interfaces/mailer/index.d.ts +30 -1
  78. package/lib/interfaces/mailer/index.js +87 -1
  79. package/lib/interfaces/mothership/index.d.ts +3 -1
  80. package/lib/interfaces/mothership/index.js +15 -0
  81. package/lib/interfaces/mothership/stats.d.ts +4 -0
  82. package/lib/interfaces/mothership/stats.js +2 -0
  83. package/lib/interfaces/nats/index.d.ts +98 -9
  84. package/lib/interfaces/nats/index.js +136 -19
  85. package/lib/interfaces/shorts/index.d.ts +10 -0
  86. package/lib/interfaces/shorts/index.js +2 -0
  87. package/lib/service/agent/bundle/dev/index.d.ts +16 -6
  88. package/lib/service/agent/bundle/dev/index.js +12 -10
  89. package/lib/service/agent/bundle/index.d.ts +10 -4
  90. package/lib/service/agent/bundle/index.js +6 -6
  91. package/lib/service/agent/context/index.d.ts +26 -7
  92. package/lib/service/agent/context/index.js +27 -12
  93. package/lib/service/auditor/index.d.ts +8 -4
  94. package/lib/service/auditor/index.js +5 -5
  95. package/lib/service/auditor/internal/index.d.ts +27 -3
  96. package/lib/service/auditor/internal/index.js +34 -5
  97. package/lib/service/bouncer/features/index.d.ts +4 -2
  98. package/lib/service/bouncer/features/index.js +2 -2
  99. package/lib/service/cosmo/asset/index.d.ts +219 -0
  100. package/lib/service/cosmo/asset/index.js +314 -0
  101. package/lib/service/cosmo/comment/index.d.ts +122 -0
  102. package/lib/service/cosmo/comment/index.js +161 -0
  103. package/lib/service/cosmo/event/index.d.ts +23 -0
  104. package/lib/service/cosmo/event/index.js +40 -0
  105. package/lib/service/cosmo/folder/index.d.ts +27 -0
  106. package/lib/service/cosmo/folder/index.js +47 -0
  107. package/lib/service/cosmo/index.d.ts +49 -0
  108. package/lib/service/cosmo/index.js +119 -0
  109. package/lib/service/cosmo/internal/index.d.ts +7 -0
  110. package/lib/service/cosmo/internal/index.js +17 -0
  111. package/lib/service/cosmo/internal/space/index.d.ts +15 -0
  112. package/lib/service/cosmo/internal/space/index.js +34 -0
  113. package/lib/service/cosmo/location/index.d.ts +40 -0
  114. package/lib/service/cosmo/location/index.js +63 -0
  115. package/lib/service/cosmo/namespace/index.d.ts +42 -0
  116. package/lib/service/cosmo/namespace/index.js +65 -0
  117. package/lib/service/cosmo/organization/index.d.ts +47 -0
  118. package/lib/service/cosmo/organization/index.js +64 -0
  119. package/lib/service/cosmo/permissions/index.d.ts +131 -0
  120. package/lib/service/cosmo/permissions/index.js +181 -0
  121. package/lib/service/cosmo/production/index.d.ts +26 -0
  122. package/lib/service/cosmo/production/index.js +45 -0
  123. package/lib/service/cosmo/share/index.d.ts +161 -0
  124. package/lib/service/cosmo/share/index.js +215 -0
  125. package/lib/service/cosmo/space/index.d.ts +104 -0
  126. package/lib/service/cosmo/space/index.js +146 -0
  127. package/lib/service/cosmo/tag/index.d.ts +67 -0
  128. package/lib/service/cosmo/tag/index.js +93 -0
  129. package/lib/service/dali/DaliAvatar.d.ts +12 -0
  130. package/lib/service/dali/DaliAvatar.js +20 -0
  131. package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +32 -0
  132. package/lib/service/dali/avatar/DaliCosmoSpace.js +59 -0
  133. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +10 -4
  134. package/lib/service/dali/avatar/DaliFuseSpace.js +7 -6
  135. package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +10 -4
  136. package/lib/service/dali/avatar/DaliHigh5Pool.js +7 -6
  137. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +10 -4
  138. package/lib/service/dali/avatar/DaliHigh5Space.js +7 -6
  139. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +10 -4
  140. package/lib/service/dali/avatar/DaliOAuthApp.js +7 -6
  141. package/lib/service/dali/avatar/DaliOrganization.d.ts +10 -4
  142. package/lib/service/dali/avatar/DaliOrganization.js +7 -6
  143. package/lib/service/dali/avatar/DaliServiceAccount.d.ts +32 -0
  144. package/lib/service/dali/avatar/DaliServiceAccount.js +59 -0
  145. package/lib/service/dali/avatar/DaliTeam.d.ts +10 -4
  146. package/lib/service/dali/avatar/DaliTeam.js +7 -6
  147. package/lib/service/dali/avatar/DaliUser.d.ts +10 -4
  148. package/lib/service/dali/avatar/DaliUser.js +7 -6
  149. package/lib/service/dali/index.d.ts +4 -5
  150. package/lib/service/dali/index.js +2 -5
  151. package/lib/service/fuse/index.d.ts +4 -2
  152. package/lib/service/fuse/index.js +2 -2
  153. package/lib/service/fuse/internal/index.d.ts +4 -2
  154. package/lib/service/fuse/internal/index.js +3 -2
  155. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +4 -2
  156. package/lib/service/fuse/internal/space/cronjob/log/index.js +2 -2
  157. package/lib/service/fuse/internal/space/index.d.ts +7 -3
  158. package/lib/service/fuse/internal/space/index.js +6 -4
  159. package/lib/service/fuse/space/cronjob/index.d.ts +35 -13
  160. package/lib/service/fuse/space/cronjob/index.js +48 -50
  161. package/lib/service/fuse/space/cronjob/log/index.d.ts +8 -4
  162. package/lib/service/fuse/space/cronjob/log/index.js +5 -5
  163. package/lib/service/fuse/space/index.d.ts +27 -11
  164. package/lib/service/fuse/space/index.js +19 -18
  165. package/lib/service/high5/execution/index.d.ts +4 -2
  166. package/lib/service/high5/execution/index.js +3 -2
  167. package/lib/service/high5/execution/status/index.d.ts +5 -3
  168. package/lib/service/high5/execution/status/index.js +3 -3
  169. package/lib/service/high5/index.d.ts +7 -2
  170. package/lib/service/high5/index.js +9 -2
  171. package/lib/service/high5/internal/index.d.ts +4 -2
  172. package/lib/service/high5/internal/index.js +3 -2
  173. package/lib/service/high5/internal/space/index.d.ts +10 -3
  174. package/lib/service/high5/internal/space/index.js +13 -4
  175. package/lib/service/high5/internal/space/job/index.d.ts +7 -0
  176. package/lib/service/high5/internal/space/job/index.js +17 -0
  177. package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
  178. package/lib/service/high5/internal/space/job/log/index.js +34 -0
  179. package/lib/service/high5/joinToken/index.d.ts +14 -6
  180. package/lib/service/high5/joinToken/index.js +10 -9
  181. package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
  182. package/lib/service/high5/space/database/document/array/index.js +102 -0
  183. package/lib/service/high5/space/database/document/index.d.ts +74 -0
  184. package/lib/service/high5/space/database/document/index.js +112 -0
  185. package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
  186. package/lib/service/high5/space/database/document/number/index.js +77 -0
  187. package/lib/service/high5/space/database/index.d.ts +65 -0
  188. package/lib/service/high5/space/database/index.js +102 -0
  189. package/lib/service/high5/space/event/index.d.ts +17 -7
  190. package/lib/service/high5/space/event/index.js +12 -11
  191. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
  192. package/lib/service/high5/space/event/stream/design/DesignOperations.js +5 -3
  193. package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
  194. package/lib/service/high5/space/event/stream/design/index.js +7 -6
  195. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
  196. package/lib/service/high5/space/event/stream/design/snapshot/index.js +12 -10
  197. package/lib/service/high5/space/event/stream/index.d.ts +32 -12
  198. package/lib/service/high5/space/event/stream/index.js +22 -21
  199. package/lib/service/high5/space/execution/index.d.ts +22 -7
  200. package/lib/service/high5/space/execution/index.js +23 -12
  201. package/lib/service/high5/space/execution/log/index.d.ts +8 -4
  202. package/lib/service/high5/space/execution/log/index.js +5 -5
  203. package/lib/service/high5/space/execution/status/index.d.ts +18 -7
  204. package/lib/service/high5/space/execution/status/index.js +20 -8
  205. package/lib/service/high5/space/index.d.ts +56 -18
  206. package/lib/service/high5/space/index.js +65 -27
  207. package/lib/service/high5/space/job/index.d.ts +145 -0
  208. package/lib/service/high5/space/job/index.js +201 -0
  209. package/lib/service/high5/space/job/log/index.d.ts +35 -0
  210. package/lib/service/high5/space/job/log/index.js +58 -0
  211. package/lib/service/high5/space/node/index.d.ts +20 -8
  212. package/lib/service/high5/space/node/index.js +14 -13
  213. package/lib/service/high5/space/pool/index.d.ts +27 -11
  214. package/lib/service/high5/space/pool/index.js +19 -18
  215. package/lib/service/high5/space/secret/index.d.ts +17 -7
  216. package/lib/service/high5/space/secret/index.js +12 -11
  217. package/lib/service/high5/space/stat/index.d.ts +12 -0
  218. package/lib/service/high5/space/stat/index.js +31 -0
  219. package/lib/service/high5/space/wave/index.d.ts +16 -6
  220. package/lib/service/high5/space/wave/index.js +11 -10
  221. package/lib/service/high5/space/webhook/index.d.ts +32 -12
  222. package/lib/service/high5/space/webhook/index.js +25 -21
  223. package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
  224. package/lib/service/high5/space/webhook/log/index.js +2 -2
  225. package/lib/service/high5/stat/index.d.ts +11 -0
  226. package/lib/service/high5/stat/index.js +30 -0
  227. package/lib/service/high5/wave/s3/index.d.ts +31 -8
  228. package/lib/service/high5/wave/s3/index.js +52 -24
  229. package/lib/service/idp/guest/index.d.ts +42 -0
  230. package/lib/service/idp/guest/index.js +66 -0
  231. package/lib/service/idp/index.d.ts +25 -7
  232. package/lib/service/idp/index.js +23 -12
  233. package/lib/service/idp/internal/index.d.ts +5 -3
  234. package/lib/service/idp/internal/index.js +5 -3
  235. package/lib/service/idp/oauth/index.d.ts +16 -6
  236. package/lib/service/idp/oauth/index.js +15 -15
  237. package/lib/service/idp/organization/index.d.ts +25 -5
  238. package/lib/service/idp/organization/index.js +29 -8
  239. package/lib/service/idp/organization/license/index.d.ts +7 -3
  240. package/lib/service/idp/organization/license/index.js +4 -4
  241. package/lib/service/idp/organization/member/index.d.ts +21 -8
  242. package/lib/service/idp/organization/member/index.js +16 -13
  243. package/lib/service/idp/organization/member/invitations/index.d.ts +23 -9
  244. package/lib/service/idp/organization/member/invitations/index.js +72 -59
  245. package/lib/service/idp/organization/service-accounts/index.d.ts +76 -0
  246. package/lib/service/idp/organization/service-accounts/index.js +109 -0
  247. package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
  248. package/lib/service/idp/organization/settings/domain/index.js +9 -8
  249. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
  250. package/lib/service/idp/organization/settings/domain/saml/index.js +19 -18
  251. package/lib/service/idp/organization/settings/oauth/index.d.ts +23 -9
  252. package/lib/service/idp/organization/settings/oauth/index.js +16 -15
  253. package/lib/service/idp/organization/stat/index.d.ts +11 -0
  254. package/lib/service/idp/organization/stat/index.js +30 -0
  255. package/lib/service/idp/organization/team/index.d.ts +22 -10
  256. package/lib/service/idp/organization/team/index.js +14 -13
  257. package/lib/service/idp/registration/index.d.ts +10 -4
  258. package/lib/service/idp/registration/index.js +15 -9
  259. package/lib/service/idp/user/index.d.ts +33 -11
  260. package/lib/service/idp/user/index.js +30 -16
  261. package/lib/service/idp/user/license/index.d.ts +7 -3
  262. package/lib/service/idp/user/license/index.js +4 -4
  263. package/lib/service/idp/user/message/index.d.ts +61 -0
  264. package/lib/service/idp/user/message/index.js +92 -0
  265. package/lib/service/idp/user/password/index.d.ts +4 -2
  266. package/lib/service/idp/user/password/index.js +3 -3
  267. package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
  268. package/lib/service/idp/user/settings/connections/index.js +2 -2
  269. package/lib/service/idp/user/settings/general/index.d.ts +10 -4
  270. package/lib/service/idp/user/settings/general/index.js +6 -6
  271. package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
  272. package/lib/service/idp/user/settings/notifications/index.js +4 -4
  273. package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
  274. package/lib/service/idp/user/settings/oauthApps/index.js +6 -5
  275. package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
  276. package/lib/service/idp/user/settings/pats/index.js +17 -15
  277. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
  278. package/lib/service/idp/user/settings/twoFactor/totp/index.js +13 -10
  279. package/lib/service/mailer/index.d.ts +4 -2
  280. package/lib/service/mailer/index.js +2 -2
  281. package/lib/service/mailer/internal/index.d.ts +13 -5
  282. package/lib/service/mailer/internal/index.js +8 -8
  283. package/lib/service/mothership/index.d.ts +35 -13
  284. package/lib/service/mothership/index.js +32 -18
  285. package/lib/service/nats/index.js +58 -44
  286. package/lib/service/shorts/index.d.ts +18 -0
  287. package/lib/service/shorts/index.js +38 -0
  288. package/lib/service/shorts/internal/index.d.ts +72 -0
  289. package/lib/service/shorts/internal/index.js +104 -0
  290. package/lib/utils/bouncer/features/Provider.js +0 -3
  291. package/package.json +22 -24
@@ -24,10 +24,10 @@ class High5Pool extends Base_1.default {
24
24
  * @param name - Name of the pool
25
25
  * @returns Pool
26
26
  */
27
- getPool(orgName, spaceName, name) {
27
+ getPool(orgName, spaceName, name, raw) {
28
28
  return __awaiter(this, void 0, void 0, function* () {
29
29
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${name}`));
30
- return resp.data;
30
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
31
31
  });
32
32
  }
33
33
  /**
@@ -40,13 +40,13 @@ class High5Pool extends Base_1.default {
40
40
  * @param targets - Execution targets that compromise the pool
41
41
  * @returns The new Pool
42
42
  */
43
- replacePool(orgName, spaceName, poolName, name, targets) {
43
+ replacePool(orgName, spaceName, poolName, name, targets, raw) {
44
44
  return __awaiter(this, void 0, void 0, function* () {
45
45
  const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${poolName}`), {
46
46
  name,
47
47
  targets,
48
48
  });
49
- return resp.data;
49
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
50
50
  });
51
51
  }
52
52
  /**
@@ -59,7 +59,7 @@ class High5Pool extends Base_1.default {
59
59
  * @param targets - Execution targets that compromise the pool
60
60
  * @returns The patched Pool
61
61
  */
62
- patchPool(orgName, spaceName, poolName, name, targets) {
62
+ patchPool(orgName, spaceName, poolName, name, targets, raw) {
63
63
  return __awaiter(this, void 0, void 0, function* () {
64
64
  if (name === undefined && targets === undefined) {
65
65
  throw new Error("unable to patch pool when there are no arguments to send");
@@ -68,7 +68,7 @@ class High5Pool extends Base_1.default {
68
68
  name,
69
69
  targets,
70
70
  });
71
- return resp.data;
71
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
72
72
  });
73
73
  }
74
74
  /**
@@ -78,9 +78,10 @@ class High5Pool extends Base_1.default {
78
78
  * @param spaceName - Name of the space
79
79
  * @param poolName - Name of the pool
80
80
  */
81
- deletePool(orgName, spaceName, poolName) {
81
+ deletePool(orgName, spaceName, poolName, raw) {
82
82
  return __awaiter(this, void 0, void 0, function* () {
83
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${poolName}`));
83
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${poolName}`));
84
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
84
85
  });
85
86
  }
86
87
  /**
@@ -94,8 +95,8 @@ class High5Pool extends Base_1.default {
94
95
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
95
96
  * @returns Object containing an array of Pool and the total number of results found in the database (independent of limit and page)
96
97
  */
97
- searchPools(_a) {
98
- return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, options, limit = 25, page = 0, }) {
98
+ searchPools(_a, raw_1) {
99
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, options, limit = 25, page = 0, }, raw) {
99
100
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
100
101
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/search`), {
101
102
  filters: filtersDTO,
@@ -108,7 +109,7 @@ class High5Pool extends Base_1.default {
108
109
  targetsSample: options === null || options === void 0 ? void 0 : options.getTargetsSample,
109
110
  },
110
111
  });
111
- return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
112
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
112
113
  });
113
114
  }
114
115
  /**
@@ -120,10 +121,10 @@ class High5Pool extends Base_1.default {
120
121
  * @param targets - Execution targets that compromise the pool
121
122
  * @returns The created Pool
122
123
  */
123
- addPool(orgName, spaceName, name, targets) {
124
+ addPool(orgName, spaceName, name, targets, raw) {
124
125
  return __awaiter(this, void 0, void 0, function* () {
125
126
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools`), { name, targets });
126
- return resp.data;
127
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
127
128
  });
128
129
  }
129
130
  /**
@@ -131,10 +132,10 @@ class High5Pool extends Base_1.default {
131
132
  *
132
133
  * @returns Array of pools the user is assigned to as execution target
133
134
  */
134
- getPools() {
135
+ getPools(raw) {
135
136
  return __awaiter(this, void 0, void 0, function* () {
136
137
  const resp = yield this.axios.get(this.getEndpoint("/v1/pools"));
137
- return resp.data;
138
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
138
139
  });
139
140
  }
140
141
  /**
@@ -149,8 +150,8 @@ class High5Pool extends Base_1.default {
149
150
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
150
151
  * @returns Object containing an array of OrganizationMember and the total number of results found in the database (independent of limit and page)
151
152
  */
152
- searchTargetsOfPool(_a) {
153
- return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, poolName, filters, sorting, limit = 25, page = 0, }) {
153
+ searchTargetsOfPool(_a, raw_1) {
154
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, poolName, filters, sorting, limit = 25, page = 0, }, raw) {
154
155
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
155
156
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${poolName}/targets/search`), {
156
157
  filters: filtersDTO,
@@ -161,7 +162,7 @@ class High5Pool extends Base_1.default {
161
162
  limit,
162
163
  },
163
164
  });
164
- return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
165
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
165
166
  });
166
167
  }
167
168
  getEndpoint(endpoint) {
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../../Base";
2
+ import Base, { MaybeRaw, Options } from "../../../../Base";
3
3
  import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
4
4
  import { CreateSecret, Secret, UpdateSecret } from "../../../../interfaces/high5/space/secret";
5
5
  export default class High5Secret extends Base {
@@ -17,10 +17,12 @@ export default class High5Secret extends Base {
17
17
  * @param encrypted - (optional) Whether to get all secret values only in encrypted form.
18
18
  * @returns Object containing an array of secret keys as well as the total number of results found in the database (independent of limit and page)
19
19
  */
20
- searchSecrets({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
20
+ searchSecrets<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
21
21
  orgName: string;
22
22
  spaceName: string;
23
- }): Promise<PaginatedResponse<Secret>>;
23
+ }, raw?: {
24
+ raw: R;
25
+ }): Promise<MaybeRaw<R, PaginatedResponse<Secret>>>;
24
26
  /**
25
27
  * Adds a secret key-value pair to a space.
26
28
  * @param orgName - Name of the organization
@@ -30,7 +32,9 @@ export default class High5Secret extends Base {
30
32
  * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
31
33
  * @returns The created Secret
32
34
  */
33
- addSecret(orgName: string, spaceName: string, secret: CreateSecret): Promise<Secret>;
35
+ addSecret<R extends boolean = false>(orgName: string, spaceName: string, secret: CreateSecret, raw?: {
36
+ raw: R;
37
+ }): Promise<MaybeRaw<R, Secret>>;
34
38
  /**
35
39
  * Updates the value for an existent secret key-value pair.
36
40
  * @param orgName - Name of the organization
@@ -40,14 +44,18 @@ export default class High5Secret extends Base {
40
44
  * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
41
45
  * @returns The updated Secret
42
46
  */
43
- updateSecret(orgName: string, spaceName: string, key: string, secret: UpdateSecret): Promise<Secret>;
47
+ updateSecret<R extends boolean = false>(orgName: string, spaceName: string, key: string, secret: UpdateSecret, raw?: {
48
+ raw: R;
49
+ }): Promise<MaybeRaw<R, Secret>>;
44
50
  /**
45
51
  * Deletes a key-value pair of the space
46
52
  * @param orgName - Name of the organization
47
53
  * @param spaceName - Name of the space
48
54
  * @param key - Key of the key-value pair
49
55
  */
50
- deleteSecret(orgName: string, spaceName: string, key: string): Promise<void>;
56
+ deleteSecret<R extends boolean = false>(orgName: string, spaceName: string, key: string, raw?: {
57
+ raw: R;
58
+ }): Promise<MaybeRaw<R, void>>;
51
59
  /**
52
60
  * Get secret value by its key
53
61
  * @param orgName - Name of the organization
@@ -55,6 +63,8 @@ export default class High5Secret extends Base {
55
63
  * @param key - Key of the key-value pair
56
64
  * @returns Secret details
57
65
  */
58
- getSecret(orgName: string, spaceName: string, key: string): Promise<Secret>;
66
+ getSecret<R extends boolean = false>(orgName: string, spaceName: string, key: string, raw?: {
67
+ raw: R;
68
+ }): Promise<MaybeRaw<R, Secret>>;
59
69
  protected getEndpoint(endpoint: string): string;
60
70
  }
@@ -29,8 +29,8 @@ class High5Secret extends Base_1.default {
29
29
  * @param encrypted - (optional) Whether to get all secret values only in encrypted form.
30
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
31
  */
32
- searchSecrets(_a) {
33
- return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
32
+ searchSecrets(_a, raw_1) {
33
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
34
34
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
35
35
  return new searchFilter_1.SearchFilterDTO(f);
36
36
  });
@@ -38,7 +38,7 @@ class High5Secret extends Base_1.default {
38
38
  filters: filtersDTO,
39
39
  sorting,
40
40
  });
41
- return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
41
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
42
42
  });
43
43
  }
44
44
  /**
@@ -50,10 +50,10 @@ class High5Secret extends Base_1.default {
50
50
  * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
51
51
  * @returns The created Secret
52
52
  */
53
- addSecret(orgName, spaceName, secret) {
53
+ addSecret(orgName, spaceName, secret, raw) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
55
55
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets`), secret);
56
- return resp.data;
56
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
57
57
  });
58
58
  }
59
59
  /**
@@ -65,10 +65,10 @@ class High5Secret extends Base_1.default {
65
65
  * @param encrypted - (optional) Boolean defining if the value should be stored encrypted (defaults to false).
66
66
  * @returns The updated Secret
67
67
  */
68
- updateSecret(orgName, spaceName, key, secret) {
68
+ updateSecret(orgName, spaceName, key, secret, raw) {
69
69
  return __awaiter(this, void 0, void 0, function* () {
70
70
  const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`), secret);
71
- return resp.data;
71
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
72
72
  });
73
73
  }
74
74
  /**
@@ -77,9 +77,10 @@ class High5Secret extends Base_1.default {
77
77
  * @param spaceName - Name of the space
78
78
  * @param key - Key of the key-value pair
79
79
  */
80
- deleteSecret(orgName, spaceName, key) {
80
+ deleteSecret(orgName, spaceName, key, raw) {
81
81
  return __awaiter(this, void 0, void 0, function* () {
82
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`));
82
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`));
83
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
83
84
  });
84
85
  }
85
86
  /**
@@ -89,10 +90,10 @@ class High5Secret extends Base_1.default {
89
90
  * @param key - Key of the key-value pair
90
91
  * @returns Secret details
91
92
  */
92
- getSecret(orgName, spaceName, key) {
93
+ getSecret(orgName, spaceName, key, raw) {
93
94
  return __awaiter(this, void 0, void 0, function* () {
94
95
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/secrets/${key}`));
95
- return resp.data;
96
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
96
97
  });
97
98
  }
98
99
  getEndpoint(endpoint) {
@@ -0,0 +1,12 @@
1
+ import Base from "../../../../Base";
2
+ import { Stats } from "../../../../interfaces/high5/stats";
3
+ export declare class High5SpaceStat extends Base {
4
+ /**
5
+ * Retrieves usage statistics for a specific space.
6
+ * @param orgName Name of the organization
7
+ * @param spaceName Name of the space
8
+ * @returns Statistics information
9
+ */
10
+ getStats(orgName: string, spaceName: string): Promise<Stats>;
11
+ protected getEndpoint(endpoint: string): string;
12
+ }
@@ -0,0 +1,31 @@
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.High5SpaceStat = void 0;
13
+ const Base_1 = require("../../../../Base");
14
+ class High5SpaceStat extends Base_1.default {
15
+ /**
16
+ * Retrieves usage statistics for a specific space.
17
+ * @param orgName Name of the organization
18
+ * @param spaceName Name of the space
19
+ * @returns Statistics information
20
+ */
21
+ getStats(orgName, spaceName) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const resp = yield this.axios.get(this.getEndpoint(`/org/${orgName}/spaces/${spaceName}/stats`));
24
+ return resp.data;
25
+ });
26
+ }
27
+ getEndpoint(endpoint) {
28
+ return `${this.options.server}/api/high5/v1${endpoint}`;
29
+ }
30
+ }
31
+ exports.High5SpaceStat = High5SpaceStat;
@@ -1,4 +1,4 @@
1
- import Base from "../../../../Base";
1
+ import Base, { MaybeRaw } from "../../../../Base";
2
2
  import { SpacePatchWaveCatalog, SpacePatchWaveEngine, WaveCatalog, WaveEngine } from "../../../../interfaces/high5";
3
3
  export default class High5Wave extends Base {
4
4
  /**
@@ -8,14 +8,18 @@ export default class High5Wave extends Base {
8
8
  * @param spacePatchWaveEngine - Patch wave engine object holding url and version
9
9
  * @returns WaveEngine object
10
10
  */
11
- patchSpaceWaveEngine(orgName: string, spaceName: string, spacePatchWaveEngine: SpacePatchWaveEngine): Promise<WaveEngine>;
11
+ patchSpaceWaveEngine<R extends boolean = false>(orgName: string, spaceName: string, spacePatchWaveEngine: SpacePatchWaveEngine, raw?: {
12
+ raw: R;
13
+ }): Promise<MaybeRaw<R, WaveEngine>>;
12
14
  /**
13
15
  * Get wave engine version currently active for the space
14
16
  * @param orgName - Name of the organization
15
17
  * @param spaceName - Name of the space
16
18
  * @returns WaveEngine object
17
19
  */
18
- getSpaceWaveEngine(orgName: string, spaceName: string): Promise<WaveEngine>;
20
+ getSpaceWaveEngine<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
21
+ raw: R;
22
+ }): Promise<MaybeRaw<R, WaveEngine>>;
19
23
  /**
20
24
  * Adds a new wave catalog version for a space or updates existing
21
25
  * @param orgName - Name of the organization
@@ -23,14 +27,20 @@ export default class High5Wave extends Base {
23
27
  * @param spacePatchWaveCatalog - Patch wave catalog object holding url, version and optionally a minimumEngineVersion
24
28
  * @returns WaveCatalog object
25
29
  */
26
- addUpdateSpaceWaveCatalog(orgName: string, spaceName: string, spacePatchCatalog: SpacePatchWaveCatalog): Promise<WaveCatalog>;
30
+ addUpdateSpaceWaveCatalog<R extends boolean = false>(orgName: string, spaceName: string, spacePatchCatalog: SpacePatchWaveCatalog, raw?: {
31
+ raw: R;
32
+ }): Promise<MaybeRaw<R, WaveCatalog>>;
27
33
  /**
28
34
  * Get wave catalogs currently active for the space
29
35
  * @param orgName - Name of the organization
30
36
  * @param spaceName - Name of the space
31
37
  * @returns WaveCatalog array
32
38
  */
33
- getSpaceWaveCatalogs(orgName: string, spaceName: string): Promise<WaveCatalog[]>;
34
- deleteSpaceWaveCatalog(orgName: string, spaceName: string, catalogId: string): Promise<void>;
39
+ getSpaceWaveCatalogs<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
40
+ raw: R;
41
+ }): Promise<MaybeRaw<R, WaveCatalog[]>>;
42
+ deleteSpaceWaveCatalog<R extends boolean = false>(orgName: string, spaceName: string, catalogId: string, raw?: {
43
+ raw: R;
44
+ }): Promise<MaybeRaw<R, void>>;
35
45
  protected getEndpoint(endpoint: string): string;
36
46
  }
@@ -18,10 +18,10 @@ class High5Wave extends Base_1.default {
18
18
  * @param spacePatchWaveEngine - Patch wave engine object holding url and version
19
19
  * @returns WaveEngine object
20
20
  */
21
- patchSpaceWaveEngine(orgName, spaceName, spacePatchWaveEngine) {
21
+ patchSpaceWaveEngine(orgName, spaceName, spacePatchWaveEngine, raw) {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
23
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/engine`), spacePatchWaveEngine);
24
- return resp.data;
24
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
25
25
  });
26
26
  }
27
27
  /**
@@ -30,10 +30,10 @@ class High5Wave extends Base_1.default {
30
30
  * @param spaceName - Name of the space
31
31
  * @returns WaveEngine object
32
32
  */
33
- getSpaceWaveEngine(orgName, spaceName) {
33
+ getSpaceWaveEngine(orgName, spaceName, raw) {
34
34
  return __awaiter(this, void 0, void 0, function* () {
35
35
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/engine`));
36
- return resp.data;
36
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
37
37
  });
38
38
  }
39
39
  /**
@@ -43,10 +43,10 @@ class High5Wave extends Base_1.default {
43
43
  * @param spacePatchWaveCatalog - Patch wave catalog object holding url, version and optionally a minimumEngineVersion
44
44
  * @returns WaveCatalog object
45
45
  */
46
- addUpdateSpaceWaveCatalog(orgName, spaceName, spacePatchCatalog) {
46
+ addUpdateSpaceWaveCatalog(orgName, spaceName, spacePatchCatalog, raw) {
47
47
  return __awaiter(this, void 0, void 0, function* () {
48
48
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog`), spacePatchCatalog);
49
- return resp.data;
49
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
50
50
  });
51
51
  }
52
52
  /**
@@ -55,15 +55,16 @@ class High5Wave extends Base_1.default {
55
55
  * @param spaceName - Name of the space
56
56
  * @returns WaveCatalog array
57
57
  */
58
- getSpaceWaveCatalogs(orgName, spaceName) {
58
+ getSpaceWaveCatalogs(orgName, spaceName, raw) {
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
60
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog`));
61
- return resp.data;
61
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
62
62
  });
63
63
  }
64
- deleteSpaceWaveCatalog(orgName, spaceName, catalogId) {
64
+ deleteSpaceWaveCatalog(orgName, spaceName, catalogId, raw) {
65
65
  return __awaiter(this, void 0, void 0, function* () {
66
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog/${catalogId}`));
66
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog/${catalogId}`));
67
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
67
68
  });
68
69
  }
69
70
  getEndpoint(endpoint) {
@@ -1,4 +1,4 @@
1
- import Base from "../../../../Base";
1
+ import Base, { MaybeRaw } from "../../../../Base";
2
2
  import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
3
3
  import { KeyValuePair, Webhook, WebhookCreate, WebhookUpdate } from "../../../../interfaces/high5/space/webhook";
4
4
  import { High5WebhookLog } from "./log";
@@ -15,10 +15,12 @@ export declare class High5Webhook extends Base {
15
15
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
16
16
  * @returns Object containing an array of Webhooks and the total number of results found in the database (independent of limit and page)
17
17
  */
18
- searchWebhooks({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
18
+ searchWebhooks<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
19
19
  orgName: string;
20
20
  spaceName: string;
21
- }): Promise<PaginatedResponse<Webhook>>;
21
+ }, raw?: {
22
+ raw: R;
23
+ }): Promise<MaybeRaw<R, PaginatedResponse<Webhook>>>;
22
24
  /**
23
25
  * Requests a Webhhok by its ID.
24
26
  * @param orgName Name of the Organization
@@ -26,7 +28,9 @@ export declare class High5Webhook extends Base {
26
28
  * @param webhookId ID of the Webhook
27
29
  * @returns The requested Webhook
28
30
  */
29
- getWebhook(orgName: string, spaceName: string, webhookId: string): Promise<Webhook>;
31
+ getWebhook<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, raw?: {
32
+ raw: R;
33
+ }): Promise<MaybeRaw<R, Webhook>>;
30
34
  /**
31
35
  * Generates a new URL for the specified Webhook. This is suggested if a leak of the current URL is likely.
32
36
  * @param orgName Name of the Organization
@@ -34,7 +38,9 @@ export declare class High5Webhook extends Base {
34
38
  * @param webhookId ID of the Webhook
35
39
  * @returns The updated Webhook
36
40
  */
37
- regenerateWebhookUrl(orgName: string, spaceName: string, webhookId: string): Promise<Webhook>;
41
+ regenerateWebhookUrl<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, raw?: {
42
+ raw: R;
43
+ }): Promise<MaybeRaw<R, Webhook>>;
38
44
  /**
39
45
  * Creates a new Webhook in the specified High5 space.
40
46
  * @param orgName Name of the Organization
@@ -42,7 +48,9 @@ export declare class High5Webhook extends Base {
42
48
  * @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the new webhook
43
49
  * @returns The created Webhook
44
50
  */
45
- createWebhook(orgName: string, spaceName: string, WebhookCreate: WebhookCreate): Promise<Webhook>;
51
+ createWebhook<R extends boolean = false>(orgName: string, spaceName: string, WebhookCreate: WebhookCreate, raw?: {
52
+ raw: R;
53
+ }): Promise<MaybeRaw<R, Webhook>>;
46
54
  /**
47
55
  * Updates an existing Webhook.
48
56
  * @param orgName Name of the Organization
@@ -51,26 +59,34 @@ export declare class High5Webhook extends Base {
51
59
  * @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the updated webhook
52
60
  * @returns the updated Webhook
53
61
  */
54
- updateWebhook(orgName: string, spaceName: string, webhookId: string, webhookUpdate: WebhookUpdate): Promise<Webhook>;
62
+ updateWebhook<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, webhookUpdate: WebhookUpdate, raw?: {
63
+ raw: R;
64
+ }): Promise<MaybeRaw<R, Webhook>>;
55
65
  /**
56
66
  * Deletes a Webhook by its ID.
57
67
  * @param orgName Name of the Organization
58
68
  * @param spaceName Name of the Space
59
69
  * @param webhookId ID of the webhook to be deleted
60
70
  */
61
- deleteWebhook(orgName: string, spaceName: string, webhookId: string): Promise<void>;
71
+ deleteWebhook<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, raw?: {
72
+ raw: R;
73
+ }): Promise<MaybeRaw<R, Webhook[]>>;
62
74
  /**
63
75
  * Executes all Events and Streams connected to the specified Webhook.
64
76
  * @param webhookUrl URL of the webhook to be triggered / executed
65
77
  */
66
- triggerWebhook(webhookUrl: string): Promise<void>;
78
+ triggerWebhook<R extends boolean = false>(webhookUrl: string, raw?: {
79
+ raw: R;
80
+ }): Promise<MaybeRaw<R, void>>;
67
81
  /**
68
82
  * Executes a webhook by its URL.
69
83
  * @param webhookUrl Webhook URL to be triggered / executed (your hcloud domain + webhook.relativeUrl)
70
84
  * @param payload Payload to be used in the event execution that will be triggered by the webhook, as JSON.
71
85
  * @param headers (optional) Security headers.
72
86
  */
73
- executeWebhookByUrl(webhookUrl: string, payload: unknown, headers?: KeyValuePair<string>): Promise<void>;
87
+ executeWebhookByUrl<R extends boolean = false>(webhookUrl: string, payload: unknown, headers?: KeyValuePair<string>, raw?: {
88
+ raw: R;
89
+ }): Promise<MaybeRaw<R, void>>;
74
90
  /**
75
91
  * Respond to a webhook via callback.
76
92
  * @param callbackURL Full or partial URL callback URL. This URL is unique per webhook execution
@@ -78,13 +94,17 @@ export declare class High5Webhook extends Base {
78
94
  * @param headers (optional) HTTP headers to send in the response
79
95
  * @param body (optional) Body to send in the HTTP response
80
96
  */
81
- respondToWebhook(callbackURL: string, status: number, headers?: Record<string, string | string[]>, body?: string): Promise<void>;
97
+ respondToWebhook<R extends boolean = false>(callbackURL: string, status: number, headers?: Record<string, string | string[]>, body?: string, raw?: {
98
+ raw: R;
99
+ }): Promise<MaybeRaw<R, void>>;
82
100
  /**
83
101
  * Validates the provided webhook URL by sending a challenge query parameter.
84
102
  * @param url Webhook URL to be validated (your hcloud domain + webhook.relativeUrl)
85
103
  * @param challenge String to be returned
86
104
  * @returns The provided challenge string as plaint text
87
105
  */
88
- validateWebhookUrl(webhookUrl: string, challenge: string): Promise<string>;
106
+ validateWebhookUrl<R extends boolean = false>(webhookUrl: string, challenge: string, raw?: {
107
+ raw: R;
108
+ }): Promise<MaybeRaw<R, string>>;
89
109
  protected getEndpoint(endpoint: string): string;
90
110
  }