hcloud-sdk 17.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 (275) hide show
  1. package/changelog.md +176 -76
  2. package/lib/Base.d.ts +2 -1
  3. package/lib/Hcloud.d.ts +6 -3
  4. package/lib/Hcloud.js +16 -5
  5. package/lib/helper/ValidationHelper.d.ts +10 -2
  6. package/lib/helper/ValidationHelper.js +55 -7
  7. package/lib/interfaces/auditor/index.d.ts +13 -2
  8. package/lib/interfaces/auditor/index.js +9 -1
  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/namespace/index.d.ts +9 -0
  17. package/lib/interfaces/cosmo/namespace/index.js +9 -0
  18. package/lib/interfaces/cosmo/permissions.d.ts +96 -0
  19. package/lib/interfaces/cosmo/permissions.js +58 -0
  20. package/lib/interfaces/cosmo/share/index.d.ts +28 -0
  21. package/lib/interfaces/cosmo/share/index.js +2 -0
  22. package/lib/interfaces/cosmo/space/index.d.ts +25 -0
  23. package/lib/interfaces/cosmo/space/index.js +2 -0
  24. package/lib/interfaces/cosmo/tag/tag.d.ts +12 -0
  25. package/lib/interfaces/cosmo/tag/tag.js +2 -0
  26. package/lib/interfaces/global/Products.d.ts +2 -2
  27. package/lib/interfaces/global/Products.js +1 -1
  28. package/lib/interfaces/high5/index.d.ts +7 -7
  29. package/lib/interfaces/high5/index.js +7 -7
  30. package/lib/interfaces/{friday → high5}/space/database/document/index.d.ts +1 -1
  31. package/lib/interfaces/{friday → high5}/space/database/document/index.js +2 -1
  32. package/lib/interfaces/high5/space/database/index.js +2 -0
  33. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +9 -2
  34. package/lib/interfaces/high5/space/execution/index.d.ts +2 -1
  35. package/lib/interfaces/high5/space/job/JobLog.d.ts +16 -0
  36. package/lib/interfaces/high5/space/job/JobLog.js +2 -0
  37. package/lib/interfaces/high5/space/job/index.d.ts +38 -0
  38. package/lib/interfaces/high5/space/job/index.js +8 -0
  39. package/lib/interfaces/high5/stats.d.ts +21 -0
  40. package/lib/interfaces/high5/stats.js +2 -0
  41. package/lib/interfaces/idp/oauth/index.d.ts +4 -3
  42. package/lib/interfaces/idp/organization/index.d.ts +1 -0
  43. package/lib/interfaces/idp/organization/index.js +1 -0
  44. package/lib/interfaces/idp/organization/license/index.d.ts +13 -11
  45. package/lib/interfaces/idp/organization/member/index.d.ts +1 -0
  46. package/lib/interfaces/idp/organization/stats.d.ts +7 -0
  47. package/lib/interfaces/idp/organization/stats.js +2 -0
  48. package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
  49. package/lib/interfaces/idp/user/Message.d.ts +21 -0
  50. package/lib/interfaces/idp/user/Message.js +14 -0
  51. package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
  52. package/lib/interfaces/idp/user/Scopes.d.ts +1 -7
  53. package/lib/interfaces/idp/user/Scopes.js +0 -9
  54. package/lib/interfaces/idp/user/index.d.ts +2 -1
  55. package/lib/interfaces/mailer/index.d.ts +30 -1
  56. package/lib/interfaces/mailer/index.js +87 -1
  57. package/lib/interfaces/mothership/index.d.ts +3 -1
  58. package/lib/interfaces/mothership/index.js +15 -0
  59. package/lib/interfaces/mothership/stats.d.ts +4 -0
  60. package/lib/interfaces/mothership/stats.js +2 -0
  61. package/lib/interfaces/nats/index.d.ts +54 -24
  62. package/lib/interfaces/nats/index.js +87 -58
  63. package/lib/interfaces/shorts/index.d.ts +10 -0
  64. package/lib/interfaces/shorts/index.js +2 -0
  65. package/lib/service/agent/bundle/dev/index.d.ts +16 -6
  66. package/lib/service/agent/bundle/dev/index.js +12 -10
  67. package/lib/service/agent/bundle/index.d.ts +10 -4
  68. package/lib/service/agent/bundle/index.js +6 -6
  69. package/lib/service/agent/context/index.d.ts +22 -8
  70. package/lib/service/agent/context/index.js +15 -14
  71. package/lib/service/auditor/index.d.ts +8 -4
  72. package/lib/service/auditor/index.js +5 -5
  73. package/lib/service/auditor/internal/index.d.ts +27 -3
  74. package/lib/service/auditor/internal/index.js +34 -5
  75. package/lib/service/bouncer/features/index.d.ts +4 -2
  76. package/lib/service/bouncer/features/index.js +2 -2
  77. package/lib/service/cosmo/asset/index.d.ts +219 -0
  78. package/lib/service/cosmo/asset/index.js +314 -0
  79. package/lib/service/cosmo/comment/index.d.ts +122 -0
  80. package/lib/service/cosmo/comment/index.js +161 -0
  81. package/lib/service/cosmo/event/index.d.ts +23 -0
  82. package/lib/service/cosmo/event/index.js +40 -0
  83. package/lib/service/cosmo/folder/index.d.ts +27 -0
  84. package/lib/service/cosmo/folder/index.js +47 -0
  85. package/lib/service/cosmo/index.d.ts +49 -0
  86. package/lib/service/cosmo/index.js +119 -0
  87. package/lib/service/cosmo/internal/index.d.ts +7 -0
  88. package/lib/service/cosmo/internal/index.js +17 -0
  89. package/lib/service/cosmo/internal/space/index.d.ts +15 -0
  90. package/lib/service/cosmo/internal/space/index.js +34 -0
  91. package/lib/service/cosmo/location/index.d.ts +40 -0
  92. package/lib/service/cosmo/location/index.js +63 -0
  93. package/lib/service/cosmo/namespace/index.d.ts +42 -0
  94. package/lib/service/cosmo/namespace/index.js +65 -0
  95. package/lib/service/cosmo/organization/index.d.ts +47 -0
  96. package/lib/service/cosmo/organization/index.js +64 -0
  97. package/lib/service/cosmo/permissions/index.d.ts +131 -0
  98. package/lib/service/cosmo/permissions/index.js +181 -0
  99. package/lib/service/cosmo/production/index.d.ts +26 -0
  100. package/lib/service/cosmo/production/index.js +45 -0
  101. package/lib/service/cosmo/share/index.d.ts +161 -0
  102. package/lib/service/cosmo/share/index.js +215 -0
  103. package/lib/service/cosmo/space/index.d.ts +104 -0
  104. package/lib/service/cosmo/space/index.js +146 -0
  105. package/lib/service/cosmo/tag/index.d.ts +67 -0
  106. package/lib/service/cosmo/tag/index.js +93 -0
  107. package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
  108. package/lib/service/dali/avatar/DaliCosmoSpace.js +8 -7
  109. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +10 -4
  110. package/lib/service/dali/avatar/DaliFuseSpace.js +7 -6
  111. package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +10 -4
  112. package/lib/service/dali/avatar/DaliHigh5Pool.js +7 -6
  113. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +10 -4
  114. package/lib/service/dali/avatar/DaliHigh5Space.js +7 -6
  115. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +10 -4
  116. package/lib/service/dali/avatar/DaliOAuthApp.js +7 -6
  117. package/lib/service/dali/avatar/DaliOrganization.d.ts +10 -4
  118. package/lib/service/dali/avatar/DaliOrganization.js +7 -6
  119. package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
  120. package/lib/service/dali/avatar/DaliServiceAccount.js +7 -6
  121. package/lib/service/dali/avatar/DaliTeam.d.ts +10 -4
  122. package/lib/service/dali/avatar/DaliTeam.js +7 -6
  123. package/lib/service/dali/avatar/DaliUser.d.ts +10 -4
  124. package/lib/service/dali/avatar/DaliUser.js +7 -6
  125. package/lib/service/dali/index.d.ts +4 -5
  126. package/lib/service/dali/index.js +2 -5
  127. package/lib/service/fuse/index.d.ts +4 -2
  128. package/lib/service/fuse/index.js +2 -2
  129. package/lib/service/fuse/internal/index.d.ts +4 -2
  130. package/lib/service/fuse/internal/index.js +3 -2
  131. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +4 -2
  132. package/lib/service/fuse/internal/space/cronjob/log/index.js +2 -2
  133. package/lib/service/fuse/internal/space/index.d.ts +7 -3
  134. package/lib/service/fuse/internal/space/index.js +6 -4
  135. package/lib/service/fuse/space/cronjob/index.d.ts +35 -13
  136. package/lib/service/fuse/space/cronjob/index.js +48 -50
  137. package/lib/service/fuse/space/cronjob/log/index.d.ts +8 -4
  138. package/lib/service/fuse/space/cronjob/log/index.js +5 -5
  139. package/lib/service/fuse/space/index.d.ts +27 -11
  140. package/lib/service/fuse/space/index.js +19 -18
  141. package/lib/service/high5/execution/index.d.ts +4 -2
  142. package/lib/service/high5/execution/index.js +3 -2
  143. package/lib/service/high5/execution/status/index.d.ts +5 -3
  144. package/lib/service/high5/execution/status/index.js +3 -3
  145. package/lib/service/high5/index.d.ts +7 -2
  146. package/lib/service/high5/index.js +9 -2
  147. package/lib/service/high5/internal/index.d.ts +4 -2
  148. package/lib/service/high5/internal/index.js +3 -2
  149. package/lib/service/high5/internal/space/index.d.ts +10 -3
  150. package/lib/service/high5/internal/space/index.js +13 -4
  151. package/lib/service/high5/internal/space/job/index.d.ts +7 -0
  152. package/lib/service/high5/internal/space/job/index.js +17 -0
  153. package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
  154. package/lib/service/high5/internal/space/job/log/index.js +34 -0
  155. package/lib/service/high5/joinToken/index.d.ts +14 -6
  156. package/lib/service/high5/joinToken/index.js +10 -9
  157. package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
  158. package/lib/service/high5/space/database/document/array/index.js +102 -0
  159. package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
  160. package/lib/service/{friday → high5}/space/database/document/index.js +31 -16
  161. package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
  162. package/lib/service/high5/space/database/document/number/index.js +77 -0
  163. package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
  164. package/lib/service/{friday → high5}/space/database/index.js +18 -17
  165. package/lib/service/high5/space/event/index.d.ts +17 -7
  166. package/lib/service/high5/space/event/index.js +12 -11
  167. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
  168. package/lib/service/high5/space/event/stream/design/DesignOperations.js +2 -2
  169. package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
  170. package/lib/service/high5/space/event/stream/design/index.js +7 -6
  171. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
  172. package/lib/service/high5/space/event/stream/design/snapshot/index.js +12 -10
  173. package/lib/service/high5/space/event/stream/index.d.ts +32 -12
  174. package/lib/service/high5/space/event/stream/index.js +22 -21
  175. package/lib/service/high5/space/execution/index.d.ts +19 -7
  176. package/lib/service/high5/space/execution/index.js +17 -12
  177. package/lib/service/high5/space/execution/log/index.d.ts +8 -4
  178. package/lib/service/high5/space/execution/log/index.js +5 -5
  179. package/lib/service/high5/space/execution/status/index.d.ts +7 -3
  180. package/lib/service/high5/space/execution/status/index.js +4 -4
  181. package/lib/service/high5/space/index.d.ts +43 -14
  182. package/lib/service/high5/space/index.js +45 -23
  183. package/lib/service/high5/space/job/index.d.ts +145 -0
  184. package/lib/service/high5/space/job/index.js +201 -0
  185. package/lib/service/high5/space/job/log/index.d.ts +35 -0
  186. package/lib/service/high5/space/job/log/index.js +58 -0
  187. package/lib/service/high5/space/node/index.d.ts +20 -8
  188. package/lib/service/high5/space/node/index.js +14 -13
  189. package/lib/service/high5/space/pool/index.d.ts +27 -11
  190. package/lib/service/high5/space/pool/index.js +19 -18
  191. package/lib/service/high5/space/secret/index.d.ts +17 -7
  192. package/lib/service/high5/space/secret/index.js +12 -11
  193. package/lib/service/high5/space/stat/index.d.ts +12 -0
  194. package/lib/service/high5/space/stat/index.js +31 -0
  195. package/lib/service/high5/space/wave/index.d.ts +16 -6
  196. package/lib/service/high5/space/wave/index.js +11 -10
  197. package/lib/service/high5/space/webhook/index.d.ts +32 -12
  198. package/lib/service/high5/space/webhook/index.js +25 -21
  199. package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
  200. package/lib/service/high5/space/webhook/log/index.js +2 -2
  201. package/lib/service/high5/stat/index.d.ts +11 -0
  202. package/lib/service/high5/stat/index.js +30 -0
  203. package/lib/service/high5/wave/s3/index.d.ts +31 -8
  204. package/lib/service/high5/wave/s3/index.js +42 -21
  205. package/lib/service/idp/guest/index.d.ts +42 -0
  206. package/lib/service/idp/guest/index.js +66 -0
  207. package/lib/service/idp/index.d.ts +25 -7
  208. package/lib/service/idp/index.js +23 -12
  209. package/lib/service/idp/internal/index.d.ts +5 -3
  210. package/lib/service/idp/internal/index.js +5 -3
  211. package/lib/service/idp/oauth/index.d.ts +16 -6
  212. package/lib/service/idp/oauth/index.js +15 -15
  213. package/lib/service/idp/organization/index.d.ts +19 -5
  214. package/lib/service/idp/organization/index.js +19 -8
  215. package/lib/service/idp/organization/license/index.d.ts +7 -3
  216. package/lib/service/idp/organization/license/index.js +4 -4
  217. package/lib/service/idp/organization/member/index.d.ts +20 -8
  218. package/lib/service/idp/organization/member/index.js +15 -13
  219. package/lib/service/idp/organization/member/invitations/index.d.ts +23 -9
  220. package/lib/service/idp/organization/member/invitations/index.js +72 -59
  221. package/lib/service/idp/organization/service-accounts/index.d.ts +20 -8
  222. package/lib/service/idp/organization/service-accounts/index.js +13 -12
  223. package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
  224. package/lib/service/idp/organization/settings/domain/index.js +9 -8
  225. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
  226. package/lib/service/idp/organization/settings/domain/saml/index.js +19 -18
  227. package/lib/service/idp/organization/settings/oauth/index.d.ts +23 -9
  228. package/lib/service/idp/organization/settings/oauth/index.js +16 -15
  229. package/lib/service/idp/organization/stat/index.d.ts +11 -0
  230. package/lib/service/idp/organization/stat/index.js +30 -0
  231. package/lib/service/idp/organization/team/index.d.ts +22 -10
  232. package/lib/service/idp/organization/team/index.js +14 -13
  233. package/lib/service/idp/registration/index.d.ts +10 -4
  234. package/lib/service/idp/registration/index.js +15 -9
  235. package/lib/service/idp/user/index.d.ts +33 -11
  236. package/lib/service/idp/user/index.js +29 -16
  237. package/lib/service/idp/user/license/index.d.ts +7 -3
  238. package/lib/service/idp/user/license/index.js +4 -4
  239. package/lib/service/idp/user/message/index.d.ts +61 -0
  240. package/lib/service/idp/user/message/index.js +92 -0
  241. package/lib/service/idp/user/password/index.d.ts +4 -2
  242. package/lib/service/idp/user/password/index.js +2 -2
  243. package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
  244. package/lib/service/idp/user/settings/connections/index.js +2 -2
  245. package/lib/service/idp/user/settings/general/index.d.ts +10 -4
  246. package/lib/service/idp/user/settings/general/index.js +6 -6
  247. package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
  248. package/lib/service/idp/user/settings/notifications/index.js +4 -4
  249. package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
  250. package/lib/service/idp/user/settings/oauthApps/index.js +6 -5
  251. package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
  252. package/lib/service/idp/user/settings/pats/index.js +17 -15
  253. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
  254. package/lib/service/idp/user/settings/twoFactor/totp/index.js +13 -10
  255. package/lib/service/mailer/index.d.ts +4 -2
  256. package/lib/service/mailer/index.js +2 -2
  257. package/lib/service/mailer/internal/index.d.ts +13 -5
  258. package/lib/service/mailer/internal/index.js +8 -8
  259. package/lib/service/mothership/index.d.ts +35 -13
  260. package/lib/service/mothership/index.js +32 -17
  261. package/lib/service/nats/index.js +58 -43
  262. package/lib/service/shorts/index.d.ts +18 -0
  263. package/lib/service/{friday → shorts}/index.js +13 -10
  264. package/lib/service/shorts/internal/index.d.ts +72 -0
  265. package/lib/service/shorts/internal/index.js +104 -0
  266. package/package.json +1 -1
  267. package/lib/interfaces/friday/index.d.ts +0 -3
  268. package/lib/interfaces/friday/index.js +0 -19
  269. package/lib/interfaces/friday/space/index.d.ts +0 -21
  270. package/lib/interfaces/friday/space/index.js +0 -11
  271. package/lib/service/friday/index.d.ts +0 -13
  272. package/lib/service/friday/space/index.d.ts +0 -81
  273. package/lib/service/friday/space/index.js +0 -150
  274. /package/lib/interfaces/{friday/space/database → cosmo/location}/index.js +0 -0
  275. /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
@@ -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;
@@ -0,0 +1,67 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { CreateTag, PatchTag, Tag } from "../../../interfaces/cosmo/tag/tag";
3
+ /**
4
+ * @class Tag
5
+ * @extends Base
6
+ *
7
+ * @remarks
8
+ * **Under development, breaking changes possible**
9
+ *
10
+ * Represents an Asset resource in Cosmo, providing methods to interact with the Asset API.
11
+ */
12
+ export declare class CosmoTag extends Base {
13
+ protected getEndpoint(endpoint: string): string;
14
+ /**
15
+ * Create a new Tag in Cosmo inside the specified Organization, Space and Namespace.
16
+ * @remarks
17
+ * ** Under development, breaking changes possible**
18
+ * @param orgName Name of the Organization
19
+ * @param spaceName Name of the Space
20
+ * @param namespaceName Name of the Namespace
21
+ * @param createTag The Tag to be created
22
+ * @returns The created tag
23
+ */
24
+ createTag<R extends boolean = false>(orgName: string, spaceName: string, namespaceName: string, createTag: CreateTag, raw?: {
25
+ raw: R;
26
+ }): Promise<MaybeRaw<R, Tag>>;
27
+ /**
28
+ * Get a list of all Tags in Cosmo inside the specified Organization, Space and Namespace.
29
+ * @remarks
30
+ * ** Under development, breaking changes possible**
31
+ * @param orgName Name of the Organization
32
+ * @param spaceName Name of the Space
33
+ * @param namespaceName Name of the Namespace
34
+ * @param createTag The Tag to be created
35
+ * @returns The created tag
36
+ */
37
+ getTags<R extends boolean = false>(orgName: string, spaceName: string, namespaceName: string, raw?: {
38
+ raw: R;
39
+ }): Promise<MaybeRaw<R, Tag[]>>;
40
+ /**
41
+ * Update a Tag in Cosmo inside the specified Organization, Space and Namespace.
42
+ * @remarks
43
+ * ** Under development, breaking changes possible**
44
+ * @param orgName Name of the Organization
45
+ * @param spaceName Name of the Space
46
+ * @param namespaceName Name of the Namespace
47
+ * @param tagName Name of the Tag to be updated
48
+ * @param patchTag The Tag data to be updated
49
+ * @returns The updated tag
50
+ */
51
+ updateTag<R extends boolean = false>(orgName: string, spaceName: string, namespaceName: string, tagName: string, patchTag: PatchTag, raw?: {
52
+ raw: R;
53
+ }): Promise<MaybeRaw<R, Tag>>;
54
+ /**
55
+ * Delete a Tag in Cosmo inside the specified Organization, Space and Namespace.
56
+ * @remarks
57
+ * ** Under development, breaking changes possible**
58
+ * @param orgName Name of the Organization
59
+ * @param spaceName Name of the Space
60
+ * @param namespaceName Name of the Namespace
61
+ * @param tagName Name of the Tag to be deleted
62
+ * @returns 204 No Content if successful
63
+ */
64
+ deleteTag<R extends boolean = false>(orgName: string, spaceName: string, namespaceName: string, tagName: string, raw?: {
65
+ raw: R;
66
+ }): Promise<MaybeRaw<R, void>>;
67
+ }
@@ -0,0 +1,93 @@
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.CosmoTag = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ /**
15
+ * @class Tag
16
+ * @extends Base
17
+ *
18
+ * @remarks
19
+ * **Under development, breaking changes possible**
20
+ *
21
+ * Represents an Asset resource in Cosmo, providing methods to interact with the Asset API.
22
+ */
23
+ class CosmoTag extends Base_1.default {
24
+ getEndpoint(endpoint) {
25
+ return `${this.options.server}/api/cosmo${endpoint}`;
26
+ }
27
+ /**
28
+ * Create a new Tag in Cosmo inside the specified Organization, Space and Namespace.
29
+ * @remarks
30
+ * ** Under development, breaking changes possible**
31
+ * @param orgName Name of the Organization
32
+ * @param spaceName Name of the Space
33
+ * @param namespaceName Name of the Namespace
34
+ * @param createTag The Tag to be created
35
+ * @returns The created tag
36
+ */
37
+ createTag(orgName, spaceName, namespaceName, createTag, raw) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/namespaces/${namespaceName}/tags`), createTag);
40
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
41
+ });
42
+ }
43
+ /**
44
+ * Get a list of all Tags in Cosmo inside the specified Organization, Space and Namespace.
45
+ * @remarks
46
+ * ** Under development, breaking changes possible**
47
+ * @param orgName Name of the Organization
48
+ * @param spaceName Name of the Space
49
+ * @param namespaceName Name of the Namespace
50
+ * @param createTag The Tag to be created
51
+ * @returns The created tag
52
+ */
53
+ getTags(orgName, spaceName, namespaceName, raw) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/namespaces/${namespaceName}/tags`));
56
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
57
+ });
58
+ }
59
+ /**
60
+ * Update a Tag in Cosmo inside the specified Organization, Space and Namespace.
61
+ * @remarks
62
+ * ** Under development, breaking changes possible**
63
+ * @param orgName Name of the Organization
64
+ * @param spaceName Name of the Space
65
+ * @param namespaceName Name of the Namespace
66
+ * @param tagName Name of the Tag to be updated
67
+ * @param patchTag The Tag data to be updated
68
+ * @returns The updated tag
69
+ */
70
+ updateTag(orgName, spaceName, namespaceName, tagName, patchTag, raw) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/namespaces/${namespaceName}/tags/${tagName}`), patchTag);
73
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
74
+ });
75
+ }
76
+ /**
77
+ * Delete a Tag in Cosmo inside the specified Organization, Space and Namespace.
78
+ * @remarks
79
+ * ** Under development, breaking changes possible**
80
+ * @param orgName Name of the Organization
81
+ * @param spaceName Name of the Space
82
+ * @param namespaceName Name of the Namespace
83
+ * @param tagName Name of the Tag to be deleted
84
+ * @returns 204 No Content if successful
85
+ */
86
+ deleteTag(orgName, spaceName, namespaceName, tagName, raw) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/namespaces/${namespaceName}/tags/${tagName}`));
89
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
90
+ });
91
+ }
92
+ }
93
+ exports.CosmoTag = CosmoTag;
@@ -1,4 +1,4 @@
1
- import Base from "../../../Base";
1
+ import Base, { MaybeRaw } from "../../../Base";
2
2
  import { AvatarCreated } from "../../../interfaces/dali";
3
3
  export declare class DaliCosmoSpace extends Base {
4
4
  /**
@@ -7,13 +7,17 @@ export declare class DaliCosmoSpace extends Base {
7
7
  * @param spaceName Name of the space
8
8
  * @returns Public URL of the created avatar
9
9
  */
10
- createAvatar(orgName: string, spaceName: string): Promise<AvatarCreated>;
10
+ createAvatar<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
11
+ raw: R;
12
+ }): Promise<MaybeRaw<R, AvatarCreated>>;
11
13
  /**
12
14
  * Deletes the avatar of the Cosmo space from cloud storage. If you want to update it instead, use updateAvatar().
13
15
  * @param orgName Name of the organization
14
16
  * @param spaceName Name of the space
15
17
  */
16
- deleteAvatar(orgName: string, spaceName: string): Promise<void>;
18
+ deleteAvatar<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
19
+ raw: R;
20
+ }): Promise<MaybeRaw<R, string>>;
17
21
  /**
18
22
  * Updates the avatar of the specified Cosmo space
19
23
  * @param orgName Name of the organization
@@ -21,6 +25,8 @@ export declare class DaliCosmoSpace extends Base {
21
25
  * @param file Image as Javascript File
22
26
  * @returns Public URL of the new avatar
23
27
  */
24
- updateAvatar(orgName: string, spaceName: string, file: File): Promise<AvatarCreated>;
28
+ updateAvatar<R extends boolean = false>(orgName: string, spaceName: string, file: File, raw?: {
29
+ raw: R;
30
+ }): Promise<MaybeRaw<R, AvatarCreated>>;
25
31
  protected getEndpoint(endpoint: string): string;
26
32
  }