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
@@ -3,9 +3,9 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
3
3
  if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
4
4
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
5
5
  };
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.NatsSubject = exports.NatsObjectType = exports.NatsMessageType = exports.NatsSubjects = void 0;
8
+ exports.NatsSubjects = exports.NatsSubject = exports.NatsObjectType = exports.NatsMessageType = void 0;
9
9
  var NatsSubject;
10
10
  (function (NatsSubject) {
11
11
  NatsSubject["IDP_USER_GENERAL"] = "hcloud.idp.user.${userId}.general";
@@ -17,6 +17,7 @@ var NatsSubject;
17
17
  NatsSubject["IDP_USER_SECURITY_GENERAL"] = "hcloud.idp.user.${userId}.security.general";
18
18
  NatsSubject["IDP_USER_LICENSE"] = "hcloud.idp.user.${userId}.license";
19
19
  NatsSubject["IDP_USER_SETTINGS_OAUTH_REVOKE"] = "hcloud.idp.user.${userId}.settings.oauth.${oAuthAppId}.revoke";
20
+ NatsSubject["IDP_USER_MESSAGES"] = "hcloud.idp.user.${userId}.messages";
20
21
  NatsSubject["IDP_ORGANIZATION"] = "hcloud.idp.organization.${base64orgName}";
21
22
  NatsSubject["IDP_ORGANIZATION_INVITATIONS"] = "hcloud.idp.organization.${base64orgName}.invitations";
22
23
  NatsSubject["IDP_ORGANIZATION_MEMBERS"] = "hcloud.idp.organization.${base64orgName}.members";
@@ -25,6 +26,7 @@ var NatsSubject;
25
26
  NatsSubject["IDP_ORGANIZATION_TEAM_MEMBERS"] = "hcloud.idp.organization.${base64orgName}.teams.${base64teamName}.members";
26
27
  NatsSubject["IDP_ORGANIZATION_LICENSE"] = "hcloud.idp.organization.${base64orgName}.license";
27
28
  NatsSubject["IDP_ORGANIZATION_SETTINGS_OAUTHAPP"] = "hcloud.idp.organization.${base64orgName}.settings.oauthapp.${oAuthAppId}";
29
+ NatsSubject["IDP_ORGANIZATION_SERVICE_ACCOUNTS"] = "hcloud.idp.organization.${base64orgName}.serviceAccounts";
28
30
  NatsSubject["HIGH5_SPACES"] = "hcloud.high5.organization.${base64orgName}.spaces";
29
31
  NatsSubject["HIGH5_SPACE_PERMISSIONS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
30
32
  NatsSubject["HIGH5_STREAM_EXECUTE"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}";
@@ -41,14 +43,28 @@ var NatsSubject;
41
43
  NatsSubject["HIGH5_CATALOGS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.catalogs";
42
44
  NatsSubject["HIGH5_NODES"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.node";
43
45
  NatsSubject["High5_DESIGN"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design";
46
+ NatsSubject["High5_DESIGN_DELTA"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design.delta";
44
47
  NatsSubject["HIGH5_SNAPSHOTS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.snapshots";
45
48
  NatsSubject["HIGH5_WAVE_ENGINE_LATEST"] = "hcloud.high5.wave.engine.latest";
46
- NatsSubject["HIGH5_SPACES_POOLS"] = "hcloud.high5.organization.${organizationId}.spaces.${spaceId}.pools.>";
47
- NatsSubject["HIGH5_SPACES_POOL"] = "hcloud.high5.organization.${organizationId}.spaces.${spaceId}.pools.${poolId}";
49
+ NatsSubject["HIGH5_SPACES_POOLS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.pools.>";
50
+ NatsSubject["HIGH5_SPACES_POOL"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.pools.${base64poolName}";
51
+ NatsSubject["HIGH5_DATABASES"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.databases";
52
+ NatsSubject["HIGH5_DOCUMENTS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.databases.${base64databaseName}.documents";
53
+ NatsSubject["HIGH5_JOBS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.jobs";
54
+ NatsSubject["HIGH5_JOB_LOGS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.jobs.${jobId}.logs";
48
55
  NatsSubject["FUSE_SPACES"] = "hcloud.fuse.organization.${base64orgName}.spaces";
49
56
  NatsSubject["FUSE_SPACE_PERMISSIONS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
50
57
  NatsSubject["FUSE_JOBS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs";
51
58
  NatsSubject["FUSE_JOB_LOGS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs.${jobId}.logs";
59
+ NatsSubject["COSMO_SPACES"] = "hcloud.cosmo.organization.${base64orgName}.spaces";
60
+ NatsSubject["COSMO_NAMESPACES"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces";
61
+ NatsSubject["COSMO_ASSETS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.assets";
62
+ NatsSubject["COSMO_COMMENTS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.assets.${assetId}.comments";
63
+ NatsSubject["COSMO_SHARE"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.share";
64
+ NatsSubject["COSMO_TAGS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.tags";
65
+ NatsSubject["COSMO_ROLES"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.roles";
66
+ NatsSubject["COSMO_STATUS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.status";
67
+ NatsSubject["MOTHERSHIP_AGENT_CONNECTION"] = "hcloud.mothership.organization.${base64orgName}.agent.connection";
52
68
  NatsSubject["AUDITOR_LOGS"] = "hcloud.auditor.organization.${base64orgName}.logs";
53
69
  NatsSubject["DEBUG_NAMESPACE"] = "hcloud.debug.namespace.${product}";
54
70
  })(NatsSubject || (exports.NatsSubject = NatsSubject = {}));
@@ -88,9 +104,25 @@ var NatsObjectType;
88
104
  NatsObjectType["POOL"] = "POOL";
89
105
  NatsObjectType["AUDIT_LOG"] = "AUDIT_LOG";
90
106
  NatsObjectType["MAIL"] = "MAIL";
107
+ NatsObjectType["JOB"] = "JOB";
108
+ NatsObjectType["JOB_ID"] = "JOB_ID";
109
+ NatsObjectType["JOB_LOG"] = "JOB_LOG";
91
110
  NatsObjectType["CRONJOB"] = "CRONJOB";
92
111
  NatsObjectType["CRONJOB_ID"] = "CRONJOB_ID";
93
112
  NatsObjectType["CRONJOB_LOG"] = "CRONJOB_LOG";
113
+ NatsObjectType["DATABASE"] = "DATABASE";
114
+ NatsObjectType["DOCUMENT"] = "DOCUMENT";
115
+ NatsObjectType["AGENT"] = "AGENT";
116
+ NatsObjectType["MESSAGE"] = "MESSAGE";
117
+ NatsObjectType["ASSET"] = "ASSET";
118
+ NatsObjectType["COMMENT"] = "COMMENT";
119
+ NatsObjectType["TAG"] = "TAG";
120
+ NatsObjectType["SHARE"] = "SHARE";
121
+ NatsObjectType["PRODUCTION"] = "PRODUCTION";
122
+ NatsObjectType["LOCATION"] = "LOCATION";
123
+ NatsObjectType["FOLDER"] = "FOLDER";
124
+ NatsObjectType["ROLE"] = "ROLE";
125
+ NatsObjectType["STATUS"] = "STATUS";
94
126
  })(NatsObjectType || (exports.NatsObjectType = NatsObjectType = {}));
95
127
  /**
96
128
  * This helper class creates subject strings to be used with nats.subscribe and nats.publish
@@ -141,6 +173,9 @@ NatsSubjects.IDP = (_a = class {
141
173
  },
142
174
  };
143
175
  },
176
+ _b.MESSAGES = (userId) => {
177
+ return NatsSubjects.replace(NatsSubject.IDP_USER_MESSAGES, { userId });
178
+ },
144
179
  _b),
145
180
  _a.ORGANIZATION = (organizationName) => {
146
181
  return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION, { organizationName });
@@ -184,6 +219,9 @@ NatsSubjects.IDP = (_a = class {
184
219
  },
185
220
  };
186
221
  },
222
+ _d.ServiceAccounts = (organizationName) => {
223
+ return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_SERVICE_ACCOUNTS, { organizationName });
224
+ },
187
225
  _d),
188
226
  _a);
189
227
  NatsSubjects.Fuse = (_f = class {
@@ -247,11 +285,11 @@ NatsSubjects.High5 = (_j = class {
247
285
  _j.Space = (_l = class {
248
286
  },
249
287
  __setFunctionName(_l, "Space"),
250
- _l.POOLS = (organizationId, spaceId) => {
251
- return NatsSubjects.replace(NatsSubject.HIGH5_SPACES_POOLS, { organizationId, spaceId });
288
+ _l.POOLS = (organizationName, spaceName) => {
289
+ return NatsSubjects.replace(NatsSubject.HIGH5_SPACES_POOLS, { organizationName, spaceName });
252
290
  },
253
- _l.POOL = (organizationId, spaceId, poolId) => {
254
- return NatsSubjects.replace(NatsSubject.HIGH5_SPACES_POOL, { organizationId, spaceId, poolId });
291
+ _l.POOL = (organizationName, spaceName, poolName) => {
292
+ return NatsSubjects.replace(NatsSubject.HIGH5_SPACES_POOL, { organizationName, spaceName, poolName });
255
293
  },
256
294
  _l.PERMISSIONS = (organizationName, spaceName) => {
257
295
  return NatsSubjects.replace(NatsSubject.HIGH5_SPACE_PERMISSIONS, { organizationName, spaceName });
@@ -283,6 +321,14 @@ NatsSubjects.High5 = (_j = class {
283
321
  streamId,
284
322
  });
285
323
  },
324
+ _o.DESIGN_DELTA = (organizationName, spaceName, eventName, streamId) => {
325
+ return NatsSubjects.replace(NatsSubject.High5_DESIGN_DELTA, {
326
+ organizationName,
327
+ spaceName,
328
+ eventName,
329
+ streamId,
330
+ });
331
+ },
286
332
  _o.SNAPSHOTS = (organizationName, spaceName, eventName, streamId) => {
287
333
  return NatsSubjects.replace(NatsSubject.HIGH5_SNAPSHOTS, {
288
334
  organizationName,
@@ -319,33 +365,101 @@ NatsSubjects.High5 = (_j = class {
319
365
  _l.NODES = (organizationName, spaceName) => {
320
366
  return NatsSubjects.replace(NatsSubject.HIGH5_NODES, { organizationName, spaceName });
321
367
  },
322
- _l),
323
- _j.WAVE = (_q = class {
368
+ _l.DATABASES = (organizationName, spaceName) => {
369
+ return NatsSubjects.replace(NatsSubject.HIGH5_DATABASES, { organizationName, spaceName });
324
370
  },
325
- __setFunctionName(_q, "WAVE"),
326
- _q.ENGINE = (_r = class {
371
+ _l.Database = (_q = class {
372
+ },
373
+ __setFunctionName(_q, "Database"),
374
+ _q.DOCUMENTS = (organizationName, spaceName, databaseName) => {
375
+ return NatsSubjects.replace(NatsSubject.HIGH5_DOCUMENTS, {
376
+ organizationName,
377
+ spaceName,
378
+ databaseName,
379
+ });
380
+ },
381
+ _q),
382
+ _l.Jobs = (_r = class {
383
+ },
384
+ __setFunctionName(_r, "Jobs"),
385
+ _r.JOBS = (organizationName, spaceName) => {
386
+ return NatsSubjects.replace(NatsSubject.HIGH5_JOBS, { organizationName, spaceName });
387
+ },
388
+ _r.JOB_LOGS = (organizationName, spaceName, jobId) => {
389
+ return NatsSubjects.replace(NatsSubject.HIGH5_JOB_LOGS, { organizationName, spaceName, jobId });
327
390
  },
328
- __setFunctionName(_r, "ENGINE"),
329
- _r.LATEST = NatsSubject.HIGH5_WAVE_ENGINE_LATEST,
330
391
  _r),
331
- _q),
392
+ _l),
393
+ _j.WAVE = (_s = class {
394
+ },
395
+ __setFunctionName(_s, "WAVE"),
396
+ _s.ENGINE = (_t = class {
397
+ },
398
+ __setFunctionName(_t, "ENGINE"),
399
+ _t.LATEST = NatsSubject.HIGH5_WAVE_ENGINE_LATEST,
400
+ _t),
401
+ _s),
332
402
  _j);
333
- NatsSubjects.Auditor = (_s = class {
403
+ NatsSubjects.Mothership = (_u = class {
404
+ },
405
+ __setFunctionName(_u, "Mothership"),
406
+ _u.CONNECTION = (organizationName) => {
407
+ return NatsSubjects.replace(NatsSubject.MOTHERSHIP_AGENT_CONNECTION, { organizationName });
334
408
  },
335
- __setFunctionName(_s, "Auditor"),
336
- _s.LOGS = (organizationName) => {
409
+ _u);
410
+ NatsSubjects.Auditor = (_v = class {
411
+ },
412
+ __setFunctionName(_v, "Auditor"),
413
+ _v.LOGS = (organizationName) => {
337
414
  return NatsSubjects.replace(NatsSubject.AUDITOR_LOGS, { organizationName });
338
415
  },
339
- _s);
416
+ _v);
340
417
  NatsSubjects.Logging = (product) => {
341
418
  return NatsSubjects.replace(NatsSubject.DEBUG_NAMESPACE, { product });
342
419
  };
420
+ NatsSubjects.Cosmo = (_w = class {
421
+ },
422
+ __setFunctionName(_w, "Cosmo"),
423
+ _w.SPACES = (organizationName) => {
424
+ return NatsSubjects.replace(NatsSubject.COSMO_SPACES, { organizationName });
425
+ },
426
+ _w.Space = (_x = class {
427
+ },
428
+ __setFunctionName(_x, "Space"),
429
+ _x.NAMESPACES = (organizationName, spaceName) => {
430
+ return NatsSubjects.replace(NatsSubject.COSMO_NAMESPACES, { organizationName, spaceName });
431
+ },
432
+ _x.Namespace = (_y = class {
433
+ },
434
+ __setFunctionName(_y, "Namespace"),
435
+ _y.COMMENTS = (organizationName, spaceName, namespaceName, assetId) => {
436
+ return NatsSubjects.replace(NatsSubject.COSMO_COMMENTS, { organizationName, spaceName, namespaceName, assetId });
437
+ },
438
+ _y.TAGS = (organizationName, spaceName, namespaceName) => {
439
+ return NatsSubjects.replace(NatsSubject.COSMO_TAGS, { organizationName, spaceName, namespaceName });
440
+ },
441
+ _y.STATUS = (organizationName, spaceName, namespaceName) => {
442
+ return NatsSubjects.replace(NatsSubject.COSMO_STATUS, { organizationName, spaceName, namespaceName });
443
+ },
444
+ _y),
445
+ _x.ASSETS = (organizationName, spaceName) => {
446
+ return NatsSubjects.replace(NatsSubject.COSMO_ASSETS, { organizationName, spaceName });
447
+ },
448
+ _x.SHARES = (organizationName, spaceName) => {
449
+ return NatsSubjects.replace(NatsSubject.COSMO_SHARE, { organizationName, spaceName });
450
+ },
451
+ _x.ROLES = (organizationName, spaceName) => {
452
+ return NatsSubjects.replace(NatsSubject.COSMO_ROLES, { organizationName, spaceName });
453
+ },
454
+ _x),
455
+ _w);
343
456
  // eslint-disable-next-line complexity
344
457
  NatsSubjects.replace = (subject, replacements) => {
345
458
  subject = subject.replace("${userId}", replacements.userId || "null");
346
459
  subject = subject.replace("${base64orgName}", replacements.organizationName ? (replacements.organizationName === "*" ? "*" : base64Encode(replacements.organizationName)) : "null");
347
460
  subject = subject.replace("${organizationId}", replacements.organizationId || "null");
348
461
  subject = subject.replace("${base64spaceName}", replacements.spaceName ? (replacements.spaceName === "*" ? "*" : base64Encode(replacements.spaceName)) : "null");
462
+ subject = subject.replace("${base64namespaceName}", replacements.namespaceName ? (replacements.namespaceName === "*" ? "*" : base64Encode(replacements.namespaceName)) : "null");
349
463
  subject = subject.replace("${spaceId}", replacements.spaceId || "null");
350
464
  subject = subject.replace("${base64eventName}", replacements.eventName ? (replacements.eventName === "*" ? "*" : base64Encode(replacements.eventName)) : "null");
351
465
  subject = subject.replace("${streamId}", replacements.streamId || "null");
@@ -358,8 +472,11 @@ NatsSubjects.replace = (subject, replacements) => {
358
472
  subject = subject.replace("${base64teamName}", replacements.teamName ? (replacements.teamName === "*" ? "*" : base64Encode(replacements.teamName)) : "null");
359
473
  subject = subject.replace("${base64poolName}", replacements.poolName ? (replacements.poolName === "*" ? "*" : base64Encode(replacements.poolName)) : "null");
360
474
  subject = subject.replace("${poolId}", replacements.poolId || "null");
475
+ subject = subject.replace("${poolName}", replacements.poolName || "null");
361
476
  subject = subject.replace("${executionId}", replacements.executionId || "null");
362
477
  subject = subject.replace("${executionSecret}", replacements.executionSecret || "null");
478
+ subject = subject.replace("${base64databaseName}", replacements.databaseName ? (replacements.databaseName === "*" ? "*" : base64Encode(replacements.databaseName)) : "null");
479
+ subject = subject.replace("${assetId}", replacements.assetId || "null");
363
480
  return subject;
364
481
  };
365
482
  const base64Encode = (str) => {
@@ -0,0 +1,10 @@
1
+ export interface Short {
2
+ _id: string;
3
+ url: string;
4
+ slug: string;
5
+ visitsLimit: number;
6
+ visitsCurrent: number;
7
+ organizationId: string;
8
+ spaceId: string;
9
+ createDate: number;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 { ToggleDevBundle } from "../../../../interfaces/agent/bundle/dev";
4
4
  export declare class DevBundle extends Base {
5
5
  constructor(options: Options, axios: AxiosInstance);
@@ -7,14 +7,24 @@ export declare class DevBundle extends Base {
7
7
  * Retrieves the current dev bundle state.
8
8
  * @returns The current dev bundle state
9
9
  */
10
- getDevBundleState(): Promise<ToggleDevBundle>;
10
+ getDevBundleState<R extends boolean = false>(raw?: {
11
+ raw: R;
12
+ }): Promise<MaybeRaw<R, ToggleDevBundle>>;
11
13
  /**
12
14
  * Update the dev bundle state.
13
15
  * @returns 204 - No content
14
16
  */
15
- updateDevBundleState(allowDev: boolean): Promise<void>;
16
- getCurrentVersion(): Promise<string>;
17
- setCurrentVersion(version: string): Promise<void>;
18
- restart(): Promise<void>;
17
+ updateDevBundleState<R extends boolean = false>(allowDev: boolean, raw?: {
18
+ raw: R;
19
+ }): Promise<MaybeRaw<R, void>>;
20
+ getCurrentVersion<R extends boolean = false>(raw?: {
21
+ raw: R;
22
+ }): Promise<MaybeRaw<R, string>>;
23
+ setCurrentVersion<R extends boolean = false>(version: string, raw?: {
24
+ raw: R;
25
+ }): Promise<MaybeRaw<R, void>>;
26
+ restart<R extends boolean = false>(raw?: {
27
+ raw: R;
28
+ }): Promise<MaybeRaw<R, void>>;
19
29
  protected getEndpoint(endpoint: string): string;
20
30
  }
@@ -19,38 +19,40 @@ class DevBundle extends Base_1.default {
19
19
  * Retrieves the current dev bundle state.
20
20
  * @returns The current dev bundle state
21
21
  */
22
- getDevBundleState() {
22
+ getDevBundleState(raw) {
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
24
  const resp = yield this.axios.get(this.getEndpoint(`/v1/bundle/dev`));
25
- return resp.data;
25
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
26
26
  });
27
27
  }
28
28
  /**
29
29
  * Update the dev bundle state.
30
30
  * @returns 204 - No content
31
31
  */
32
- updateDevBundleState(allowDev) {
32
+ updateDevBundleState(allowDev, raw) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
34
  const resp = yield this.axios.post(this.getEndpoint(`/v1/bundle/dev`), {
35
35
  allowDev,
36
36
  });
37
- return resp.data;
37
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
38
38
  });
39
39
  }
40
- getCurrentVersion() {
40
+ getCurrentVersion(raw) {
41
41
  return __awaiter(this, void 0, void 0, function* () {
42
42
  const resp = yield this.axios.get(this.getEndpoint("/v1/bundle/version"));
43
- return resp.data;
43
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
44
44
  });
45
45
  }
46
- setCurrentVersion(version) {
46
+ setCurrentVersion(version, raw) {
47
47
  return __awaiter(this, void 0, void 0, function* () {
48
- yield this.axios.put(this.getEndpoint("/v1/bundle/version"), { version }, { headers: { "Content-Type": "application/x-www-form-urlencoded" } });
48
+ const resp = yield this.axios.put(this.getEndpoint("/v1/bundle/version"), { version }, { headers: { "Content-Type": "application/x-www-form-urlencoded" } });
49
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
49
50
  });
50
51
  }
51
- restart() {
52
+ restart(raw) {
52
53
  return __awaiter(this, void 0, void 0, function* () {
53
- yield this.axios.post(this.getEndpoint("/v1/bundle/restart"));
54
+ const resp = yield this.axios.post(this.getEndpoint("/v1/bundle/restart"));
55
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
54
56
  });
55
57
  }
56
58
  getEndpoint(endpoint) {
@@ -1,11 +1,17 @@
1
1
  import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../Base";
2
+ import Base, { MaybeRaw, Options } from "../../../Base";
3
3
  import { AgentVersions, Version } from "../../../interfaces/agent";
4
4
  export declare class AgentBundle extends Base {
5
5
  private sourceServer;
6
6
  constructor(options: Options, axios: AxiosInstance);
7
- getVersions(): Promise<AgentVersions>;
8
- getLatestVersion(): Promise<Version>;
9
- getVersion(version: string): Promise<Version | void>;
7
+ getVersions<R extends boolean = false>(raw?: {
8
+ raw: R;
9
+ }): Promise<MaybeRaw<R, AgentVersions>>;
10
+ getLatestVersion<R extends boolean = false>(raw?: {
11
+ raw: R;
12
+ }): Promise<MaybeRaw<R, Version>>;
13
+ getVersion<R extends boolean = false>(version: string, raw?: {
14
+ raw: R;
15
+ }): Promise<MaybeRaw<R, Version | void>>;
10
16
  protected getEndpoint(endpoint: string): string;
11
17
  }
@@ -18,26 +18,26 @@ class AgentBundle extends Base_1.default {
18
18
  super(options, axios);
19
19
  this.sourceServer = ((_a = options.agent) === null || _a === void 0 ? void 0 : _a.server) || "https://agent.s3.helmut.cloud";
20
20
  }
21
- getVersions() {
21
+ getVersions(raw) {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
23
  const resp = yield this.axios.get(this.getEndpoint("/bundles/index.json"), { headers: axios_1.disableCacheHeaders });
24
24
  const registry = resp.data;
25
25
  for (const v in registry.versions) {
26
26
  setDev(registry.versions[v]);
27
27
  }
28
- return resp.data;
28
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
29
29
  });
30
30
  }
31
- getLatestVersion() {
31
+ getLatestVersion(raw) {
32
32
  return __awaiter(this, void 0, void 0, function* () {
33
33
  const resp = yield this.getVersions();
34
- return setDev(resp.versions[resp.latest]);
34
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: setDev(resp.versions[resp.latest]) }) : setDev(resp.versions[resp.latest]));
35
35
  });
36
36
  }
37
- getVersion(version) {
37
+ getVersion(version, raw) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
39
  const resp = yield this.getVersions();
40
- return setDev(resp.versions[version]);
40
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: setDev(resp.versions[version]) }) : setDev(resp.versions[version]));
41
41
  });
42
42
  }
43
43
  getEndpoint(endpoint) {
@@ -1,35 +1,54 @@
1
- import Base from "../../../Base";
1
+ import Base, { MaybeRaw } from "../../../Base";
2
2
  import { Context } from "../../../interfaces/agent/context";
3
3
  export declare class AgentContext extends Base {
4
4
  /**
5
5
  * Retrieves all contexts.
6
6
  * @returns The requested contexts
7
7
  */
8
- getContexts(): Promise<Context[]>;
8
+ getContexts<R extends boolean = false>(raw?: {
9
+ raw: R;
10
+ }): Promise<MaybeRaw<R, Context[]>>;
9
11
  /**
10
12
  * Add a new context.
11
13
  * @returns The newly created context
12
14
  */
13
- addContext(server: string, email: string, token: string, enabled: boolean): Promise<Context>;
15
+ addContext<R extends boolean = false>(server: string, email: string, token: string, enabled: boolean, raw?: {
16
+ raw: R;
17
+ }): Promise<MaybeRaw<R, Context>>;
18
+ /**
19
+ * Add a new context by using a service accounts PAT token.
20
+ * @returns The newly created context
21
+ */
22
+ addServiceAccountContext<R extends boolean = false>(server: string, token: string, enabled: boolean, raw?: {
23
+ raw: R;
24
+ }): Promise<MaybeRaw<R, Context>>;
14
25
  /**
15
26
  * Update an existing context.
16
27
  * @returns The updated context
17
28
  */
18
- updateContext(uuid: string, server: string, email: string, token: string, enabled: boolean): Promise<Context>;
29
+ updateContext<R extends boolean = false>(uuid: string, server: string, email: string, token: string, enabled: boolean, raw?: {
30
+ raw: R;
31
+ }): Promise<MaybeRaw<R, Context>>;
19
32
  /**
20
33
  * Get an existing context.
21
34
  * @returns The requested context
22
35
  */
23
- getContext(uuid: string): Promise<Context>;
36
+ getContext<R extends boolean = false>(uuid: string, raw?: {
37
+ raw: R;
38
+ }): Promise<MaybeRaw<R, Context>>;
24
39
  /**
25
40
  * Delete a context.
26
41
  * @returns void
27
42
  */
28
- deleteContext(uuid: string): Promise<void>;
43
+ deleteContext<R extends boolean = false>(uuid: string, raw?: {
44
+ raw: R;
45
+ }): Promise<MaybeRaw<R, Context>>;
29
46
  /**
30
47
  * Patch the enabled property of a Context.
31
48
  * @returns Updated Context
32
49
  */
33
- patchContextEnabled(uuid: string, enabled: boolean): Promise<Context>;
50
+ patchContextEnabled<R extends boolean = false>(uuid: string, enabled: boolean, raw?: {
51
+ raw: R;
52
+ }): Promise<MaybeRaw<R, Context>>;
34
53
  protected getEndpoint(endpoint: string): string;
35
54
  }
@@ -16,17 +16,17 @@ class AgentContext extends Base_1.default {
16
16
  * Retrieves all contexts.
17
17
  * @returns The requested contexts
18
18
  */
19
- getContexts() {
19
+ getContexts(raw) {
20
20
  return __awaiter(this, void 0, void 0, function* () {
21
21
  const resp = yield this.axios.get(this.getEndpoint(`/v1/context`));
22
- return resp.data;
22
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
23
23
  });
24
24
  }
25
25
  /**
26
26
  * Add a new context.
27
27
  * @returns The newly created context
28
28
  */
29
- addContext(server, email, token, enabled) {
29
+ addContext(server, email, token, enabled, raw) {
30
30
  return __awaiter(this, void 0, void 0, function* () {
31
31
  const resp = yield this.axios.post(this.getEndpoint(`/v1/context`), {
32
32
  server,
@@ -34,14 +34,28 @@ class AgentContext extends Base_1.default {
34
34
  token,
35
35
  enabled,
36
36
  });
37
- return resp.data;
37
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
38
+ });
39
+ }
40
+ /**
41
+ * Add a new context by using a service accounts PAT token.
42
+ * @returns The newly created context
43
+ */
44
+ addServiceAccountContext(server, token, enabled, raw) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/context`), {
47
+ server,
48
+ token: token.toLowerCase().startsWith("bearer") ? token : `Bearer ${token}`,
49
+ enabled,
50
+ });
51
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
38
52
  });
39
53
  }
40
54
  /**
41
55
  * Update an existing context.
42
56
  * @returns The updated context
43
57
  */
44
- updateContext(uuid, server, email, token, enabled) {
58
+ updateContext(uuid, server, email, token, enabled, raw) {
45
59
  return __awaiter(this, void 0, void 0, function* () {
46
60
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/context/${uuid}`), {
47
61
  server,
@@ -49,38 +63,39 @@ class AgentContext extends Base_1.default {
49
63
  token,
50
64
  enabled,
51
65
  });
52
- return resp.data;
66
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
53
67
  });
54
68
  }
55
69
  /**
56
70
  * Get an existing context.
57
71
  * @returns The requested context
58
72
  */
59
- getContext(uuid) {
73
+ getContext(uuid, raw) {
60
74
  return __awaiter(this, void 0, void 0, function* () {
61
75
  const resp = yield this.axios.get(this.getEndpoint(`/v1/context/${uuid}`));
62
- return resp.data;
76
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
63
77
  });
64
78
  }
65
79
  /**
66
80
  * Delete a context.
67
81
  * @returns void
68
82
  */
69
- deleteContext(uuid) {
83
+ deleteContext(uuid, raw) {
70
84
  return __awaiter(this, void 0, void 0, function* () {
71
- yield this.axios.delete(this.getEndpoint(`/v1/context/${uuid}`));
85
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/context/${uuid}`));
86
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
72
87
  });
73
88
  }
74
89
  /**
75
90
  * Patch the enabled property of a Context.
76
91
  * @returns Updated Context
77
92
  */
78
- patchContextEnabled(uuid, enabled) {
93
+ patchContextEnabled(uuid, enabled, raw) {
79
94
  return __awaiter(this, void 0, void 0, function* () {
80
95
  const res = yield this.axios.patch(this.getEndpoint(`/v1/context/${uuid}/enabled`), {
81
96
  enabled,
82
97
  });
83
- return res.data;
98
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
84
99
  });
85
100
  }
86
101
  getEndpoint(endpoint) {
@@ -1,4 +1,4 @@
1
- import Base from "../../Base";
1
+ import Base, { MaybeRaw } from "../../Base";
2
2
  import { AuditLog } from "../../interfaces/auditor";
3
3
  import { PaginatedResponse, SearchParams, Version } from "../../interfaces/global";
4
4
  import { AuditorInternal } from "./internal";
@@ -8,7 +8,9 @@ export default class Auditor extends Base {
8
8
  /**
9
9
  * @returns An object containing the endpoint version as a string
10
10
  */
11
- version(): Promise<Version>;
11
+ version<R extends boolean = false>(raw?: {
12
+ raw: R;
13
+ }): Promise<MaybeRaw<R, Version>>;
12
14
  /**
13
15
  * Returns all audit logs for an organization which match the search filter
14
16
  * @param organizationName Name of the organization
@@ -18,8 +20,10 @@ export default class Auditor extends Base {
18
20
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
19
21
  * @returns Object containing an array of audit logs and the total number of results found in the database (independent of limit and page)
20
22
  */
21
- searchAuditLogs({ organizationName, filters, sorting, limit, page, }: SearchParams & {
23
+ searchAuditLogs<R extends boolean = false>({ organizationName, filters, sorting, limit, page }: SearchParams & {
22
24
  organizationName: string;
23
- }): Promise<PaginatedResponse<AuditLog>>;
25
+ }, raw?: {
26
+ raw: R;
27
+ }): Promise<MaybeRaw<R, PaginatedResponse<AuditLog>>>;
24
28
  protected getEndpoint(endpoint: string): string;
25
29
  }
@@ -23,10 +23,10 @@ class Auditor extends Base_1.default {
23
23
  /**
24
24
  * @returns An object containing the endpoint version as a string
25
25
  */
26
- version() {
26
+ version(raw) {
27
27
  return __awaiter(this, void 0, void 0, function* () {
28
28
  const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
29
- return resp.data;
29
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
30
30
  });
31
31
  }
32
32
  /**
@@ -38,14 +38,14 @@ class Auditor extends Base_1.default {
38
38
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
39
39
  * @returns Object containing an array of audit logs and the total number of results found in the database (independent of limit and page)
40
40
  */
41
- searchAuditLogs(_a) {
42
- return __awaiter(this, arguments, void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0, }) {
41
+ searchAuditLogs(_a, raw_1) {
42
+ return __awaiter(this, arguments, void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0 }, raw) {
43
43
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
44
44
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${organizationName}/logs/search?page=${page}&limit=${limit}`), {
45
45
  filters: filtersDTO,
46
46
  sorting: sorting,
47
47
  });
48
- return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
48
+ 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));
49
49
  });
50
50
  }
51
51
  getEndpoint(endpoint) {