hcloud-sdk 16.0.0 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/changelog.md +178 -51
  2. package/lib/Base.d.ts +2 -1
  3. package/lib/Hcloud.d.ts +6 -0
  4. package/lib/Hcloud.js +18 -0
  5. package/lib/helper/ValidationHelper.d.ts +74 -0
  6. package/lib/helper/ValidationHelper.js +360 -0
  7. package/lib/interfaces/auditor/index.d.ts +17 -2
  8. package/lib/interfaces/auditor/index.js +12 -0
  9. package/lib/interfaces/cosmo/asset/index.d.ts +185 -0
  10. package/lib/interfaces/cosmo/asset/index.js +82 -0
  11. package/lib/interfaces/cosmo/comment/index.d.ts +38 -0
  12. package/lib/interfaces/cosmo/comment/index.js +8 -0
  13. package/lib/interfaces/cosmo/event/index.d.ts +31 -0
  14. package/lib/interfaces/cosmo/event/index.js +17 -0
  15. package/lib/interfaces/cosmo/location/index.d.ts +4 -0
  16. package/lib/interfaces/cosmo/location/index.js +2 -0
  17. package/lib/interfaces/cosmo/namespace/index.d.ts +9 -0
  18. package/lib/interfaces/cosmo/namespace/index.js +9 -0
  19. package/lib/interfaces/cosmo/permissions.d.ts +96 -0
  20. package/lib/interfaces/cosmo/permissions.js +58 -0
  21. package/lib/interfaces/cosmo/share/index.d.ts +28 -0
  22. package/lib/interfaces/cosmo/share/index.js +2 -0
  23. package/lib/interfaces/cosmo/space/index.d.ts +25 -0
  24. package/lib/interfaces/cosmo/space/index.js +2 -0
  25. package/lib/interfaces/cosmo/tag/tag.d.ts +12 -0
  26. package/lib/interfaces/cosmo/tag/tag.js +2 -0
  27. package/lib/interfaces/frontend/config/index.d.ts +1 -0
  28. package/lib/interfaces/fuse/space/index.d.ts +1 -0
  29. package/lib/interfaces/global/Products.d.ts +3 -1
  30. package/lib/interfaces/global/Products.js +2 -0
  31. package/lib/interfaces/global/Views.d.ts +2 -1
  32. package/lib/interfaces/global/Views.js +1 -0
  33. package/lib/interfaces/high5/execution/index.d.ts +23 -2
  34. package/lib/interfaces/high5/execution/index.js +2 -0
  35. package/lib/interfaces/high5/index.d.ts +7 -7
  36. package/lib/interfaces/high5/index.js +7 -7
  37. package/lib/interfaces/high5/space/database/document/index.d.ts +34 -0
  38. package/lib/interfaces/high5/space/database/document/index.js +14 -0
  39. package/lib/interfaces/high5/space/database/index.d.ts +12 -0
  40. package/lib/interfaces/high5/space/database/index.js +2 -0
  41. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +9 -2
  42. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +10 -2
  43. package/lib/interfaces/high5/space/event/stream/node/index.js +6 -1
  44. package/lib/interfaces/high5/space/execution/index.d.ts +56 -2
  45. package/lib/interfaces/high5/space/execution/index.js +8 -0
  46. package/lib/interfaces/high5/space/index.d.ts +2 -0
  47. package/lib/interfaces/high5/space/job/JobLog.d.ts +16 -0
  48. package/lib/interfaces/high5/space/job/JobLog.js +2 -0
  49. package/lib/interfaces/high5/space/job/index.d.ts +38 -0
  50. package/lib/interfaces/high5/space/job/index.js +8 -0
  51. package/lib/interfaces/high5/space/pool/index.d.ts +5 -7
  52. package/lib/interfaces/high5/space/pool/index.js +0 -7
  53. package/lib/interfaces/high5/space/webhook/index.d.ts +3 -1
  54. package/lib/interfaces/high5/stats.d.ts +21 -0
  55. package/lib/interfaces/high5/stats.js +2 -0
  56. package/lib/interfaces/high5/wave/index.d.ts +8 -3
  57. package/lib/interfaces/idp/index.d.ts +1 -0
  58. package/lib/interfaces/idp/index.js +1 -0
  59. package/lib/interfaces/idp/oauth/index.d.ts +4 -3
  60. package/lib/interfaces/idp/organization/index.d.ts +1 -0
  61. package/lib/interfaces/idp/organization/index.js +1 -0
  62. package/lib/interfaces/idp/organization/license/index.d.ts +13 -0
  63. package/lib/interfaces/idp/organization/member/index.d.ts +2 -0
  64. package/lib/interfaces/idp/organization/service-accounts.d.ts +8 -0
  65. package/lib/interfaces/idp/organization/service-accounts.js +2 -0
  66. package/lib/interfaces/idp/organization/stats.d.ts +7 -0
  67. package/lib/interfaces/idp/organization/stats.js +2 -0
  68. package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
  69. package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
  70. package/lib/interfaces/idp/user/GeneralSettings.js +1 -0
  71. package/lib/interfaces/idp/user/Message.d.ts +21 -0
  72. package/lib/interfaces/idp/user/Message.js +14 -0
  73. package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
  74. package/lib/interfaces/idp/user/Scopes.d.ts +8 -2
  75. package/lib/interfaces/idp/user/Scopes.js +9 -0
  76. package/lib/interfaces/idp/user/index.d.ts +2 -1
  77. package/lib/interfaces/mailer/index.d.ts +30 -1
  78. package/lib/interfaces/mailer/index.js +87 -1
  79. package/lib/interfaces/mothership/index.d.ts +3 -1
  80. package/lib/interfaces/mothership/index.js +15 -0
  81. package/lib/interfaces/mothership/stats.d.ts +4 -0
  82. package/lib/interfaces/mothership/stats.js +2 -0
  83. package/lib/interfaces/nats/index.d.ts +98 -9
  84. package/lib/interfaces/nats/index.js +136 -19
  85. package/lib/interfaces/shorts/index.d.ts +10 -0
  86. package/lib/interfaces/shorts/index.js +2 -0
  87. package/lib/service/agent/bundle/dev/index.d.ts +16 -6
  88. package/lib/service/agent/bundle/dev/index.js +12 -10
  89. package/lib/service/agent/bundle/index.d.ts +10 -4
  90. package/lib/service/agent/bundle/index.js +6 -6
  91. package/lib/service/agent/context/index.d.ts +26 -7
  92. package/lib/service/agent/context/index.js +27 -12
  93. package/lib/service/auditor/index.d.ts +8 -4
  94. package/lib/service/auditor/index.js +5 -5
  95. package/lib/service/auditor/internal/index.d.ts +27 -3
  96. package/lib/service/auditor/internal/index.js +34 -5
  97. package/lib/service/bouncer/features/index.d.ts +4 -2
  98. package/lib/service/bouncer/features/index.js +2 -2
  99. package/lib/service/cosmo/asset/index.d.ts +219 -0
  100. package/lib/service/cosmo/asset/index.js +314 -0
  101. package/lib/service/cosmo/comment/index.d.ts +122 -0
  102. package/lib/service/cosmo/comment/index.js +161 -0
  103. package/lib/service/cosmo/event/index.d.ts +23 -0
  104. package/lib/service/cosmo/event/index.js +40 -0
  105. package/lib/service/cosmo/folder/index.d.ts +27 -0
  106. package/lib/service/cosmo/folder/index.js +47 -0
  107. package/lib/service/cosmo/index.d.ts +49 -0
  108. package/lib/service/cosmo/index.js +119 -0
  109. package/lib/service/cosmo/internal/index.d.ts +7 -0
  110. package/lib/service/cosmo/internal/index.js +17 -0
  111. package/lib/service/cosmo/internal/space/index.d.ts +15 -0
  112. package/lib/service/cosmo/internal/space/index.js +34 -0
  113. package/lib/service/cosmo/location/index.d.ts +40 -0
  114. package/lib/service/cosmo/location/index.js +63 -0
  115. package/lib/service/cosmo/namespace/index.d.ts +42 -0
  116. package/lib/service/cosmo/namespace/index.js +65 -0
  117. package/lib/service/cosmo/organization/index.d.ts +47 -0
  118. package/lib/service/cosmo/organization/index.js +64 -0
  119. package/lib/service/cosmo/permissions/index.d.ts +131 -0
  120. package/lib/service/cosmo/permissions/index.js +181 -0
  121. package/lib/service/cosmo/production/index.d.ts +26 -0
  122. package/lib/service/cosmo/production/index.js +45 -0
  123. package/lib/service/cosmo/share/index.d.ts +161 -0
  124. package/lib/service/cosmo/share/index.js +215 -0
  125. package/lib/service/cosmo/space/index.d.ts +104 -0
  126. package/lib/service/cosmo/space/index.js +146 -0
  127. package/lib/service/cosmo/tag/index.d.ts +67 -0
  128. package/lib/service/cosmo/tag/index.js +93 -0
  129. package/lib/service/dali/DaliAvatar.d.ts +12 -0
  130. package/lib/service/dali/DaliAvatar.js +20 -0
  131. package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +32 -0
  132. package/lib/service/dali/avatar/DaliCosmoSpace.js +59 -0
  133. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +10 -4
  134. package/lib/service/dali/avatar/DaliFuseSpace.js +7 -6
  135. package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +10 -4
  136. package/lib/service/dali/avatar/DaliHigh5Pool.js +7 -6
  137. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +10 -4
  138. package/lib/service/dali/avatar/DaliHigh5Space.js +7 -6
  139. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +10 -4
  140. package/lib/service/dali/avatar/DaliOAuthApp.js +7 -6
  141. package/lib/service/dali/avatar/DaliOrganization.d.ts +10 -4
  142. package/lib/service/dali/avatar/DaliOrganization.js +7 -6
  143. package/lib/service/dali/avatar/DaliServiceAccount.d.ts +32 -0
  144. package/lib/service/dali/avatar/DaliServiceAccount.js +59 -0
  145. package/lib/service/dali/avatar/DaliTeam.d.ts +10 -4
  146. package/lib/service/dali/avatar/DaliTeam.js +7 -6
  147. package/lib/service/dali/avatar/DaliUser.d.ts +10 -4
  148. package/lib/service/dali/avatar/DaliUser.js +7 -6
  149. package/lib/service/dali/index.d.ts +4 -5
  150. package/lib/service/dali/index.js +2 -5
  151. package/lib/service/fuse/index.d.ts +4 -2
  152. package/lib/service/fuse/index.js +2 -2
  153. package/lib/service/fuse/internal/index.d.ts +4 -2
  154. package/lib/service/fuse/internal/index.js +3 -2
  155. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +4 -2
  156. package/lib/service/fuse/internal/space/cronjob/log/index.js +2 -2
  157. package/lib/service/fuse/internal/space/index.d.ts +7 -3
  158. package/lib/service/fuse/internal/space/index.js +6 -4
  159. package/lib/service/fuse/space/cronjob/index.d.ts +35 -13
  160. package/lib/service/fuse/space/cronjob/index.js +48 -50
  161. package/lib/service/fuse/space/cronjob/log/index.d.ts +8 -4
  162. package/lib/service/fuse/space/cronjob/log/index.js +5 -5
  163. package/lib/service/fuse/space/index.d.ts +27 -11
  164. package/lib/service/fuse/space/index.js +19 -18
  165. package/lib/service/high5/execution/index.d.ts +4 -2
  166. package/lib/service/high5/execution/index.js +3 -2
  167. package/lib/service/high5/execution/status/index.d.ts +5 -3
  168. package/lib/service/high5/execution/status/index.js +3 -3
  169. package/lib/service/high5/index.d.ts +7 -2
  170. package/lib/service/high5/index.js +9 -2
  171. package/lib/service/high5/internal/index.d.ts +4 -2
  172. package/lib/service/high5/internal/index.js +3 -2
  173. package/lib/service/high5/internal/space/index.d.ts +10 -3
  174. package/lib/service/high5/internal/space/index.js +13 -4
  175. package/lib/service/high5/internal/space/job/index.d.ts +7 -0
  176. package/lib/service/high5/internal/space/job/index.js +17 -0
  177. package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
  178. package/lib/service/high5/internal/space/job/log/index.js +34 -0
  179. package/lib/service/high5/joinToken/index.d.ts +14 -6
  180. package/lib/service/high5/joinToken/index.js +10 -9
  181. package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
  182. package/lib/service/high5/space/database/document/array/index.js +102 -0
  183. package/lib/service/high5/space/database/document/index.d.ts +74 -0
  184. package/lib/service/high5/space/database/document/index.js +112 -0
  185. package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
  186. package/lib/service/high5/space/database/document/number/index.js +77 -0
  187. package/lib/service/high5/space/database/index.d.ts +65 -0
  188. package/lib/service/high5/space/database/index.js +102 -0
  189. package/lib/service/high5/space/event/index.d.ts +17 -7
  190. package/lib/service/high5/space/event/index.js +12 -11
  191. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
  192. package/lib/service/high5/space/event/stream/design/DesignOperations.js +5 -3
  193. package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
  194. package/lib/service/high5/space/event/stream/design/index.js +7 -6
  195. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
  196. package/lib/service/high5/space/event/stream/design/snapshot/index.js +12 -10
  197. package/lib/service/high5/space/event/stream/index.d.ts +32 -12
  198. package/lib/service/high5/space/event/stream/index.js +22 -21
  199. package/lib/service/high5/space/execution/index.d.ts +22 -7
  200. package/lib/service/high5/space/execution/index.js +23 -12
  201. package/lib/service/high5/space/execution/log/index.d.ts +8 -4
  202. package/lib/service/high5/space/execution/log/index.js +5 -5
  203. package/lib/service/high5/space/execution/status/index.d.ts +18 -7
  204. package/lib/service/high5/space/execution/status/index.js +20 -8
  205. package/lib/service/high5/space/index.d.ts +56 -18
  206. package/lib/service/high5/space/index.js +65 -27
  207. package/lib/service/high5/space/job/index.d.ts +145 -0
  208. package/lib/service/high5/space/job/index.js +201 -0
  209. package/lib/service/high5/space/job/log/index.d.ts +35 -0
  210. package/lib/service/high5/space/job/log/index.js +58 -0
  211. package/lib/service/high5/space/node/index.d.ts +20 -8
  212. package/lib/service/high5/space/node/index.js +14 -13
  213. package/lib/service/high5/space/pool/index.d.ts +27 -11
  214. package/lib/service/high5/space/pool/index.js +19 -18
  215. package/lib/service/high5/space/secret/index.d.ts +17 -7
  216. package/lib/service/high5/space/secret/index.js +12 -11
  217. package/lib/service/high5/space/stat/index.d.ts +12 -0
  218. package/lib/service/high5/space/stat/index.js +31 -0
  219. package/lib/service/high5/space/wave/index.d.ts +16 -6
  220. package/lib/service/high5/space/wave/index.js +11 -10
  221. package/lib/service/high5/space/webhook/index.d.ts +32 -12
  222. package/lib/service/high5/space/webhook/index.js +25 -21
  223. package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
  224. package/lib/service/high5/space/webhook/log/index.js +2 -2
  225. package/lib/service/high5/stat/index.d.ts +11 -0
  226. package/lib/service/high5/stat/index.js +30 -0
  227. package/lib/service/high5/wave/s3/index.d.ts +31 -8
  228. package/lib/service/high5/wave/s3/index.js +52 -24
  229. package/lib/service/idp/guest/index.d.ts +42 -0
  230. package/lib/service/idp/guest/index.js +66 -0
  231. package/lib/service/idp/index.d.ts +25 -7
  232. package/lib/service/idp/index.js +23 -12
  233. package/lib/service/idp/internal/index.d.ts +5 -3
  234. package/lib/service/idp/internal/index.js +5 -3
  235. package/lib/service/idp/oauth/index.d.ts +16 -6
  236. package/lib/service/idp/oauth/index.js +15 -15
  237. package/lib/service/idp/organization/index.d.ts +25 -5
  238. package/lib/service/idp/organization/index.js +29 -8
  239. package/lib/service/idp/organization/license/index.d.ts +7 -3
  240. package/lib/service/idp/organization/license/index.js +4 -4
  241. package/lib/service/idp/organization/member/index.d.ts +21 -8
  242. package/lib/service/idp/organization/member/index.js +16 -13
  243. package/lib/service/idp/organization/member/invitations/index.d.ts +23 -9
  244. package/lib/service/idp/organization/member/invitations/index.js +72 -59
  245. package/lib/service/idp/organization/service-accounts/index.d.ts +76 -0
  246. package/lib/service/idp/organization/service-accounts/index.js +109 -0
  247. package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
  248. package/lib/service/idp/organization/settings/domain/index.js +9 -8
  249. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
  250. package/lib/service/idp/organization/settings/domain/saml/index.js +19 -18
  251. package/lib/service/idp/organization/settings/oauth/index.d.ts +23 -9
  252. package/lib/service/idp/organization/settings/oauth/index.js +16 -15
  253. package/lib/service/idp/organization/stat/index.d.ts +11 -0
  254. package/lib/service/idp/organization/stat/index.js +30 -0
  255. package/lib/service/idp/organization/team/index.d.ts +22 -10
  256. package/lib/service/idp/organization/team/index.js +14 -13
  257. package/lib/service/idp/registration/index.d.ts +10 -4
  258. package/lib/service/idp/registration/index.js +15 -9
  259. package/lib/service/idp/user/index.d.ts +33 -11
  260. package/lib/service/idp/user/index.js +30 -16
  261. package/lib/service/idp/user/license/index.d.ts +7 -3
  262. package/lib/service/idp/user/license/index.js +4 -4
  263. package/lib/service/idp/user/message/index.d.ts +61 -0
  264. package/lib/service/idp/user/message/index.js +92 -0
  265. package/lib/service/idp/user/password/index.d.ts +4 -2
  266. package/lib/service/idp/user/password/index.js +3 -3
  267. package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
  268. package/lib/service/idp/user/settings/connections/index.js +2 -2
  269. package/lib/service/idp/user/settings/general/index.d.ts +10 -4
  270. package/lib/service/idp/user/settings/general/index.js +6 -6
  271. package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
  272. package/lib/service/idp/user/settings/notifications/index.js +4 -4
  273. package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
  274. package/lib/service/idp/user/settings/oauthApps/index.js +6 -5
  275. package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
  276. package/lib/service/idp/user/settings/pats/index.js +17 -15
  277. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
  278. package/lib/service/idp/user/settings/twoFactor/totp/index.js +13 -10
  279. package/lib/service/mailer/index.d.ts +4 -2
  280. package/lib/service/mailer/index.js +2 -2
  281. package/lib/service/mailer/internal/index.d.ts +13 -5
  282. package/lib/service/mailer/internal/index.js +8 -8
  283. package/lib/service/mothership/index.d.ts +35 -13
  284. package/lib/service/mothership/index.js +32 -18
  285. package/lib/service/nats/index.js +58 -44
  286. package/lib/service/shorts/index.d.ts +18 -0
  287. package/lib/service/shorts/index.js +38 -0
  288. package/lib/service/shorts/internal/index.d.ts +72 -0
  289. package/lib/service/shorts/internal/index.js +104 -0
  290. package/lib/utils/bouncer/features/Provider.js +0 -3
  291. package/package.json +22 -24
@@ -0,0 +1,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.CosmoProduction = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ /**
15
+ * @class Production
16
+ * @extends Base
17
+ *
18
+ * @remarks
19
+ * **Under development, breaking changes possible**
20
+ *
21
+ * Represents a Production resource in Cosmo, providing methods to interact with the Production API.
22
+ */
23
+ class CosmoProduction extends Base_1.default {
24
+ getEndpoint(endpoint) {
25
+ return `${this.options.server}/api/cosmo${endpoint}`;
26
+ }
27
+ /**
28
+ * Create a new Production in the specified Organization and Space.
29
+ * @remarks
30
+ * ** Under development, breaking changes possible**
31
+ * @param orgName Name of the Organization
32
+ * @param spaceName Name of the Space
33
+ * @param productionName Name of the Production to create
34
+ * @returns The created Production
35
+ */
36
+ createProduction(orgName, spaceName, productionName, raw) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/productions`), {
39
+ name: productionName,
40
+ });
41
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
42
+ });
43
+ }
44
+ }
45
+ exports.CosmoProduction = CosmoProduction;
@@ -0,0 +1,161 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { Asset } from "../../../interfaces/cosmo/asset";
3
+ import { Share, ShareCreate, SharePatch, ShareWithUsers } from "../../../interfaces/cosmo/share";
4
+ import { SearchFilter, Sorting } from "../../../interfaces/global";
5
+ /**
6
+ * @class Share
7
+ * @extends Base
8
+ *
9
+ * @remarks
10
+ * **Under development, breaking changes possible**
11
+ *
12
+ * Represents a Share resource in Cosmo, providing methods to interact with the Share API.
13
+ */
14
+ export declare class CosmoShare extends Base {
15
+ protected getEndpoint(endpoint: string): string;
16
+ /**
17
+ * Create a new Share in the specified Organization and Space.
18
+ * @remarks
19
+ * ** Under development, breaking changes possible**
20
+ * @param orgName Name of the Organization
21
+ * @param spaceName Name of the Space
22
+ * @param createShare The Share object to create
23
+ *
24
+ * @returns The created Share
25
+ */
26
+ createShare<R extends boolean = false>(orgName: string, spaceName: string, createShare: ShareCreate, raw?: {
27
+ raw: R;
28
+ }): Promise<MaybeRaw<R, Share>>;
29
+ /**
30
+ * Links the user to a Share, making the assets shared available to the user
31
+ * @remarks
32
+ * ** Under development, breaking changes possible**
33
+ * @param orgName Name of the Organization
34
+ * @param spaceName Name of the Space
35
+ * @param shareId The ID of the Share to link
36
+ *
37
+ * @returns The created Share
38
+ */
39
+ linkShare<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, password?: string, shareIdHMAC?: string, raw?: {
40
+ raw: R;
41
+ }): Promise<MaybeRaw<R, Share>>;
42
+ /**
43
+ * Fetch shared Assets.
44
+ * @remarks
45
+ * ** Under development, breaking changes possible**
46
+ * @param orgName Name of the Organization
47
+ * @param spaceName Name of the Space
48
+ * @param shareId The ID of the Share to link
49
+ * @param limit The number of assets to return
50
+ * @param page The page number to return
51
+ * @param namespace The namespace to filter by
52
+ *
53
+ * @returns The created Share
54
+ */
55
+ fetchSharedAssets<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, limit: number, page: number, namespace: string, raw?: {
56
+ raw: R;
57
+ }): Promise<MaybeRaw<R, Asset[]>>;
58
+ /**
59
+ * Delete Shares by ID.
60
+ * @remarks
61
+ * ** Under development, breaking changes possible**
62
+ * @param orgName Name of the Organization
63
+ * @param spaceName Name of the Space
64
+ * @param shareIds The IDs of the Shares to delete
65
+ *
66
+ * @returns 204 No Content if successful
67
+ */
68
+ deleteShare<R extends boolean = false>(orgName: string, spaceName: string, shareIds: string[], raw?: {
69
+ raw: R;
70
+ }): Promise<MaybeRaw<R, void>>;
71
+ /**
72
+ * Fetch a Share.
73
+ * @param orgName Name of the Organization
74
+ * @param spaceName Name of the Space
75
+ * @param shareId The ID of the Share to link
76
+ *
77
+ * @returns Detailed Share object
78
+ */
79
+ fetchShare<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, raw?: {
80
+ raw: R;
81
+ }): Promise<MaybeRaw<R, Share>>;
82
+ /**
83
+ * Searches for shares within a specific space in an organization.
84
+ *
85
+ * @param {string} orgName - The name of the organization.
86
+ * @param {string} spaceName - The name of the space.
87
+ * @param {{ sorting?: Sorting, filters?: SearchFilter[] }} search - Search criteria including optional sorting and filters.
88
+ * @param {number} limit - Maximum number of results per page.
89
+ * @param {number} page - The page number to retrieve.
90
+ * @returns {Promise<ShareWithUsers[]>} A promise that resolves to a list of shares with their associated users.
91
+ */
92
+ searchSharesOfSpace<R extends boolean = false>(orgName: string, spaceName: string, search: {
93
+ sorting?: Sorting;
94
+ filters?: SearchFilter[];
95
+ }, limit: number, page: number, raw?: {
96
+ raw: R;
97
+ }): Promise<MaybeRaw<R, ShareWithUsers[]>>;
98
+ /**
99
+ * Searches for shares the current user is linked to.
100
+ *
101
+ * @param {{ sorting?: Sorting, filters?: SearchFilter[] }} search - Search criteria including optional sorting and filters.
102
+ * @param {number} limit - Maximum number of results per page.
103
+ * @param {number} page - The page number to retrieve.
104
+ * @returns {Promise<Share[]>} A promise that resolves to a list of shares the current user is linked to.
105
+ */
106
+ searchSharesOfUser<R extends boolean = false>(search: {
107
+ sorting?: Sorting;
108
+ filters?: SearchFilter[];
109
+ }, limit: number, page: number, raw?: {
110
+ raw: R;
111
+ }): Promise<MaybeRaw<R, Share[]>>;
112
+ /**
113
+ * Unlinks the current user from a specific share in a space.
114
+ *
115
+ * @param {string} orgName - The name of the organization.
116
+ * @param {string} spaceName - The name of the space.
117
+ * @param {string} shareId - The ID of the share to unlink from.
118
+ * @returns {Promise<void>} A promise that resolves when the unlinking is complete.
119
+ */
120
+ unlinkSelf<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, raw?: {
121
+ raw: R;
122
+ }): Promise<MaybeRaw<R, void>>;
123
+ /**
124
+ * Unlinks another user from a specific share in a space.
125
+ *
126
+ * @param {string} orgName - The name of the organization.
127
+ * @param {string} spaceName - The name of the space.
128
+ * @param {string} shareId - The ID of the share to unlink from.
129
+ * @param {string} userId - The ID of the user to unlink.
130
+ * @returns {Promise<void>} A promise that resolves when the unlinking is complete.
131
+ */
132
+ unlinkOther<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, userId: string, raw?: {
133
+ raw: R;
134
+ }): Promise<MaybeRaw<R, void>>;
135
+ /**
136
+ * Links one or more users (by email) to a specific share in a space.
137
+ *
138
+ * @param {string} orgName - The name of the organization.
139
+ * @param {string} spaceName - The name of the space.
140
+ * @param {string} shareId - The ID of the share to link to.
141
+ * @param {string[]} emails - An array of email addresses to link to the share.
142
+ * @returns {Promise<Share>} A promise that resolves to the updated share object.
143
+ */
144
+ linkOther<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, emails: string[], raw?: {
145
+ raw: R;
146
+ }): Promise<MaybeRaw<R, Share>>;
147
+ /**
148
+ * Patch a Share in the specified Organization and Space.
149
+ * @remarks
150
+ * ** Under development, breaking changes possible**
151
+ * @param orgName Name of the Organization
152
+ * @param spaceName Name of the Space
153
+ * @param shareId ID of the Share
154
+ * @param patchObject An object whose properties will be used to replace the existing Share ones
155
+ *
156
+ * @returns The patched Share
157
+ */
158
+ patchShare<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, patchObject: SharePatch, raw?: {
159
+ raw: R;
160
+ }): Promise<MaybeRaw<R, Share>>;
161
+ }
@@ -0,0 +1,215 @@
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.CosmoShare = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ /**
15
+ * @class Share
16
+ * @extends Base
17
+ *
18
+ * @remarks
19
+ * **Under development, breaking changes possible**
20
+ *
21
+ * Represents a Share resource in Cosmo, providing methods to interact with the Share API.
22
+ */
23
+ class CosmoShare extends Base_1.default {
24
+ getEndpoint(endpoint) {
25
+ return `${this.options.server}/api/cosmo${endpoint}`;
26
+ }
27
+ /**
28
+ * Create a new Share in the specified Organization and Space.
29
+ * @remarks
30
+ * ** Under development, breaking changes possible**
31
+ * @param orgName Name of the Organization
32
+ * @param spaceName Name of the Space
33
+ * @param createShare The Share object to create
34
+ *
35
+ * @returns The created Share
36
+ */
37
+ createShare(orgName, spaceName, createShare, raw) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares`), createShare);
40
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
41
+ });
42
+ }
43
+ /**
44
+ * Links the user to a Share, making the assets shared available to the user
45
+ * @remarks
46
+ * ** Under development, breaking changes possible**
47
+ * @param orgName Name of the Organization
48
+ * @param spaceName Name of the Space
49
+ * @param shareId The ID of the Share to link
50
+ *
51
+ * @returns The created Share
52
+ */
53
+ linkShare(orgName, spaceName, shareId, password, shareIdHMAC, raw) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}`), {
56
+ password,
57
+ shareIdHMAC,
58
+ });
59
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
60
+ });
61
+ }
62
+ /**
63
+ * Fetch shared Assets.
64
+ * @remarks
65
+ * ** Under development, breaking changes possible**
66
+ * @param orgName Name of the Organization
67
+ * @param spaceName Name of the Space
68
+ * @param shareId The ID of the Share to link
69
+ * @param limit The number of assets to return
70
+ * @param page The page number to return
71
+ * @param namespace The namespace to filter by
72
+ *
73
+ * @returns The created Share
74
+ */
75
+ fetchSharedAssets(orgName, spaceName, shareId, limit, page, namespace, raw) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}/assets?limit=${limit}&page=${page}&namespace=${namespace}`));
78
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
79
+ });
80
+ }
81
+ /**
82
+ * Delete Shares by ID.
83
+ * @remarks
84
+ * ** Under development, breaking changes possible**
85
+ * @param orgName Name of the Organization
86
+ * @param spaceName Name of the Space
87
+ * @param shareIds The IDs of the Shares to delete
88
+ *
89
+ * @returns 204 No Content if successful
90
+ */
91
+ deleteShare(orgName, spaceName, shareIds, raw) {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares`), {
94
+ data: { shareIds },
95
+ });
96
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
97
+ });
98
+ }
99
+ /**
100
+ * Fetch a Share.
101
+ * @param orgName Name of the Organization
102
+ * @param spaceName Name of the Space
103
+ * @param shareId The ID of the Share to link
104
+ *
105
+ * @returns Detailed Share object
106
+ */
107
+ fetchShare(orgName, spaceName, shareId, raw) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ const res = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}`));
110
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
111
+ });
112
+ }
113
+ /**
114
+ * Searches for shares within a specific space in an organization.
115
+ *
116
+ * @param {string} orgName - The name of the organization.
117
+ * @param {string} spaceName - The name of the space.
118
+ * @param {{ sorting?: Sorting, filters?: SearchFilter[] }} search - Search criteria including optional sorting and filters.
119
+ * @param {number} limit - Maximum number of results per page.
120
+ * @param {number} page - The page number to retrieve.
121
+ * @returns {Promise<ShareWithUsers[]>} A promise that resolves to a list of shares with their associated users.
122
+ */
123
+ searchSharesOfSpace(orgName, spaceName, search, limit, page, raw) {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/search`), search, {
126
+ params: {
127
+ limit,
128
+ page,
129
+ },
130
+ });
131
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
132
+ });
133
+ }
134
+ /**
135
+ * Searches for shares the current user is linked to.
136
+ *
137
+ * @param {{ sorting?: Sorting, filters?: SearchFilter[] }} search - Search criteria including optional sorting and filters.
138
+ * @param {number} limit - Maximum number of results per page.
139
+ * @param {number} page - The page number to retrieve.
140
+ * @returns {Promise<Share[]>} A promise that resolves to a list of shares the current user is linked to.
141
+ */
142
+ searchSharesOfUser(search, limit, page, raw) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/user/shares/search`), search, {
145
+ params: {
146
+ limit,
147
+ page,
148
+ },
149
+ });
150
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
151
+ });
152
+ }
153
+ /**
154
+ * Unlinks the current user from a specific share in a space.
155
+ *
156
+ * @param {string} orgName - The name of the organization.
157
+ * @param {string} spaceName - The name of the space.
158
+ * @param {string} shareId - The ID of the share to unlink from.
159
+ * @returns {Promise<void>} A promise that resolves when the unlinking is complete.
160
+ */
161
+ unlinkSelf(orgName, spaceName, shareId, raw) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}/link`));
164
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
165
+ });
166
+ }
167
+ /**
168
+ * Unlinks another user from a specific share in a space.
169
+ *
170
+ * @param {string} orgName - The name of the organization.
171
+ * @param {string} spaceName - The name of the space.
172
+ * @param {string} shareId - The ID of the share to unlink from.
173
+ * @param {string} userId - The ID of the user to unlink.
174
+ * @returns {Promise<void>} A promise that resolves when the unlinking is complete.
175
+ */
176
+ unlinkOther(orgName, spaceName, shareId, userId, raw) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}/user/${userId}`));
179
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
180
+ });
181
+ }
182
+ /**
183
+ * Links one or more users (by email) to a specific share in a space.
184
+ *
185
+ * @param {string} orgName - The name of the organization.
186
+ * @param {string} spaceName - The name of the space.
187
+ * @param {string} shareId - The ID of the share to link to.
188
+ * @param {string[]} emails - An array of email addresses to link to the share.
189
+ * @returns {Promise<Share>} A promise that resolves to the updated share object.
190
+ */
191
+ linkOther(orgName, spaceName, shareId, emails, raw) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const res = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}/user`), { users: emails });
194
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
195
+ });
196
+ }
197
+ /**
198
+ * Patch a Share in the specified Organization and Space.
199
+ * @remarks
200
+ * ** Under development, breaking changes possible**
201
+ * @param orgName Name of the Organization
202
+ * @param spaceName Name of the Space
203
+ * @param shareId ID of the Share
204
+ * @param patchObject An object whose properties will be used to replace the existing Share ones
205
+ *
206
+ * @returns The patched Share
207
+ */
208
+ patchShare(orgName, spaceName, shareId, patchObject, raw) {
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}`), patchObject);
211
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
212
+ });
213
+ }
214
+ }
215
+ exports.CosmoShare = CosmoShare;
@@ -0,0 +1,104 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { High5SpaceInfo, CosmoSpace as ICosmoSpace, SpaceUser } from "../../../interfaces/cosmo/space";
3
+ /**
4
+ * @class Space
5
+ * @extends Base
6
+ *
7
+ * @remarks
8
+ * **Under development, breaking changes possible**
9
+ *
10
+ * Represents a Space resource in Cosmo, providing methods to interact with the Space API.
11
+ */
12
+ export declare class CosmoSpace extends Base {
13
+ protected getEndpoint(endpoint: string): string;
14
+ /**
15
+ * Create a new Space in the specified Organization.
16
+ * @remarks
17
+ * ** Under development, breaking changes possible**
18
+ * @param orgName Name of the Organization
19
+ * @param noAvatar Optional flag to create the Space without an avatar
20
+ * @returns The created Space
21
+ */
22
+ createSpace<R extends boolean = false>(orgName: string, spaceName: string, noAvatar?: boolean, raw?: {
23
+ raw: R;
24
+ }): Promise<MaybeRaw<R, ICosmoSpace>>;
25
+ /**
26
+ * List spaces of an Organization.
27
+ * @remarks
28
+ * ** Under development, breaking changes possible**
29
+ * @param orgName Name of the Organization
30
+ * @param limit Maximum number of Spaces to return
31
+ * @param page Page number for pagination
32
+ * @returns A list of Spaces in the Organization
33
+ */
34
+ listSpaces<R extends boolean = false>(orgName: string, limit: number, page: number, raw?: {
35
+ raw: R;
36
+ }): Promise<MaybeRaw<R, ICosmoSpace[]>>;
37
+ /**
38
+ * Fetch a single space by its Name.
39
+ * @remarks
40
+ * ** Under development, breaking changes possible**
41
+ * @param orgName Name of the Organization
42
+ * @param spaceName Name of the Space to fetch
43
+ * @returns The requested Space
44
+ */
45
+ getSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
46
+ raw: R;
47
+ }): Promise<MaybeRaw<R, ICosmoSpace>>;
48
+ /**
49
+ * Delete a Space by it's Name.
50
+ * @remarks
51
+ * ** Under development, breaking changes possible**
52
+ * @param orgName Name of the Organization
53
+ * @param spaceName Name of the Space to delete
54
+ * @returns 204 No Content on success
55
+ */
56
+ deleteSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
57
+ raw: R;
58
+ }): Promise<MaybeRaw<R, void>>;
59
+ /**
60
+ * Rename a Space.
61
+ * @remarks
62
+ * ** Under development, breaking changes possible**
63
+ * @param orgName Name of the Organization
64
+ * @param spaceName Name of the Space
65
+ * @param newName New name for the Space
66
+ * @returns The updated Space
67
+ */
68
+ renameSpace<R extends boolean = false>(orgName: string, spaceName: string, newName: string, raw?: {
69
+ raw: R;
70
+ }): Promise<MaybeRaw<R, ICosmoSpace>>;
71
+ /**
72
+ * Link a high5 space to a cosmo space.
73
+ * @remarks
74
+ * ** Under development, breaking changes possible**
75
+ * @param orgName Name of the Organization
76
+ * @param spaceName Name of the Cosmo Space
77
+ * @param high5SpaceInfo Information about the high5 space
78
+ * @returns The updated Cosmo Space
79
+ */
80
+ linkSpace<R extends boolean = false>(orgName: string, spaceName: string, high5SpaceInfo: High5SpaceInfo, raw?: {
81
+ raw: R;
82
+ }): Promise<MaybeRaw<R, ICosmoSpace>>;
83
+ /**
84
+ * Link a high5 space to a cosmo space.
85
+ * @remarks
86
+ * ** Under development, breaking changes possible**
87
+ * @param orgName Name of the Organization
88
+ * @param spaceName Name of the Cosmo Space
89
+ * @param high5SpaceInfo Information about the high5 space
90
+ * @returns The updated Cosmo Space
91
+ */
92
+ unlinkSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
93
+ raw: R;
94
+ }): Promise<MaybeRaw<R, ICosmoSpace>>;
95
+ /**
96
+ * List all users with access to the given Space.
97
+ * @param orgName Name of the Organization
98
+ * @param spaceName Name of the Cosmo Space
99
+ * @returns The SpaceUser array
100
+ */
101
+ listSpaceUsers<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
102
+ raw: R;
103
+ }): Promise<MaybeRaw<R, SpaceUser[]>>;
104
+ }
@@ -0,0 +1,146 @@
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.CosmoSpace = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ /**
15
+ * @class Space
16
+ * @extends Base
17
+ *
18
+ * @remarks
19
+ * **Under development, breaking changes possible**
20
+ *
21
+ * Represents a Space resource in Cosmo, providing methods to interact with the Space API.
22
+ */
23
+ class CosmoSpace extends Base_1.default {
24
+ getEndpoint(endpoint) {
25
+ return `${this.options.server}/api/cosmo${endpoint}`;
26
+ }
27
+ /**
28
+ * Create a new Space in the specified Organization.
29
+ * @remarks
30
+ * ** Under development, breaking changes possible**
31
+ * @param orgName Name of the Organization
32
+ * @param noAvatar Optional flag to create the Space without an avatar
33
+ * @returns The created Space
34
+ */
35
+ createSpace(orgName, spaceName, noAvatar, raw) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces?noAvatar=${noAvatar ? "true" : "false"}`), {
38
+ name: spaceName,
39
+ });
40
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
41
+ });
42
+ }
43
+ /**
44
+ * List spaces of an Organization.
45
+ * @remarks
46
+ * ** Under development, breaking changes possible**
47
+ * @param orgName Name of the Organization
48
+ * @param limit Maximum number of Spaces to return
49
+ * @param page Page number for pagination
50
+ * @returns A list of Spaces in the Organization
51
+ */
52
+ listSpaces(orgName, limit, page, raw) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces?limit=${limit}&page=${page}`));
55
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
56
+ });
57
+ }
58
+ /**
59
+ * Fetch a single space by its Name.
60
+ * @remarks
61
+ * ** Under development, breaking changes possible**
62
+ * @param orgName Name of the Organization
63
+ * @param spaceName Name of the Space to fetch
64
+ * @returns The requested Space
65
+ */
66
+ getSpace(orgName, spaceName, raw) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
69
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
70
+ });
71
+ }
72
+ /**
73
+ * Delete a Space by it's Name.
74
+ * @remarks
75
+ * ** Under development, breaking changes possible**
76
+ * @param orgName Name of the Organization
77
+ * @param spaceName Name of the Space to delete
78
+ * @returns 204 No Content on success
79
+ */
80
+ deleteSpace(orgName, spaceName, raw) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
83
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
84
+ });
85
+ }
86
+ /**
87
+ * Rename a Space.
88
+ * @remarks
89
+ * ** Under development, breaking changes possible**
90
+ * @param orgName Name of the Organization
91
+ * @param spaceName Name of the Space
92
+ * @param newName New name for the Space
93
+ * @returns The updated Space
94
+ */
95
+ renameSpace(orgName, spaceName, newName, raw) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
98
+ name: newName,
99
+ });
100
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
101
+ });
102
+ }
103
+ /**
104
+ * Link a high5 space to a cosmo space.
105
+ * @remarks
106
+ * ** Under development, breaking changes possible**
107
+ * @param orgName Name of the Organization
108
+ * @param spaceName Name of the Cosmo Space
109
+ * @param high5SpaceInfo Information about the high5 space
110
+ * @returns The updated Cosmo Space
111
+ */
112
+ linkSpace(orgName, spaceName, high5SpaceInfo, raw) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/high5/link/space`), high5SpaceInfo);
115
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
116
+ });
117
+ }
118
+ /**
119
+ * Link a high5 space to a cosmo space.
120
+ * @remarks
121
+ * ** Under development, breaking changes possible**
122
+ * @param orgName Name of the Organization
123
+ * @param spaceName Name of the Cosmo Space
124
+ * @param high5SpaceInfo Information about the high5 space
125
+ * @returns The updated Cosmo Space
126
+ */
127
+ unlinkSpace(orgName, spaceName, raw) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/high5/unlink/space`));
130
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
131
+ });
132
+ }
133
+ /**
134
+ * List all users with access to the given Space.
135
+ * @param orgName Name of the Organization
136
+ * @param spaceName Name of the Cosmo Space
137
+ * @returns The SpaceUser array
138
+ */
139
+ listSpaceUsers(orgName, spaceName, raw) {
140
+ return __awaiter(this, void 0, void 0, function* () {
141
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/users`));
142
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
143
+ });
144
+ }
145
+ }
146
+ exports.CosmoSpace = CosmoSpace;