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
@@ -1,59 +0,0 @@
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.DaliFuseSpace = void 0;
13
- const Base_1 = require("../../../Base");
14
- class DaliFuseSpace extends Base_1.default {
15
- /**
16
- * Creates a default avatar for the specified Fuse space.
17
- * @param orgName Name of the organization
18
- * @param spaceName Name of the space
19
- * @returns Public URL of the created avatar
20
- */
21
- createAvatar(orgName, spaceName, raw) {
22
- return __awaiter(this, void 0, void 0, function* () {
23
- const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`), {});
24
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
25
- });
26
- }
27
- /**
28
- * Deletes the avatar of the Fuse space from cloud storage. If you want to update it instead, use updateAvatar().
29
- * @param orgName Name of the organization
30
- * @param spaceName Name of the space
31
- */
32
- deleteAvatar(orgName, spaceName, raw) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- const resp = yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`));
35
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
36
- });
37
- }
38
- /**
39
- * Updates the avatar of the specified Fuse space
40
- * @param orgName Name of the organization
41
- * @param spaceName Name of the space
42
- * @param file Image as Javascript File
43
- * @returns Public URL of the new avatar
44
- */
45
- updateAvatar(orgName, spaceName, file, raw) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- const data = new FormData();
48
- data.append("avatar", file);
49
- const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/fuse/${spaceName}`), data, {
50
- headers: { "Content-Type": "multipart/form-data" },
51
- });
52
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
53
- });
54
- }
55
- getEndpoint(endpoint) {
56
- return `${this.options.server}/api/dali${endpoint}`;
57
- }
58
- }
59
- exports.DaliFuseSpace = DaliFuseSpace;
@@ -1,20 +0,0 @@
1
- import Base, { MaybeRaw } from "../../Base";
2
- import { Version } from "../../interfaces/global";
3
- import { FuseInternal } from "./internal";
4
- import { FuseSpaceInternal } from "./internal/space";
5
- import { FuseSpace } from "./space";
6
- export default class Fuse extends Base {
7
- get space(): FuseSpace;
8
- private _space?;
9
- get internal(): FuseInternal;
10
- private _internal?;
11
- get spaceInternal(): FuseSpaceInternal;
12
- private _spaceInternal?;
13
- /**
14
- * @returns Object containing the version as a string
15
- */
16
- version<R extends boolean = false>(raw?: {
17
- raw: R;
18
- }): Promise<MaybeRaw<R, Version>>;
19
- protected getEndpoint(endpoint: string): string;
20
- }
@@ -1,48 +0,0 @@
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 internal_1 = require("./internal");
14
- const space_1 = require("./internal/space");
15
- const space_2 = require("./space");
16
- class Fuse extends Base_1.default {
17
- get space() {
18
- if (this._space === undefined) {
19
- this._space = new space_2.FuseSpace(this.options, this.axios);
20
- }
21
- return this._space;
22
- }
23
- get internal() {
24
- if (this._internal === undefined) {
25
- this._internal = new internal_1.FuseInternal(this.options, this.axios);
26
- }
27
- return this._internal;
28
- }
29
- get spaceInternal() {
30
- if (this._spaceInternal === undefined) {
31
- this._spaceInternal = new space_1.FuseSpaceInternal(this.options, this.axios);
32
- }
33
- return this._spaceInternal;
34
- }
35
- /**
36
- * @returns Object containing the version as a string
37
- */
38
- version(raw) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
41
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
42
- });
43
- }
44
- getEndpoint(endpoint) {
45
- return `${this.options.server}/api/fuse${endpoint}`;
46
- }
47
- }
48
- exports.default = Fuse;
@@ -1,10 +0,0 @@
1
- import Base, { MaybeRaw } from "../../../Base";
2
- import { FuseSpaceInternal } from "./space";
3
- export declare class FuseInternal extends Base {
4
- get space(): FuseSpaceInternal;
5
- private _space?;
6
- deleteUsers<R extends boolean = false>(userIds: string[], raw?: {
7
- raw: R;
8
- }): Promise<MaybeRaw<R, void>>;
9
- protected getEndpoint(endpoint: string): string;
10
- }
@@ -1,32 +0,0 @@
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.FuseInternal = void 0;
13
- const Base_1 = require("../../../Base");
14
- const space_1 = require("./space");
15
- class FuseInternal extends Base_1.default {
16
- get space() {
17
- if (this._space === undefined) {
18
- this._space = new space_1.FuseSpaceInternal(this.options, this.axios);
19
- }
20
- return this._space;
21
- }
22
- deleteUsers(userIds, raw) {
23
- return __awaiter(this, void 0, void 0, function* () {
24
- const resp = yield this.axios.delete(this.getEndpoint("/v1/users"), { data: { userIds } });
25
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
26
- });
27
- }
28
- getEndpoint(endpoint) {
29
- return `${this.options.server}/api/fuse/internal${endpoint}`;
30
- }
31
- }
32
- exports.FuseInternal = FuseInternal;
@@ -1,7 +0,0 @@
1
- import Base from "../../../../../Base";
2
- import { FuseCronjobLogInternal } from "./log";
3
- export declare class FuseCronjobInternal extends Base {
4
- get cronjobLog(): FuseCronjobLogInternal;
5
- private _cronjobLog?;
6
- protected getEndpoint(endpoint: string): string;
7
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FuseCronjobInternal = void 0;
4
- const Base_1 = require("../../../../../Base");
5
- const log_1 = require("./log");
6
- class FuseCronjobInternal extends Base_1.default {
7
- get cronjobLog() {
8
- if (this._cronjobLog === undefined) {
9
- this._cronjobLog = new log_1.FuseCronjobLogInternal(this.options, this.axios);
10
- }
11
- return this._cronjobLog;
12
- }
13
- getEndpoint(endpoint) {
14
- return `${this.options.server}/api/fuse/internal${endpoint}`;
15
- }
16
- }
17
- exports.FuseCronjobInternal = FuseCronjobInternal;
@@ -1,17 +0,0 @@
1
- import Base, { MaybeRaw } from "../../../../../../Base";
2
- import { CronjobLogCreate, CronjobLogDto } from "../../../../../../interfaces/fuse/space/cronjob/CronjobLog";
3
- export declare class FuseCronjobLogInternal extends Base {
4
- /**
5
- * Creates a log for a cronjob.
6
- *
7
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
8
- * @param orgName Name of the organization
9
- * @param spaceName Name of the Fuse space
10
- * @param createCronjob Cronjob log to be created
11
- * @returns the created cronjob log with metadata
12
- */
13
- createCronjobLog<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, log: CronjobLogCreate, raw?: {
14
- raw: R;
15
- }): Promise<MaybeRaw<R, CronjobLogDto>>;
16
- protected getEndpoint(endpoint: string): string;
17
- }
@@ -1,34 +0,0 @@
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.FuseCronjobLogInternal = void 0;
13
- const Base_1 = require("../../../../../../Base");
14
- class FuseCronjobLogInternal extends Base_1.default {
15
- /**
16
- * Creates a log for a cronjob.
17
- *
18
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
19
- * @param orgName Name of the organization
20
- * @param spaceName Name of the Fuse space
21
- * @param createCronjob Cronjob log to be created
22
- * @returns the created cronjob log with metadata
23
- */
24
- createCronjobLog(orgName, spaceName, cronjobId, log, raw) {
25
- return __awaiter(this, void 0, void 0, function* () {
26
- const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/logs}`), log);
27
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
28
- });
29
- }
30
- getEndpoint(endpoint) {
31
- return `${this.options.server}/api/fuse/internal${endpoint}`;
32
- }
33
- }
34
- exports.FuseCronjobLogInternal = FuseCronjobLogInternal;
@@ -1,26 +0,0 @@
1
- import Base, { MaybeRaw } from "../../../../Base";
2
- import { FuseCronjobInternal } from "./cronjob";
3
- export declare class FuseSpaceInternal extends Base {
4
- get cronjob(): FuseCronjobInternal;
5
- private _cronjob?;
6
- /**
7
- * Deletes all spaces of an organization.
8
- *
9
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
10
- * @param orgName Name of the organization
11
- */
12
- deleteAllSpacesOfOrganization<R extends boolean = false>(orgName: string, raw?: {
13
- raw: R;
14
- }): Promise<MaybeRaw<R, void>>;
15
- /**
16
- * Removes the user from all spaces of an organization.
17
- *
18
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
19
- * @param orgName Name of the organization
20
- * @param userId ID of the user
21
- */
22
- removeUserFromAllSpacesOfOrganization<R extends boolean = false>(orgName: string, userId: string, raw?: {
23
- raw: R;
24
- }): Promise<MaybeRaw<R, void>>;
25
- protected getEndpoint(endpoint: string): string;
26
- }
@@ -1,51 +0,0 @@
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.FuseSpaceInternal = void 0;
13
- const Base_1 = require("../../../../Base");
14
- const cronjob_1 = require("./cronjob");
15
- class FuseSpaceInternal extends Base_1.default {
16
- get cronjob() {
17
- if (this._cronjob === undefined) {
18
- this._cronjob = new cronjob_1.FuseCronjobInternal(this.options, this.axios);
19
- }
20
- return this._cronjob;
21
- }
22
- /**
23
- * Deletes all spaces of an organization.
24
- *
25
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
26
- * @param orgName Name of the organization
27
- */
28
- deleteAllSpacesOfOrganization(orgName, raw) {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}`));
31
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
32
- });
33
- }
34
- /**
35
- * Removes the user from all spaces of an organization.
36
- *
37
- * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
38
- * @param orgName Name of the organization
39
- * @param userId ID of the user
40
- */
41
- removeUserFromAllSpacesOfOrganization(orgName, userId, raw) {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/user/${userId}`));
44
- return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
45
- });
46
- }
47
- getEndpoint(endpoint) {
48
- return `${this.options.server}/api/fuse/internal${endpoint}`;
49
- }
50
- }
51
- exports.FuseSpaceInternal = FuseSpaceInternal;
@@ -1,145 +0,0 @@
1
- import Base, { MaybeRaw } from "../../../../Base";
2
- import { Cronjob, CronjobCreate } from "../../../../interfaces/fuse/space/cronjob/Cronjob";
3
- import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
4
- import { FuseCronjobLogInternal } from "../../internal/space/cronjob/log";
5
- import { FuseCronjobLog } from "./log";
6
- export declare class FuseCronjob extends Base {
7
- get cronjobLog(): FuseCronjobLog;
8
- private _cronjobLog?;
9
- get cronjobLogInternal(): FuseCronjobLogInternal;
10
- private _cronjobLogInternal?;
11
- /**
12
- * Retrieves a cronjob by it's ID.
13
- * @param orgName Name of the organization
14
- * @param spaceName Name of the Fuse space
15
- * @param cronjobId ID of the cronjob
16
- * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
17
- * @returns The requested cronjob
18
- */
19
- getCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, exposeNextExecution?: boolean, raw?: {
20
- raw: R;
21
- }): Promise<MaybeRaw<R, Cronjob>>;
22
- /**
23
- * Retrieves the next n cronjob executions as Unix timestamps (in milliseconds).
24
- * @param orgName Name of the organization
25
- * @param spaceName Name of the space
26
- * @param cronjobId ID of the cronjob
27
- * @returns Array of Unix timestamps
28
- */
29
- getNextCronjobExecutions<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, raw?: {
30
- raw: R;
31
- }): Promise<MaybeRaw<R, number[]>>;
32
- /**
33
- * Creates a new cronjob in the specified Fuse space.
34
- * @param orgName Name of the organisation
35
- * @param spaceName Name of the Fuse space
36
- * @param createCronjob Cronjob to be created
37
- * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
38
- * @returns Created cronjob
39
- */
40
- createCronjob<R extends boolean = false>(orgName: string, spaceName: string, createCronjob: CronjobCreate, exposeNextExecution?: boolean, raw?: {
41
- raw: R;
42
- }): Promise<MaybeRaw<R, Cronjob>>;
43
- /**
44
- * Updates an existing cronjob.
45
- * @param orgName Name of the organization
46
- * @param spaceName Name of the space
47
- * @param cronjobId ID of the cronjob
48
- * @param createCronjob Cronjob to be updated
49
- * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
50
- * @returns Updated cronjob
51
- */
52
- updateCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, createCronjob: CronjobCreate, exposeNextExecution?: boolean, raw?: {
53
- raw: R;
54
- }): Promise<MaybeRaw<R, Cronjob>>;
55
- /**
56
- * Change the cron expression of an existing cronjob
57
- * @param orgName Name of the organization
58
- * @param spaceName Name of the space
59
- * @param cronjobId ID of the cronjob
60
- * @param expression New cron expression
61
- * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
62
- * @returns The patched cronjob
63
- */
64
- patchCronjobExpression<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, expression: string, exposeNextExecution?: boolean, raw?: {
65
- raw: R;
66
- }): Promise<MaybeRaw<R, Cronjob>>;
67
- /**
68
- * Change the enabled flag of an existing cronjob
69
- * @param orgName Name of the organization
70
- * @param spaceName Name of the space
71
- * @param cronjobId ID of the cronjob
72
- * @param enabled Boolean flag to set
73
- * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
74
- * @returns The patched cronjob
75
- */
76
- patchCronjobEnabled<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, enabled: boolean, exposeNextExecution?: boolean, raw?: {
77
- raw: R;
78
- }): Promise<MaybeRaw<R, Cronjob>>;
79
- /**
80
- * Enable a cronjob.
81
- *
82
- * This is a wrapper around patchCronjobEnabled.
83
- *
84
- * @param orgName Name of the organization
85
- * @param spaceName Name of the space
86
- * @param cronjobId ID of the cronjob
87
- * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
88
- * @returns The patched cronjob
89
- */
90
- enableCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, exposeNextExecution?: boolean, raw?: {
91
- raw: R;
92
- }): Promise<MaybeRaw<R, Cronjob>>;
93
- /**
94
- * Disable a cronjob.
95
- *
96
- * This is a wrapper around patchCronjobEnabled.
97
- *
98
- * @param orgName Name of the organization
99
- * @param spaceName Name of the space
100
- * @param cronjobId ID of the cronjob
101
- * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
102
- * @returns The patched cronjob
103
- */
104
- disableCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, exposeNextExecution?: boolean, raw?: {
105
- raw: R;
106
- }): Promise<MaybeRaw<R, Cronjob>>;
107
- /**
108
- * Deletes a cronjob by its ID
109
- * @param orgName Name of the organization
110
- * @param spaceName Name of the space
111
- * @param cronjobId ID of the cronjob
112
- */
113
- deleteCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, raw?: {
114
- raw: R;
115
- }): Promise<MaybeRaw<R, void>>;
116
- /**
117
- * Retrieves all cronjobs of a Fuse space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
118
- * @param orgName Name of the organization
119
- * @param spaceName Name of the space
120
- * @param filters (optional) Array of search filters
121
- * @param sorting (optional) Sorting object
122
- * @param limit (optional) Max number of results (1-100; defaults to 25)
123
- * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
124
- * @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the returned cronjob objects
125
- * @returns Object containing an array of filtered cronjobs as well as the total number of results found in the database (independent of limit and page)
126
- */
127
- searchCronjobs<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page, exposeNextExecution, }: SearchParams & {
128
- orgName: string;
129
- spaceName: string;
130
- exposeNextExecution?: boolean;
131
- }, raw?: {
132
- raw: R;
133
- }): Promise<MaybeRaw<R, PaginatedResponse<Cronjob>>>;
134
- /**
135
- * Resolve a cron pattern along with a timezone to get the next executions in mili-seconds.
136
- * @param expression The cron expression
137
- * @param timezone The target IANA timezone
138
- * @param amount The amount of returned execution-dates (limited between 1 and 10, default is 3)
139
- * @returns Array of Unix timestamps
140
- */
141
- resolveCronPatternWithTimezone<R extends boolean = false>(expression: string, timezone: string, amount?: number, raw?: {
142
- raw: R;
143
- }): Promise<MaybeRaw<R, number[]>>;
144
- protected getEndpoint(endpoint: string): string;
145
- }