hcloud-sdk 0.0.16 → 15.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 (310) hide show
  1. package/README.md +1 -0
  2. package/changelog.md +45 -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 +90 -0
  8. package/lib/Hcloud.js +184 -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.d.ts → auditor/index.d.ts} +31 -5
  20. package/lib/interfaces/{Auditor.js → auditor/index.js} +15 -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 +7 -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/frontend/featureflags/index.d.ts +7 -0
  32. package/lib/interfaces/frontend/featureflags/index.js +2 -0
  33. package/lib/interfaces/fuse/index.d.ts +3 -0
  34. package/lib/interfaces/fuse/index.js +19 -0
  35. package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +38 -0
  36. package/lib/interfaces/fuse/space/cronjob/Cronjob.js +8 -0
  37. package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +16 -0
  38. package/lib/interfaces/fuse/space/cronjob/CronjobLog.js +2 -0
  39. package/lib/interfaces/fuse/space/index.d.ts +21 -0
  40. package/lib/interfaces/fuse/space/index.js +11 -0
  41. package/lib/interfaces/global/HCloudError.d.ts +8 -0
  42. package/lib/interfaces/global/HCloudError.js +13 -0
  43. package/lib/interfaces/global/Header.d.ts +4 -0
  44. package/lib/interfaces/global/Header.js +2 -0
  45. package/lib/interfaces/global/HttpMethod.d.ts +7 -0
  46. package/lib/interfaces/global/HttpMethod.js +11 -0
  47. package/lib/interfaces/global/PaginatedResponse.d.ts +4 -0
  48. package/lib/interfaces/global/PaginatedResponse.js +2 -0
  49. package/lib/interfaces/global/Products.d.ts +11 -0
  50. package/lib/interfaces/global/Products.js +15 -0
  51. package/lib/interfaces/global/SearchFilters.d.ts +86 -0
  52. package/lib/interfaces/global/SearchFilters.js +49 -0
  53. package/lib/interfaces/global/Space.d.ts +20 -0
  54. package/lib/interfaces/global/Space.js +8 -0
  55. package/lib/interfaces/global/Version.d.ts +3 -0
  56. package/lib/interfaces/global/Version.js +2 -0
  57. package/lib/interfaces/global/Views.d.ts +8 -0
  58. package/lib/interfaces/global/Views.js +12 -0
  59. package/lib/interfaces/global/index.d.ts +9 -0
  60. package/lib/interfaces/global/index.js +25 -0
  61. package/lib/interfaces/high5/index.d.ts +16 -0
  62. package/lib/interfaces/high5/index.js +32 -0
  63. package/lib/interfaces/high5/joinToken/index.d.ts +10 -0
  64. package/lib/interfaces/high5/joinToken/index.js +2 -0
  65. package/lib/interfaces/high5/space/event/index.d.ts +15 -0
  66. package/lib/interfaces/high5/space/event/index.js +2 -0
  67. package/lib/interfaces/high5/space/event/stream/design/DesignOperation.d.ts +68 -0
  68. package/lib/interfaces/high5/space/event/stream/design/DesignOperation.js +20 -0
  69. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +92 -0
  70. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.js +20 -0
  71. package/lib/interfaces/high5/space/event/stream/design/index.d.ts +22 -0
  72. package/lib/interfaces/high5/space/event/stream/design/index.js +2 -0
  73. package/lib/interfaces/high5/space/event/stream/design/snapshot/index.d.ts +30 -0
  74. package/lib/interfaces/high5/space/event/stream/design/snapshot/index.js +8 -0
  75. package/lib/interfaces/high5/space/event/stream/index.d.ts +77 -0
  76. package/lib/interfaces/high5/space/event/stream/index.js +13 -0
  77. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +62 -0
  78. package/lib/interfaces/high5/space/event/stream/node/index.js +7 -0
  79. package/lib/interfaces/high5/space/execution/index.d.ts +148 -0
  80. package/lib/interfaces/high5/space/execution/index.js +21 -0
  81. package/lib/interfaces/high5/space/index.d.ts +23 -0
  82. package/lib/interfaces/high5/space/index.js +12 -0
  83. package/lib/interfaces/high5/space/secret/index.d.ts +12 -0
  84. package/lib/interfaces/high5/space/secret/index.js +2 -0
  85. package/lib/interfaces/high5/space/webhook/index.d.ts +75 -0
  86. package/lib/interfaces/high5/space/webhook/index.js +9 -0
  87. package/lib/interfaces/high5/wave/changelog.d.ts +30 -0
  88. package/lib/interfaces/high5/wave/changelog.js +18 -0
  89. package/lib/interfaces/high5/wave/index.d.ts +201 -0
  90. package/lib/interfaces/high5/wave/index.js +61 -0
  91. package/lib/interfaces/idp/index.d.ts +26 -0
  92. package/lib/interfaces/idp/index.js +38 -0
  93. package/lib/interfaces/idp/oauth/index.d.ts +19 -0
  94. package/lib/interfaces/idp/oauth/index.js +8 -0
  95. package/lib/interfaces/idp/organization/index.d.ts +32 -0
  96. package/lib/interfaces/idp/organization/index.js +25 -0
  97. package/lib/interfaces/idp/organization/license/index.d.ts +84 -0
  98. package/lib/interfaces/idp/organization/license/index.js +15 -0
  99. package/lib/interfaces/idp/organization/member/index.d.ts +15 -0
  100. package/lib/interfaces/idp/organization/member/index.js +2 -0
  101. package/lib/interfaces/idp/organization/member/invitations/index.d.ts +26 -0
  102. package/lib/interfaces/idp/organization/member/invitations/index.js +18 -0
  103. package/lib/interfaces/idp/organization/settings/domain/index.d.ts +19 -0
  104. package/lib/interfaces/idp/organization/settings/domain/index.js +8 -0
  105. package/lib/interfaces/idp/organization/settings/domain/saml/index.d.ts +10 -0
  106. package/lib/interfaces/idp/organization/settings/domain/saml/index.js +2 -0
  107. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +37 -0
  108. package/lib/interfaces/idp/organization/settings/oauthApp/index.js +2 -0
  109. package/lib/interfaces/idp/organization/team/index.d.ts +24 -0
  110. package/lib/interfaces/idp/organization/team/index.js +9 -0
  111. package/lib/interfaces/idp/user/ConnectionSettings.d.ts +6 -0
  112. package/lib/interfaces/idp/user/ConnectionSettings.js +2 -0
  113. package/lib/interfaces/idp/user/GeneralSettings.d.ts +45 -0
  114. package/lib/interfaces/idp/user/GeneralSettings.js +38 -0
  115. package/lib/interfaces/idp/user/NotificationSettings.d.ts +8 -0
  116. package/lib/interfaces/idp/user/NotificationSettings.js +2 -0
  117. package/lib/interfaces/idp/user/Pat.d.ts +19 -0
  118. package/lib/interfaces/idp/user/Pat.js +2 -0
  119. package/lib/interfaces/idp/user/Scopes.d.ts +40 -0
  120. package/lib/interfaces/idp/user/Scopes.js +50 -0
  121. package/lib/interfaces/idp/user/SuccessfulAuth.d.ts +5 -0
  122. package/lib/interfaces/idp/user/SuccessfulAuth.js +2 -0
  123. package/lib/interfaces/idp/user/Totp.d.ts +20 -0
  124. package/lib/interfaces/idp/user/Totp.js +2 -0
  125. package/lib/interfaces/idp/user/index.d.ts +23 -0
  126. package/lib/interfaces/idp/user/index.js +2 -0
  127. package/lib/interfaces/mailer/index.d.ts +66 -0
  128. package/lib/interfaces/mailer/index.js +81 -0
  129. package/lib/interfaces/mothership/index.d.ts +28 -0
  130. package/lib/interfaces/mothership/index.js +8 -0
  131. package/lib/interfaces/nats/index.d.ts +239 -0
  132. package/lib/interfaces/nats/index.js +316 -0
  133. package/lib/service/agent/bundle/dev/index.d.ts +17 -0
  134. package/lib/service/agent/bundle/dev/index.js +44 -0
  135. package/lib/service/agent/bundle/index.d.ts +11 -0
  136. package/lib/service/agent/bundle/index.js +55 -0
  137. package/lib/service/agent/context/index.d.ts +35 -0
  138. package/lib/service/agent/context/index.js +90 -0
  139. package/lib/service/agent/index.d.ts +16 -0
  140. package/lib/service/agent/index.js +37 -0
  141. package/lib/service/agent/installer/index.d.ts +15 -0
  142. package/lib/service/agent/installer/index.js +97 -0
  143. package/lib/service/auditor/index.d.ts +25 -0
  144. package/lib/service/auditor/index.js +55 -0
  145. package/lib/service/auditor/internal/index.d.ts +27 -0
  146. package/lib/service/auditor/internal/index.js +65 -0
  147. package/lib/service/bouncer/features/index.d.ts +8 -0
  148. package/lib/service/bouncer/features/index.js +27 -0
  149. package/lib/service/bouncer/index.d.ts +7 -0
  150. package/lib/service/bouncer/index.js +16 -0
  151. package/lib/service/dali/DaliAvatar.d.ts +40 -0
  152. package/lib/service/dali/DaliAvatar.js +70 -0
  153. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +26 -0
  154. package/lib/service/dali/avatar/DaliFuseSpace.js +58 -0
  155. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +26 -0
  156. package/lib/service/dali/avatar/DaliHigh5Space.js +58 -0
  157. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +26 -0
  158. package/lib/service/dali/avatar/DaliOAuthApp.js +58 -0
  159. package/lib/service/dali/avatar/DaliOrganization.d.ts +23 -0
  160. package/lib/service/dali/avatar/DaliOrganization.js +55 -0
  161. package/lib/service/dali/avatar/DaliTeam.d.ts +26 -0
  162. package/lib/service/dali/avatar/DaliTeam.js +58 -0
  163. package/lib/service/dali/avatar/DaliUser.d.ts +20 -0
  164. package/lib/service/dali/avatar/DaliUser.js +52 -0
  165. package/lib/service/dali/index.d.ts +15 -0
  166. package/lib/service/dali/index.js +37 -0
  167. package/lib/service/fuse/index.d.ts +18 -0
  168. package/lib/service/fuse/index.js +48 -0
  169. package/lib/service/fuse/internal/index.d.ts +8 -0
  170. package/lib/service/fuse/internal/index.js +31 -0
  171. package/lib/service/fuse/internal/space/cronjob/index.d.ts +7 -0
  172. package/lib/service/fuse/internal/space/cronjob/index.js +17 -0
  173. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +15 -0
  174. package/lib/service/fuse/internal/space/cronjob/log/index.js +34 -0
  175. package/lib/service/fuse/internal/space/index.d.ts +22 -0
  176. package/lib/service/fuse/internal/space/index.js +49 -0
  177. package/lib/service/fuse/space/cronjob/index.d.ts +123 -0
  178. package/lib/service/fuse/space/cronjob/index.js +203 -0
  179. package/lib/service/fuse/space/cronjob/log/index.d.ts +31 -0
  180. package/lib/service/fuse/space/cronjob/log/index.js +58 -0
  181. package/lib/service/fuse/space/index.d.ts +81 -0
  182. package/lib/service/fuse/space/index.js +152 -0
  183. package/lib/service/high5/execution/index.d.ts +10 -0
  184. package/lib/service/high5/execution/index.js +24 -0
  185. package/lib/service/high5/execution/log/index.d.ts +19 -0
  186. package/lib/service/high5/execution/log/index.js +40 -0
  187. package/lib/service/high5/execution/status/index.d.ts +18 -0
  188. package/lib/service/high5/execution/status/index.js +40 -0
  189. package/lib/service/high5/index.d.ts +25 -0
  190. package/lib/service/high5/index.js +63 -0
  191. package/lib/service/high5/internal/index.d.ts +8 -0
  192. package/lib/service/high5/internal/index.js +31 -0
  193. package/lib/service/high5/internal/space/index.d.ts +21 -0
  194. package/lib/service/high5/internal/space/index.js +45 -0
  195. package/lib/service/high5/joinToken/index.d.ts +40 -0
  196. package/lib/service/high5/joinToken/index.js +72 -0
  197. package/lib/service/high5/space/event/index.d.ts +55 -0
  198. package/lib/service/high5/space/event/index.js +101 -0
  199. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +31 -0
  200. package/lib/service/high5/space/event/stream/design/DesignOperations.js +117 -0
  201. package/lib/service/high5/space/event/stream/design/index.d.ts +53 -0
  202. package/lib/service/high5/space/event/stream/design/index.js +91 -0
  203. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +62 -0
  204. package/lib/service/high5/space/event/stream/design/snapshot/index.js +107 -0
  205. package/lib/service/high5/space/event/stream/index.d.ts +113 -0
  206. package/lib/service/high5/space/event/stream/index.js +186 -0
  207. package/lib/service/high5/space/execution/index.d.ts +48 -0
  208. package/lib/service/high5/space/execution/index.js +89 -0
  209. package/lib/service/high5/space/execution/log/index.d.ts +29 -0
  210. package/lib/service/high5/space/execution/log/index.js +58 -0
  211. package/lib/service/high5/space/execution/status/index.d.ts +16 -0
  212. package/lib/service/high5/space/execution/status/index.js +36 -0
  213. package/lib/service/high5/space/index.d.ts +111 -0
  214. package/lib/service/high5/space/index.js +205 -0
  215. package/lib/service/high5/space/node/index.d.ts +58 -0
  216. package/lib/service/high5/space/node/index.js +116 -0
  217. package/lib/service/high5/space/secret/index.d.ts +60 -0
  218. package/lib/service/high5/space/secret/index.js +102 -0
  219. package/lib/service/high5/space/wave/index.d.ts +36 -0
  220. package/lib/service/high5/space/wave/index.js +73 -0
  221. package/lib/service/high5/space/webhook/index.d.ts +90 -0
  222. package/lib/service/high5/space/webhook/index.js +165 -0
  223. package/lib/service/high5/space/webhook/log/index.d.ts +16 -0
  224. package/lib/service/high5/space/webhook/log/index.js +37 -0
  225. package/lib/service/high5/wave/index.d.ts +8 -0
  226. package/lib/service/high5/wave/index.js +15 -0
  227. package/lib/service/high5/wave/s3/index.d.ts +48 -0
  228. package/lib/service/high5/wave/s3/index.js +100 -0
  229. package/lib/service/idp/index.d.ts +84 -0
  230. package/lib/service/idp/index.js +185 -0
  231. package/lib/service/idp/internal/index.d.ts +17 -0
  232. package/lib/service/idp/internal/index.js +33 -0
  233. package/lib/service/idp/oauth/index.d.ts +49 -0
  234. package/lib/service/idp/oauth/index.js +117 -0
  235. package/lib/service/idp/organization/index.d.ts +56 -0
  236. package/lib/service/idp/organization/index.js +114 -0
  237. package/lib/service/idp/organization/license/index.d.ts +7 -0
  238. package/lib/service/idp/organization/license/index.js +31 -0
  239. package/lib/service/idp/organization/member/index.d.ts +57 -0
  240. package/lib/service/idp/organization/member/index.js +110 -0
  241. package/lib/service/idp/organization/member/invitations/index.d.ts +79 -0
  242. package/lib/service/idp/organization/member/invitations/index.js +122 -0
  243. package/lib/service/idp/organization/settings/domain/index.d.ts +37 -0
  244. package/lib/service/idp/organization/settings/domain/index.js +76 -0
  245. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +43 -0
  246. package/lib/service/idp/organization/settings/domain/saml/index.js +98 -0
  247. package/lib/service/idp/organization/settings/index.d.ts +16 -0
  248. package/lib/service/idp/organization/settings/index.js +29 -0
  249. package/lib/service/idp/organization/settings/oauth/index.d.ts +62 -0
  250. package/lib/service/idp/organization/settings/oauth/index.js +117 -0
  251. package/lib/service/idp/organization/team/index.d.ts +72 -0
  252. package/lib/service/idp/organization/team/index.js +124 -0
  253. package/lib/service/idp/registration/index.d.ts +37 -0
  254. package/lib/service/idp/registration/index.js +87 -0
  255. package/lib/service/idp/user/index.d.ts +83 -0
  256. package/lib/service/idp/user/index.js +160 -0
  257. package/lib/service/idp/user/license/index.d.ts +7 -0
  258. package/lib/service/idp/user/license/index.js +31 -0
  259. package/lib/service/idp/user/password/index.d.ts +19 -0
  260. package/lib/service/idp/user/password/index.js +51 -0
  261. package/lib/service/idp/user/settings/connections/index.d.ts +13 -0
  262. package/lib/service/idp/user/settings/connections/index.js +32 -0
  263. package/lib/service/idp/user/settings/general/index.d.ts +22 -0
  264. package/lib/service/idp/user/settings/general/index.js +51 -0
  265. package/lib/service/idp/user/settings/index.d.ts +40 -0
  266. package/lib/service/idp/user/settings/index.js +70 -0
  267. package/lib/service/idp/user/settings/notifications/index.d.ts +16 -0
  268. package/lib/service/idp/user/settings/notifications/index.js +40 -0
  269. package/lib/service/idp/user/settings/oauthApps/index.d.ts +20 -0
  270. package/lib/service/idp/user/settings/oauthApps/index.js +55 -0
  271. package/lib/service/idp/user/settings/pats/index.d.ts +48 -0
  272. package/lib/service/idp/user/settings/pats/index.js +104 -0
  273. package/lib/service/idp/user/settings/twoFactor/index.d.ts +10 -0
  274. package/lib/service/idp/user/settings/twoFactor/index.js +20 -0
  275. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +32 -0
  276. package/lib/service/idp/user/settings/twoFactor/totp/index.js +72 -0
  277. package/lib/service/mailer/index.d.ts +13 -0
  278. package/lib/service/{Mailer.js → mailer/index.js} +17 -16
  279. package/lib/service/mailer/internal/index.d.ts +36 -0
  280. package/lib/service/mailer/internal/index.js +69 -0
  281. package/lib/service/mothership/index.d.ts +97 -0
  282. package/lib/service/mothership/index.js +149 -0
  283. package/lib/service/nats/index.d.ts +49 -0
  284. package/lib/service/nats/index.js +138 -0
  285. package/lib/utils/Types.d.ts +1 -0
  286. package/lib/utils/Types.js +2 -0
  287. package/lib/utils/bouncer/features/Provider.d.ts +19 -0
  288. package/lib/utils/bouncer/features/Provider.js +101 -0
  289. package/package.json +37 -29
  290. package/lib/base.d.ts +0 -12
  291. package/lib/base.js +0 -8
  292. package/lib/hcloud.d.ts +0 -13
  293. package/lib/hcloud.js +0 -29
  294. package/lib/interfaces/Global.d.ts +0 -8
  295. package/lib/interfaces/IDP.d.ts +0 -9
  296. package/lib/interfaces/Mail.d.ts +0 -29
  297. package/lib/interfaces/Mail.js +0 -8
  298. package/lib/service/Auditor.d.ts +0 -22
  299. package/lib/service/Auditor.js +0 -61
  300. package/lib/service/AuditorInternal.d.ts +0 -28
  301. package/lib/service/AuditorInternal.js +0 -65
  302. package/lib/service/High5.d.ts +0 -4
  303. package/lib/service/High5.js +0 -9
  304. package/lib/service/IDP.d.ts +0 -39
  305. package/lib/service/IDP.js +0 -84
  306. package/lib/service/Mailer.d.ts +0 -13
  307. package/lib/service/MailerInternal.d.ts +0 -32
  308. package/lib/service/MailerInternal.js +0 -64
  309. /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
  310. /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
@@ -0,0 +1,81 @@
1
+ import Base from "../../../Base";
2
+ import { FuseSpace as IFuseSpace, FuseSpaceEntityPermission as SpaceEntityPermission, FuseSpacePermission as SpacePermission } from "../../../interfaces/fuse/space";
3
+ import { PaginatedResponse, SearchParams } from "../../../interfaces/global";
4
+ import { FuseCronjob } from "./cronjob";
5
+ export declare class FuseSpace extends Base {
6
+ get cronjob(): FuseCronjob;
7
+ private _cronjob?;
8
+ /**
9
+ * Retrieves a Fuse space by its name
10
+ * @param orgName Name of the organization
11
+ * @param spaceName Name of the space
12
+ * @returns The requested space
13
+ */
14
+ getSpace(orgName: string, spaceName: string): Promise<IFuseSpace>;
15
+ /**
16
+ * Creates a new Fuse space
17
+ * @param orgName Name of the organization
18
+ * @param name Name of the space to be created
19
+ * @returns The created space
20
+ */
21
+ createSpace(orgName: string, name: string): Promise<IFuseSpace>;
22
+ /**
23
+ * Deletes a space by its name
24
+ * @param orgName Name of the organization
25
+ * @param spaceName Name of the space
26
+ */
27
+ deleteSpace(orgName: string, spaceName: string): Promise<void>;
28
+ /**
29
+ * Adds/Updates/Removes the permission a user has in the specified space.
30
+ * @param orgName Name of the organization
31
+ * @param spaceName Name of the space
32
+ * @param userId ID of the user
33
+ * @param permission New permission
34
+ * @returns The Fuse space with the updated permissions
35
+ */
36
+ updateUserSpacePermission(orgName: string, spaceName: string, userId: string, permission: SpacePermission): Promise<SpaceEntityPermission>;
37
+ /**
38
+ * Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
39
+ * @param orgName Name of the organization
40
+ * @param spaceName Name of the space
41
+ * @param teamName Name of the team
42
+ * @param permission New permission
43
+ * @returns The Fuse space with the updated permissions
44
+ */
45
+ updateTeamSpacePermission(orgName: string, spaceName: string, teamName: string, permission: SpacePermission): Promise<SpaceEntityPermission>;
46
+ /**
47
+ * Retrieves all Fuse spaces of an organization which match the provided search filter(s). Will return all spaces of the organization if no filter is provided.
48
+ * @param orgName Name of the organization
49
+ * @param filters (optional) Array of search filters
50
+ * @param sorting (optional) Sorting object
51
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
52
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
53
+ * @returns Object containing an array of filtered Fuse spaces as well as the total number of results found in the database (independent of limit and page)
54
+ */
55
+ searchSpaces({ orgName, filters, sorting, limit, page, }: SearchParams & {
56
+ orgName: string;
57
+ }): Promise<PaginatedResponse<IFuseSpace>>;
58
+ /**
59
+ * Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
60
+ * @param orgName Name of the organization
61
+ * @param spaceName Name of the space
62
+ * @param filters (optional) Array of search filters
63
+ * @param sorting (optional) Sorting object
64
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
65
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
66
+ * @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
67
+ */
68
+ searchSpacePermissions({ orgName, spaceName, filters, sorting, limit, page, }: SearchParams & {
69
+ orgName: string;
70
+ spaceName: string;
71
+ }): Promise<PaginatedResponse<SpaceEntityPermission>>;
72
+ /**
73
+ * Updates the name of a space.
74
+ * @param orgName Name of the organization
75
+ * @param spaceName Current name of the space
76
+ * @param newSpaceName New name for the space
77
+ * @returns The updated space
78
+ */
79
+ renameSpace(orgName: string, spaceName: string, newSpaceName: string): Promise<IFuseSpace>;
80
+ protected getEndpoint(endpoint: string): string;
81
+ }
@@ -0,0 +1,152 @@
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.FuseSpace = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelper");
15
+ const searchFilter_1 = require("../../../helper/searchFilter");
16
+ const cronjob_1 = require("./cronjob");
17
+ class FuseSpace extends Base_1.default {
18
+ get cronjob() {
19
+ if (this._cronjob === undefined) {
20
+ this._cronjob = new cronjob_1.FuseCronjob(this.options, this.axios);
21
+ }
22
+ return this._cronjob;
23
+ }
24
+ /**
25
+ * Retrieves a Fuse space by its name
26
+ * @param orgName Name of the organization
27
+ * @param spaceName Name of the space
28
+ * @returns The requested space
29
+ */
30
+ getSpace(orgName, spaceName) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
33
+ return resp.data;
34
+ });
35
+ }
36
+ /**
37
+ * Creates a new Fuse space
38
+ * @param orgName Name of the organization
39
+ * @param name Name of the space to be created
40
+ * @returns The created space
41
+ */
42
+ createSpace(orgName, name) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
45
+ return resp.data;
46
+ });
47
+ }
48
+ /**
49
+ * Deletes a space by its name
50
+ * @param orgName Name of the organization
51
+ * @param spaceName Name of the space
52
+ */
53
+ deleteSpace(orgName, spaceName) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
56
+ });
57
+ }
58
+ /**
59
+ * Adds/Updates/Removes the permission a user has in the specified space.
60
+ * @param orgName Name of the organization
61
+ * @param spaceName Name of the space
62
+ * @param userId ID of the user
63
+ * @param permission New permission
64
+ * @returns The Fuse space with the updated permissions
65
+ */
66
+ updateUserSpacePermission(orgName, spaceName, userId, permission) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
69
+ userId,
70
+ permission,
71
+ });
72
+ return resp.data;
73
+ });
74
+ }
75
+ /**
76
+ * Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
77
+ * @param orgName Name of the organization
78
+ * @param spaceName Name of the space
79
+ * @param teamName Name of the team
80
+ * @param permission New permission
81
+ * @returns The Fuse space with the updated permissions
82
+ */
83
+ updateTeamSpacePermission(orgName, spaceName, teamName, permission) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
86
+ teamName,
87
+ permission,
88
+ });
89
+ return resp.data;
90
+ });
91
+ }
92
+ /**
93
+ * Retrieves all Fuse spaces of an organization which match the provided search filter(s). Will return all spaces of the organization if no filter is provided.
94
+ * @param orgName Name of the organization
95
+ * @param filters (optional) Array of search filters
96
+ * @param sorting (optional) Sorting object
97
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
98
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
99
+ * @returns Object containing an array of filtered Fuse spaces as well as the total number of results found in the database (independent of limit and page)
100
+ */
101
+ searchSpaces(_a) {
102
+ return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0, }) {
103
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
104
+ return new searchFilter_1.SearchFilterDTO(f);
105
+ });
106
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/search?limit=${limit}&page=${page}`), {
107
+ filters: filtersDTO,
108
+ sorting,
109
+ });
110
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
111
+ });
112
+ }
113
+ /**
114
+ * Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
115
+ * @param orgName Name of the organization
116
+ * @param spaceName Name of the space
117
+ * @param filters (optional) Array of search filters
118
+ * @param sorting (optional) Sorting object
119
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
120
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
121
+ * @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
122
+ */
123
+ searchSpacePermissions(_a) {
124
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, }) {
125
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
126
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
127
+ filters: filtersDTO,
128
+ sorting: sorting,
129
+ });
130
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
131
+ });
132
+ }
133
+ /**
134
+ * Updates the name of a space.
135
+ * @param orgName Name of the organization
136
+ * @param spaceName Current name of the space
137
+ * @param newSpaceName New name for the space
138
+ * @returns The updated space
139
+ */
140
+ renameSpace(orgName, spaceName, newSpaceName) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
143
+ newSpaceName,
144
+ });
145
+ return resp.data;
146
+ });
147
+ }
148
+ getEndpoint(endpoint) {
149
+ return `${this.options.server}/api/fuse${endpoint}`;
150
+ }
151
+ }
152
+ exports.FuseSpace = FuseSpace;
@@ -0,0 +1,10 @@
1
+ import Base from "../../../Base";
2
+ import { High5OrganizationExecutionLogs } from "./log/index";
3
+ import { High5OrganizationExecutionStates } from "./status/index";
4
+ export declare class High5OrganizationExecute extends Base {
5
+ get logs(): High5OrganizationExecutionLogs;
6
+ private _logs?;
7
+ get status(): High5OrganizationExecutionStates;
8
+ private _status?;
9
+ protected getEndpoint(endpoint: string): string;
10
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.High5OrganizationExecute = void 0;
4
+ const Base_1 = require("../../../Base");
5
+ const index_1 = require("./log/index");
6
+ const index_2 = require("./status/index");
7
+ class High5OrganizationExecute extends Base_1.default {
8
+ get logs() {
9
+ if (this._logs === undefined) {
10
+ this._logs = new index_1.High5OrganizationExecutionLogs(this.options, this.axios);
11
+ }
12
+ return this._logs;
13
+ }
14
+ get status() {
15
+ if (this._status === undefined) {
16
+ this._status = new index_2.High5OrganizationExecutionStates(this.options, this.axios);
17
+ }
18
+ return this._status;
19
+ }
20
+ getEndpoint(endpoint) {
21
+ return `${this.options.server}/api/high5${endpoint}`;
22
+ }
23
+ }
24
+ exports.High5OrganizationExecute = High5OrganizationExecute;
@@ -0,0 +1,19 @@
1
+ import Base from "../../../../Base";
2
+ import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
3
+ import { High5ExecutionLog } from "../../../../interfaces/high5/space/execution";
4
+ export declare class High5OrganizationExecutionLogs extends Base {
5
+ /**
6
+ * Retrieves all stream execution logs for a given execution inside an organization.
7
+ * @param orgName Name of the Organization
8
+ * @param filters (optional) Array of search filters
9
+ * @param sorting (optional) Sorting object
10
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
11
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
12
+ * @returns Object containing an array of Stream execution logs as well as the total number of results
13
+ */
14
+ searchExecutionLogs({ orgName, payload, filters, sorting, limit, page, }: SearchParams & {
15
+ orgName: string;
16
+ payload?: boolean;
17
+ }): Promise<PaginatedResponse<High5ExecutionLog>>;
18
+ protected getEndpoint(endpoint: string): string;
19
+ }
@@ -0,0 +1,40 @@
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.High5OrganizationExecutionLogs = void 0;
13
+ const Base_1 = require("../../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
15
+ const searchFilter_1 = require("../../../../helper/searchFilter");
16
+ class High5OrganizationExecutionLogs extends Base_1.default {
17
+ /**
18
+ * Retrieves all stream execution logs for a given execution inside an organization.
19
+ * @param orgName Name of the Organization
20
+ * @param filters (optional) Array of search filters
21
+ * @param sorting (optional) Sorting object
22
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
23
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
24
+ * @returns Object containing an array of Stream execution logs as well as the total number of results
25
+ */
26
+ searchExecutionLogs(_a) {
27
+ return __awaiter(this, arguments, void 0, function* ({ orgName, payload = false, filters, sorting, limit = 25, page = 0, }) {
28
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
29
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/execution/logs/search?page=${page}&limit=${limit}&payload=${payload}`), {
30
+ filters: filtersDTO,
31
+ sorting: sorting,
32
+ });
33
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
34
+ });
35
+ }
36
+ getEndpoint(endpoint) {
37
+ return `${this.options.server}/api/high5${endpoint}`;
38
+ }
39
+ }
40
+ exports.High5OrganizationExecutionLogs = High5OrganizationExecutionLogs;
@@ -0,0 +1,18 @@
1
+ import Base from "../../../../Base";
2
+ import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
3
+ import { High5ExecutionStatus } from "../../../../interfaces/high5/space/execution";
4
+ export declare class High5OrganizationExecutionStates extends Base {
5
+ /**
6
+ * Retrieves all stream execution logs for a given execution inside an organization.
7
+ * @param orgName Name of the Organization
8
+ * @param filters (optional) Array of search filters
9
+ * @param sorting (optional) Sorting object
10
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
11
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
12
+ * @returns Object containing an array of Stream execution logs as well as the total number of results
13
+ */
14
+ searchExecutionStates({ orgName, filters, sorting, limit, page, }: SearchParams & {
15
+ orgName: string;
16
+ }): Promise<PaginatedResponse<High5ExecutionStatus>>;
17
+ protected getEndpoint(endpoint: string): string;
18
+ }
@@ -0,0 +1,40 @@
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.High5OrganizationExecutionStates = void 0;
13
+ const Base_1 = require("../../../../Base");
14
+ const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
15
+ const searchFilter_1 = require("../../../../helper/searchFilter");
16
+ class High5OrganizationExecutionStates extends Base_1.default {
17
+ /**
18
+ * Retrieves all stream execution logs for a given execution inside an organization.
19
+ * @param orgName Name of the Organization
20
+ * @param filters (optional) Array of search filters
21
+ * @param sorting (optional) Sorting object
22
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
23
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
24
+ * @returns Object containing an array of Stream execution logs as well as the total number of results
25
+ */
26
+ searchExecutionStates(_a) {
27
+ return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0, }) {
28
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
29
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/execution/status/search?page=${page}&limit=${limit}`), {
30
+ filters: filtersDTO,
31
+ sorting: sorting,
32
+ });
33
+ return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
34
+ });
35
+ }
36
+ getEndpoint(endpoint) {
37
+ return `${this.options.server}/api/high5${endpoint}`;
38
+ }
39
+ }
40
+ exports.High5OrganizationExecutionStates = High5OrganizationExecutionStates;
@@ -0,0 +1,25 @@
1
+ import Base from "../../Base";
2
+ import { Version } from "../../interfaces/global";
3
+ import { High5OrganizationExecute } from "./execution";
4
+ import { High5Internal } from "./internal";
5
+ import { High5JoinToken } from "./joinToken";
6
+ import { High5Space } from "./space";
7
+ import { High5Wave } from "./wave";
8
+ export default class High5 extends Base {
9
+ get space(): High5Space;
10
+ private _space?;
11
+ get internal(): High5Internal;
12
+ private _internal?;
13
+ get wave(): High5Wave;
14
+ private _wave?;
15
+ get joinToken(): High5JoinToken;
16
+ private _joinToken?;
17
+ get execution(): High5OrganizationExecute;
18
+ private _execution?;
19
+ /**
20
+ * Requests the endpoint version
21
+ * @returns Version object
22
+ */
23
+ version(): Promise<Version>;
24
+ protected getEndpoint(endpoint: string): string;
25
+ }
@@ -0,0 +1,63 @@
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 execution_1 = require("./execution");
14
+ const internal_1 = require("./internal");
15
+ const joinToken_1 = require("./joinToken");
16
+ const space_1 = require("./space");
17
+ const wave_1 = require("./wave");
18
+ class High5 extends Base_1.default {
19
+ get space() {
20
+ if (this._space === undefined) {
21
+ this._space = new space_1.High5Space(this.options, this.axios);
22
+ }
23
+ return this._space;
24
+ }
25
+ get internal() {
26
+ if (this._internal === undefined) {
27
+ this._internal = new internal_1.High5Internal(this.options, this.axios);
28
+ }
29
+ return this._internal;
30
+ }
31
+ get wave() {
32
+ if (this._wave === undefined) {
33
+ this._wave = new wave_1.High5Wave(this.options, this.axios);
34
+ }
35
+ return this._wave;
36
+ }
37
+ get joinToken() {
38
+ if (this._joinToken === undefined) {
39
+ this._joinToken = new joinToken_1.High5JoinToken(this.options, this.axios);
40
+ }
41
+ return this._joinToken;
42
+ }
43
+ get execution() {
44
+ if (this._execution === undefined) {
45
+ this._execution = new execution_1.High5OrganizationExecute(this.options, this.axios);
46
+ }
47
+ return this._execution;
48
+ }
49
+ /**
50
+ * Requests the endpoint version
51
+ * @returns Version object
52
+ */
53
+ version() {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const resp = yield this.axios.get(this.getEndpoint("/v1/version"));
56
+ return resp.data;
57
+ });
58
+ }
59
+ getEndpoint(endpoint) {
60
+ return `${this.options.server}/api/high5${endpoint}`;
61
+ }
62
+ }
63
+ exports.default = High5;
@@ -0,0 +1,8 @@
1
+ import Base from "../../../Base";
2
+ import { High5SpaceInternal } from "./space";
3
+ export declare class High5Internal extends Base {
4
+ get space(): High5SpaceInternal;
5
+ private _space?;
6
+ deleteUsers(userIds: string[]): Promise<void>;
7
+ protected getEndpoint(endpoint: string): string;
8
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.High5Internal = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ const space_1 = require("./space");
15
+ class High5Internal extends Base_1.default {
16
+ get space() {
17
+ if (this._space === undefined) {
18
+ this._space = new space_1.High5SpaceInternal(this.options, this.axios);
19
+ }
20
+ return this._space;
21
+ }
22
+ deleteUsers(userIds) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ yield this.axios.delete(this.getEndpoint("/v1/users"), { data: { userIds } });
25
+ });
26
+ }
27
+ getEndpoint(endpoint) {
28
+ return `${this.options.server}/api/high5/internal${endpoint}`;
29
+ }
30
+ }
31
+ exports.High5Internal = High5Internal;
@@ -0,0 +1,21 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../../Base";
3
+ export declare class High5SpaceInternal extends Base {
4
+ constructor(options: Options, axios: AxiosInstance);
5
+ /**
6
+ * Deletes all spaces of an organization.
7
+ *
8
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
9
+ * @param orgName Name of the organization
10
+ */
11
+ deleteAllSpacesOfOrganization(orgName: string): Promise<void>;
12
+ /**
13
+ * Removes the user from all spaces of an organization.
14
+ *
15
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
16
+ * @param orgName Name of the organization
17
+ * @param userId ID of the user
18
+ */
19
+ removeUserFromAllSpacesOfOrganization(orgName: string, userId: string): Promise<void>;
20
+ protected getEndpoint(endpoint: string): string;
21
+ }
@@ -0,0 +1,45 @@
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.High5SpaceInternal = void 0;
13
+ const Base_1 = require("../../../../Base");
14
+ class High5SpaceInternal extends Base_1.default {
15
+ constructor(options, axios) {
16
+ super(options, axios);
17
+ }
18
+ /**
19
+ * Deletes all spaces of an organization.
20
+ *
21
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
22
+ * @param orgName Name of the organization
23
+ */
24
+ deleteAllSpacesOfOrganization(orgName) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}`));
27
+ });
28
+ }
29
+ /**
30
+ * Removes the user from all spaces of an organization.
31
+ *
32
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
33
+ * @param orgName Name of the organization
34
+ * @param userId ID of the user
35
+ */
36
+ removeUserFromAllSpacesOfOrganization(orgName, userId) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/user/${userId}`));
39
+ });
40
+ }
41
+ getEndpoint(endpoint) {
42
+ return `${this.options.server}/api/high5/internal${endpoint}`;
43
+ }
44
+ }
45
+ exports.High5SpaceInternal = High5SpaceInternal;
@@ -0,0 +1,40 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { Options } from "../../../Base";
3
+ import { PaginatedResponse } from "../../../interfaces/global";
4
+ import { JoinToken } from "../../../interfaces/high5/joinToken";
5
+ import { User } from "../../../interfaces/idp";
6
+ export declare class High5JoinToken extends Base {
7
+ constructor(options: Options, axios: AxiosInstance);
8
+ /**
9
+ * Retrieves join tokens of the specified organization (paginated request)
10
+ * @param orgName Name of the Organization
11
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
12
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
13
+ * @returns Object containing an array of join tokens and the total number of results found in the database (independent of limit and page)
14
+ */
15
+ get(orgName: string, limit?: number, page?: number): Promise<PaginatedResponse<JoinToken>>;
16
+ /**
17
+ * Creates a join token for the specified organization
18
+ * @param orgName Name of the Organization
19
+ * @param name Name of the Join Token
20
+ * @returns Created join token
21
+ */
22
+ create(orgName: string, name: string): Promise<JoinToken>;
23
+ /**
24
+ * Revokes a join token of the specified organization
25
+ * @param orgName Name of the Organization
26
+ * @param tokenId ID of the Join Token
27
+ */
28
+ revoke(orgName: string, tokenId: string): Promise<void>;
29
+ /**
30
+ * Exchanges a join token for an agent user
31
+ *
32
+ * @param joinToken Join token
33
+ * @returns An object containing the User object and the PAT that represents the agent user
34
+ */
35
+ exchange(joinToken: string): Promise<{
36
+ user: User;
37
+ pat: string;
38
+ }>;
39
+ protected getEndpoint(endpoint: string): string;
40
+ }