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
@@ -0,0 +1,201 @@
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.High5Job = 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("../../internal/space/job/log");
17
+ const log_2 = require("./log");
18
+ class High5Job extends Base_1.default {
19
+ get jobLog() {
20
+ if (this._jobLog === undefined) {
21
+ this._jobLog = new log_2.High5JobLog(this.options, this.axios);
22
+ }
23
+ return this._jobLog;
24
+ }
25
+ get jobLogInternal() {
26
+ if (this._jobLogInternal === undefined) {
27
+ this._jobLogInternal = new log_1.High5JobLogInternal(this.options, this.axios);
28
+ }
29
+ return this._jobLogInternal;
30
+ }
31
+ /**
32
+ * Retrieves a cronjob by it's ID.
33
+ * @param orgName Name of the organization
34
+ * @param spaceName Name of the High5 space
35
+ * @param jobId ID of the cronjob
36
+ * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
37
+ * @returns The requested cronjob
38
+ */
39
+ getJob(orgName_1, spaceName_1, jobId_1) {
40
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, jobId, exposeNextExecution = false, raw) {
41
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}?nextExecution=${exposeNextExecution}`));
42
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
43
+ });
44
+ }
45
+ /**
46
+ * Retrieves the next n cronjob executions as Unix timestamps (in milliseconds).
47
+ * @param orgName Name of the organization
48
+ * @param spaceName Name of the space
49
+ * @param jobId ID of the cronjob
50
+ * @returns Array of Unix timestamps
51
+ */
52
+ getNextCronjobExecutions(orgName, spaceName, jobId, raw) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/next`));
55
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
56
+ });
57
+ }
58
+ /**
59
+ * Creates a new cronjob in the specified High5 space.
60
+ * @param orgName Name of the organisation
61
+ * @param spaceName Name of the High5 space
62
+ * @param createJob Cronjob to be created
63
+ * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
64
+ * @returns Created cronjob
65
+ */
66
+ createJob(orgName_1, spaceName_1, createJob_1) {
67
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, createJob, exposeNextExecution = false, raw) {
68
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs?nextExecution=${exposeNextExecution}`), createJob);
69
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
70
+ });
71
+ }
72
+ /**
73
+ * Updates an existing cronjob.
74
+ * @param orgName Name of the organization
75
+ * @param spaceName Name of the space
76
+ * @param jobId ID of the cronjob
77
+ * @param createJob Cronjob to be updated
78
+ * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
79
+ * @returns Updated cronjob
80
+ */
81
+ updateJob(orgName_1, spaceName_1, jobId_1, createJob_1) {
82
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, jobId, createJob, exposeNextExecution = false, raw) {
83
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}?nextExecution=${exposeNextExecution}`), createJob);
84
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
85
+ });
86
+ }
87
+ /**
88
+ * Change the cron expression of an existing cronjob
89
+ * @param orgName Name of the organization
90
+ * @param spaceName Name of the space
91
+ * @param jobId ID of the cronjob
92
+ * @param expression New cron expression
93
+ * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
94
+ * @returns The patched cronjob
95
+ */
96
+ patchCronjobExpression(orgName_1, spaceName_1, jobId_1, expression_1) {
97
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, jobId, expression, exposeNextExecution = false, raw) {
98
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/expression?nextExecution=${exposeNextExecution}`), { expression: expression });
99
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
100
+ });
101
+ }
102
+ /**
103
+ * Change the enabled flag of an existing cronjob
104
+ * @param orgName Name of the organization
105
+ * @param spaceName Name of the space
106
+ * @param jobId ID of the cronjob
107
+ * @param enabled Boolean flag to set
108
+ * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
109
+ * @returns The patched cronjob
110
+ */
111
+ patchCronjobEnabled(orgName_1, spaceName_1, jobId_1, enabled_1) {
112
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, jobId, enabled, exposeNextExecution = false, raw) {
113
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/enabled?nextExecution=${exposeNextExecution}`), { enabled });
114
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
115
+ });
116
+ }
117
+ /**
118
+ * Enable a cronjob.
119
+ *
120
+ * This is a wrapper around patchCronjobEnabled.
121
+ *
122
+ * @param orgName Name of the organization
123
+ * @param spaceName Name of the space
124
+ * @param jobId ID of the cronjob
125
+ * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
126
+ * @returns The patched cronjob
127
+ */
128
+ enableCronjob(orgName, spaceName, jobId, exposeNextExecution = false, raw) {
129
+ return this.patchCronjobEnabled(orgName, spaceName, jobId, true, exposeNextExecution, raw);
130
+ }
131
+ /**
132
+ * Disable a cronjob.
133
+ *
134
+ * This is a wrapper around patchCronjobEnabled.
135
+ *
136
+ * @param orgName Name of the organization
137
+ * @param spaceName Name of the space
138
+ * @param jobId ID of the cronjob
139
+ * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
140
+ * @returns The patched cronjob
141
+ */
142
+ disableCronjob(orgName, spaceName, jobId, exposeNextExecution = false, raw) {
143
+ return this.patchCronjobEnabled(orgName, spaceName, jobId, false, exposeNextExecution, raw);
144
+ }
145
+ /**
146
+ * Deletes a cronjob by its ID
147
+ * @param orgName Name of the organization
148
+ * @param spaceName Name of the space
149
+ * @param jobId ID of the cronjob
150
+ */
151
+ deleteJob(orgName, spaceName, jobId, raw) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}`));
154
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
155
+ });
156
+ }
157
+ /**
158
+ * Retrieves all cronjobs of a High5 space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
159
+ * @param orgName Name of the organization
160
+ * @param spaceName Name of the space
161
+ * @param filters (optional) Array of search filters
162
+ * @param sorting (optional) Sorting object
163
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
164
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
165
+ * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the returned cronjob objects
166
+ * @returns Object containing an array of filtered cronjobs as well as the total number of results found in the database (independent of limit and page)
167
+ */
168
+ searchJobs(_a, raw_1) {
169
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, exposeNextExecution = false, }, raw) {
170
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
171
+ return new searchFilter_1.SearchFilterDTO(f);
172
+ });
173
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/search?limit=${limit}&page=${page}&nextExecution=${exposeNextExecution}`), {
174
+ filters: filtersDTO,
175
+ sorting,
176
+ });
177
+ 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));
178
+ });
179
+ }
180
+ /**
181
+ * Resolve a cron pattern along with a timezone to get the next executions in mili-seconds.
182
+ * @param expression The cron expression
183
+ * @param timezone The target IANA timezone
184
+ * @param amount The amount of returned execution-dates (limited between 1 and 10, default is 3)
185
+ * @returns Array of Unix timestamps
186
+ */
187
+ resolveCronPatternWithTimezone(expression_1, timezone_1) {
188
+ return __awaiter(this, arguments, void 0, function* (expression, timezone, amount = 3, raw) {
189
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/cron/resolve`), {
190
+ expression: expression,
191
+ timezone: timezone,
192
+ amount: amount,
193
+ });
194
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
195
+ });
196
+ }
197
+ getEndpoint(endpoint) {
198
+ return `${this.options.server}/api/high5${endpoint}`;
199
+ }
200
+ }
201
+ exports.High5Job = High5Job;
@@ -0,0 +1,35 @@
1
+ import Base, { MaybeRaw } from "../../../../../Base";
2
+ import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
3
+ import { JobLogDto } from "../../../../../interfaces/high5/space/job/JobLog";
4
+ export declare class High5JobLog extends Base {
5
+ /**
6
+ * Retrieves all cronjobs of a High5 space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
7
+ * @param orgName Name of the organization
8
+ * @param spaceName Name of the space
9
+ * @param jobId ID of the cronjob
10
+ * @param filters (optional) Array of search filters
11
+ * @param sorting (optional) Sorting object
12
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
13
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
14
+ * @returns Object containing an array of filtered cronjob logs as well as the total number of results found in the database (independent of limit and page)
15
+ */
16
+ searchJobLogs<R extends boolean = false>({ orgName, spaceName, jobId, filters, sorting, limit, page }: SearchParams & {
17
+ orgName: string;
18
+ spaceName: string;
19
+ jobId: string;
20
+ }, raw?: {
21
+ raw: R;
22
+ }): Promise<MaybeRaw<R, PaginatedResponse<JobLogDto>>>;
23
+ /**
24
+ * Retrieves a cronjob log by it's ID
25
+ * @param orgName Name of the organization
26
+ * @param spaceName Name of the space
27
+ * @param jobId ID of the cronjob
28
+ * @param jobLogId ID of the cronjob log
29
+ * @returns the cronjob log
30
+ */
31
+ getJobLog<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, jobLogId: string, raw?: {
32
+ raw: R;
33
+ }): Promise<MaybeRaw<R, JobLogDto>>;
34
+ protected getEndpoint(endpoint: string): string;
35
+ }
@@ -0,0 +1,58 @@
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.High5JobLog = void 0;
13
+ const Base_1 = require("../../../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
+ const searchFilter_1 = require("../../../../../helper/searchFilter");
16
+ class High5JobLog extends Base_1.default {
17
+ /**
18
+ * Retrieves all cronjobs of a High5 space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
19
+ * @param orgName Name of the organization
20
+ * @param spaceName Name of the space
21
+ * @param jobId ID of the cronjob
22
+ * @param filters (optional) Array of search filters
23
+ * @param sorting (optional) Sorting object
24
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
25
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
26
+ * @returns Object containing an array of filtered cronjob logs as well as the total number of results found in the database (independent of limit and page)
27
+ */
28
+ searchJobLogs(_a, raw_1) {
29
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, jobId, filters, sorting, limit = 25, page = 0 }, raw) {
30
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
31
+ return new searchFilter_1.SearchFilterDTO(f);
32
+ });
33
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/logs/search?page=${page}&limit=${limit}`), {
34
+ filters: filtersDTO,
35
+ sorting,
36
+ });
37
+ 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));
38
+ });
39
+ }
40
+ /**
41
+ * Retrieves a cronjob log by it's ID
42
+ * @param orgName Name of the organization
43
+ * @param spaceName Name of the space
44
+ * @param jobId ID of the cronjob
45
+ * @param jobLogId ID of the cronjob log
46
+ * @returns the cronjob log
47
+ */
48
+ getJobLog(orgName, spaceName, jobId, jobLogId, raw) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/logs/${jobLogId}`));
51
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
52
+ });
53
+ }
54
+ getEndpoint(endpoint) {
55
+ return `${this.options.server}/api/high5${endpoint}`;
56
+ }
57
+ }
58
+ exports.High5JobLog = High5JobLog;
@@ -1,4 +1,4 @@
1
- import Base from "../../../../Base";
1
+ import Base, { MaybeRaw } from "../../../../Base";
2
2
  import { Node, NodeCategory } from "../../../../interfaces/high5/space/event/stream/node";
3
3
  export default class High5Node extends Base {
4
4
  /**
@@ -9,7 +9,9 @@ export default class High5Node extends Base {
9
9
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
10
10
  * @returns Array containg the Nodes
11
11
  */
12
- getAllNodes(orgName: string, spaceName: string, limit?: number, page?: number): Promise<Node[]>;
12
+ getAllNodes<R extends boolean = false>(orgName: string, spaceName: string, limit?: number, page?: number, raw?: {
13
+ raw: R;
14
+ }): Promise<MaybeRaw<R, Node[]>>;
13
15
  /**
14
16
  * Retrieves a Node by its ID.
15
17
  * @param orgName Name of the organization
@@ -17,7 +19,9 @@ export default class High5Node extends Base {
17
19
  * @param nodeId Id of the Node
18
20
  * @returns The requested Node
19
21
  */
20
- getNode(orgName: string, spaceName: string, nodeId: string): Promise<Node>;
22
+ getNode<R extends boolean = false>(orgName: string, spaceName: string, nodeId: string, raw?: {
23
+ raw: R;
24
+ }): Promise<MaybeRaw<R, Node>>;
21
25
  /**
22
26
  * Adds a new Node to a stream.
23
27
  * @param orgName Name of the organization
@@ -27,14 +31,18 @@ export default class High5Node extends Base {
27
31
  * @param typescript Typescript code as a base64 string
28
32
  * @returns The created Node
29
33
  */
30
- createNode(orgName: string, spaceName: string, nodeCategory: NodeCategory, specification: string, typescript: string): Promise<Node>;
34
+ createNode<R extends boolean = false>(orgName: string, spaceName: string, nodeCategory: NodeCategory, specification: string, typescript: string, raw?: {
35
+ raw: R;
36
+ }): Promise<MaybeRaw<R, Node>>;
31
37
  /**
32
38
  * Deletes a Node by its ID
33
39
  * @param orgName Name of the organization
34
40
  * @param spaceName Name of the space
35
41
  * @param nodeId Id of the node
36
42
  */
37
- deleteNode(orgName: string, spaceName: string, nodeId: string): Promise<void>;
43
+ deleteNode<R extends boolean = false>(orgName: string, spaceName: string, nodeId: string, raw?: {
44
+ raw: R;
45
+ }): Promise<MaybeRaw<R, void>>;
38
46
  /**
39
47
  * Patches the Typescript code and specification of the Node.
40
48
  * @param orgName Name of the organization
@@ -45,14 +53,18 @@ export default class High5Node extends Base {
45
53
  * @param typescript (optional) Typescript code as a base64 string
46
54
  * @return The updated Node
47
55
  */
48
- patchNode(orgName: string, spaceName: string, nodeId: string, regenerateSecret: boolean, specification?: string, typescript?: string): Promise<Node>;
56
+ patchNode<R extends boolean = false>(orgName: string, spaceName: string, nodeId: string, regenerateSecret: boolean, specification?: string, typescript?: string, raw?: {
57
+ raw: R;
58
+ }): Promise<MaybeRaw<R, Node>>;
49
59
  /**
50
60
  * Retrieves the content (raw javascript code) of a Node.
51
61
  * @param orgName Name of the organization
52
62
  * @param spaceName Name of the space
53
63
  * @param secret Secret of the Node (a unique sha512 hash)
54
- * @rerurns Raw javascript representation of the Node's content
64
+ * @returns Raw javascript representation of the Node's content
55
65
  */
56
- getNodeContent(orgName: string, spaceName: string, secret: string): Promise<string>;
66
+ getNodeContent<R extends boolean = false>(orgName: string, spaceName: string, secret: string, raw?: {
67
+ raw: R;
68
+ }): Promise<MaybeRaw<R, string>>;
57
69
  protected getEndpoint(endpoint: string): string;
58
70
  }
@@ -19,12 +19,12 @@ class High5Node extends Base_1.default {
19
19
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
20
20
  * @returns Array containg the Nodes
21
21
  */
22
- getAllNodes(orgName, spaceName, limit, page) {
22
+ getAllNodes(orgName, spaceName, limit, page, raw) {
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
24
  limit = limit || 25;
25
25
  page = page || 0;
26
26
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes?page=${page}&limit=${limit}`));
27
- return resp.data;
27
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
28
28
  });
29
29
  }
30
30
  /**
@@ -34,10 +34,10 @@ class High5Node extends Base_1.default {
34
34
  * @param nodeId Id of the Node
35
35
  * @returns The requested Node
36
36
  */
37
- getNode(orgName, spaceName, nodeId) {
37
+ getNode(orgName, spaceName, nodeId, raw) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
39
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/${nodeId}`));
40
- return resp.data;
40
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
41
41
  });
42
42
  }
43
43
  /**
@@ -49,14 +49,14 @@ class High5Node extends Base_1.default {
49
49
  * @param typescript Typescript code as a base64 string
50
50
  * @returns The created Node
51
51
  */
52
- createNode(orgName, spaceName, nodeCategory, specification, typescript) {
52
+ createNode(orgName, spaceName, nodeCategory, specification, typescript, raw) {
53
53
  return __awaiter(this, void 0, void 0, function* () {
54
54
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes`), {
55
55
  category: nodeCategory,
56
56
  specification: specification,
57
57
  typescript: typescript,
58
58
  });
59
- return resp.data;
59
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
60
60
  });
61
61
  }
62
62
  /**
@@ -65,9 +65,10 @@ class High5Node extends Base_1.default {
65
65
  * @param spaceName Name of the space
66
66
  * @param nodeId Id of the node
67
67
  */
68
- deleteNode(orgName, spaceName, nodeId) {
68
+ deleteNode(orgName, spaceName, nodeId, raw) {
69
69
  return __awaiter(this, void 0, void 0, function* () {
70
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/${nodeId}`));
70
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/${nodeId}`));
71
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
71
72
  });
72
73
  }
73
74
  /**
@@ -80,7 +81,7 @@ class High5Node extends Base_1.default {
80
81
  * @param typescript (optional) Typescript code as a base64 string
81
82
  * @return The updated Node
82
83
  */
83
- patchNode(orgName, spaceName, nodeId, regenerateSecret, specification, typescript) {
84
+ patchNode(orgName, spaceName, nodeId, regenerateSecret, specification, typescript, raw) {
84
85
  return __awaiter(this, void 0, void 0, function* () {
85
86
  const patchNode = {
86
87
  specification: specification,
@@ -93,7 +94,7 @@ class High5Node extends Base_1.default {
93
94
  delete patchNode.typescript;
94
95
  }
95
96
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/${nodeId}?regenerateSecret=${regenerateSecret}`), patchNode);
96
- return resp.data;
97
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
97
98
  });
98
99
  }
99
100
  /**
@@ -101,12 +102,12 @@ class High5Node extends Base_1.default {
101
102
  * @param orgName Name of the organization
102
103
  * @param spaceName Name of the space
103
104
  * @param secret Secret of the Node (a unique sha512 hash)
104
- * @rerurns Raw javascript representation of the Node's content
105
+ * @returns Raw javascript representation of the Node's content
105
106
  */
106
- getNodeContent(orgName, spaceName, secret) {
107
+ getNodeContent(orgName, spaceName, secret, raw) {
107
108
  return __awaiter(this, void 0, void 0, function* () {
108
109
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/nodes/content/${secret}`));
109
- return resp.data;
110
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
110
111
  });
111
112
  }
112
113
  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 { Pool, PoolChange, PoolQueryOptions, PoolTargetPatch } from "../../../../interfaces/high5/space/pool";
5
5
  import { OrganizationMember } from "../../../../interfaces/idp";
@@ -13,7 +13,9 @@ export default class High5Pool extends Base {
13
13
  * @param name - Name of the pool
14
14
  * @returns Pool
15
15
  */
16
- getPool(orgName: string, spaceName: string, name: string): Promise<Pool>;
16
+ getPool<R extends boolean = false>(orgName: string, spaceName: string, name: string, raw?: {
17
+ raw: R;
18
+ }): Promise<MaybeRaw<R, Pool>>;
17
19
  /**
18
20
  * Replace a pool of a space
19
21
  *
@@ -24,7 +26,9 @@ export default class High5Pool extends Base {
24
26
  * @param targets - Execution targets that compromise the pool
25
27
  * @returns The new Pool
26
28
  */
27
- replacePool(orgName: string, spaceName: string, poolName: string, name: string, targets: string[]): Promise<PoolChange>;
29
+ replacePool<R extends boolean = false>(orgName: string, spaceName: string, poolName: string, name: string, targets: string[], raw?: {
30
+ raw: R;
31
+ }): Promise<MaybeRaw<R, PoolChange>>;
28
32
  /**
29
33
  * Patch a pool of a space
30
34
  *
@@ -35,7 +39,9 @@ export default class High5Pool extends Base {
35
39
  * @param targets - Execution targets that compromise the pool
36
40
  * @returns The patched Pool
37
41
  */
38
- patchPool(orgName: string, spaceName: string, poolName: string, name?: string, targets?: PoolTargetPatch): Promise<PoolChange>;
42
+ patchPool<R extends boolean = false>(orgName: string, spaceName: string, poolName: string, name?: string, targets?: PoolTargetPatch, raw?: {
43
+ raw: R;
44
+ }): Promise<MaybeRaw<R, PoolChange>>;
39
45
  /**
40
46
  * Delete a pool of a space
41
47
  *
@@ -43,7 +49,9 @@ export default class High5Pool extends Base {
43
49
  * @param spaceName - Name of the space
44
50
  * @param poolName - Name of the pool
45
51
  */
46
- deletePool(orgName: string, spaceName: string, poolName: string): Promise<void>;
52
+ deletePool<R extends boolean = false>(orgName: string, spaceName: string, poolName: string, raw?: {
53
+ raw: R;
54
+ }): Promise<MaybeRaw<R, Pool>>;
47
55
  /**
48
56
  * Retrieves all pools of a High5 Space which match the provided search filter(s). Will return all pools of the Space if no filter is provided.
49
57
  *
@@ -55,11 +63,13 @@ export default class High5Pool extends Base {
55
63
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
56
64
  * @returns Object containing an array of Pool and the total number of results found in the database (independent of limit and page)
57
65
  */
58
- searchPools({ orgName, spaceName, filters, sorting, options, limit, page, }: SearchParams & {
66
+ searchPools<R extends boolean = false>({ orgName, spaceName, filters, sorting, options, limit, page, }: SearchParams & {
59
67
  orgName: string;
60
68
  spaceName: string;
61
69
  options?: PoolQueryOptions;
62
- }): Promise<PaginatedResponse<Pool>>;
70
+ }, raw?: {
71
+ raw: R;
72
+ }): Promise<MaybeRaw<R, PaginatedResponse<Pool>>>;
63
73
  /**
64
74
  * Add a pool to a space
65
75
  *
@@ -69,13 +79,17 @@ export default class High5Pool extends Base {
69
79
  * @param targets - Execution targets that compromise the pool
70
80
  * @returns The created Pool
71
81
  */
72
- addPool(orgName: string, spaceName: string, name: string, targets: string[]): Promise<PoolChange>;
82
+ addPool<R extends boolean = false>(orgName: string, spaceName: string, name: string, targets: string[], raw?: {
83
+ raw: R;
84
+ }): Promise<MaybeRaw<R, PoolChange>>;
73
85
  /**
74
86
  * Retrieves all the pools the current user is assigned to as an execution target
75
87
  *
76
88
  * @returns Array of pools the user is assigned to as execution target
77
89
  */
78
- getPools(): Promise<Pool[]>;
90
+ getPools<R extends boolean = false>(raw?: {
91
+ raw: R;
92
+ }): Promise<MaybeRaw<R, Pool[]>>;
79
93
  /**
80
94
  * Retrieves all targets of a pool which match the provided search filter(s). Will return all targets of the pool if no filter is provided.
81
95
  *
@@ -88,10 +102,12 @@ export default class High5Pool extends Base {
88
102
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
89
103
  * @returns Object containing an array of OrganizationMember and the total number of results found in the database (independent of limit and page)
90
104
  */
91
- searchTargetsOfPool({ orgName, spaceName, poolName, filters, sorting, limit, page, }: SearchParams & {
105
+ searchTargetsOfPool<R extends boolean = false>({ orgName, spaceName, poolName, filters, sorting, limit, page, }: SearchParams & {
92
106
  orgName: string;
93
107
  spaceName: string;
94
108
  poolName: string;
95
- }): Promise<PaginatedResponse<OrganizationMember>>;
109
+ }, raw?: {
110
+ raw: R;
111
+ }): Promise<MaybeRaw<R, PaginatedResponse<OrganizationMember>>>;
96
112
  protected getEndpoint(endpoint: string): string;
97
113
  }