hcloud-sdk 0.0.15 → 14.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/README.md +1 -0
  2. package/changelog.md +809 -0
  3. package/index.d.ts +3 -2
  4. package/index.js +5 -2
  5. package/lib/Base.d.ts +26 -0
  6. package/lib/Base.js +12 -0
  7. package/lib/Hcloud.d.ts +80 -0
  8. package/lib/Hcloud.js +134 -0
  9. package/lib/helper/ErrorHelper.d.ts +7 -0
  10. package/lib/helper/ErrorHelper.js +19 -0
  11. package/lib/helper/paginatedResponseHelper.d.ts +3 -0
  12. package/lib/helper/paginatedResponseHelper.js +9 -0
  13. package/lib/helper/searchFilter.d.ts +9 -0
  14. package/lib/helper/searchFilter.js +12 -0
  15. package/lib/interfaces/agent/bundle/dev/index.d.ts +3 -0
  16. package/lib/interfaces/agent/context/index.d.ts +19 -0
  17. package/lib/interfaces/agent/index.d.ts +21 -0
  18. package/lib/interfaces/agent/index.js +2 -0
  19. package/lib/interfaces/auditor/index.d.ts +72 -0
  20. package/lib/interfaces/{Auditor.js → auditor/index.js} +21 -5
  21. package/lib/interfaces/axios/index.d.ts +5 -0
  22. package/lib/interfaces/axios/index.js +8 -0
  23. package/lib/interfaces/bouncer/features/index.d.ts +10 -0
  24. package/lib/interfaces/bouncer/features/index.js +2 -0
  25. package/lib/interfaces/bouncer/index.d.ts +6 -0
  26. package/lib/interfaces/bouncer/index.js +17 -0
  27. package/lib/interfaces/dali/index.d.ts +3 -0
  28. package/lib/interfaces/dali/index.js +2 -0
  29. package/lib/interfaces/frontend/config/index.d.ts +33 -0
  30. package/lib/interfaces/frontend/config/index.js +10 -0
  31. package/lib/interfaces/fuse/index.d.ts +3 -0
  32. package/lib/interfaces/fuse/index.js +19 -0
  33. package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +38 -0
  34. package/lib/interfaces/fuse/space/cronjob/Cronjob.js +8 -0
  35. package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +16 -0
  36. package/lib/interfaces/fuse/space/cronjob/CronjobLog.js +2 -0
  37. package/lib/interfaces/fuse/space/index.d.ts +21 -0
  38. package/lib/interfaces/fuse/space/index.js +11 -0
  39. package/lib/interfaces/global/HCloudError.d.ts +8 -0
  40. package/lib/interfaces/global/HCloudError.js +13 -0
  41. package/lib/interfaces/global/Header.d.ts +4 -0
  42. package/lib/interfaces/global/Header.js +2 -0
  43. package/lib/interfaces/global/HttpMethod.d.ts +7 -0
  44. package/lib/interfaces/global/HttpMethod.js +11 -0
  45. package/lib/interfaces/global/PaginatedResponse.d.ts +4 -0
  46. package/lib/interfaces/global/PaginatedResponse.js +2 -0
  47. package/lib/interfaces/global/Products.d.ts +11 -0
  48. package/lib/interfaces/global/Products.js +15 -0
  49. package/lib/interfaces/global/SearchFilters.d.ts +86 -0
  50. package/lib/interfaces/global/SearchFilters.js +49 -0
  51. package/lib/interfaces/global/Space.d.ts +20 -0
  52. package/lib/interfaces/global/Space.js +8 -0
  53. package/lib/interfaces/global/Version.d.ts +3 -0
  54. package/lib/interfaces/global/Version.js +2 -0
  55. package/lib/interfaces/global/Views.d.ts +8 -0
  56. package/lib/interfaces/global/Views.js +12 -0
  57. package/lib/interfaces/global/index.d.ts +9 -0
  58. package/lib/interfaces/global/index.js +25 -0
  59. package/lib/interfaces/high5/index.d.ts +16 -0
  60. package/lib/interfaces/high5/index.js +32 -0
  61. package/lib/interfaces/high5/joinToken/index.d.ts +10 -0
  62. package/lib/interfaces/high5/joinToken/index.js +2 -0
  63. package/lib/interfaces/high5/space/event/index.d.ts +15 -0
  64. package/lib/interfaces/high5/space/event/index.js +2 -0
  65. package/lib/interfaces/high5/space/event/stream/design/DesignOperation.d.ts +68 -0
  66. package/lib/interfaces/high5/space/event/stream/design/DesignOperation.js +20 -0
  67. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +92 -0
  68. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.js +20 -0
  69. package/lib/interfaces/high5/space/event/stream/design/index.d.ts +22 -0
  70. package/lib/interfaces/high5/space/event/stream/design/index.js +2 -0
  71. package/lib/interfaces/high5/space/event/stream/design/snapshot/index.d.ts +30 -0
  72. package/lib/interfaces/high5/space/event/stream/design/snapshot/index.js +8 -0
  73. package/lib/interfaces/high5/space/event/stream/index.d.ts +77 -0
  74. package/lib/interfaces/high5/space/event/stream/index.js +13 -0
  75. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +60 -0
  76. package/lib/interfaces/high5/space/event/stream/node/index.js +7 -0
  77. package/lib/interfaces/high5/space/execution/index.d.ts +137 -0
  78. package/lib/interfaces/high5/space/execution/index.js +21 -0
  79. package/lib/interfaces/high5/space/index.d.ts +23 -0
  80. package/lib/interfaces/high5/space/index.js +12 -0
  81. package/lib/interfaces/high5/space/secret/index.d.ts +12 -0
  82. package/lib/interfaces/high5/space/secret/index.js +2 -0
  83. package/lib/interfaces/high5/space/webhook/index.d.ts +75 -0
  84. package/lib/interfaces/high5/space/webhook/index.js +9 -0
  85. package/lib/interfaces/high5/wave/index.d.ts +171 -0
  86. package/lib/interfaces/high5/wave/index.js +52 -0
  87. package/lib/interfaces/idp/index.d.ts +26 -0
  88. package/lib/interfaces/idp/index.js +38 -0
  89. package/lib/interfaces/idp/oauth/index.d.ts +19 -0
  90. package/lib/interfaces/idp/oauth/index.js +8 -0
  91. package/lib/interfaces/idp/organization/index.d.ts +32 -0
  92. package/lib/interfaces/idp/organization/index.js +25 -0
  93. package/lib/interfaces/idp/organization/license/index.d.ts +84 -0
  94. package/lib/interfaces/idp/organization/license/index.js +15 -0
  95. package/lib/interfaces/idp/organization/member/index.d.ts +15 -0
  96. package/lib/interfaces/idp/organization/member/index.js +2 -0
  97. package/lib/interfaces/idp/organization/member/invitations/index.d.ts +26 -0
  98. package/lib/interfaces/idp/organization/member/invitations/index.js +18 -0
  99. package/lib/interfaces/idp/organization/settings/domain/index.d.ts +19 -0
  100. package/lib/interfaces/idp/organization/settings/domain/index.js +8 -0
  101. package/lib/interfaces/idp/organization/settings/domain/saml/index.d.ts +10 -0
  102. package/lib/interfaces/idp/organization/settings/domain/saml/index.js +2 -0
  103. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +37 -0
  104. package/lib/interfaces/idp/organization/settings/oauthApp/index.js +2 -0
  105. package/lib/interfaces/idp/organization/team/index.d.ts +24 -0
  106. package/lib/interfaces/idp/organization/team/index.js +9 -0
  107. package/lib/interfaces/idp/user/ConnectionSettings.d.ts +6 -0
  108. package/lib/interfaces/idp/user/ConnectionSettings.js +2 -0
  109. package/lib/interfaces/idp/user/GeneralSettings.d.ts +44 -0
  110. package/lib/interfaces/idp/user/GeneralSettings.js +38 -0
  111. package/lib/interfaces/idp/user/NotificationSettings.d.ts +8 -0
  112. package/lib/interfaces/idp/user/NotificationSettings.js +2 -0
  113. package/lib/interfaces/idp/user/Pat.d.ts +19 -0
  114. package/lib/interfaces/idp/user/Pat.js +2 -0
  115. package/lib/interfaces/idp/user/Scopes.d.ts +40 -0
  116. package/lib/interfaces/idp/user/Scopes.js +50 -0
  117. package/lib/interfaces/idp/user/SuccessfulAuth.d.ts +5 -0
  118. package/lib/interfaces/idp/user/SuccessfulAuth.js +2 -0
  119. package/lib/interfaces/idp/user/Totp.d.ts +20 -0
  120. package/lib/interfaces/idp/user/Totp.js +2 -0
  121. package/lib/interfaces/idp/user/index.d.ts +23 -0
  122. package/lib/interfaces/idp/user/index.js +2 -0
  123. package/lib/interfaces/mailer/index.d.ts +66 -0
  124. package/lib/interfaces/mailer/index.js +81 -0
  125. package/lib/interfaces/mothership/index.d.ts +27 -0
  126. package/lib/interfaces/mothership/index.js +8 -0
  127. package/lib/interfaces/nats/index.d.ts +252 -0
  128. package/lib/interfaces/nats/index.js +334 -0
  129. package/lib/service/agent/bundle/dev/index.d.ts +17 -0
  130. package/lib/service/agent/bundle/dev/index.js +40 -0
  131. package/lib/service/agent/bundle/index.d.ts +11 -0
  132. package/lib/service/agent/bundle/index.js +55 -0
  133. package/lib/service/agent/context/index.d.ts +37 -0
  134. package/lib/service/agent/context/index.js +81 -0
  135. package/lib/service/agent/index.d.ts +14 -0
  136. package/lib/service/agent/index.js +20 -0
  137. package/lib/service/agent/installer/index.d.ts +15 -0
  138. package/lib/service/agent/installer/index.js +97 -0
  139. package/lib/service/auditor/index.d.ts +26 -0
  140. package/lib/service/auditor/index.js +49 -0
  141. package/lib/service/auditor/internal/index.d.ts +27 -0
  142. package/lib/service/auditor/internal/index.js +61 -0
  143. package/lib/service/bouncer/features/index.d.ts +8 -0
  144. package/lib/service/bouncer/features/index.js +25 -0
  145. package/lib/service/bouncer/index.d.ts +14 -0
  146. package/lib/service/bouncer/index.js +31 -0
  147. package/lib/service/dali/DaliAvatar.d.ts +36 -0
  148. package/lib/service/dali/DaliAvatar.js +25 -0
  149. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +28 -0
  150. package/lib/service/dali/avatar/DaliFuseSpace.js +55 -0
  151. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +28 -0
  152. package/lib/service/dali/avatar/DaliHigh5Space.js +55 -0
  153. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +28 -0
  154. package/lib/service/dali/avatar/DaliOAuthApp.js +55 -0
  155. package/lib/service/dali/avatar/DaliOrganization.d.ts +25 -0
  156. package/lib/service/dali/avatar/DaliOrganization.js +52 -0
  157. package/lib/service/dali/avatar/DaliTeam.d.ts +28 -0
  158. package/lib/service/dali/avatar/DaliTeam.js +55 -0
  159. package/lib/service/dali/avatar/DaliUser.d.ts +22 -0
  160. package/lib/service/dali/avatar/DaliUser.js +49 -0
  161. package/lib/service/dali/index.d.ts +16 -0
  162. package/lib/service/dali/index.js +30 -0
  163. package/lib/service/fuse/index.d.ts +17 -0
  164. package/lib/service/fuse/index.js +34 -0
  165. package/lib/service/fuse/internal/index.d.ts +9 -0
  166. package/lib/service/fuse/internal/index.js +29 -0
  167. package/lib/service/fuse/internal/space/cronjob/index.d.ts +8 -0
  168. package/lib/service/fuse/internal/space/cronjob/index.js +15 -0
  169. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +17 -0
  170. package/lib/service/fuse/internal/space/cronjob/log/index.js +35 -0
  171. package/lib/service/fuse/internal/space/index.d.ts +23 -0
  172. package/lib/service/fuse/internal/space/index.js +43 -0
  173. package/lib/service/fuse/space/cronjob/index.d.ts +123 -0
  174. package/lib/service/fuse/space/cronjob/index.js +175 -0
  175. package/lib/service/fuse/space/cronjob/log/index.d.ts +31 -0
  176. package/lib/service/fuse/space/cronjob/log/index.js +57 -0
  177. package/lib/service/fuse/space/index.d.ts +82 -0
  178. package/lib/service/fuse/space/index.js +134 -0
  179. package/lib/service/high5/execution/index.d.ts +10 -0
  180. package/lib/service/high5/execution/index.js +17 -0
  181. package/lib/service/high5/execution/log/index.d.ts +19 -0
  182. package/lib/service/high5/execution/log/index.js +41 -0
  183. package/lib/service/high5/execution/status/index.d.ts +18 -0
  184. package/lib/service/high5/execution/status/index.js +41 -0
  185. package/lib/service/high5/index.d.ts +22 -0
  186. package/lib/service/high5/index.js +39 -0
  187. package/lib/service/high5/internal/index.d.ts +9 -0
  188. package/lib/service/high5/internal/index.js +29 -0
  189. package/lib/service/high5/internal/space/index.d.ts +21 -0
  190. package/lib/service/high5/internal/space/index.js +41 -0
  191. package/lib/service/high5/joinToken/index.d.ts +40 -0
  192. package/lib/service/high5/joinToken/index.js +64 -0
  193. package/lib/service/high5/space/event/index.d.ts +56 -0
  194. package/lib/service/high5/space/event/index.js +89 -0
  195. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +31 -0
  196. package/lib/service/high5/space/event/stream/design/DesignOperations.js +117 -0
  197. package/lib/service/high5/space/event/stream/design/index.d.ts +38 -0
  198. package/lib/service/high5/space/event/stream/design/index.js +56 -0
  199. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +62 -0
  200. package/lib/service/high5/space/event/stream/design/snapshot/index.js +100 -0
  201. package/lib/service/high5/space/event/stream/index.d.ts +114 -0
  202. package/lib/service/high5/space/event/stream/index.js +164 -0
  203. package/lib/service/high5/space/execution/index.d.ts +48 -0
  204. package/lib/service/high5/space/execution/index.js +74 -0
  205. package/lib/service/high5/space/execution/log/index.d.ts +31 -0
  206. package/lib/service/high5/space/execution/log/index.js +57 -0
  207. package/lib/service/high5/space/execution/status/index.d.ts +16 -0
  208. package/lib/service/high5/space/execution/status/index.js +34 -0
  209. package/lib/service/high5/space/index.d.ts +107 -0
  210. package/lib/service/high5/space/index.js +160 -0
  211. package/lib/service/high5/space/node/index.d.ts +58 -0
  212. package/lib/service/high5/space/node/index.js +116 -0
  213. package/lib/service/high5/space/secret/index.d.ts +60 -0
  214. package/lib/service/high5/space/secret/index.js +92 -0
  215. package/lib/service/high5/space/wave/index.d.ts +38 -0
  216. package/lib/service/high5/space/wave/index.js +66 -0
  217. package/lib/service/high5/space/webhook/index.d.ts +83 -0
  218. package/lib/service/high5/space/webhook/index.js +132 -0
  219. package/lib/service/high5/space/webhook/log/index.d.ts +18 -0
  220. package/lib/service/high5/space/webhook/log/index.js +38 -0
  221. package/lib/service/high5/wave/index.d.ts +8 -0
  222. package/lib/service/high5/wave/index.js +15 -0
  223. package/lib/service/high5/wave/s3/index.d.ts +48 -0
  224. package/lib/service/high5/wave/s3/index.js +88 -0
  225. package/lib/service/idp/index.d.ts +82 -0
  226. package/lib/service/idp/index.js +137 -0
  227. package/lib/service/idp/internal/index.d.ts +19 -0
  228. package/lib/service/idp/internal/index.js +34 -0
  229. package/lib/service/idp/oauth/index.d.ts +45 -0
  230. package/lib/service/idp/oauth/index.js +105 -0
  231. package/lib/service/idp/organization/index.d.ts +54 -0
  232. package/lib/service/idp/organization/index.js +79 -0
  233. package/lib/service/idp/organization/license/index.d.ts +7 -0
  234. package/lib/service/idp/organization/license/index.js +30 -0
  235. package/lib/service/idp/organization/member/index.d.ts +58 -0
  236. package/lib/service/idp/organization/member/index.js +96 -0
  237. package/lib/service/idp/organization/member/invitations/index.d.ts +79 -0
  238. package/lib/service/idp/organization/member/invitations/index.js +118 -0
  239. package/lib/service/idp/organization/settings/domain/index.d.ts +38 -0
  240. package/lib/service/idp/organization/settings/domain/index.js +63 -0
  241. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +43 -0
  242. package/lib/service/idp/organization/settings/domain/saml/index.js +88 -0
  243. package/lib/service/idp/organization/settings/index.d.ts +16 -0
  244. package/lib/service/idp/organization/settings/index.js +16 -0
  245. package/lib/service/idp/organization/settings/oauth/index.d.ts +64 -0
  246. package/lib/service/idp/organization/settings/oauth/index.js +106 -0
  247. package/lib/service/idp/organization/team/index.d.ts +72 -0
  248. package/lib/service/idp/organization/team/index.js +115 -0
  249. package/lib/service/idp/registration/index.d.ts +39 -0
  250. package/lib/service/idp/registration/index.js +84 -0
  251. package/lib/service/idp/user/index.d.ts +82 -0
  252. package/lib/service/idp/user/index.js +125 -0
  253. package/lib/service/idp/user/license/index.d.ts +7 -0
  254. package/lib/service/idp/user/license/index.js +30 -0
  255. package/lib/service/idp/user/password/index.d.ts +19 -0
  256. package/lib/service/idp/user/password/index.js +52 -0
  257. package/lib/service/idp/user/settings/connections/index.d.ts +15 -0
  258. package/lib/service/idp/user/settings/connections/index.js +33 -0
  259. package/lib/service/idp/user/settings/general/index.d.ts +18 -0
  260. package/lib/service/idp/user/settings/general/index.js +39 -0
  261. package/lib/service/idp/user/settings/index.d.ts +36 -0
  262. package/lib/service/idp/user/settings/index.js +25 -0
  263. package/lib/service/idp/user/settings/notifications/index.d.ts +18 -0
  264. package/lib/service/idp/user/settings/notifications/index.js +39 -0
  265. package/lib/service/idp/user/settings/oauthApps/index.d.ts +22 -0
  266. package/lib/service/idp/user/settings/oauthApps/index.js +54 -0
  267. package/lib/service/idp/user/settings/pats/index.d.ts +50 -0
  268. package/lib/service/idp/user/settings/pats/index.js +93 -0
  269. package/lib/service/idp/user/settings/twoFactor/index.d.ts +11 -0
  270. package/lib/service/idp/user/settings/twoFactor/index.js +15 -0
  271. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +34 -0
  272. package/lib/service/idp/user/settings/twoFactor/totp/index.js +65 -0
  273. package/lib/service/mailer/index.d.ts +14 -0
  274. package/lib/service/mailer/index.js +31 -0
  275. package/lib/service/mailer/internal/index.d.ts +36 -0
  276. package/lib/service/mailer/internal/index.js +64 -0
  277. package/lib/service/mothership/index.d.ts +97 -0
  278. package/lib/service/mothership/index.js +136 -0
  279. package/lib/service/nats/index.d.ts +51 -0
  280. package/lib/service/nats/index.js +138 -0
  281. package/lib/utils/Types.d.ts +1 -0
  282. package/lib/utils/Types.js +2 -0
  283. package/lib/utils/bouncer/features/Provider.d.ts +16 -0
  284. package/lib/utils/bouncer/features/Provider.js +83 -0
  285. package/package.json +36 -27
  286. package/lib/base.d.ts +0 -12
  287. package/lib/base.js +0 -8
  288. package/lib/hcloud.d.ts +0 -11
  289. package/lib/hcloud.js +0 -27
  290. package/lib/interfaces/Auditor.d.ts +0 -40
  291. package/lib/interfaces/Global.d.ts +0 -8
  292. package/lib/interfaces/IDP.d.ts +0 -9
  293. package/lib/service/Auditor.d.ts +0 -42
  294. package/lib/service/Auditor.js +0 -101
  295. package/lib/service/High5.d.ts +0 -4
  296. package/lib/service/High5.js +0 -9
  297. package/lib/service/IDP.d.ts +0 -39
  298. package/lib/service/IDP.js +0 -84
  299. /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
  300. /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
@@ -0,0 +1,55 @@
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.AgentBundle = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ const axios_1 = require("../../../interfaces/axios");
15
+ class AgentBundle extends Base_1.default {
16
+ constructor(options, axios) {
17
+ var _a;
18
+ super(options, axios);
19
+ this.sourceServer = ((_a = options.agent) === null || _a === void 0 ? void 0 : _a.server) || "https://agent.s3.helmut.cloud";
20
+ }
21
+ getVersions() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const resp = yield this.axios.get(this.getEndpoint("/bundles/index.json"), { headers: axios_1.disableCacheHeaders });
24
+ const registry = resp.data;
25
+ for (const v in registry.versions) {
26
+ setDev(registry.versions[v]);
27
+ }
28
+ return resp.data;
29
+ });
30
+ }
31
+ getLatestVersion() {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const resp = yield this.getVersions();
34
+ return setDev(resp.versions[resp.latest]);
35
+ });
36
+ }
37
+ getVersion(version) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const resp = yield this.getVersions();
40
+ return setDev(resp.versions[version]);
41
+ });
42
+ }
43
+ getEndpoint(endpoint) {
44
+ return this.sourceServer + endpoint;
45
+ }
46
+ }
47
+ exports.AgentBundle = AgentBundle;
48
+ function setDev(v) {
49
+ // We check false because this way if there is a problem
50
+ // and the registry gets updated without a dev flag it will
51
+ // be undefined and therefore considered dev since false !== undefined
52
+ v.dev = v["dev-release"] !== false;
53
+ delete v["dev-release"];
54
+ return v;
55
+ }
@@ -0,0 +1,37 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../Base";
3
+ import { Context } from "../../../interfaces/agent/context";
4
+ export declare class AgentContext extends Base {
5
+ constructor(options: Options, axios: AxiosInstance);
6
+ /**
7
+ * Retrieves all contexts.
8
+ * @returns The requested contexts
9
+ */
10
+ getContexts: () => Promise<Context[]>;
11
+ /**
12
+ * Add a new context.
13
+ * @returns The newly created context
14
+ */
15
+ addContext: (server: string, email: string, token: string, enabled: boolean) => Promise<Context>;
16
+ /**
17
+ * Update an existing context.
18
+ * @returns The updated context
19
+ */
20
+ updateContext: (uuid: string, server: string, email: string, token: string, enabled: boolean) => Promise<Context>;
21
+ /**
22
+ * Get an existing context.
23
+ * @returns The requested context
24
+ */
25
+ getContext: (uuid: string) => Promise<Context>;
26
+ /**
27
+ * Delete a context.
28
+ * @returns void
29
+ */
30
+ deleteContext: (uuid: string) => Promise<void>;
31
+ /**
32
+ * Patch the enabled property of a Context.
33
+ * @returns Updated Context
34
+ */
35
+ patchContextEnabled: (uuid: string, enabled: boolean) => Promise<Context>;
36
+ protected getEndpoint(endpoint: string): string;
37
+ }
@@ -0,0 +1,81 @@
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.AgentContext = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ class AgentContext extends Base_1.default {
15
+ constructor(options, axios) {
16
+ super(options, axios);
17
+ /**
18
+ * Retrieves all contexts.
19
+ * @returns The requested contexts
20
+ */
21
+ this.getContexts = () => __awaiter(this, void 0, void 0, function* () {
22
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/context`));
23
+ return resp.data;
24
+ });
25
+ /**
26
+ * Add a new context.
27
+ * @returns The newly created context
28
+ */
29
+ this.addContext = (server, email, token, enabled) => __awaiter(this, void 0, void 0, function* () {
30
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/context`), {
31
+ server,
32
+ email,
33
+ token,
34
+ enabled,
35
+ });
36
+ return resp.data;
37
+ });
38
+ /**
39
+ * Update an existing context.
40
+ * @returns The updated context
41
+ */
42
+ this.updateContext = (uuid, server, email, token, enabled) => __awaiter(this, void 0, void 0, function* () {
43
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/context/${uuid}`), {
44
+ server,
45
+ email,
46
+ token,
47
+ enabled,
48
+ });
49
+ return resp.data;
50
+ });
51
+ /**
52
+ * Get an existing context.
53
+ * @returns The requested context
54
+ */
55
+ this.getContext = (uuid) => __awaiter(this, void 0, void 0, function* () {
56
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/context/${uuid}`));
57
+ return resp.data;
58
+ });
59
+ /**
60
+ * Delete a context.
61
+ * @returns void
62
+ */
63
+ this.deleteContext = (uuid) => __awaiter(this, void 0, void 0, function* () {
64
+ yield this.axios.delete(this.getEndpoint(`/v1/context/${uuid}`));
65
+ });
66
+ /**
67
+ * Patch the enabled property of a Context.
68
+ * @returns Updated Context
69
+ */
70
+ this.patchContextEnabled = (uuid, enabled) => __awaiter(this, void 0, void 0, function* () {
71
+ const res = yield this.axios.patch(this.getEndpoint(`/v1/context/${uuid}/enabled`), {
72
+ enabled,
73
+ });
74
+ return res.data;
75
+ });
76
+ }
77
+ getEndpoint(endpoint) {
78
+ return `${this.options.server}/api/agent${endpoint}`;
79
+ }
80
+ }
81
+ exports.AgentContext = AgentContext;
@@ -0,0 +1,14 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../Base";
3
+ import { AgentBundle } from "./bundle";
4
+ import { DevBundle } from "./bundle/dev";
5
+ import { AgentContext } from "./context";
6
+ import { AgentInstaller } from "./installer";
7
+ export default class Agent extends Base {
8
+ context: AgentContext;
9
+ bundle: AgentBundle;
10
+ devBundle: DevBundle;
11
+ installer: AgentInstaller;
12
+ constructor(options: Options, axios: AxiosInstance);
13
+ protected getEndpoint(endpoint: string): string;
14
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Base_1 = require("../../Base");
4
+ const bundle_1 = require("./bundle");
5
+ const dev_1 = require("./bundle/dev");
6
+ const context_1 = require("./context");
7
+ const installer_1 = require("./installer");
8
+ class Agent extends Base_1.default {
9
+ constructor(options, axios) {
10
+ super(options, axios);
11
+ this.context = new context_1.AgentContext(this.options, this.axios);
12
+ this.bundle = new bundle_1.AgentBundle(this.options, this.axios);
13
+ this.devBundle = new dev_1.DevBundle(this.options, this.axios);
14
+ this.installer = new installer_1.AgentInstaller(this.options, this.axios);
15
+ }
16
+ getEndpoint(endpoint) {
17
+ return `${this.options.server}/api/agent${endpoint}`;
18
+ }
19
+ }
20
+ exports.default = Agent;
@@ -0,0 +1,15 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../Base";
3
+ import { AgentInstallerVersions, InstallerVersion } from "../../../interfaces/agent";
4
+ export declare class AgentInstaller extends Base {
5
+ private sourceServer;
6
+ constructor(options: Options, axios: AxiosInstance);
7
+ getVersions(): Promise<AgentInstallerVersions>;
8
+ getLatestVersion(dev?: boolean): Promise<InstallerVersion[]>;
9
+ getLatestVersionDarwin(): Promise<InstallerVersion | null>;
10
+ getLatestVersionWindows(): Promise<InstallerVersion | null>;
11
+ getVersion(version: string): Promise<InstallerVersion[] | void>;
12
+ getVersionDarwin(version: string): Promise<InstallerVersion | null>;
13
+ getVersionWindows(version: string): Promise<InstallerVersion | null>;
14
+ protected getEndpoint(endpoint: string): string;
15
+ }
@@ -0,0 +1,97 @@
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.AgentInstaller = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ const axios_1 = require("../../../interfaces/axios");
15
+ class AgentInstaller extends Base_1.default {
16
+ constructor(options, axios) {
17
+ var _a;
18
+ super(options, axios);
19
+ this.sourceServer = ((_a = options.agent) === null || _a === void 0 ? void 0 : _a.server) || "https://agent.s3.helmut.cloud";
20
+ }
21
+ getVersions() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const resp = yield this.axios.get(this.getEndpoint("/install/index.json"), { headers: axios_1.disableCacheHeaders });
24
+ const registry = resp.data;
25
+ for (const version in registry.versions) {
26
+ setDev(registry.versions[version]);
27
+ }
28
+ return registry;
29
+ });
30
+ }
31
+ getLatestVersion() {
32
+ return __awaiter(this, arguments, void 0, function* (dev = false) {
33
+ const resp = yield this.getVersions();
34
+ const releases = Object.values(resp.versions)
35
+ .flat()
36
+ .filter(r => r.dev === dev);
37
+ releases.sort((r1, r2) => r2.published_date - r1.published_date);
38
+ const windowsInstaller = releases.find(r => r.os === "windows");
39
+ const macInstaller = releases.find(r => r.os === "darwin");
40
+ const installers = [];
41
+ if (windowsInstaller) {
42
+ installers.push(windowsInstaller);
43
+ }
44
+ if (macInstaller) {
45
+ installers.push(macInstaller);
46
+ }
47
+ return installers;
48
+ });
49
+ }
50
+ getLatestVersionDarwin() {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ var _a;
53
+ const versions = yield this.getLatestVersion();
54
+ return (_a = versions === null || versions === void 0 ? void 0 : versions.find(v => v.os === "darwin")) !== null && _a !== void 0 ? _a : null;
55
+ });
56
+ }
57
+ getLatestVersionWindows() {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ var _a;
60
+ const versions = yield this.getLatestVersion();
61
+ return (_a = versions === null || versions === void 0 ? void 0 : versions.find(v => v.os === "windows")) !== null && _a !== void 0 ? _a : null;
62
+ });
63
+ }
64
+ getVersion(version) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const resp = yield this.getVersions();
67
+ return resp.versions[version];
68
+ });
69
+ }
70
+ getVersionDarwin(version) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ var _a;
73
+ const versions = yield this.getVersion(version);
74
+ return (_a = versions === null || versions === void 0 ? void 0 : versions.find(v => v.os === "darwin")) !== null && _a !== void 0 ? _a : null;
75
+ });
76
+ }
77
+ getVersionWindows(version) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ var _a;
80
+ const versions = yield this.getVersion(version);
81
+ return (_a = versions === null || versions === void 0 ? void 0 : versions.find(v => v.os === "windows")) !== null && _a !== void 0 ? _a : null;
82
+ });
83
+ }
84
+ getEndpoint(endpoint) {
85
+ return this.sourceServer + endpoint;
86
+ }
87
+ }
88
+ exports.AgentInstaller = AgentInstaller;
89
+ function setDev(vs) {
90
+ for (const v of vs) {
91
+ if (v.dev !== false) {
92
+ // This catches undefined, etc. even though it may seem dumb
93
+ v.dev = true;
94
+ }
95
+ }
96
+ return vs;
97
+ }
@@ -0,0 +1,26 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../Base";
3
+ import { AuditLog } from "../../interfaces/auditor";
4
+ import { PaginatedResponse, SearchParams, Version } from "../../interfaces/global";
5
+ import { AuditorInternal } from "./internal";
6
+ export default class Auditor extends Base {
7
+ internal: AuditorInternal;
8
+ constructor(options: Options, axios: AxiosInstance);
9
+ /**
10
+ * @returns An object containing the endpoint version as a string
11
+ */
12
+ version: () => Promise<Version>;
13
+ /**
14
+ * Returns all audit logs for an organization which match the search filter
15
+ * @param organizationName Name of the organization
16
+ * @param filters (optional) Array of search filters
17
+ * @param sorting (optional) Sorting object
18
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
19
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
20
+ * @returns Object containing an array of audit logs and the total number of results found in the database (independent of limit and page)
21
+ */
22
+ searchAuditLogs: ({ organizationName, filters, sorting, limit, page, }: SearchParams & {
23
+ organizationName: string;
24
+ }) => Promise<PaginatedResponse<AuditLog>>;
25
+ protected getEndpoint(endpoint: string): string;
26
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Base_1 = require("../../Base");
13
+ const paginatedResponseHelper_1 = require("../../helper/paginatedResponseHelper");
14
+ const searchFilter_1 = require("../../helper/searchFilter");
15
+ const internal_1 = require("./internal");
16
+ class Auditor extends Base_1.default {
17
+ constructor(options, axios) {
18
+ super(options, axios);
19
+ /**
20
+ * @returns An object containing the endpoint version as a string
21
+ */
22
+ this.version = () => __awaiter(this, void 0, void 0, function* () {
23
+ const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
24
+ return resp.data;
25
+ });
26
+ /**
27
+ * Returns all audit logs for an organization which match the search filter
28
+ * @param organizationName Name of the organization
29
+ * @param filters (optional) Array of search filters
30
+ * @param sorting (optional) Sorting object
31
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
32
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
33
+ * @returns Object containing an array of audit logs and the total number of results found in the database (independent of limit and page)
34
+ */
35
+ this.searchAuditLogs = (_a) => __awaiter(this, [_a], void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0, }) {
36
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
37
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${organizationName}/logs/search?page=${page}&limit=${limit}`), {
38
+ filters: filtersDTO,
39
+ sorting: sorting,
40
+ });
41
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
42
+ });
43
+ this.internal = new internal_1.AuditorInternal(this.options, this.axios);
44
+ }
45
+ getEndpoint(endpoint) {
46
+ return `${this.options.server}/api/auditor${endpoint}`;
47
+ }
48
+ }
49
+ exports.default = Auditor;
@@ -0,0 +1,27 @@
1
+ import Base from "../../../Base";
2
+ import { AuditLogCreate } from "../../../interfaces/auditor";
3
+ export declare class AuditorInternal extends Base {
4
+ private queueExecutionInterval;
5
+ private logQueue;
6
+ private logQueueTimer;
7
+ /**
8
+ * Adds log entries to a queue that will be processed periodically.
9
+ *
10
+ * No exceptions are thrown in case of an error as this function runs periodically asynchronous.
11
+ *
12
+ * This also comes with the downside of log timesstamps being inaccurate as they are created by the Auditor Server.
13
+ * Timestamps might differ as much as: this.options.auditor.queue.executionInterval || 500
14
+ * @param logs array (add multiple logs entries at once)
15
+ */
16
+ queueAuditLogs: (logs: AuditLogCreate[]) => Promise<void>;
17
+ private startQueue;
18
+ /**
19
+ * Deletes all audit logs of an organization
20
+ *
21
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
22
+ * @param orgId the organizations's ID
23
+ * @returns void
24
+ */
25
+ deleteAllAuditLogsOfOrganization: (orgId: string) => Promise<void>;
26
+ protected getEndpoint(endpoint: string): string;
27
+ }
@@ -0,0 +1,61 @@
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.AuditorInternal = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ class AuditorInternal extends Base_1.default {
15
+ constructor() {
16
+ var _a, _b;
17
+ super(...arguments);
18
+ this.queueExecutionInterval = ((_b = (_a = this.options.auditor) === null || _a === void 0 ? void 0 : _a.queue) === null || _b === void 0 ? void 0 : _b.executionInterval) || 500;
19
+ this.logQueue = [];
20
+ /**
21
+ * Adds log entries to a queue that will be processed periodically.
22
+ *
23
+ * No exceptions are thrown in case of an error as this function runs periodically asynchronous.
24
+ *
25
+ * This also comes with the downside of log timesstamps being inaccurate as they are created by the Auditor Server.
26
+ * Timestamps might differ as much as: this.options.auditor.queue.executionInterval || 500
27
+ * @param logs array (add multiple logs entries at once)
28
+ */
29
+ this.queueAuditLogs = (logs) => __awaiter(this, void 0, void 0, function* () {
30
+ if (!this.logQueueTimer) {
31
+ this.startQueue();
32
+ }
33
+ this.logQueue = this.logQueue.concat(logs);
34
+ });
35
+ /**
36
+ * Deletes all audit logs of an organization
37
+ *
38
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
39
+ * @param orgId the organizations's ID
40
+ * @returns void
41
+ */
42
+ this.deleteAllAuditLogsOfOrganization = (orgId) => __awaiter(this, void 0, void 0, function* () {
43
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgId}/logs`));
44
+ });
45
+ }
46
+ startQueue() {
47
+ if (!this.logQueueTimer) {
48
+ this.logQueueTimer = setTimeout(() => {
49
+ if (this.logQueue.length > 0) {
50
+ // DO NOT REMOVE THE IGNORE CATCH AS IT WOULD LEAD TO UNHANDLED PROMISE REJECTION IN OTHER ENDPOINTS AND THEIR CRASH
51
+ this.axios.post(this.getEndpoint("/v1/logs"), this.logQueue).catch(ignored => ignored);
52
+ this.logQueue = [];
53
+ }
54
+ }, this.queueExecutionInterval);
55
+ }
56
+ }
57
+ getEndpoint(endpoint) {
58
+ return `${this.options.server}/api/auditor/internal${endpoint}`;
59
+ }
60
+ }
61
+ exports.AuditorInternal = AuditorInternal;
@@ -0,0 +1,8 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../Base";
3
+ import { HcloudFeature } from "../../../interfaces/bouncer";
4
+ export default class BouncerFeatures extends Base {
5
+ constructor(options: Options, axios: AxiosInstance);
6
+ getHcloudFeatures: () => Promise<HcloudFeature[]>;
7
+ protected getEndpoint(endpoint: string): string;
8
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Base_1 = require("../../../Base");
13
+ class BouncerFeatures extends Base_1.default {
14
+ constructor(options, axios) {
15
+ super(options, axios);
16
+ this.getHcloudFeatures = () => __awaiter(this, void 0, void 0, function* () {
17
+ const resp = yield this.axios.get(this.getEndpoint("/v1/feature/hcloud"), {});
18
+ return resp.data;
19
+ });
20
+ }
21
+ getEndpoint(endpoint) {
22
+ return `${this.options.server}/api/bouncer${endpoint}`;
23
+ }
24
+ }
25
+ exports.default = BouncerFeatures;
@@ -0,0 +1,14 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../Base";
3
+ import { Version } from "../../interfaces/global";
4
+ import BouncerFeatures from "./features";
5
+ export default class Bouncer extends Base {
6
+ features: BouncerFeatures;
7
+ constructor(options: Options, axios: AxiosInstance);
8
+ /**
9
+ * Requests the endpoint version
10
+ * @returns Version object
11
+ */
12
+ version: () => Promise<Version>;
13
+ protected getEndpoint(endpoint: string): string;
14
+ }
@@ -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
+ const Base_1 = require("../../Base");
13
+ const features_1 = require("./features");
14
+ class Bouncer extends Base_1.default {
15
+ constructor(options, axios) {
16
+ super(options, axios);
17
+ /**
18
+ * Requests the endpoint version
19
+ * @returns Version object
20
+ */
21
+ this.version = () => __awaiter(this, void 0, void 0, function* () {
22
+ const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
23
+ return resp.data;
24
+ });
25
+ this.features = new features_1.default(options, axios);
26
+ }
27
+ getEndpoint(endpoint) {
28
+ return `${this.options.server}/api/bouncer${endpoint}`;
29
+ }
30
+ }
31
+ exports.default = Bouncer;
@@ -0,0 +1,36 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../Base";
3
+ import { DaliFuse } from "./avatar/DaliFuseSpace";
4
+ import { DaliHigh5 } from "./avatar/DaliHigh5Space";
5
+ import { DaliOAuthApp } from "./avatar/DaliOAuthApp";
6
+ import { DaliOrganization } from "./avatar/DaliOrganization";
7
+ import { DaliTeam } from "./avatar/DaliTeam";
8
+ import { DaliUser } from "./avatar/DaliUser";
9
+ export declare class DaliAvatar extends Base {
10
+ /**
11
+ * Handles everything around user avatars
12
+ */
13
+ user: DaliUser;
14
+ /**
15
+ * Handles everything around team avatars
16
+ */
17
+ team: DaliTeam;
18
+ /**
19
+ * Handles everything around organization avatars
20
+ */
21
+ organization: DaliOrganization;
22
+ /**
23
+ * Handles everything around high5 spaces avatars
24
+ */
25
+ high5Space: DaliHigh5;
26
+ /**
27
+ * Handles everything around fuse spaces avatars
28
+ */
29
+ fuseSpace: DaliFuse;
30
+ /**
31
+ * Handles everything around OAuth applications avatars
32
+ */
33
+ oauth: DaliOAuthApp;
34
+ constructor(options: Options, axios: AxiosInstance);
35
+ protected getEndpoint(endpoint: string): string;
36
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DaliAvatar = void 0;
4
+ const Base_1 = require("../../Base");
5
+ const DaliFuseSpace_1 = require("./avatar/DaliFuseSpace");
6
+ const DaliHigh5Space_1 = require("./avatar/DaliHigh5Space");
7
+ const DaliOAuthApp_1 = require("./avatar/DaliOAuthApp");
8
+ const DaliOrganization_1 = require("./avatar/DaliOrganization");
9
+ const DaliTeam_1 = require("./avatar/DaliTeam");
10
+ const DaliUser_1 = require("./avatar/DaliUser");
11
+ class DaliAvatar extends Base_1.default {
12
+ constructor(options, axios) {
13
+ super(options, axios);
14
+ this.user = new DaliUser_1.DaliUser(this.options, this.axios);
15
+ this.team = new DaliTeam_1.DaliTeam(this.options, this.axios);
16
+ this.organization = new DaliOrganization_1.DaliOrganization(this.options, this.axios);
17
+ this.high5Space = new DaliHigh5Space_1.DaliHigh5(this.options, this.axios);
18
+ this.fuseSpace = new DaliFuseSpace_1.DaliFuse(this.options, this.axios);
19
+ this.oauth = new DaliOAuthApp_1.DaliOAuthApp(this.options, this.axios);
20
+ }
21
+ getEndpoint(endpoint) {
22
+ return `${this.options.server}/api/dali${endpoint}`;
23
+ }
24
+ }
25
+ exports.DaliAvatar = DaliAvatar;