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,27 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { Asset } from "../../../interfaces/cosmo/asset";
3
+ /**
4
+ * @class Folder
5
+ * @extends Base
6
+ *
7
+ * @remarks
8
+ * **Under development, breaking changes possible**
9
+ *
10
+ * Represents a Folder resource in Cosmo, providing methods to interact with the Folder API.
11
+ */
12
+ export declare class CosmoFolder extends Base {
13
+ protected getEndpoint(endpoint: string): string;
14
+ /**
15
+ * Create a new Folder in the specified Organization and Space.
16
+ * @remarks
17
+ * ** Under development, breaking changes possible**
18
+ * @param orgName Name of the Organization
19
+ * @param spaceName Name of the Space
20
+ * @param folderName Name of the Folder to create
21
+ * @param parentId Optional ID of the parent Folder. If not provided, the Folder will be created at the root level.
22
+ * @returns The created Folder
23
+ */
24
+ createFolder<R extends boolean = false>(orgName: string, spaceName: string, folderName: string, parentId?: string, raw?: {
25
+ raw: R;
26
+ }): Promise<MaybeRaw<R, Asset>>;
27
+ }
@@ -0,0 +1,47 @@
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.CosmoFolder = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ /**
15
+ * @class Folder
16
+ * @extends Base
17
+ *
18
+ * @remarks
19
+ * **Under development, breaking changes possible**
20
+ *
21
+ * Represents a Folder resource in Cosmo, providing methods to interact with the Folder API.
22
+ */
23
+ class CosmoFolder extends Base_1.default {
24
+ getEndpoint(endpoint) {
25
+ return `${this.options.server}/api/cosmo${endpoint}`;
26
+ }
27
+ /**
28
+ * Create a new Folder 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 folderName Name of the Folder to create
34
+ * @param parentId Optional ID of the parent Folder. If not provided, the Folder will be created at the root level.
35
+ * @returns The created Folder
36
+ */
37
+ createFolder(orgName, spaceName, folderName, parentId, raw) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/folders`), {
40
+ name: folderName,
41
+ parentId: parentId,
42
+ });
43
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
44
+ });
45
+ }
46
+ }
47
+ exports.CosmoFolder = CosmoFolder;
@@ -0,0 +1,49 @@
1
+ import Base from "../../Base";
2
+ import { Version } from "../../interfaces/global";
3
+ import { CosmoAsset } from "./asset";
4
+ import { CosmoComment } from "./comment";
5
+ import { CosmoEvent } from "./event";
6
+ import { CosmoFolder } from "./folder";
7
+ import { CosmoSpaceInternal } from "./internal/space";
8
+ import { CosmoLocation } from "./location";
9
+ import { CosmoNamespace } from "./namespace";
10
+ import { CosmoOrganization } from "./organization";
11
+ import { CosmoPermissions } from "./permissions";
12
+ import { CosmoProduction } from "./production";
13
+ import { CosmoShare } from "./share";
14
+ import { CosmoSpace } from "./space";
15
+ import { CosmoTag } from "./tag";
16
+ export default class CosmoService extends Base {
17
+ get cosmoAsset(): CosmoAsset;
18
+ private _cosmoAsset?;
19
+ get cosmoSpace(): CosmoSpace;
20
+ private _cosmoSpace?;
21
+ get cosmoLocation(): CosmoLocation;
22
+ private _cosmoLocation?;
23
+ get cosmoProduction(): CosmoProduction;
24
+ private _cosmoProduction?;
25
+ get cosmoFolder(): CosmoFolder;
26
+ private _cosmoFolder?;
27
+ get cosmoNamespace(): CosmoNamespace;
28
+ private _cosmoNamespace?;
29
+ get cosmoComment(): CosmoComment;
30
+ private _cosmoComment?;
31
+ get cosmoShare(): CosmoShare;
32
+ private _cosmoShare?;
33
+ get cosmoOrganization(): CosmoOrganization;
34
+ private _cosmoOrganization?;
35
+ get cosmoSpaceInternal(): CosmoSpaceInternal;
36
+ private _cosmoSpaceInternal?;
37
+ get cosmoEvent(): CosmoEvent;
38
+ private _cosmoEvent?;
39
+ get cosmoTag(): CosmoTag;
40
+ private _cosmoTag?;
41
+ get cosmoPermissions(): CosmoPermissions;
42
+ private _cosmoPermissions?;
43
+ /**
44
+ * Requests the endpoint version
45
+ * @returns Version object
46
+ */
47
+ version(): Promise<Version>;
48
+ protected getEndpoint(endpoint: string): string;
49
+ }
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Base_1 = require("../../Base");
13
+ const asset_1 = require("./asset");
14
+ const comment_1 = require("./comment");
15
+ const event_1 = require("./event");
16
+ const folder_1 = require("./folder");
17
+ const space_1 = require("./internal/space");
18
+ const location_1 = require("./location");
19
+ const namespace_1 = require("./namespace");
20
+ const organization_1 = require("./organization");
21
+ const permissions_1 = require("./permissions");
22
+ const production_1 = require("./production");
23
+ const share_1 = require("./share");
24
+ const space_2 = require("./space");
25
+ const tag_1 = require("./tag");
26
+ class CosmoService extends Base_1.default {
27
+ get cosmoAsset() {
28
+ if (this._cosmoAsset === undefined) {
29
+ this._cosmoAsset = new asset_1.CosmoAsset(this.options, this.axios);
30
+ }
31
+ return this._cosmoAsset;
32
+ }
33
+ get cosmoSpace() {
34
+ if (this._cosmoSpace === undefined) {
35
+ this._cosmoSpace = new space_2.CosmoSpace(this.options, this.axios);
36
+ }
37
+ return this._cosmoSpace;
38
+ }
39
+ get cosmoLocation() {
40
+ if (this._cosmoLocation === undefined) {
41
+ this._cosmoLocation = new location_1.CosmoLocation(this.options, this.axios);
42
+ }
43
+ return this._cosmoLocation;
44
+ }
45
+ get cosmoProduction() {
46
+ if (this._cosmoProduction === undefined) {
47
+ this._cosmoProduction = new production_1.CosmoProduction(this.options, this.axios);
48
+ }
49
+ return this._cosmoProduction;
50
+ }
51
+ get cosmoFolder() {
52
+ if (this._cosmoFolder === undefined) {
53
+ this._cosmoFolder = new folder_1.CosmoFolder(this.options, this.axios);
54
+ }
55
+ return this._cosmoFolder;
56
+ }
57
+ get cosmoNamespace() {
58
+ if (this._cosmoNamespace === undefined) {
59
+ this._cosmoNamespace = new namespace_1.CosmoNamespace(this.options, this.axios);
60
+ }
61
+ return this._cosmoNamespace;
62
+ }
63
+ get cosmoComment() {
64
+ if (this._cosmoComment === undefined) {
65
+ this._cosmoComment = new comment_1.CosmoComment(this.options, this.axios);
66
+ }
67
+ return this._cosmoComment;
68
+ }
69
+ get cosmoShare() {
70
+ if (this._cosmoShare === undefined) {
71
+ this._cosmoShare = new share_1.CosmoShare(this.options, this.axios);
72
+ }
73
+ return this._cosmoShare;
74
+ }
75
+ get cosmoOrganization() {
76
+ if (this._cosmoOrganization === undefined) {
77
+ this._cosmoOrganization = new organization_1.CosmoOrganization(this.options, this.axios);
78
+ }
79
+ return this._cosmoOrganization;
80
+ }
81
+ get cosmoSpaceInternal() {
82
+ if (this._cosmoSpaceInternal === undefined) {
83
+ this._cosmoSpaceInternal = new space_1.CosmoSpaceInternal(this.options, this.axios);
84
+ }
85
+ return this._cosmoSpaceInternal;
86
+ }
87
+ get cosmoEvent() {
88
+ if (this._cosmoEvent === undefined) {
89
+ this._cosmoEvent = new event_1.CosmoEvent(this.options, this.axios);
90
+ }
91
+ return this._cosmoEvent;
92
+ }
93
+ get cosmoTag() {
94
+ if (this._cosmoTag === undefined) {
95
+ this._cosmoTag = new tag_1.CosmoTag(this.options, this.axios);
96
+ }
97
+ return this._cosmoTag;
98
+ }
99
+ get cosmoPermissions() {
100
+ if (this._cosmoPermissions === undefined) {
101
+ this._cosmoPermissions = new permissions_1.CosmoPermissions(this.options, this.axios);
102
+ }
103
+ return this._cosmoPermissions;
104
+ }
105
+ /**
106
+ * Requests the endpoint version
107
+ * @returns Version object
108
+ */
109
+ version() {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const resp = yield this.axios.get(this.getEndpoint("/v1/version"));
112
+ return resp.data;
113
+ });
114
+ }
115
+ getEndpoint(endpoint) {
116
+ return `${this.options.server}/api/cosmo${endpoint}`;
117
+ }
118
+ }
119
+ exports.default = CosmoService;
@@ -0,0 +1,7 @@
1
+ import Base from "../../../Base";
2
+ import { CosmoSpaceInternal } from "./space";
3
+ export declare class CosmoInternal extends Base {
4
+ get space(): CosmoSpaceInternal;
5
+ private _space?;
6
+ protected getEndpoint(endpoint: string): string;
7
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CosmoInternal = void 0;
4
+ const Base_1 = require("../../../Base");
5
+ const space_1 = require("./space");
6
+ class CosmoInternal extends Base_1.default {
7
+ get space() {
8
+ if (this._space === undefined) {
9
+ this._space = new space_1.CosmoSpaceInternal(this.options, this.axios);
10
+ }
11
+ return this._space;
12
+ }
13
+ getEndpoint(endpoint) {
14
+ return `${this.options.server}/api/cosmo/internal${endpoint}`;
15
+ }
16
+ }
17
+ exports.CosmoInternal = CosmoInternal;
@@ -0,0 +1,15 @@
1
+ import { AxiosInstance } from "axios";
2
+ import Base, { MaybeRaw, Options } from "../../../../Base";
3
+ export declare class CosmoSpaceInternal extends Base {
4
+ constructor(options: Options, axios: AxiosInstance);
5
+ /**
6
+ * Deletes all spaces of an organization and the organization itself.
7
+ *
8
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
9
+ * @param orgId ID of the organization
10
+ */
11
+ deleteSpacesOfDeletedOrg<R extends boolean = false>(orgId: string, raw?: {
12
+ raw: R;
13
+ }): Promise<MaybeRaw<R, void>>;
14
+ protected getEndpoint(endpoint: string): string;
15
+ }
@@ -0,0 +1,34 @@
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.CosmoSpaceInternal = void 0;
13
+ const Base_1 = require("../../../../Base");
14
+ class CosmoSpaceInternal extends Base_1.default {
15
+ constructor(options, axios) {
16
+ super(options, axios);
17
+ }
18
+ /**
19
+ * Deletes all spaces of an organization and the organization itself.
20
+ *
21
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
22
+ * @param orgId ID of the organization
23
+ */
24
+ deleteSpacesOfDeletedOrg(orgId, raw) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgId}/spaces`));
27
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
28
+ });
29
+ }
30
+ getEndpoint(endpoint) {
31
+ return `${this.options.server}/api/cosmo/internal${endpoint}`;
32
+ }
33
+ }
34
+ exports.CosmoSpaceInternal = CosmoSpaceInternal;
@@ -0,0 +1,40 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { Asset, AssetFilter } from "../../../interfaces/cosmo/asset";
3
+ import { Location } from "../../../interfaces/cosmo/location";
4
+ /**
5
+ * @class Location
6
+ * @extends Base
7
+ *
8
+ * @remarks
9
+ * **Under development, breaking changes possible**
10
+ *
11
+ * Represents a Location resource in Cosmo, providing methods to interact with the Location API.
12
+ */
13
+ export declare class CosmoLocation extends Base {
14
+ protected getEndpoint(endpoint: string): string;
15
+ /**
16
+ * Create a new Location in the specified Organization and Space.
17
+ * @remarks
18
+ * ** Under development, breaking changes possible**
19
+ * @param orgName Name of the Organization
20
+ * @param spaceName Name of the Space
21
+ * @param locationName Name of the Location to create
22
+ * @returns The created Location
23
+ */
24
+ createLocation<R extends boolean = false>(orgName: string, spaceName: string, locationName: string, raw?: {
25
+ raw: R;
26
+ }): Promise<MaybeRaw<R, Location>>;
27
+ /**
28
+ * Search assets of a Location.
29
+ * @remarks
30
+ * ** Under development, breaking changes possible**
31
+ * @param orgName Name of the Organization
32
+ * @param spaceName Name of the Space
33
+ * @param locationId ID of the Location to search
34
+ * @param assetFilter Filter for assets in the Space
35
+ * @returns The found Assets
36
+ */
37
+ searchAssetsOfLocation<R extends boolean = false>(orgName: string, spaceName: string, locationId: string, assetFilter: AssetFilter[], raw?: {
38
+ raw: R;
39
+ }): Promise<MaybeRaw<R, Asset[]>>;
40
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CosmoLocation = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ /**
15
+ * @class Location
16
+ * @extends Base
17
+ *
18
+ * @remarks
19
+ * **Under development, breaking changes possible**
20
+ *
21
+ * Represents a Location resource in Cosmo, providing methods to interact with the Location API.
22
+ */
23
+ class CosmoLocation extends Base_1.default {
24
+ getEndpoint(endpoint) {
25
+ return `${this.options.server}/api/cosmo${endpoint}`;
26
+ }
27
+ /**
28
+ * Create a new Location 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 locationName Name of the Location to create
34
+ * @returns The created Location
35
+ */
36
+ createLocation(orgName, spaceName, locationName, raw) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/locations`), {
39
+ name: locationName,
40
+ });
41
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
42
+ });
43
+ }
44
+ /**
45
+ * Search assets of a Location.
46
+ * @remarks
47
+ * ** Under development, breaking changes possible**
48
+ * @param orgName Name of the Organization
49
+ * @param spaceName Name of the Space
50
+ * @param locationId ID of the Location to search
51
+ * @param assetFilter Filter for assets in the Space
52
+ * @returns The found Assets
53
+ */
54
+ searchAssetsOfLocation(orgName, spaceName, locationId, assetFilter, raw) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/locations/${locationId}/assets`), {
57
+ filters: assetFilter,
58
+ });
59
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
60
+ });
61
+ }
62
+ }
63
+ exports.CosmoLocation = CosmoLocation;
@@ -0,0 +1,42 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { Asset, NamespaceRushStatus } from "../../../interfaces/cosmo/asset";
3
+ import { Namespace } from "../../../interfaces/cosmo/namespace";
4
+ /**
5
+ * @class Namespace
6
+ * @extends Base
7
+ *
8
+ * @remarks
9
+ * **Under development, breaking changes possible**
10
+ *
11
+ * Represents a Namespace resource in Cosmo, providing methods to interact with the Namespace API.
12
+ */
13
+ export declare class CosmoNamespace extends Base {
14
+ protected getEndpoint(endpoint: string): string;
15
+ /**
16
+ * Create a new Namespace in the specified Organization and Space.
17
+ * @remarks
18
+ * ** Under development, breaking changes possible**
19
+ * @param orgName Name of the Organization
20
+ * @param spaceName Name of the Space
21
+ * @param namespaceName Name of the Namespace to create
22
+ * @param defaultStatus Status that asset references within this namespace will have by default
23
+ * @returns The created Namespace
24
+ */
25
+ createNamespace<R extends boolean = false>(orgName: string, spaceName: string, namespaceName: string, defaultStatus?: string, raw?: {
26
+ raw: R;
27
+ }): Promise<MaybeRaw<R, Namespace>>;
28
+ /**
29
+ * Change the status of a reference (e.g. Asset)
30
+ * @remarks
31
+ * ** Under development, breaking changes possible**
32
+ * @param orgName Name of the Organization
33
+ * @param spaceName Name of the Space
34
+ * @param namespaceName Name of the Namespace
35
+ * @param refId ID of the reference to change status
36
+ * @param status New status to set for the reference
37
+ * @returns The updated Reference
38
+ */
39
+ changeStatus<R extends boolean = false>(orgName: string, spaceName: string, refId: string, namespaceName: string, status: NamespaceRushStatus, raw?: {
40
+ raw: R;
41
+ }): Promise<MaybeRaw<R, Asset>>;
42
+ }
@@ -0,0 +1,65 @@
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.CosmoNamespace = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ /**
15
+ * @class Namespace
16
+ * @extends Base
17
+ *
18
+ * @remarks
19
+ * **Under development, breaking changes possible**
20
+ *
21
+ * Represents a Namespace resource in Cosmo, providing methods to interact with the Namespace API.
22
+ */
23
+ class CosmoNamespace extends Base_1.default {
24
+ getEndpoint(endpoint) {
25
+ return `${this.options.server}/api/cosmo${endpoint}`;
26
+ }
27
+ /**
28
+ * Create a new Namespace 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 namespaceName Name of the Namespace to create
34
+ * @param defaultStatus Status that asset references within this namespace will have by default
35
+ * @returns The created Namespace
36
+ */
37
+ createNamespace(orgName_1, spaceName_1, namespaceName_1) {
38
+ return __awaiter(this, arguments, void 0, function* (orgName, spaceName, namespaceName, defaultStatus = "none", raw) {
39
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/namespaces`), {
40
+ name: namespaceName,
41
+ defaultStatus,
42
+ });
43
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
44
+ });
45
+ }
46
+ /**
47
+ * Change the status of a reference (e.g. Asset)
48
+ * @remarks
49
+ * ** Under development, breaking changes possible**
50
+ * @param orgName Name of the Organization
51
+ * @param spaceName Name of the Space
52
+ * @param namespaceName Name of the Namespace
53
+ * @param refId ID of the reference to change status
54
+ * @param status New status to set for the reference
55
+ * @returns The updated Reference
56
+ */
57
+ changeStatus(orgName, spaceName, refId, namespaceName, status, raw) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/namespaces/${namespaceName}/ref/${refId}/status`), { status });
60
+ // TypeScript can't infer conditional type at runtime, so we assert
61
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
62
+ });
63
+ }
64
+ }
65
+ exports.CosmoNamespace = CosmoNamespace;
@@ -0,0 +1,47 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { Asset, AssetFilter, AssetSearchContext } from "../../../interfaces/cosmo/asset";
3
+ import { Sorting } from "../../../interfaces/global";
4
+ /**
5
+ * @class Organization
6
+ * @extends Base
7
+ *
8
+ * @remarks
9
+ * **Under development, breaking changes possible**
10
+ *
11
+ * Represents an Organization resource in Cosmo, providing methods to interact with the Organization API.
12
+ */
13
+ export declare class CosmoOrganization extends Base {
14
+ protected getEndpoint(endpoint: string): string;
15
+ /**
16
+ * Search Assets of an Organization across all Spaces
17
+ * @remarks
18
+ * ** Under development, breaking changes possible**
19
+ * @param orgName Name of the Organization
20
+ * @param context Context to search in (e.g., ORGANIZATION, TRASH, SHARE)
21
+ * @param limit Maximum number of Assets to return
22
+ * @param page Page number for pagination
23
+ * @param recursive Flag for searching recursively
24
+ * @param spaceName Name of Space to restrict search (mandatory if context is not ORGANIZATION)
25
+ * @param namespace Name of Namespace to restrict search
26
+ * @param parentId ID of parent (folder, etc.) to restrict search
27
+ * @param shareId ID of Share to restrict search (mandatory if context is SHARE)
28
+ * @param assetFilter Filter criteria for Assets
29
+ * @param sorting Sorting criteria for the results
30
+ * @returns List of found Assets
31
+ */
32
+ searchAssets<R extends boolean = false>({ orgName, context, limit, page, recursive, spaceName, namespace, parentId, shareId, assetFilter, sorting, }: {
33
+ orgName: string;
34
+ context: AssetSearchContext;
35
+ limit?: number;
36
+ page?: number;
37
+ recursive?: boolean;
38
+ spaceName?: string;
39
+ namespace?: string[] | string;
40
+ parentId?: string;
41
+ shareId?: string;
42
+ assetFilter?: AssetFilter[];
43
+ sorting?: Sorting;
44
+ }, raw?: {
45
+ raw: R;
46
+ }): Promise<MaybeRaw<R, Asset[]>>;
47
+ }
@@ -0,0 +1,64 @@
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.CosmoOrganization = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ /**
15
+ * @class Organization
16
+ * @extends Base
17
+ *
18
+ * @remarks
19
+ * **Under development, breaking changes possible**
20
+ *
21
+ * Represents an Organization resource in Cosmo, providing methods to interact with the Organization API.
22
+ */
23
+ class CosmoOrganization extends Base_1.default {
24
+ getEndpoint(endpoint) {
25
+ return `${this.options.server}/api/cosmo${endpoint}`;
26
+ }
27
+ /**
28
+ * Search Assets of an Organization across all Spaces
29
+ * @remarks
30
+ * ** Under development, breaking changes possible**
31
+ * @param orgName Name of the Organization
32
+ * @param context Context to search in (e.g., ORGANIZATION, TRASH, SHARE)
33
+ * @param limit Maximum number of Assets to return
34
+ * @param page Page number for pagination
35
+ * @param recursive Flag for searching recursively
36
+ * @param spaceName Name of Space to restrict search (mandatory if context is not ORGANIZATION)
37
+ * @param namespace Name of Namespace to restrict search
38
+ * @param parentId ID of parent (folder, etc.) to restrict search
39
+ * @param shareId ID of Share to restrict search (mandatory if context is SHARE)
40
+ * @param assetFilter Filter criteria for Assets
41
+ * @param sorting Sorting criteria for the results
42
+ * @returns List of found Assets
43
+ */
44
+ searchAssets(_a, raw_1) {
45
+ return __awaiter(this, arguments, void 0, function* ({ orgName, context, limit, page, recursive = false, spaceName, namespace, parentId, shareId, assetFilter, sorting, }, raw) {
46
+ limit = limit !== null && limit !== void 0 ? limit : 100;
47
+ page = page !== null && page !== void 0 ? page : 0;
48
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/assets/search`), Object.assign({ filters: assetFilter !== null && assetFilter !== void 0 ? assetFilter : [] }, (sorting ? { sorting } : {})), {
49
+ params: {
50
+ context,
51
+ limit,
52
+ page,
53
+ recursive,
54
+ spaceName,
55
+ namespace,
56
+ parentId,
57
+ shareId,
58
+ },
59
+ });
60
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
61
+ });
62
+ }
63
+ }
64
+ exports.CosmoOrganization = CosmoOrganization;