hcloud-sdk 18.0.0 → 19.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 (223) hide show
  1. package/changelog.md +86 -175
  2. package/lib/Hcloud.d.ts +18 -3
  3. package/lib/Hcloud.js +113 -21
  4. package/lib/helper/ErrorHelper.js +5 -2
  5. package/lib/helper/ValidationHelper.d.ts +6 -4
  6. package/lib/helper/ValidationHelper.js +30 -18
  7. package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
  8. package/lib/interfaces/agent/logging/index.d.ts +2 -0
  9. package/lib/interfaces/{fuse → agent/logging}/index.js +2 -3
  10. package/lib/interfaces/agent/logging/log-collector.d.ts +35 -0
  11. package/lib/interfaces/agent/logging/log-collector.js +2 -0
  12. package/lib/interfaces/agent/module/index.d.ts +7 -0
  13. package/lib/interfaces/agent/module/index.js +2 -0
  14. package/lib/interfaces/auditor/index.d.ts +0 -1
  15. package/lib/interfaces/auditor/index.js +0 -1
  16. package/lib/interfaces/axios/index.d.ts +5 -0
  17. package/lib/interfaces/cosmo/asset/index.d.ts +40 -9
  18. package/lib/interfaces/cosmo/asset/index.js +9 -1
  19. package/lib/interfaces/cosmo/comment/index.d.ts +4 -1
  20. package/lib/interfaces/cosmo/event/index.d.ts +34 -5
  21. package/lib/interfaces/cosmo/event/index.js +16 -2
  22. package/lib/interfaces/cosmo/share/index.d.ts +89 -7
  23. package/lib/interfaces/cosmo/share/index.js +21 -0
  24. package/lib/interfaces/cosmo/space/index.d.ts +6 -0
  25. package/lib/interfaces/cosmo/stats/index.d.ts +11 -0
  26. package/lib/interfaces/cosmo/stats/index.js +2 -0
  27. package/lib/interfaces/cosmo/tag/tag.d.ts +2 -1
  28. package/lib/interfaces/global/Products.d.ts +0 -1
  29. package/lib/interfaces/global/Products.js +0 -1
  30. package/lib/interfaces/global/Views.d.ts +0 -1
  31. package/lib/interfaces/global/Views.js +0 -1
  32. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
  33. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
  34. package/lib/interfaces/high5/space/execution/index.d.ts +1 -0
  35. package/lib/interfaces/high5/space/job/index.d.ts +64 -19
  36. package/lib/interfaces/high5/space/job/index.js +9 -6
  37. package/lib/interfaces/high5/wave/dependentInputs.d.ts +42 -0
  38. package/lib/interfaces/high5/wave/dependentInputs.js +144 -0
  39. package/lib/interfaces/high5/wave/dependentInputsValidation.d.ts +22 -0
  40. package/lib/interfaces/high5/wave/dependentInputsValidation.js +220 -0
  41. package/lib/interfaces/idp/index.d.ts +3 -3
  42. package/lib/interfaces/idp/index.js +3 -3
  43. package/lib/interfaces/idp/oauth/device.d.ts +18 -0
  44. package/lib/interfaces/idp/oauth/device.js +2 -0
  45. package/lib/interfaces/idp/oauth/index.d.ts +17 -4
  46. package/lib/interfaces/idp/organization/index.d.ts +1 -0
  47. package/lib/interfaces/idp/organization/index.js +1 -0
  48. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +4 -0
  49. package/lib/interfaces/idp/user/Message.d.ts +1 -0
  50. package/lib/interfaces/idp/user/Scopes.d.ts +1 -9
  51. package/lib/interfaces/idp/user/Scopes.js +0 -12
  52. package/lib/interfaces/idp/user/index.d.ts +3 -0
  53. package/lib/interfaces/mailer/index.d.ts +20 -1
  54. package/lib/interfaces/mailer/index.js +14 -2
  55. package/lib/interfaces/nats/index.d.ts +30 -32
  56. package/lib/interfaces/nats/index.js +103 -117
  57. package/lib/interfaces/shorts/index.d.ts +7 -0
  58. package/lib/interfaces/shorts/index.js +6 -0
  59. package/lib/service/agent/bundle/dev/index.js +4 -1
  60. package/lib/service/agent/bundle/index.js +4 -1
  61. package/lib/service/agent/context/index.js +4 -1
  62. package/lib/service/agent/index.d.ts +6 -0
  63. package/lib/service/agent/index.js +18 -1
  64. package/lib/service/agent/installer/index.js +4 -1
  65. package/lib/service/agent/logging/index.d.ts +69 -0
  66. package/lib/service/agent/logging/index.js +117 -0
  67. package/lib/service/agent/module/index.d.ts +36 -0
  68. package/lib/service/agent/module/index.js +65 -0
  69. package/lib/service/auditor/index.js +4 -1
  70. package/lib/service/auditor/internal/index.js +4 -1
  71. package/lib/service/bouncer/features/index.js +4 -1
  72. package/lib/service/bouncer/index.js +5 -2
  73. package/lib/service/cosmo/asset/index.d.ts +49 -3
  74. package/lib/service/cosmo/asset/index.js +111 -5
  75. package/lib/service/cosmo/comment/index.d.ts +7 -36
  76. package/lib/service/cosmo/comment/index.js +18 -43
  77. package/lib/service/cosmo/event/index.js +4 -1
  78. package/lib/service/cosmo/folder/index.js +4 -1
  79. package/lib/service/cosmo/index.d.ts +3 -0
  80. package/lib/service/cosmo/index.js +11 -1
  81. package/lib/service/cosmo/internal/index.js +4 -1
  82. package/lib/service/cosmo/internal/space/index.js +4 -1
  83. package/lib/service/cosmo/location/index.js +4 -1
  84. package/lib/service/cosmo/namespace/index.d.ts +15 -1
  85. package/lib/service/cosmo/namespace/index.js +21 -1
  86. package/lib/service/cosmo/organization/index.js +4 -1
  87. package/lib/service/cosmo/permissions/index.js +4 -1
  88. package/lib/service/cosmo/production/index.js +4 -1
  89. package/lib/service/cosmo/share/index.d.ts +37 -29
  90. package/lib/service/cosmo/share/index.js +47 -35
  91. package/lib/service/cosmo/space/index.d.ts +28 -1
  92. package/lib/service/cosmo/space/index.js +45 -1
  93. package/lib/service/cosmo/stats/index.d.ts +35 -0
  94. package/lib/service/cosmo/stats/index.js +58 -0
  95. package/lib/service/cosmo/tag/index.js +4 -1
  96. package/lib/service/dali/DaliAvatar.d.ts +0 -6
  97. package/lib/service/dali/DaliAvatar.js +4 -11
  98. package/lib/service/dali/avatar/DaliCosmoSpace.js +4 -1
  99. package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +2 -1
  100. package/lib/service/dali/avatar/DaliHigh5Pool.js +5 -2
  101. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +2 -1
  102. package/lib/service/dali/avatar/DaliHigh5Space.js +5 -2
  103. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +2 -1
  104. package/lib/service/dali/avatar/DaliOAuthApp.js +5 -2
  105. package/lib/service/dali/avatar/DaliOrganization.d.ts +2 -1
  106. package/lib/service/dali/avatar/DaliOrganization.js +5 -2
  107. package/lib/service/dali/avatar/DaliServiceAccount.d.ts +1 -1
  108. package/lib/service/dali/avatar/DaliServiceAccount.js +6 -3
  109. package/lib/service/dali/avatar/DaliTeam.d.ts +2 -1
  110. package/lib/service/dali/avatar/DaliTeam.js +5 -2
  111. package/lib/service/dali/avatar/DaliUser.d.ts +2 -1
  112. package/lib/service/dali/avatar/DaliUser.js +5 -2
  113. package/lib/service/dali/index.js +4 -1
  114. package/lib/service/high5/execution/index.js +4 -1
  115. package/lib/service/high5/execution/log/index.js +4 -1
  116. package/lib/service/high5/execution/status/index.js +4 -1
  117. package/lib/service/high5/index.js +4 -1
  118. package/lib/service/high5/internal/index.js +4 -1
  119. package/lib/service/high5/internal/space/index.js +4 -1
  120. package/lib/service/high5/internal/space/job/index.js +4 -1
  121. package/lib/service/high5/internal/space/job/log/index.js +4 -1
  122. package/lib/service/high5/joinToken/index.js +4 -1
  123. package/lib/service/high5/space/database/document/array/index.js +4 -1
  124. package/lib/service/high5/space/database/document/index.js +4 -1
  125. package/lib/service/high5/space/database/document/number/index.js +4 -1
  126. package/lib/service/high5/space/database/index.js +4 -1
  127. package/lib/service/high5/space/event/index.js +4 -1
  128. package/lib/service/high5/space/event/stream/design/DesignOperations.js +4 -1
  129. package/lib/service/high5/space/event/stream/design/index.js +6 -3
  130. package/lib/service/high5/space/event/stream/design/snapshot/index.js +4 -1
  131. package/lib/service/high5/space/event/stream/index.js +4 -1
  132. package/lib/service/high5/space/execution/index.js +4 -1
  133. package/lib/service/high5/space/execution/log/index.js +4 -1
  134. package/lib/service/high5/space/execution/status/index.js +4 -1
  135. package/lib/service/high5/space/index.d.ts +10 -0
  136. package/lib/service/high5/space/index.js +25 -5
  137. package/lib/service/high5/space/job/index.js +4 -1
  138. package/lib/service/high5/space/job/log/index.js +4 -1
  139. package/lib/service/high5/space/node/index.js +4 -1
  140. package/lib/service/high5/space/pool/index.d.ts +11 -0
  141. package/lib/service/high5/space/pool/index.js +22 -1
  142. package/lib/service/high5/space/secret/index.js +4 -1
  143. package/lib/service/high5/space/stat/index.js +4 -1
  144. package/lib/service/high5/space/wave/index.js +4 -1
  145. package/lib/service/high5/space/webhook/index.js +4 -1
  146. package/lib/service/high5/space/webhook/log/index.js +4 -1
  147. package/lib/service/high5/stat/index.js +4 -1
  148. package/lib/service/high5/wave/index.js +4 -1
  149. package/lib/service/high5/wave/s3/index.js +5 -2
  150. package/lib/service/idp/guest/index.js +4 -1
  151. package/lib/service/idp/index.js +4 -1
  152. package/lib/service/idp/internal/index.js +4 -1
  153. package/lib/service/idp/oauth/device.d.ts +131 -0
  154. package/lib/service/idp/oauth/device.js +177 -0
  155. package/lib/service/idp/oauth/index.d.ts +3 -0
  156. package/lib/service/idp/oauth/index.js +11 -1
  157. package/lib/service/idp/organization/index.d.ts +9 -0
  158. package/lib/service/idp/organization/index.js +22 -3
  159. package/lib/service/idp/organization/license/index.js +4 -1
  160. package/lib/service/idp/organization/member/index.js +5 -2
  161. package/lib/service/idp/organization/member/invitations/index.d.ts +19 -0
  162. package/lib/service/idp/organization/member/invitations/index.js +23 -1
  163. package/lib/service/idp/organization/service-accounts/index.d.ts +11 -1
  164. package/lib/service/idp/organization/service-accounts/index.js +22 -2
  165. package/lib/service/idp/organization/settings/domain/index.js +4 -1
  166. package/lib/service/idp/organization/settings/domain/saml/index.js +4 -1
  167. package/lib/service/idp/organization/settings/index.js +4 -1
  168. package/lib/service/idp/organization/settings/oauth/index.d.ts +10 -0
  169. package/lib/service/idp/organization/settings/oauth/index.js +21 -1
  170. package/lib/service/idp/organization/stat/index.js +4 -1
  171. package/lib/service/idp/organization/team/index.d.ts +10 -0
  172. package/lib/service/idp/organization/team/index.js +21 -1
  173. package/lib/service/idp/registration/index.js +4 -1
  174. package/lib/service/idp/user/index.d.ts +8 -0
  175. package/lib/service/idp/user/index.js +20 -3
  176. package/lib/service/idp/user/license/index.js +4 -1
  177. package/lib/service/idp/user/message/index.d.ts +1 -0
  178. package/lib/service/idp/user/message/index.js +4 -1
  179. package/lib/service/idp/user/password/index.js +4 -1
  180. package/lib/service/idp/user/settings/connections/index.js +4 -1
  181. package/lib/service/idp/user/settings/general/index.js +4 -1
  182. package/lib/service/idp/user/settings/index.js +4 -1
  183. package/lib/service/idp/user/settings/notifications/index.js +4 -1
  184. package/lib/service/idp/user/settings/oauthApps/index.js +4 -1
  185. package/lib/service/idp/user/settings/pats/index.js +4 -1
  186. package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
  187. package/lib/service/idp/user/settings/twoFactor/totp/index.js +4 -1
  188. package/lib/service/mailer/index.js +5 -2
  189. package/lib/service/mailer/internal/index.d.ts +2 -2
  190. package/lib/service/mailer/internal/index.js +5 -2
  191. package/lib/service/mothership/index.js +4 -1
  192. package/lib/service/nats/index.d.ts +7 -0
  193. package/lib/service/nats/index.js +19 -1
  194. package/lib/service/shorts/index.js +4 -1
  195. package/lib/service/shorts/internal/index.d.ts +6 -3
  196. package/lib/service/shorts/internal/index.js +20 -6
  197. package/lib/utils/bouncer/features/Provider.js +0 -1
  198. package/package.json +2 -2
  199. package/lib/interfaces/fuse/index.d.ts +0 -3
  200. package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +0 -38
  201. package/lib/interfaces/fuse/space/cronjob/Cronjob.js +0 -8
  202. package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +0 -16
  203. package/lib/interfaces/fuse/space/index.d.ts +0 -22
  204. package/lib/interfaces/fuse/space/index.js +0 -11
  205. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -32
  206. package/lib/service/dali/avatar/DaliFuseSpace.js +0 -59
  207. package/lib/service/fuse/index.d.ts +0 -20
  208. package/lib/service/fuse/index.js +0 -48
  209. package/lib/service/fuse/internal/index.d.ts +0 -10
  210. package/lib/service/fuse/internal/index.js +0 -32
  211. package/lib/service/fuse/internal/space/cronjob/index.d.ts +0 -7
  212. package/lib/service/fuse/internal/space/cronjob/index.js +0 -17
  213. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +0 -17
  214. package/lib/service/fuse/internal/space/cronjob/log/index.js +0 -34
  215. package/lib/service/fuse/internal/space/index.d.ts +0 -26
  216. package/lib/service/fuse/internal/space/index.js +0 -51
  217. package/lib/service/fuse/space/cronjob/index.d.ts +0 -145
  218. package/lib/service/fuse/space/cronjob/index.js +0 -201
  219. package/lib/service/fuse/space/cronjob/log/index.d.ts +0 -35
  220. package/lib/service/fuse/space/cronjob/log/index.js +0 -58
  221. package/lib/service/fuse/space/index.d.ts +0 -97
  222. package/lib/service/fuse/space/index.js +0 -153
  223. /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/cloudwatch.js} +0 -0
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoFolder = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  /**
15
18
  * @class Folder
16
19
  * @extends Base
@@ -12,6 +12,7 @@ import { CosmoPermissions } from "./permissions";
12
12
  import { CosmoProduction } from "./production";
13
13
  import { CosmoShare } from "./share";
14
14
  import { CosmoSpace } from "./space";
15
+ import { CosmoStats } from "./stats";
15
16
  import { CosmoTag } from "./tag";
16
17
  export default class CosmoService extends Base {
17
18
  get cosmoAsset(): CosmoAsset;
@@ -40,6 +41,8 @@ export default class CosmoService extends Base {
40
41
  private _cosmoTag?;
41
42
  get cosmoPermissions(): CosmoPermissions;
42
43
  private _cosmoPermissions?;
44
+ get cosmoStats(): CosmoStats;
45
+ private _cosmoStats?;
43
46
  /**
44
47
  * Requests the endpoint version
45
48
  * @returns Version object
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const Base_1 = require("../../Base");
15
+ const Base_1 = __importDefault(require("../../Base"));
13
16
  const asset_1 = require("./asset");
14
17
  const comment_1 = require("./comment");
15
18
  const event_1 = require("./event");
@@ -22,6 +25,7 @@ const permissions_1 = require("./permissions");
22
25
  const production_1 = require("./production");
23
26
  const share_1 = require("./share");
24
27
  const space_2 = require("./space");
28
+ const stats_1 = require("./stats");
25
29
  const tag_1 = require("./tag");
26
30
  class CosmoService extends Base_1.default {
27
31
  get cosmoAsset() {
@@ -102,6 +106,12 @@ class CosmoService extends Base_1.default {
102
106
  }
103
107
  return this._cosmoPermissions;
104
108
  }
109
+ get cosmoStats() {
110
+ if (this._cosmoStats === undefined) {
111
+ this._cosmoStats = new stats_1.CosmoStats(this.options, this.axios);
112
+ }
113
+ return this._cosmoStats;
114
+ }
105
115
  /**
106
116
  * Requests the endpoint version
107
117
  * @returns Version object
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.CosmoInternal = void 0;
4
- const Base_1 = require("../../../Base");
7
+ const Base_1 = __importDefault(require("../../../Base"));
5
8
  const space_1 = require("./space");
6
9
  class CosmoInternal extends Base_1.default {
7
10
  get space() {
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoSpaceInternal = void 0;
13
- const Base_1 = require("../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../Base"));
14
17
  class CosmoSpaceInternal extends Base_1.default {
15
18
  constructor(options, axios) {
16
19
  super(options, axios);
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoLocation = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  /**
15
18
  * @class Location
16
19
  * @extends Base
@@ -1,5 +1,5 @@
1
1
  import Base, { MaybeRaw } from "../../../Base";
2
- import { Asset, NamespaceRushStatus } from "../../../interfaces/cosmo/asset";
2
+ import { Asset, NamespaceMetadata, NamespaceRushStatus } from "../../../interfaces/cosmo/asset";
3
3
  import { Namespace } from "../../../interfaces/cosmo/namespace";
4
4
  /**
5
5
  * @class Namespace
@@ -39,4 +39,18 @@ export declare class CosmoNamespace extends Base {
39
39
  changeStatus<R extends boolean = false>(orgName: string, spaceName: string, refId: string, namespaceName: string, status: NamespaceRushStatus, raw?: {
40
40
  raw: R;
41
41
  }): Promise<MaybeRaw<R, Asset>>;
42
+ /**
43
+ * Update the metadata of a reference (e.g. Asset)
44
+ * @remarks
45
+ * ** Under development, breaking changes possible**
46
+ * @param orgName Name of the Organization
47
+ * @param spaceName Name of the Space
48
+ * @param namespaceName Name of the Namespace
49
+ * @param refId ID of the reference to change status
50
+ * @param metadata New metadata to set
51
+ * @returns The updated Reference
52
+ */
53
+ updateMetadata<R extends boolean = false>(orgName: string, spaceName: string, refId: string, namespaceName: string, metadata: NamespaceMetadata, raw?: {
54
+ raw: R;
55
+ }): Promise<MaybeRaw<R, Asset>>;
42
56
  }
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoNamespace = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  /**
15
18
  * @class Namespace
16
19
  * @extends Base
@@ -61,5 +64,22 @@ class CosmoNamespace extends Base_1.default {
61
64
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
62
65
  });
63
66
  }
67
+ /**
68
+ * Update the metadata of a reference (e.g. Asset)
69
+ * @remarks
70
+ * ** Under development, breaking changes possible**
71
+ * @param orgName Name of the Organization
72
+ * @param spaceName Name of the Space
73
+ * @param namespaceName Name of the Namespace
74
+ * @param refId ID of the reference to change status
75
+ * @param metadata New metadata to set
76
+ * @returns The updated Reference
77
+ */
78
+ updateMetadata(orgName, spaceName, refId, namespaceName, metadata, raw) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/namespaces/${namespaceName}/ref/${refId}/metadata`), metadata);
81
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
82
+ });
83
+ }
64
84
  }
65
85
  exports.CosmoNamespace = CosmoNamespace;
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoOrganization = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  /**
15
18
  * @class Organization
16
19
  * @extends Base
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoPermissions = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  class CosmoPermissions extends Base_1.default {
15
18
  /**
16
19
  * Fetches a list of all available permissions that can be assigned to roles.
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoProduction = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  /**
15
18
  * @class Production
16
19
  * @extends Base
@@ -1,5 +1,4 @@
1
1
  import Base, { MaybeRaw } from "../../../Base";
2
- import { Asset } from "../../../interfaces/cosmo/asset";
3
2
  import { Share, ShareCreate, SharePatch, ShareWithUsers } from "../../../interfaces/cosmo/share";
4
3
  import { SearchFilter, Sorting } from "../../../interfaces/global";
5
4
  /**
@@ -39,22 +38,6 @@ export declare class CosmoShare extends Base {
39
38
  linkShare<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, password?: string, shareIdHMAC?: string, raw?: {
40
39
  raw: R;
41
40
  }): 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
41
  /**
59
42
  * Delete Shares by ID.
60
43
  * @remarks
@@ -132,18 +115,6 @@ export declare class CosmoShare extends Base {
132
115
  unlinkOther<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, userId: string, raw?: {
133
116
  raw: R;
134
117
  }): 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
118
  /**
148
119
  * Patch a Share in the specified Organization and Space.
149
120
  * @remarks
@@ -158,4 +129,41 @@ export declare class CosmoShare extends Base {
158
129
  patchShare<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, patchObject: SharePatch, raw?: {
159
130
  raw: R;
160
131
  }): Promise<MaybeRaw<R, Share>>;
132
+ /**
133
+ * Resends share emails to **all recipients** associated with a share.
134
+ *
135
+ * This will trigger the backend to re-send the share notification email
136
+ * to every email address that has previously been invited to the share.
137
+ *
138
+ * @typeParam R - When `true`, the raw Axios response is returned instead of `undefined`
139
+ *
140
+ * @param orgName - The organization identifier
141
+ * @param spaceName - The space identifier within the organization
142
+ * @param shareId - The share ID whose emails should be resent
143
+ * @param raw - Optional flag to return the raw Axios response
144
+ *
145
+ * @returns `undefined` by default, or the raw Axios response when `raw.raw` is `true`
146
+ */
147
+ resendAllEmails<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, raw?: {
148
+ raw: R;
149
+ }): Promise<MaybeRaw<R, undefined>>;
150
+ /**
151
+ * Resends share emails to **specific recipients** for a share.
152
+ *
153
+ * Only the provided email addresses will receive a new share notification.
154
+ * At least one email address must be provided.
155
+ *
156
+ * @typeParam R - When `true`, the raw Axios response is returned instead of `undefined`
157
+ *
158
+ * @param orgName - The organization identifier
159
+ * @param spaceName - The space identifier within the organization
160
+ * @param shareId - The share ID whose emails should be resent
161
+ * @param emails - A non-empty list of email addresses to resend the share to
162
+ * @param raw - Optional flag to return the raw Axios response
163
+ *
164
+ * @returns `undefined` by default, or the raw Axios response when `raw.raw` is `true`
165
+ */
166
+ resendEmails<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, emails: [string, ...string[]], raw?: {
167
+ raw: R;
168
+ }): Promise<MaybeRaw<R, undefined>>;
161
169
  }
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoShare = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  /**
15
18
  * @class Share
16
19
  * @extends Base
@@ -59,25 +62,6 @@ class CosmoShare extends Base_1.default {
59
62
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
60
63
  });
61
64
  }
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
65
  /**
82
66
  * Delete Shares by ID.
83
67
  * @remarks
@@ -179,21 +163,6 @@ class CosmoShare extends Base_1.default {
179
163
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
180
164
  });
181
165
  }
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
166
  /**
198
167
  * Patch a Share in the specified Organization and Space.
199
168
  * @remarks
@@ -211,5 +180,48 @@ class CosmoShare extends Base_1.default {
211
180
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
212
181
  });
213
182
  }
183
+ /**
184
+ * Resends share emails to **all recipients** associated with a share.
185
+ *
186
+ * This will trigger the backend to re-send the share notification email
187
+ * to every email address that has previously been invited to the share.
188
+ *
189
+ * @typeParam R - When `true`, the raw Axios response is returned instead of `undefined`
190
+ *
191
+ * @param orgName - The organization identifier
192
+ * @param spaceName - The space identifier within the organization
193
+ * @param shareId - The share ID whose emails should be resent
194
+ * @param raw - Optional flag to return the raw Axios response
195
+ *
196
+ * @returns `undefined` by default, or the raw Axios response when `raw.raw` is `true`
197
+ */
198
+ resendAllEmails(orgName, spaceName, shareId, raw) {
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}/email/all`));
201
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
202
+ });
203
+ }
204
+ /**
205
+ * Resends share emails to **specific recipients** for a share.
206
+ *
207
+ * Only the provided email addresses will receive a new share notification.
208
+ * At least one email address must be provided.
209
+ *
210
+ * @typeParam R - When `true`, the raw Axios response is returned instead of `undefined`
211
+ *
212
+ * @param orgName - The organization identifier
213
+ * @param spaceName - The space identifier within the organization
214
+ * @param shareId - The share ID whose emails should be resent
215
+ * @param emails - A non-empty list of email addresses to resend the share to
216
+ * @param raw - Optional flag to return the raw Axios response
217
+ *
218
+ * @returns `undefined` by default, or the raw Axios response when `raw.raw` is `true`
219
+ */
220
+ resendEmails(orgName, spaceName, shareId, emails, raw) {
221
+ return __awaiter(this, void 0, void 0, function* () {
222
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/shares/${shareId}/email`), { emails });
223
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
224
+ });
225
+ }
214
226
  }
215
227
  exports.CosmoShare = CosmoShare;
@@ -1,5 +1,5 @@
1
1
  import Base, { MaybeRaw } from "../../../Base";
2
- import { High5SpaceInfo, CosmoSpace as ICosmoSpace, SpaceUser } from "../../../interfaces/cosmo/space";
2
+ import { High5SpaceInfo, CosmoSpace as ICosmoSpace, SpaceUser, TrashPolicy } from "../../../interfaces/cosmo/space";
3
3
  /**
4
4
  * @class Space
5
5
  * @extends Base
@@ -101,4 +101,31 @@ export declare class CosmoSpace extends Base {
101
101
  listSpaceUsers<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
102
102
  raw: R;
103
103
  }): Promise<MaybeRaw<R, SpaceUser[]>>;
104
+ /**
105
+ * Updates the avatar of the specified Cosmo space
106
+ * @param orgName Name of the organization
107
+ * @param spaceName Name of the space
108
+ * @param file Image as Javascript File
109
+ * @returns Space details with updated avatar
110
+ */
111
+ updateAvatar<R extends boolean = false>(orgName: string, spaceName: string, file: File, raw?: {
112
+ raw: R;
113
+ }): Promise<MaybeRaw<R, ICosmoSpace>>;
114
+ /**
115
+ * Permanently deletes all items in the trash of the specified Cosmo space
116
+ * @param orgName Name of the organization
117
+ * @param spaceName Name of the space
118
+ * @returns 204 No Content on success
119
+ */
120
+ emptyTrash(orgName: string, spaceName: string): Promise<void>;
121
+ /**
122
+ * Updates the trashbin auto-delete policy for the specified Cosmo space.
123
+ * @param orgName Name of the organization
124
+ * @param spaceName Name of the space
125
+ * @param policy Trash policy to apply. When `enabled` is `true`, `ttlDays` (1–365) must be provided. When `enabled` is `false`, `ttlDays` must be omitted.
126
+ * @returns The updated Space
127
+ */
128
+ updateTrashbinPolicy<R extends boolean = false>(orgName: string, spaceName: string, policy: TrashPolicy, raw?: {
129
+ raw: R;
130
+ }): Promise<MaybeRaw<R, ICosmoSpace>>;
104
131
  }
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoSpace = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  /**
15
18
  * @class Space
16
19
  * @extends Base
@@ -142,5 +145,46 @@ class CosmoSpace extends Base_1.default {
142
145
  return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
143
146
  });
144
147
  }
148
+ /**
149
+ * Updates the avatar of the specified Cosmo space
150
+ * @param orgName Name of the organization
151
+ * @param spaceName Name of the space
152
+ * @param file Image as Javascript File
153
+ * @returns Space details with updated avatar
154
+ */
155
+ updateAvatar(orgName, spaceName, file, raw) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const data = new FormData();
158
+ data.append("avatar", file);
159
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/avatar`), data, {
160
+ headers: { "Content-Type": "multipart/form-data" },
161
+ });
162
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
163
+ });
164
+ }
165
+ /**
166
+ * Permanently deletes all items in the trash of the specified Cosmo space
167
+ * @param orgName Name of the organization
168
+ * @param spaceName Name of the space
169
+ * @returns 204 No Content on success
170
+ */
171
+ emptyTrash(orgName, spaceName) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/trash`));
174
+ });
175
+ }
176
+ /**
177
+ * Updates the trashbin auto-delete policy for the specified Cosmo space.
178
+ * @param orgName Name of the organization
179
+ * @param spaceName Name of the space
180
+ * @param policy Trash policy to apply. When `enabled` is `true`, `ttlDays` (1–365) must be provided. When `enabled` is `false`, `ttlDays` must be omitted.
181
+ * @returns The updated Space
182
+ */
183
+ updateTrashbinPolicy(orgName, spaceName, policy, raw) {
184
+ return __awaiter(this, void 0, void 0, function* () {
185
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/trash/policy`), policy);
186
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
187
+ });
188
+ }
145
189
  }
146
190
  exports.CosmoSpace = CosmoSpace;
@@ -0,0 +1,35 @@
1
+ import Base, { MaybeRaw } from "../../../Base";
2
+ import { ICosmoStats } from "../../../interfaces/cosmo/stats";
3
+ /**
4
+ * @class Space
5
+ * @extends Base
6
+ *
7
+ * @remarks
8
+ * **Under development, breaking changes possible**
9
+ *
10
+ * Represents a Stats resource in Cosmo, providing get methods to retrieve statistics with the Stats API.
11
+ */
12
+ export declare class CosmoStats extends Base {
13
+ protected getEndpoint(endpoint: string): string;
14
+ /**
15
+ * Fetch org related stats
16
+ * @remarks
17
+ * ** Under development, breaking changes possible**
18
+ * @param orgName Name of the Organization
19
+ * @returns The requested org stats
20
+ */
21
+ getOrgStats<R extends boolean = false>(orgName: string, raw?: {
22
+ raw: R;
23
+ }): Promise<MaybeRaw<R, ICosmoStats>>;
24
+ /**
25
+ * Fetch space related stats
26
+ * @remarks
27
+ * ** Under development, breaking changes possible**
28
+ * @param orgName Name of the Organization
29
+ * @param spaceName Name of the Space
30
+ * @returns The requested space stats
31
+ */
32
+ getSpaceStats<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
33
+ raw: R;
34
+ }): Promise<MaybeRaw<R, ICosmoStats>>;
35
+ }
@@ -0,0 +1,58 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.CosmoStats = void 0;
16
+ const Base_1 = __importDefault(require("../../../Base"));
17
+ /**
18
+ * @class Space
19
+ * @extends Base
20
+ *
21
+ * @remarks
22
+ * **Under development, breaking changes possible**
23
+ *
24
+ * Represents a Stats resource in Cosmo, providing get methods to retrieve statistics with the Stats API.
25
+ */
26
+ class CosmoStats extends Base_1.default {
27
+ getEndpoint(endpoint) {
28
+ return `${this.options.server}/api/cosmo${endpoint}`;
29
+ }
30
+ /**
31
+ * Fetch org related stats
32
+ * @remarks
33
+ * ** Under development, breaking changes possible**
34
+ * @param orgName Name of the Organization
35
+ * @returns The requested org stats
36
+ */
37
+ getOrgStats(orgName, raw) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}`));
40
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
41
+ });
42
+ }
43
+ /**
44
+ * Fetch space related stats
45
+ * @remarks
46
+ * ** Under development, breaking changes possible**
47
+ * @param orgName Name of the Organization
48
+ * @param spaceName Name of the Space
49
+ * @returns The requested space stats
50
+ */
51
+ getSpaceStats(orgName, spaceName, raw) {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
54
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
55
+ });
56
+ }
57
+ }
58
+ exports.CosmoStats = CosmoStats;
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.CosmoTag = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  /**
15
18
  * @class Tag
16
19
  * @extends Base
@@ -1,6 +1,5 @@
1
1
  import Base from "../../Base";
2
2
  import { DaliCosmoSpace } from "./avatar/DaliCosmoSpace";
3
- import { DaliFuseSpace } from "./avatar/DaliFuseSpace";
4
3
  import { DaliHigh5Pool } from "./avatar/DaliHigh5Pool";
5
4
  import { DaliHigh5Space } from "./avatar/DaliHigh5Space";
6
5
  import { DaliOAuthApp } from "./avatar/DaliOAuthApp";
@@ -39,11 +38,6 @@ export declare class DaliAvatar extends Base {
39
38
  */
40
39
  get high5Pool(): DaliHigh5Pool;
41
40
  private _high5Pool?;
42
- /**
43
- * Handles everything around fuse spaces avatars
44
- */
45
- get fuseSpace(): DaliFuseSpace;
46
- private _fuseSpace?;
47
41
  /**
48
42
  * Handles everything around cosmo spaces avatars
49
43
  */