hcloud-sdk 18.0.0 → 19.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 (223) hide show
  1. package/changelog.md +86 -175
  2. package/lib/Hcloud.d.ts +18 -3
  3. package/lib/Hcloud.js +113 -21
  4. package/lib/helper/ErrorHelper.js +5 -2
  5. package/lib/helper/ValidationHelper.d.ts +6 -4
  6. package/lib/helper/ValidationHelper.js +30 -18
  7. package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
  8. package/lib/interfaces/agent/logging/index.d.ts +2 -0
  9. package/lib/interfaces/{fuse → agent/logging}/index.js +2 -3
  10. package/lib/interfaces/agent/logging/log-collector.d.ts +35 -0
  11. package/lib/interfaces/agent/logging/log-collector.js +2 -0
  12. package/lib/interfaces/agent/module/index.d.ts +7 -0
  13. package/lib/interfaces/agent/module/index.js +2 -0
  14. package/lib/interfaces/auditor/index.d.ts +0 -1
  15. package/lib/interfaces/auditor/index.js +0 -1
  16. package/lib/interfaces/axios/index.d.ts +5 -0
  17. package/lib/interfaces/cosmo/asset/index.d.ts +40 -9
  18. package/lib/interfaces/cosmo/asset/index.js +9 -1
  19. package/lib/interfaces/cosmo/comment/index.d.ts +4 -1
  20. package/lib/interfaces/cosmo/event/index.d.ts +34 -5
  21. package/lib/interfaces/cosmo/event/index.js +16 -2
  22. package/lib/interfaces/cosmo/share/index.d.ts +89 -7
  23. package/lib/interfaces/cosmo/share/index.js +21 -0
  24. package/lib/interfaces/cosmo/space/index.d.ts +6 -0
  25. package/lib/interfaces/cosmo/stats/index.d.ts +11 -0
  26. package/lib/interfaces/cosmo/stats/index.js +2 -0
  27. package/lib/interfaces/cosmo/tag/tag.d.ts +2 -1
  28. package/lib/interfaces/global/Products.d.ts +0 -1
  29. package/lib/interfaces/global/Products.js +0 -1
  30. package/lib/interfaces/global/Views.d.ts +0 -1
  31. package/lib/interfaces/global/Views.js +0 -1
  32. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
  33. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
  34. package/lib/interfaces/high5/space/execution/index.d.ts +1 -0
  35. package/lib/interfaces/high5/space/job/index.d.ts +64 -19
  36. package/lib/interfaces/high5/space/job/index.js +9 -6
  37. package/lib/interfaces/high5/wave/dependentInputs.d.ts +42 -0
  38. package/lib/interfaces/high5/wave/dependentInputs.js +144 -0
  39. package/lib/interfaces/high5/wave/dependentInputsValidation.d.ts +22 -0
  40. package/lib/interfaces/high5/wave/dependentInputsValidation.js +220 -0
  41. package/lib/interfaces/idp/index.d.ts +3 -3
  42. package/lib/interfaces/idp/index.js +3 -3
  43. package/lib/interfaces/idp/oauth/device.d.ts +18 -0
  44. package/lib/interfaces/idp/oauth/device.js +2 -0
  45. package/lib/interfaces/idp/oauth/index.d.ts +17 -4
  46. package/lib/interfaces/idp/organization/index.d.ts +1 -0
  47. package/lib/interfaces/idp/organization/index.js +1 -0
  48. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +4 -0
  49. package/lib/interfaces/idp/user/Message.d.ts +1 -0
  50. package/lib/interfaces/idp/user/Scopes.d.ts +1 -9
  51. package/lib/interfaces/idp/user/Scopes.js +0 -12
  52. package/lib/interfaces/idp/user/index.d.ts +3 -0
  53. package/lib/interfaces/mailer/index.d.ts +20 -1
  54. package/lib/interfaces/mailer/index.js +14 -2
  55. package/lib/interfaces/nats/index.d.ts +30 -32
  56. package/lib/interfaces/nats/index.js +103 -117
  57. package/lib/interfaces/shorts/index.d.ts +7 -0
  58. package/lib/interfaces/shorts/index.js +6 -0
  59. package/lib/service/agent/bundle/dev/index.js +4 -1
  60. package/lib/service/agent/bundle/index.js +4 -1
  61. package/lib/service/agent/context/index.js +4 -1
  62. package/lib/service/agent/index.d.ts +6 -0
  63. package/lib/service/agent/index.js +18 -1
  64. package/lib/service/agent/installer/index.js +4 -1
  65. package/lib/service/agent/logging/index.d.ts +69 -0
  66. package/lib/service/agent/logging/index.js +117 -0
  67. package/lib/service/agent/module/index.d.ts +36 -0
  68. package/lib/service/agent/module/index.js +65 -0
  69. package/lib/service/auditor/index.js +4 -1
  70. package/lib/service/auditor/internal/index.js +4 -1
  71. package/lib/service/bouncer/features/index.js +4 -1
  72. package/lib/service/bouncer/index.js +5 -2
  73. package/lib/service/cosmo/asset/index.d.ts +49 -3
  74. package/lib/service/cosmo/asset/index.js +111 -5
  75. package/lib/service/cosmo/comment/index.d.ts +7 -36
  76. package/lib/service/cosmo/comment/index.js +18 -43
  77. package/lib/service/cosmo/event/index.js +4 -1
  78. package/lib/service/cosmo/folder/index.js +4 -1
  79. package/lib/service/cosmo/index.d.ts +3 -0
  80. package/lib/service/cosmo/index.js +11 -1
  81. package/lib/service/cosmo/internal/index.js +4 -1
  82. package/lib/service/cosmo/internal/space/index.js +4 -1
  83. package/lib/service/cosmo/location/index.js +4 -1
  84. package/lib/service/cosmo/namespace/index.d.ts +15 -1
  85. package/lib/service/cosmo/namespace/index.js +21 -1
  86. package/lib/service/cosmo/organization/index.js +4 -1
  87. package/lib/service/cosmo/permissions/index.js +4 -1
  88. package/lib/service/cosmo/production/index.js +4 -1
  89. package/lib/service/cosmo/share/index.d.ts +37 -29
  90. package/lib/service/cosmo/share/index.js +47 -35
  91. package/lib/service/cosmo/space/index.d.ts +28 -1
  92. package/lib/service/cosmo/space/index.js +45 -1
  93. package/lib/service/cosmo/stats/index.d.ts +35 -0
  94. package/lib/service/cosmo/stats/index.js +58 -0
  95. package/lib/service/cosmo/tag/index.js +4 -1
  96. package/lib/service/dali/DaliAvatar.d.ts +0 -6
  97. package/lib/service/dali/DaliAvatar.js +4 -11
  98. package/lib/service/dali/avatar/DaliCosmoSpace.js +4 -1
  99. package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +2 -1
  100. package/lib/service/dali/avatar/DaliHigh5Pool.js +5 -2
  101. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +2 -1
  102. package/lib/service/dali/avatar/DaliHigh5Space.js +5 -2
  103. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +2 -1
  104. package/lib/service/dali/avatar/DaliOAuthApp.js +5 -2
  105. package/lib/service/dali/avatar/DaliOrganization.d.ts +2 -1
  106. package/lib/service/dali/avatar/DaliOrganization.js +5 -2
  107. package/lib/service/dali/avatar/DaliServiceAccount.d.ts +1 -1
  108. package/lib/service/dali/avatar/DaliServiceAccount.js +6 -3
  109. package/lib/service/dali/avatar/DaliTeam.d.ts +2 -1
  110. package/lib/service/dali/avatar/DaliTeam.js +5 -2
  111. package/lib/service/dali/avatar/DaliUser.d.ts +2 -1
  112. package/lib/service/dali/avatar/DaliUser.js +5 -2
  113. package/lib/service/dali/index.js +4 -1
  114. package/lib/service/high5/execution/index.js +4 -1
  115. package/lib/service/high5/execution/log/index.js +4 -1
  116. package/lib/service/high5/execution/status/index.js +4 -1
  117. package/lib/service/high5/index.js +4 -1
  118. package/lib/service/high5/internal/index.js +4 -1
  119. package/lib/service/high5/internal/space/index.js +4 -1
  120. package/lib/service/high5/internal/space/job/index.js +4 -1
  121. package/lib/service/high5/internal/space/job/log/index.js +4 -1
  122. package/lib/service/high5/joinToken/index.js +4 -1
  123. package/lib/service/high5/space/database/document/array/index.js +4 -1
  124. package/lib/service/high5/space/database/document/index.js +4 -1
  125. package/lib/service/high5/space/database/document/number/index.js +4 -1
  126. package/lib/service/high5/space/database/index.js +4 -1
  127. package/lib/service/high5/space/event/index.js +4 -1
  128. package/lib/service/high5/space/event/stream/design/DesignOperations.js +4 -1
  129. package/lib/service/high5/space/event/stream/design/index.js +6 -3
  130. package/lib/service/high5/space/event/stream/design/snapshot/index.js +4 -1
  131. package/lib/service/high5/space/event/stream/index.js +4 -1
  132. package/lib/service/high5/space/execution/index.js +4 -1
  133. package/lib/service/high5/space/execution/log/index.js +4 -1
  134. package/lib/service/high5/space/execution/status/index.js +4 -1
  135. package/lib/service/high5/space/index.d.ts +10 -0
  136. package/lib/service/high5/space/index.js +25 -5
  137. package/lib/service/high5/space/job/index.js +4 -1
  138. package/lib/service/high5/space/job/log/index.js +4 -1
  139. package/lib/service/high5/space/node/index.js +4 -1
  140. package/lib/service/high5/space/pool/index.d.ts +11 -0
  141. package/lib/service/high5/space/pool/index.js +22 -1
  142. package/lib/service/high5/space/secret/index.js +4 -1
  143. package/lib/service/high5/space/stat/index.js +4 -1
  144. package/lib/service/high5/space/wave/index.js +4 -1
  145. package/lib/service/high5/space/webhook/index.js +4 -1
  146. package/lib/service/high5/space/webhook/log/index.js +4 -1
  147. package/lib/service/high5/stat/index.js +4 -1
  148. package/lib/service/high5/wave/index.js +4 -1
  149. package/lib/service/high5/wave/s3/index.js +5 -2
  150. package/lib/service/idp/guest/index.js +4 -1
  151. package/lib/service/idp/index.js +4 -1
  152. package/lib/service/idp/internal/index.js +4 -1
  153. package/lib/service/idp/oauth/device.d.ts +131 -0
  154. package/lib/service/idp/oauth/device.js +177 -0
  155. package/lib/service/idp/oauth/index.d.ts +3 -0
  156. package/lib/service/idp/oauth/index.js +11 -1
  157. package/lib/service/idp/organization/index.d.ts +9 -0
  158. package/lib/service/idp/organization/index.js +22 -3
  159. package/lib/service/idp/organization/license/index.js +4 -1
  160. package/lib/service/idp/organization/member/index.js +5 -2
  161. package/lib/service/idp/organization/member/invitations/index.d.ts +19 -0
  162. package/lib/service/idp/organization/member/invitations/index.js +23 -1
  163. package/lib/service/idp/organization/service-accounts/index.d.ts +11 -1
  164. package/lib/service/idp/organization/service-accounts/index.js +22 -2
  165. package/lib/service/idp/organization/settings/domain/index.js +4 -1
  166. package/lib/service/idp/organization/settings/domain/saml/index.js +4 -1
  167. package/lib/service/idp/organization/settings/index.js +4 -1
  168. package/lib/service/idp/organization/settings/oauth/index.d.ts +10 -0
  169. package/lib/service/idp/organization/settings/oauth/index.js +21 -1
  170. package/lib/service/idp/organization/stat/index.js +4 -1
  171. package/lib/service/idp/organization/team/index.d.ts +10 -0
  172. package/lib/service/idp/organization/team/index.js +21 -1
  173. package/lib/service/idp/registration/index.js +4 -1
  174. package/lib/service/idp/user/index.d.ts +8 -0
  175. package/lib/service/idp/user/index.js +20 -3
  176. package/lib/service/idp/user/license/index.js +4 -1
  177. package/lib/service/idp/user/message/index.d.ts +1 -0
  178. package/lib/service/idp/user/message/index.js +4 -1
  179. package/lib/service/idp/user/password/index.js +4 -1
  180. package/lib/service/idp/user/settings/connections/index.js +4 -1
  181. package/lib/service/idp/user/settings/general/index.js +4 -1
  182. package/lib/service/idp/user/settings/index.js +4 -1
  183. package/lib/service/idp/user/settings/notifications/index.js +4 -1
  184. package/lib/service/idp/user/settings/oauthApps/index.js +4 -1
  185. package/lib/service/idp/user/settings/pats/index.js +4 -1
  186. package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
  187. package/lib/service/idp/user/settings/twoFactor/totp/index.js +4 -1
  188. package/lib/service/mailer/index.js +5 -2
  189. package/lib/service/mailer/internal/index.d.ts +2 -2
  190. package/lib/service/mailer/internal/index.js +5 -2
  191. package/lib/service/mothership/index.js +4 -1
  192. package/lib/service/nats/index.d.ts +7 -0
  193. package/lib/service/nats/index.js +19 -1
  194. package/lib/service/shorts/index.js +4 -1
  195. package/lib/service/shorts/internal/index.d.ts +6 -3
  196. package/lib/service/shorts/internal/index.js +20 -6
  197. package/lib/utils/bouncer/features/Provider.js +0 -1
  198. package/package.json +2 -2
  199. package/lib/interfaces/fuse/index.d.ts +0 -3
  200. package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +0 -38
  201. package/lib/interfaces/fuse/space/cronjob/Cronjob.js +0 -8
  202. package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +0 -16
  203. package/lib/interfaces/fuse/space/index.d.ts +0 -22
  204. package/lib/interfaces/fuse/space/index.js +0 -11
  205. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -32
  206. package/lib/service/dali/avatar/DaliFuseSpace.js +0 -59
  207. package/lib/service/fuse/index.d.ts +0 -20
  208. package/lib/service/fuse/index.js +0 -48
  209. package/lib/service/fuse/internal/index.d.ts +0 -10
  210. package/lib/service/fuse/internal/index.js +0 -32
  211. package/lib/service/fuse/internal/space/cronjob/index.d.ts +0 -7
  212. package/lib/service/fuse/internal/space/cronjob/index.js +0 -17
  213. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +0 -17
  214. package/lib/service/fuse/internal/space/cronjob/log/index.js +0 -34
  215. package/lib/service/fuse/internal/space/index.d.ts +0 -26
  216. package/lib/service/fuse/internal/space/index.js +0 -51
  217. package/lib/service/fuse/space/cronjob/index.d.ts +0 -145
  218. package/lib/service/fuse/space/cronjob/index.js +0 -201
  219. package/lib/service/fuse/space/cronjob/log/index.d.ts +0 -35
  220. package/lib/service/fuse/space/cronjob/log/index.js +0 -58
  221. package/lib/service/fuse/space/index.d.ts +0 -97
  222. package/lib/service/fuse/space/index.js +0 -153
  223. /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/cloudwatch.js} +0 -0
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5SpaceExecutionLogs = void 0;
13
- const Base_1 = require("../../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../../Base"));
14
17
  const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
18
  const searchFilter_1 = require("../../../../../helper/searchFilter");
16
19
  class High5SpaceExecutionLogs extends Base_1.default {
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5SpaceExecutionStates = void 0;
13
- const Base_1 = require("../../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../../Base"));
14
17
  class High5SpaceExecutionStates extends Base_1.default {
15
18
  constructor(options, axios) {
16
19
  super(options, axios);
@@ -148,5 +148,15 @@ export declare class High5Space extends Base {
148
148
  enableDev<R extends boolean = false>(orgName: string, spaceName: string, enableDev: boolean, raw?: {
149
149
  raw: R;
150
150
  }): Promise<MaybeRaw<R, Space>>;
151
+ /**
152
+ * Updates the avatar of the specified High5 space
153
+ * @param orgName Name of the organization
154
+ * @param spaceName Name of the space
155
+ * @param file Image as Javascript File
156
+ * @returns Space details with updated avatar
157
+ */
158
+ updateAvatar<R extends boolean = false>(orgName: string, spaceName: string, file: File, raw?: {
159
+ raw: R;
160
+ }): Promise<MaybeRaw<R, Space>>;
151
161
  protected getEndpoint(endpoint: string): string;
152
162
  }
@@ -8,20 +8,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5Space = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelper");
15
18
  const searchFilter_1 = require("../../../helper/searchFilter");
16
19
  const database_1 = require("./database");
17
20
  const event_1 = require("./event");
18
21
  const execution_1 = require("./execution");
19
22
  const job_1 = require("./job");
20
- const node_1 = require("./node");
21
- const pool_1 = require("./pool");
22
- const secret_1 = require("./secret");
23
+ const node_1 = __importDefault(require("./node"));
24
+ const pool_1 = __importDefault(require("./pool"));
25
+ const secret_1 = __importDefault(require("./secret"));
23
26
  const stat_1 = require("./stat");
24
- const wave_1 = require("./wave");
27
+ const wave_1 = __importDefault(require("./wave"));
25
28
  const webhook_1 = require("./webhook");
26
29
  class High5Space extends Base_1.default {
27
30
  get event() {
@@ -243,6 +246,23 @@ class High5Space extends Base_1.default {
243
246
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
244
247
  });
245
248
  }
249
+ /**
250
+ * Updates the avatar of the specified High5 space
251
+ * @param orgName Name of the organization
252
+ * @param spaceName Name of the space
253
+ * @param file Image as Javascript File
254
+ * @returns Space details with updated avatar
255
+ */
256
+ updateAvatar(orgName, spaceName, file, raw) {
257
+ return __awaiter(this, void 0, void 0, function* () {
258
+ const data = new FormData();
259
+ data.append("avatar", file);
260
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/avatar`), data, {
261
+ headers: { "Content-Type": "multipart/form-data" },
262
+ });
263
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
264
+ });
265
+ }
246
266
  getEndpoint(endpoint) {
247
267
  return `${this.options.server}/api/high5${endpoint}`;
248
268
  }
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5Job = void 0;
13
- const Base_1 = require("../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../Base"));
14
17
  const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
15
18
  const searchFilter_1 = require("../../../../helper/searchFilter");
16
19
  const log_1 = require("../../internal/space/job/log");
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5JobLog = void 0;
13
- const Base_1 = require("../../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../../Base"));
14
17
  const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
18
  const searchFilter_1 = require("../../../../../helper/searchFilter");
16
19
  class High5JobLog extends Base_1.default {
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const Base_1 = require("../../../../Base");
15
+ const Base_1 = __importDefault(require("../../../../Base"));
13
16
  class High5Node extends Base_1.default {
14
17
  /**
15
18
  * Retrieves all Nodes for the specified stream.
@@ -109,5 +109,16 @@ export default class High5Pool extends Base {
109
109
  }, raw?: {
110
110
  raw: R;
111
111
  }): Promise<MaybeRaw<R, PaginatedResponse<OrganizationMember>>>;
112
+ /**
113
+ * Updates the avatar of the specified pool
114
+ * @param orgName Name of the organization
115
+ * @param spaceName Name of the space
116
+ * @param name Name of the pool
117
+ * @param file Image as Javascript File
118
+ * @returns Pool details with updated avatar
119
+ */
120
+ updateAvatar<R extends boolean = false>(orgName: string, spaceName: string, name: string, file: File, raw?: {
121
+ raw: R;
122
+ }): Promise<MaybeRaw<R, Pool>>;
112
123
  protected getEndpoint(endpoint: string): string;
113
124
  }
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const Base_1 = require("../../../../Base");
15
+ const Base_1 = __importDefault(require("../../../../Base"));
13
16
  const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
14
17
  const searchFilter_1 = require("../../../../helper/searchFilter");
15
18
  class High5Pool extends Base_1.default {
@@ -165,6 +168,24 @@ class High5Pool extends Base_1.default {
165
168
  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));
166
169
  });
167
170
  }
171
+ /**
172
+ * Updates the avatar of the specified pool
173
+ * @param orgName Name of the organization
174
+ * @param spaceName Name of the space
175
+ * @param name Name of the pool
176
+ * @param file Image as Javascript File
177
+ * @returns Pool details with updated avatar
178
+ */
179
+ updateAvatar(orgName, spaceName, name, file, raw) {
180
+ return __awaiter(this, void 0, void 0, function* () {
181
+ const data = new FormData();
182
+ data.append("avatar", file);
183
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/pools/${name}/avatar`), data, {
184
+ headers: { "Content-Type": "multipart/form-data" },
185
+ });
186
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
187
+ });
188
+ }
168
189
  getEndpoint(endpoint) {
169
190
  return `${this.options.server}/api/high5${endpoint}`;
170
191
  }
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const Base_1 = require("../../../../Base");
15
+ const Base_1 = __importDefault(require("../../../../Base"));
13
16
  const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
14
17
  const searchFilter_1 = require("../../../../helper/searchFilter");
15
18
  class High5Secret extends Base_1.default {
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5SpaceStat = void 0;
13
- const Base_1 = require("../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../Base"));
14
17
  class High5SpaceStat extends Base_1.default {
15
18
  /**
16
19
  * Retrieves usage statistics for a specific space.
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const Base_1 = require("../../../../Base");
15
+ const Base_1 = __importDefault(require("../../../../Base"));
13
16
  class High5Wave extends Base_1.default {
14
17
  /**
15
18
  * Patch wave engine version for a space
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5Webhook = void 0;
13
- const Base_1 = require("../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../Base"));
14
17
  const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
15
18
  const searchFilter_1 = require("../../../../helper/searchFilter");
16
19
  const log_1 = require("./log");
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5WebhookLog = void 0;
13
- const Base_1 = require("../../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../../Base"));
14
17
  const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
18
  class High5WebhookLog extends Base_1.default {
16
19
  /**
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5OrgStat = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  class High5OrgStat extends Base_1.default {
15
18
  /**
16
19
  * Retrieves usage statistics for a specific organization.
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.High5Wave = void 0;
4
- const Base_1 = require("../../../Base");
7
+ const Base_1 = __importDefault(require("../../../Base"));
5
8
  const s3_1 = require("./s3");
6
9
  class High5Wave extends Base_1.default {
7
10
  constructor(options, axios) {
@@ -8,11 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.S3 = void 0;
13
- const axios_1 = require("axios");
16
+ const axios_1 = __importDefault(require("axios"));
14
17
  const package_json_1 = require("../../../../../package.json");
15
- const Base_1 = require("../../../../Base");
18
+ const Base_1 = __importDefault(require("../../../../Base"));
16
19
  const axios_2 = require("../../../../interfaces/axios");
17
20
  const sdkVersion = "hcloud-sdk-js/v" + package_json_1.version;
18
21
  /**
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.IdpGuest = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  class IdpGuest extends Base_1.default {
15
18
  /**
16
19
  * Creates a new guest user account.
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const Base_1 = require("../../Base");
15
+ const Base_1 = __importDefault(require("../../Base"));
13
16
  const guest_1 = require("./guest");
14
17
  const internal_1 = require("./internal");
15
18
  const oauth_1 = require("./oauth");
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.IdpInternal = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  class IdpInternal extends Base_1.default {
15
18
  /**
16
19
  * Creates an agent user for an organization.
@@ -0,0 +1,131 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { OAuthAppPublicInfo, Scope } from "../../../interfaces/idp";
3
+ import { OAuthDeviceAuthorizationResponse, OAuthDeviceTokenResponse } from "../../../interfaces/idp/oauth/device";
4
+ /**
5
+ * IdpOAuthDevice
6
+ *
7
+ * Client wrapper for OAuth 2.0 Device Authorization Grant (RFC 8628).
8
+ *
9
+ * This class provides methods to:
10
+ * - Initiate a device authorization request
11
+ * - Validate a user-provided code
12
+ * - Approve or reject a device authorization
13
+ * - Exchange a device code for an access token
14
+ *
15
+ * All methods support returning either the parsed response body or the raw Axios
16
+ * response via the `{ raw: true }` option.
17
+ *
18
+ * @extends Base
19
+ */
20
+ export default class IdpOAuthDevice extends Base {
21
+ /**
22
+ * Initiates the OAuth Device Authorization flow.
23
+ *
24
+ * This endpoint returns a `device_code` and `user_code` which should be:
25
+ * - Displayed to the user on the device
26
+ * - Entered by the user on a separate verification page
27
+ *
28
+ * @typeParam R - Whether to return the raw Axios response
29
+ *
30
+ * @param clientId - OAuth client identifier
31
+ * @param scope - Optional OAuth scope string (space-delimited)
32
+ * @param raw - Optional flag to return the raw Axios response
33
+ *
34
+ * @returns Device authorization response or raw Axios response
35
+ */
36
+ authorize<R extends boolean = false>(clientId: string, scope?: string, raw?: {
37
+ raw: R;
38
+ }): Promise<MaybeRaw<R, OAuthDeviceAuthorizationResponse>>;
39
+ /**
40
+ * Validates a user-entered device code.
41
+ *
42
+ * This is typically called by the authorization UI after the user enters
43
+ * the `user_code`. It returns public information about the requesting
44
+ * application and the requested scopes.
45
+ *
46
+ * @typeParam R - Whether to return the raw Axios response
47
+ *
48
+ * @param clientId - OAuth client identifier
49
+ * @param userCode - User-facing verification code
50
+ * @param raw - Optional flag to return the raw Axios response
51
+ *
52
+ * @returns Application public info and requested scopes
53
+ */
54
+ validateUserCode<R extends boolean = false>(clientId: string, userCode: string, raw?: {
55
+ raw: R;
56
+ }): Promise<MaybeRaw<R, {
57
+ app: OAuthAppPublicInfo;
58
+ scopes: Scope[];
59
+ }>>;
60
+ /**
61
+ * Approves or rejects a device authorization request.
62
+ *
63
+ * ⚠️ This endpoint requires an `Authorization` header to be set
64
+ * on the HCloud instance (e.g., a logged-in user session or access token).
65
+ *
66
+ * @typeParam R - Whether to return the raw Axios response
67
+ *
68
+ * @param clientId - OAuth client identifier
69
+ * @param userCode - User-facing verification code
70
+ * @param status - Authorization decision (`APPROVED` or `REJECTED`)
71
+ * @param raw - Optional flag to return the raw Axios response
72
+ *
73
+ * @throws Error if the Authorization header is not set
74
+ *
75
+ * @returns Void response or raw Axios response
76
+ */
77
+ decide<R extends boolean = false>(clientId: string, userCode: string, status: "APPROVED" | "REJECTED", raw?: {
78
+ raw: R;
79
+ }): Promise<MaybeRaw<R, void>>;
80
+ /**
81
+ * Approves a device authorization request.
82
+ *
83
+ * Shorthand for {@link decide} with status `"APPROVED"`.
84
+ *
85
+ * @typeParam R - Whether to return the raw Axios response
86
+ *
87
+ * @param clientId - OAuth client identifier
88
+ * @param userCode - User-facing verification code
89
+ * @param raw - Optional flag to return the raw Axios response
90
+ *
91
+ * @returns Void response or raw Axios response
92
+ */
93
+ approve<R extends boolean = false>(clientId: string, userCode: string, raw?: {
94
+ raw: R;
95
+ }): Promise<MaybeRaw<R, void>>;
96
+ /**
97
+ * Rejects a device authorization request.
98
+ *
99
+ * Shorthand for {@link decide} with status `"REJECTED"`.
100
+ *
101
+ * @typeParam R - Whether to return the raw Axios response
102
+ *
103
+ * @param clientId - OAuth client identifier
104
+ * @param userCode - User-facing verification code
105
+ * @param raw - Optional flag to return the raw Axios response
106
+ *
107
+ * @returns Void response or raw Axios response
108
+ */
109
+ reject<R extends boolean = false>(clientId: string, userCode: string, raw?: {
110
+ raw: R;
111
+ }): Promise<MaybeRaw<R, void>>;
112
+ /**
113
+ * Exchanges a device code for an access token.
114
+ *
115
+ * This endpoint may return HTTP 400 responses for non-fatal OAuth states
116
+ * such as `authorization_pending` or `slow_down`. These responses are
117
+ * returned normally and should be handled by the caller.
118
+ *
119
+ * @typeParam R - Whether to return the raw Axios response
120
+ *
121
+ * @param clientId - OAuth client identifier
122
+ * @param deviceCode - Device code obtained from {@link authorize}
123
+ * @param raw - Optional flag to return the raw Axios response
124
+ *
125
+ * @returns Device token response or raw Axios response
126
+ */
127
+ token<R extends boolean = false>(clientId: string, deviceCode: string, raw?: {
128
+ raw: R;
129
+ }): Promise<MaybeRaw<R, OAuthDeviceTokenResponse>>;
130
+ protected getEndpoint(endpoint: string): string;
131
+ }