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.
- package/changelog.md +176 -76
- package/lib/Base.d.ts +2 -1
- package/lib/Hcloud.d.ts +6 -3
- package/lib/Hcloud.js +16 -5
- package/lib/helper/ValidationHelper.d.ts +10 -2
- package/lib/helper/ValidationHelper.js +55 -7
- package/lib/interfaces/auditor/index.d.ts +13 -2
- package/lib/interfaces/auditor/index.js +9 -1
- package/lib/interfaces/cosmo/asset/index.d.ts +185 -0
- package/lib/interfaces/cosmo/asset/index.js +82 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +38 -0
- package/lib/interfaces/cosmo/comment/index.js +8 -0
- package/lib/interfaces/cosmo/event/index.d.ts +31 -0
- package/lib/interfaces/cosmo/event/index.js +17 -0
- package/lib/interfaces/cosmo/location/index.d.ts +4 -0
- package/lib/interfaces/cosmo/namespace/index.d.ts +9 -0
- package/lib/interfaces/cosmo/namespace/index.js +9 -0
- package/lib/interfaces/cosmo/permissions.d.ts +96 -0
- package/lib/interfaces/cosmo/permissions.js +58 -0
- package/lib/interfaces/cosmo/share/index.d.ts +28 -0
- package/lib/interfaces/cosmo/share/index.js +2 -0
- package/lib/interfaces/cosmo/space/index.d.ts +25 -0
- package/lib/interfaces/cosmo/space/index.js +2 -0
- package/lib/interfaces/cosmo/tag/tag.d.ts +12 -0
- package/lib/interfaces/cosmo/tag/tag.js +2 -0
- package/lib/interfaces/global/Products.d.ts +2 -2
- package/lib/interfaces/global/Products.js +1 -1
- package/lib/interfaces/high5/index.d.ts +7 -7
- package/lib/interfaces/high5/index.js +7 -7
- package/lib/interfaces/{friday → high5}/space/database/document/index.d.ts +1 -1
- package/lib/interfaces/{friday → high5}/space/database/document/index.js +2 -1
- package/lib/interfaces/high5/space/database/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +9 -2
- package/lib/interfaces/high5/space/execution/index.d.ts +2 -1
- package/lib/interfaces/high5/space/job/JobLog.d.ts +16 -0
- package/lib/interfaces/high5/space/job/JobLog.js +2 -0
- package/lib/interfaces/high5/space/job/index.d.ts +38 -0
- package/lib/interfaces/high5/space/job/index.js +8 -0
- package/lib/interfaces/high5/stats.d.ts +21 -0
- package/lib/interfaces/high5/stats.js +2 -0
- package/lib/interfaces/idp/oauth/index.d.ts +4 -3
- package/lib/interfaces/idp/organization/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/index.js +1 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +13 -11
- package/lib/interfaces/idp/organization/member/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/stats.d.ts +7 -0
- package/lib/interfaces/idp/organization/stats.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
- package/lib/interfaces/idp/user/Message.d.ts +21 -0
- package/lib/interfaces/idp/user/Message.js +14 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -7
- package/lib/interfaces/idp/user/Scopes.js +0 -9
- package/lib/interfaces/idp/user/index.d.ts +2 -1
- package/lib/interfaces/mailer/index.d.ts +30 -1
- package/lib/interfaces/mailer/index.js +87 -1
- package/lib/interfaces/mothership/index.d.ts +3 -1
- package/lib/interfaces/mothership/index.js +15 -0
- package/lib/interfaces/mothership/stats.d.ts +4 -0
- package/lib/interfaces/mothership/stats.js +2 -0
- package/lib/interfaces/nats/index.d.ts +54 -24
- package/lib/interfaces/nats/index.js +87 -58
- package/lib/interfaces/shorts/index.d.ts +10 -0
- package/lib/interfaces/shorts/index.js +2 -0
- package/lib/service/agent/bundle/dev/index.d.ts +16 -6
- package/lib/service/agent/bundle/dev/index.js +12 -10
- package/lib/service/agent/bundle/index.d.ts +10 -4
- package/lib/service/agent/bundle/index.js +6 -6
- package/lib/service/agent/context/index.d.ts +22 -8
- package/lib/service/agent/context/index.js +15 -14
- package/lib/service/auditor/index.d.ts +8 -4
- package/lib/service/auditor/index.js +5 -5
- package/lib/service/auditor/internal/index.d.ts +27 -3
- package/lib/service/auditor/internal/index.js +34 -5
- package/lib/service/bouncer/features/index.d.ts +4 -2
- package/lib/service/bouncer/features/index.js +2 -2
- package/lib/service/cosmo/asset/index.d.ts +219 -0
- package/lib/service/cosmo/asset/index.js +314 -0
- package/lib/service/cosmo/comment/index.d.ts +122 -0
- package/lib/service/cosmo/comment/index.js +161 -0
- package/lib/service/cosmo/event/index.d.ts +23 -0
- package/lib/service/cosmo/event/index.js +40 -0
- package/lib/service/cosmo/folder/index.d.ts +27 -0
- package/lib/service/cosmo/folder/index.js +47 -0
- package/lib/service/cosmo/index.d.ts +49 -0
- package/lib/service/cosmo/index.js +119 -0
- package/lib/service/cosmo/internal/index.d.ts +7 -0
- package/lib/service/cosmo/internal/index.js +17 -0
- package/lib/service/cosmo/internal/space/index.d.ts +15 -0
- package/lib/service/cosmo/internal/space/index.js +34 -0
- package/lib/service/cosmo/location/index.d.ts +40 -0
- package/lib/service/cosmo/location/index.js +63 -0
- package/lib/service/cosmo/namespace/index.d.ts +42 -0
- package/lib/service/cosmo/namespace/index.js +65 -0
- package/lib/service/cosmo/organization/index.d.ts +47 -0
- package/lib/service/cosmo/organization/index.js +64 -0
- package/lib/service/cosmo/permissions/index.d.ts +131 -0
- package/lib/service/cosmo/permissions/index.js +181 -0
- package/lib/service/cosmo/production/index.d.ts +26 -0
- package/lib/service/cosmo/production/index.js +45 -0
- package/lib/service/cosmo/share/index.d.ts +161 -0
- package/lib/service/cosmo/share/index.js +215 -0
- package/lib/service/cosmo/space/index.d.ts +104 -0
- package/lib/service/cosmo/space/index.js +146 -0
- package/lib/service/cosmo/tag/index.d.ts +67 -0
- package/lib/service/cosmo/tag/index.js +93 -0
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliCosmoSpace.js +8 -7
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliFuseSpace.js +7 -6
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +10 -4
- package/lib/service/dali/avatar/DaliHigh5Pool.js +7 -6
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +10 -4
- package/lib/service/dali/avatar/DaliHigh5Space.js +7 -6
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +10 -4
- package/lib/service/dali/avatar/DaliOAuthApp.js +7 -6
- package/lib/service/dali/avatar/DaliOrganization.d.ts +10 -4
- package/lib/service/dali/avatar/DaliOrganization.js +7 -6
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
- package/lib/service/dali/avatar/DaliServiceAccount.js +7 -6
- package/lib/service/dali/avatar/DaliTeam.d.ts +10 -4
- package/lib/service/dali/avatar/DaliTeam.js +7 -6
- package/lib/service/dali/avatar/DaliUser.d.ts +10 -4
- package/lib/service/dali/avatar/DaliUser.js +7 -6
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +2 -5
- package/lib/service/fuse/index.d.ts +4 -2
- package/lib/service/fuse/index.js +2 -2
- package/lib/service/fuse/internal/index.d.ts +4 -2
- package/lib/service/fuse/internal/index.js +3 -2
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +4 -2
- package/lib/service/fuse/internal/space/cronjob/log/index.js +2 -2
- package/lib/service/fuse/internal/space/index.d.ts +7 -3
- package/lib/service/fuse/internal/space/index.js +6 -4
- package/lib/service/fuse/space/cronjob/index.d.ts +35 -13
- package/lib/service/fuse/space/cronjob/index.js +48 -50
- package/lib/service/fuse/space/cronjob/log/index.d.ts +8 -4
- package/lib/service/fuse/space/cronjob/log/index.js +5 -5
- package/lib/service/fuse/space/index.d.ts +27 -11
- package/lib/service/fuse/space/index.js +19 -18
- package/lib/service/high5/execution/index.d.ts +4 -2
- package/lib/service/high5/execution/index.js +3 -2
- package/lib/service/high5/execution/status/index.d.ts +5 -3
- package/lib/service/high5/execution/status/index.js +3 -3
- package/lib/service/high5/index.d.ts +7 -2
- package/lib/service/high5/index.js +9 -2
- package/lib/service/high5/internal/index.d.ts +4 -2
- package/lib/service/high5/internal/index.js +3 -2
- package/lib/service/high5/internal/space/index.d.ts +10 -3
- package/lib/service/high5/internal/space/index.js +13 -4
- package/lib/service/high5/internal/space/job/index.d.ts +7 -0
- package/lib/service/high5/internal/space/job/index.js +17 -0
- package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
- package/lib/service/high5/internal/space/job/log/index.js +34 -0
- package/lib/service/high5/joinToken/index.d.ts +14 -6
- package/lib/service/high5/joinToken/index.js +10 -9
- package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
- package/lib/service/high5/space/database/document/array/index.js +102 -0
- package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
- package/lib/service/{friday → high5}/space/database/document/index.js +31 -16
- package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
- package/lib/service/high5/space/database/document/number/index.js +77 -0
- package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
- package/lib/service/{friday → high5}/space/database/index.js +18 -17
- package/lib/service/high5/space/event/index.d.ts +17 -7
- package/lib/service/high5/space/event/index.js +12 -11
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +2 -2
- package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
- package/lib/service/high5/space/event/stream/design/index.js +7 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +12 -10
- package/lib/service/high5/space/event/stream/index.d.ts +32 -12
- package/lib/service/high5/space/event/stream/index.js +22 -21
- package/lib/service/high5/space/execution/index.d.ts +19 -7
- package/lib/service/high5/space/execution/index.js +17 -12
- package/lib/service/high5/space/execution/log/index.d.ts +8 -4
- package/lib/service/high5/space/execution/log/index.js +5 -5
- package/lib/service/high5/space/execution/status/index.d.ts +7 -3
- package/lib/service/high5/space/execution/status/index.js +4 -4
- package/lib/service/high5/space/index.d.ts +43 -14
- package/lib/service/high5/space/index.js +45 -23
- package/lib/service/high5/space/job/index.d.ts +145 -0
- package/lib/service/high5/space/job/index.js +201 -0
- package/lib/service/high5/space/job/log/index.d.ts +35 -0
- package/lib/service/high5/space/job/log/index.js +58 -0
- package/lib/service/high5/space/node/index.d.ts +20 -8
- package/lib/service/high5/space/node/index.js +14 -13
- package/lib/service/high5/space/pool/index.d.ts +27 -11
- package/lib/service/high5/space/pool/index.js +19 -18
- package/lib/service/high5/space/secret/index.d.ts +17 -7
- package/lib/service/high5/space/secret/index.js +12 -11
- package/lib/service/high5/space/stat/index.d.ts +12 -0
- package/lib/service/high5/space/stat/index.js +31 -0
- package/lib/service/high5/space/wave/index.d.ts +16 -6
- package/lib/service/high5/space/wave/index.js +11 -10
- package/lib/service/high5/space/webhook/index.d.ts +32 -12
- package/lib/service/high5/space/webhook/index.js +25 -21
- package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
- package/lib/service/high5/space/webhook/log/index.js +2 -2
- package/lib/service/high5/stat/index.d.ts +11 -0
- package/lib/service/high5/stat/index.js +30 -0
- package/lib/service/high5/wave/s3/index.d.ts +31 -8
- package/lib/service/high5/wave/s3/index.js +42 -21
- package/lib/service/idp/guest/index.d.ts +42 -0
- package/lib/service/idp/guest/index.js +66 -0
- package/lib/service/idp/index.d.ts +25 -7
- package/lib/service/idp/index.js +23 -12
- package/lib/service/idp/internal/index.d.ts +5 -3
- package/lib/service/idp/internal/index.js +5 -3
- package/lib/service/idp/oauth/index.d.ts +16 -6
- package/lib/service/idp/oauth/index.js +15 -15
- package/lib/service/idp/organization/index.d.ts +19 -5
- package/lib/service/idp/organization/index.js +19 -8
- package/lib/service/idp/organization/license/index.d.ts +7 -3
- package/lib/service/idp/organization/license/index.js +4 -4
- package/lib/service/idp/organization/member/index.d.ts +20 -8
- package/lib/service/idp/organization/member/index.js +15 -13
- package/lib/service/idp/organization/member/invitations/index.d.ts +23 -9
- package/lib/service/idp/organization/member/invitations/index.js +72 -59
- package/lib/service/idp/organization/service-accounts/index.d.ts +20 -8
- package/lib/service/idp/organization/service-accounts/index.js +13 -12
- package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
- package/lib/service/idp/organization/settings/domain/index.js +9 -8
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
- package/lib/service/idp/organization/settings/domain/saml/index.js +19 -18
- package/lib/service/idp/organization/settings/oauth/index.d.ts +23 -9
- package/lib/service/idp/organization/settings/oauth/index.js +16 -15
- package/lib/service/idp/organization/stat/index.d.ts +11 -0
- package/lib/service/idp/organization/stat/index.js +30 -0
- package/lib/service/idp/organization/team/index.d.ts +22 -10
- package/lib/service/idp/organization/team/index.js +14 -13
- package/lib/service/idp/registration/index.d.ts +10 -4
- package/lib/service/idp/registration/index.js +15 -9
- package/lib/service/idp/user/index.d.ts +33 -11
- package/lib/service/idp/user/index.js +29 -16
- package/lib/service/idp/user/license/index.d.ts +7 -3
- package/lib/service/idp/user/license/index.js +4 -4
- package/lib/service/idp/user/message/index.d.ts +61 -0
- package/lib/service/idp/user/message/index.js +92 -0
- package/lib/service/idp/user/password/index.d.ts +4 -2
- package/lib/service/idp/user/password/index.js +2 -2
- package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
- package/lib/service/idp/user/settings/connections/index.js +2 -2
- package/lib/service/idp/user/settings/general/index.d.ts +10 -4
- package/lib/service/idp/user/settings/general/index.js +6 -6
- package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
- package/lib/service/idp/user/settings/notifications/index.js +4 -4
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
- package/lib/service/idp/user/settings/oauthApps/index.js +6 -5
- package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
- package/lib/service/idp/user/settings/pats/index.js +17 -15
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +13 -10
- package/lib/service/mailer/index.d.ts +4 -2
- package/lib/service/mailer/index.js +2 -2
- package/lib/service/mailer/internal/index.d.ts +13 -5
- package/lib/service/mailer/internal/index.js +8 -8
- package/lib/service/mothership/index.d.ts +35 -13
- package/lib/service/mothership/index.js +32 -17
- package/lib/service/nats/index.js +58 -43
- package/lib/service/shorts/index.d.ts +18 -0
- package/lib/service/{friday → shorts}/index.js +13 -10
- package/lib/service/shorts/internal/index.d.ts +72 -0
- package/lib/service/shorts/internal/index.js +104 -0
- package/package.json +1 -1
- package/lib/interfaces/friday/index.d.ts +0 -3
- package/lib/interfaces/friday/index.js +0 -19
- package/lib/interfaces/friday/space/index.d.ts +0 -21
- package/lib/interfaces/friday/space/index.js +0 -11
- package/lib/service/friday/index.d.ts +0 -13
- package/lib/service/friday/space/index.d.ts +0 -81
- package/lib/service/friday/space/index.js +0 -150
- /package/lib/interfaces/{friday/space/database → cosmo/location}/index.js +0 -0
- /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
|
@@ -16,18 +16,19 @@ class DaliUser extends Base_1.default {
|
|
|
16
16
|
* Creates a default avatar for the requesting user.
|
|
17
17
|
* @returns Public URL of the created avatar
|
|
18
18
|
*/
|
|
19
|
-
createAvatar() {
|
|
19
|
+
createAvatar(raw) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/user`), {});
|
|
22
|
-
return resp.data;
|
|
22
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Deletes the avatar of the requesting user from cloud storage. If you want to update it instead, use updateAvatar().
|
|
27
27
|
*/
|
|
28
|
-
deleteAvatar() {
|
|
28
|
+
deleteAvatar(raw) {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
yield this.axios.delete(this.getEndpoint(`/v1/avatar/user`));
|
|
30
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/avatar/user`));
|
|
31
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
@@ -35,14 +36,14 @@ class DaliUser extends Base_1.default {
|
|
|
35
36
|
* @param file Image as Javascript File
|
|
36
37
|
* @returns Public URL of the new avatar
|
|
37
38
|
*/
|
|
38
|
-
updateAvatar(file) {
|
|
39
|
+
updateAvatar(file, raw) {
|
|
39
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
41
|
const data = new FormData();
|
|
41
42
|
data.append("avatar", file);
|
|
42
43
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/user`), data, {
|
|
43
44
|
headers: { "Content-Type": "multipart/form-data" },
|
|
44
45
|
});
|
|
45
|
-
return resp.data;
|
|
46
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../Base";
|
|
2
2
|
import { Version } from "../../interfaces/global";
|
|
3
3
|
import { DaliAvatar } from "./DaliAvatar";
|
|
4
4
|
export default class Dali extends Base {
|
|
@@ -7,9 +7,8 @@ export default class Dali extends Base {
|
|
|
7
7
|
*/
|
|
8
8
|
get avatar(): DaliAvatar;
|
|
9
9
|
private _avatar?;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
version(): Promise<Version>;
|
|
10
|
+
version<R extends boolean = false>(raw?: {
|
|
11
|
+
raw: R;
|
|
12
|
+
}): Promise<MaybeRaw<R, Version>>;
|
|
14
13
|
protected getEndpoint(endpoint: string): string;
|
|
15
14
|
}
|
|
@@ -21,13 +21,10 @@ class Dali extends Base_1.default {
|
|
|
21
21
|
}
|
|
22
22
|
return this._avatar;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
* @returns An object containing the endpoint version as a string
|
|
26
|
-
*/
|
|
27
|
-
version() {
|
|
24
|
+
version(raw) {
|
|
28
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
26
|
const resp = yield this.axios.get(this.getEndpoint("/v1/version"));
|
|
30
|
-
return resp.data;
|
|
27
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
31
28
|
});
|
|
32
29
|
}
|
|
33
30
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../Base";
|
|
2
2
|
import { Version } from "../../interfaces/global";
|
|
3
3
|
import { FuseInternal } from "./internal";
|
|
4
4
|
import { FuseSpaceInternal } from "./internal/space";
|
|
@@ -13,6 +13,8 @@ export default class Fuse extends Base {
|
|
|
13
13
|
/**
|
|
14
14
|
* @returns Object containing the version as a string
|
|
15
15
|
*/
|
|
16
|
-
version(
|
|
16
|
+
version<R extends boolean = false>(raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, Version>>;
|
|
17
19
|
protected getEndpoint(endpoint: string): string;
|
|
18
20
|
}
|
|
@@ -35,10 +35,10 @@ class Fuse extends Base_1.default {
|
|
|
35
35
|
/**
|
|
36
36
|
* @returns Object containing the version as a string
|
|
37
37
|
*/
|
|
38
|
-
version() {
|
|
38
|
+
version(raw) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
const resp = yield this.axios.get(this.getEndpoint("/v1/version"), {});
|
|
41
|
-
return resp.data;
|
|
41
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
getEndpoint(endpoint) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { FuseSpaceInternal } from "./space";
|
|
3
3
|
export declare class FuseInternal extends Base {
|
|
4
4
|
get space(): FuseSpaceInternal;
|
|
5
5
|
private _space?;
|
|
6
|
-
deleteUsers(userIds: string[]
|
|
6
|
+
deleteUsers<R extends boolean = false>(userIds: string[], raw?: {
|
|
7
|
+
raw: R;
|
|
8
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
7
9
|
protected getEndpoint(endpoint: string): string;
|
|
8
10
|
}
|
|
@@ -19,9 +19,10 @@ class FuseInternal extends Base_1.default {
|
|
|
19
19
|
}
|
|
20
20
|
return this._space;
|
|
21
21
|
}
|
|
22
|
-
deleteUsers(userIds) {
|
|
22
|
+
deleteUsers(userIds, raw) {
|
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
yield this.axios.delete(this.getEndpoint("/v1/users"), { data: { userIds } });
|
|
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);
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../../Base";
|
|
2
2
|
import { CronjobLogCreate, CronjobLogDto } from "../../../../../../interfaces/fuse/space/cronjob/CronjobLog";
|
|
3
3
|
export declare class FuseCronjobLogInternal extends Base {
|
|
4
4
|
/**
|
|
@@ -10,6 +10,8 @@ export declare class FuseCronjobLogInternal extends Base {
|
|
|
10
10
|
* @param createCronjob Cronjob log to be created
|
|
11
11
|
* @returns the created cronjob log with metadata
|
|
12
12
|
*/
|
|
13
|
-
createCronjobLog(orgName: string, spaceName: string, cronjobId: string, log: CronjobLogCreate
|
|
13
|
+
createCronjobLog<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, log: CronjobLogCreate, raw?: {
|
|
14
|
+
raw: R;
|
|
15
|
+
}): Promise<MaybeRaw<R, CronjobLogDto>>;
|
|
14
16
|
protected getEndpoint(endpoint: string): string;
|
|
15
17
|
}
|
|
@@ -21,10 +21,10 @@ class FuseCronjobLogInternal extends Base_1.default {
|
|
|
21
21
|
* @param createCronjob Cronjob log to be created
|
|
22
22
|
* @returns the created cronjob log with metadata
|
|
23
23
|
*/
|
|
24
|
-
createCronjobLog(orgName, spaceName, cronjobId, log) {
|
|
24
|
+
createCronjobLog(orgName, spaceName, cronjobId, log, raw) {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/logs}`), log);
|
|
27
|
-
return resp.data;
|
|
27
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { FuseCronjobInternal } from "./cronjob";
|
|
3
3
|
export declare class FuseSpaceInternal extends Base {
|
|
4
4
|
get cronjob(): FuseCronjobInternal;
|
|
@@ -9,7 +9,9 @@ export declare class FuseSpaceInternal extends Base {
|
|
|
9
9
|
* THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
|
|
10
10
|
* @param orgName Name of the organization
|
|
11
11
|
*/
|
|
12
|
-
deleteAllSpacesOfOrganization(orgName: string
|
|
12
|
+
deleteAllSpacesOfOrganization<R extends boolean = false>(orgName: string, raw?: {
|
|
13
|
+
raw: R;
|
|
14
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
13
15
|
/**
|
|
14
16
|
* Removes the user from all spaces of an organization.
|
|
15
17
|
*
|
|
@@ -17,6 +19,8 @@ export declare class FuseSpaceInternal extends Base {
|
|
|
17
19
|
* @param orgName Name of the organization
|
|
18
20
|
* @param userId ID of the user
|
|
19
21
|
*/
|
|
20
|
-
removeUserFromAllSpacesOfOrganization(orgName: string, userId: string
|
|
22
|
+
removeUserFromAllSpacesOfOrganization<R extends boolean = false>(orgName: string, userId: string, raw?: {
|
|
23
|
+
raw: R;
|
|
24
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
21
25
|
protected getEndpoint(endpoint: string): string;
|
|
22
26
|
}
|
|
@@ -25,9 +25,10 @@ class FuseSpaceInternal extends Base_1.default {
|
|
|
25
25
|
* THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
|
|
26
26
|
* @param orgName Name of the organization
|
|
27
27
|
*/
|
|
28
|
-
deleteAllSpacesOfOrganization(orgName) {
|
|
28
|
+
deleteAllSpacesOfOrganization(orgName, raw) {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}`));
|
|
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);
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
@@ -37,9 +38,10 @@ class FuseSpaceInternal extends Base_1.default {
|
|
|
37
38
|
* @param orgName Name of the organization
|
|
38
39
|
* @param userId ID of the user
|
|
39
40
|
*/
|
|
40
|
-
removeUserFromAllSpacesOfOrganization(orgName, userId) {
|
|
41
|
+
removeUserFromAllSpacesOfOrganization(orgName, userId, raw) {
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/user/${userId}`));
|
|
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);
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { Cronjob, CronjobCreate } from "../../../../interfaces/fuse/space/cronjob/Cronjob";
|
|
3
3
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
4
4
|
import { FuseCronjobLogInternal } from "../../internal/space/cronjob/log";
|
|
@@ -16,7 +16,9 @@ export declare class FuseCronjob extends Base {
|
|
|
16
16
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
17
17
|
* @returns The requested cronjob
|
|
18
18
|
*/
|
|
19
|
-
getCronjob(orgName: string, spaceName: string, cronjobId: string, exposeNextExecution?: boolean
|
|
19
|
+
getCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, exposeNextExecution?: boolean, raw?: {
|
|
20
|
+
raw: R;
|
|
21
|
+
}): Promise<MaybeRaw<R, Cronjob>>;
|
|
20
22
|
/**
|
|
21
23
|
* Retrieves the next n cronjob executions as Unix timestamps (in milliseconds).
|
|
22
24
|
* @param orgName Name of the organization
|
|
@@ -24,7 +26,9 @@ export declare class FuseCronjob extends Base {
|
|
|
24
26
|
* @param cronjobId ID of the cronjob
|
|
25
27
|
* @returns Array of Unix timestamps
|
|
26
28
|
*/
|
|
27
|
-
getNextCronjobExecutions(orgName: string, spaceName: string, cronjobId: string
|
|
29
|
+
getNextCronjobExecutions<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, raw?: {
|
|
30
|
+
raw: R;
|
|
31
|
+
}): Promise<MaybeRaw<R, number[]>>;
|
|
28
32
|
/**
|
|
29
33
|
* Creates a new cronjob in the specified Fuse space.
|
|
30
34
|
* @param orgName Name of the organisation
|
|
@@ -33,7 +37,9 @@ export declare class FuseCronjob extends Base {
|
|
|
33
37
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
34
38
|
* @returns Created cronjob
|
|
35
39
|
*/
|
|
36
|
-
createCronjob(orgName: string, spaceName: string, createCronjob: CronjobCreate, exposeNextExecution?: boolean
|
|
40
|
+
createCronjob<R extends boolean = false>(orgName: string, spaceName: string, createCronjob: CronjobCreate, exposeNextExecution?: boolean, raw?: {
|
|
41
|
+
raw: R;
|
|
42
|
+
}): Promise<MaybeRaw<R, Cronjob>>;
|
|
37
43
|
/**
|
|
38
44
|
* Updates an existing cronjob.
|
|
39
45
|
* @param orgName Name of the organization
|
|
@@ -43,7 +49,9 @@ export declare class FuseCronjob extends Base {
|
|
|
43
49
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
44
50
|
* @returns Updated cronjob
|
|
45
51
|
*/
|
|
46
|
-
updateCronjob(orgName: string, spaceName: string, cronjobId: string, createCronjob: CronjobCreate, exposeNextExecution?: boolean
|
|
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>>;
|
|
47
55
|
/**
|
|
48
56
|
* Change the cron expression of an existing cronjob
|
|
49
57
|
* @param orgName Name of the organization
|
|
@@ -53,7 +61,9 @@ export declare class FuseCronjob extends Base {
|
|
|
53
61
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
54
62
|
* @returns The patched cronjob
|
|
55
63
|
*/
|
|
56
|
-
patchCronjobExpression(orgName: string, spaceName: string, cronjobId: string, expression: string, exposeNextExecution?: boolean
|
|
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>>;
|
|
57
67
|
/**
|
|
58
68
|
* Change the enabled flag of an existing cronjob
|
|
59
69
|
* @param orgName Name of the organization
|
|
@@ -63,7 +73,9 @@ export declare class FuseCronjob extends Base {
|
|
|
63
73
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
64
74
|
* @returns The patched cronjob
|
|
65
75
|
*/
|
|
66
|
-
patchCronjobEnabled(orgName: string, spaceName: string, cronjobId: string, enabled: boolean, exposeNextExecution?: boolean
|
|
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>>;
|
|
67
79
|
/**
|
|
68
80
|
* Enable a cronjob.
|
|
69
81
|
*
|
|
@@ -75,7 +87,9 @@ export declare class FuseCronjob extends Base {
|
|
|
75
87
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
76
88
|
* @returns The patched cronjob
|
|
77
89
|
*/
|
|
78
|
-
enableCronjob
|
|
90
|
+
enableCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, exposeNextExecution?: boolean, raw?: {
|
|
91
|
+
raw: R;
|
|
92
|
+
}): Promise<MaybeRaw<R, Cronjob>>;
|
|
79
93
|
/**
|
|
80
94
|
* Disable a cronjob.
|
|
81
95
|
*
|
|
@@ -87,14 +101,18 @@ export declare class FuseCronjob extends Base {
|
|
|
87
101
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
88
102
|
* @returns The patched cronjob
|
|
89
103
|
*/
|
|
90
|
-
disableCronjob
|
|
104
|
+
disableCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, exposeNextExecution?: boolean, raw?: {
|
|
105
|
+
raw: R;
|
|
106
|
+
}): Promise<MaybeRaw<R, Cronjob>>;
|
|
91
107
|
/**
|
|
92
108
|
* Deletes a cronjob by its ID
|
|
93
109
|
* @param orgName Name of the organization
|
|
94
110
|
* @param spaceName Name of the space
|
|
95
111
|
* @param cronjobId ID of the cronjob
|
|
96
112
|
*/
|
|
97
|
-
deleteCronjob(orgName: string, spaceName: string, cronjobId: string
|
|
113
|
+
deleteCronjob<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, raw?: {
|
|
114
|
+
raw: R;
|
|
115
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
98
116
|
/**
|
|
99
117
|
* Retrieves all cronjobs of a Fuse space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
|
|
100
118
|
* @param orgName Name of the organization
|
|
@@ -106,11 +124,13 @@ export declare class FuseCronjob extends Base {
|
|
|
106
124
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the returned cronjob objects
|
|
107
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)
|
|
108
126
|
*/
|
|
109
|
-
searchCronjobs({ orgName, spaceName, filters, sorting, limit, page, exposeNextExecution, }: SearchParams & {
|
|
127
|
+
searchCronjobs<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page, exposeNextExecution, }: SearchParams & {
|
|
110
128
|
orgName: string;
|
|
111
129
|
spaceName: string;
|
|
112
130
|
exposeNextExecution?: boolean;
|
|
113
|
-
}
|
|
131
|
+
}, raw?: {
|
|
132
|
+
raw: R;
|
|
133
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<Cronjob>>>;
|
|
114
134
|
/**
|
|
115
135
|
* Resolve a cron pattern along with a timezone to get the next executions in mili-seconds.
|
|
116
136
|
* @param expression The cron expression
|
|
@@ -118,6 +138,8 @@ export declare class FuseCronjob extends Base {
|
|
|
118
138
|
* @param amount The amount of returned execution-dates (limited between 1 and 10, default is 3)
|
|
119
139
|
* @returns Array of Unix timestamps
|
|
120
140
|
*/
|
|
121
|
-
resolveCronPatternWithTimezone(expression: string, timezone: string, amount?: number
|
|
141
|
+
resolveCronPatternWithTimezone<R extends boolean = false>(expression: string, timezone: string, amount?: number, raw?: {
|
|
142
|
+
raw: R;
|
|
143
|
+
}): Promise<MaybeRaw<R, number[]>>;
|
|
122
144
|
protected getEndpoint(endpoint: string): string;
|
|
123
145
|
}
|
|
@@ -16,37 +16,6 @@ const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
|
16
16
|
const log_1 = require("../../internal/space/cronjob/log");
|
|
17
17
|
const log_2 = require("./log");
|
|
18
18
|
class FuseCronjob extends Base_1.default {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
/**
|
|
22
|
-
* Enable a cronjob.
|
|
23
|
-
*
|
|
24
|
-
* This is a wrapper around patchCronjobEnabled.
|
|
25
|
-
*
|
|
26
|
-
* @param orgName Name of the organization
|
|
27
|
-
* @param spaceName Name of the space
|
|
28
|
-
* @param cronjobId ID of the cronjob
|
|
29
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
30
|
-
* @returns The patched cronjob
|
|
31
|
-
*/
|
|
32
|
-
this.enableCronjob = (orgName, spaceName, cronjobId, exposeNextExecution = false) => {
|
|
33
|
-
return this.patchCronjobEnabled(orgName, spaceName, cronjobId, true, exposeNextExecution);
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Disable a cronjob.
|
|
37
|
-
*
|
|
38
|
-
* This is a wrapper around patchCronjobEnabled.
|
|
39
|
-
*
|
|
40
|
-
* @param orgName Name of the organization
|
|
41
|
-
* @param spaceName Name of the space
|
|
42
|
-
* @param cronjobId ID of the cronjob
|
|
43
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
44
|
-
* @returns The patched cronjob
|
|
45
|
-
*/
|
|
46
|
-
this.disableCronjob = (orgName, spaceName, cronjobId, exposeNextExecution = false) => {
|
|
47
|
-
return this.patchCronjobEnabled(orgName, spaceName, cronjobId, false, exposeNextExecution);
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
19
|
get cronjobLog() {
|
|
51
20
|
if (this._cronjobLog === undefined) {
|
|
52
21
|
this._cronjobLog = new log_2.FuseCronjobLog(this.options, this.axios);
|
|
@@ -68,9 +37,9 @@ class FuseCronjob extends Base_1.default {
|
|
|
68
37
|
* @returns The requested cronjob
|
|
69
38
|
*/
|
|
70
39
|
getCronjob(orgName_1, spaceName_1, cronjobId_1) {
|
|
71
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, exposeNextExecution = false) {
|
|
40
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, exposeNextExecution = false, raw) {
|
|
72
41
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}?nextExecution=${exposeNextExecution}`));
|
|
73
|
-
return resp.data;
|
|
42
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
74
43
|
});
|
|
75
44
|
}
|
|
76
45
|
/**
|
|
@@ -80,10 +49,10 @@ class FuseCronjob extends Base_1.default {
|
|
|
80
49
|
* @param cronjobId ID of the cronjob
|
|
81
50
|
* @returns Array of Unix timestamps
|
|
82
51
|
*/
|
|
83
|
-
getNextCronjobExecutions(orgName, spaceName, cronjobId) {
|
|
52
|
+
getNextCronjobExecutions(orgName, spaceName, cronjobId, raw) {
|
|
84
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
54
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/next`));
|
|
86
|
-
return resp.data;
|
|
55
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
87
56
|
});
|
|
88
57
|
}
|
|
89
58
|
/**
|
|
@@ -95,9 +64,9 @@ class FuseCronjob extends Base_1.default {
|
|
|
95
64
|
* @returns Created cronjob
|
|
96
65
|
*/
|
|
97
66
|
createCronjob(orgName_1, spaceName_1, createCronjob_1) {
|
|
98
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, createCronjob, exposeNextExecution = false) {
|
|
67
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, createCronjob, exposeNextExecution = false, raw) {
|
|
99
68
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs?nextExecution=${exposeNextExecution}`), createCronjob);
|
|
100
|
-
return resp.data;
|
|
69
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
101
70
|
});
|
|
102
71
|
}
|
|
103
72
|
/**
|
|
@@ -110,9 +79,9 @@ class FuseCronjob extends Base_1.default {
|
|
|
110
79
|
* @returns Updated cronjob
|
|
111
80
|
*/
|
|
112
81
|
updateCronjob(orgName_1, spaceName_1, cronjobId_1, createCronjob_1) {
|
|
113
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, createCronjob, exposeNextExecution = false) {
|
|
82
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, createCronjob, exposeNextExecution = false, raw) {
|
|
114
83
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}?nextExecution=${exposeNextExecution}`), createCronjob);
|
|
115
|
-
return resp.data;
|
|
84
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
116
85
|
});
|
|
117
86
|
}
|
|
118
87
|
/**
|
|
@@ -125,9 +94,9 @@ class FuseCronjob extends Base_1.default {
|
|
|
125
94
|
* @returns The patched cronjob
|
|
126
95
|
*/
|
|
127
96
|
patchCronjobExpression(orgName_1, spaceName_1, cronjobId_1, expression_1) {
|
|
128
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, expression, exposeNextExecution = false) {
|
|
97
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, expression, exposeNextExecution = false, raw) {
|
|
129
98
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/expression?nextExecution=${exposeNextExecution}`), { expression: expression });
|
|
130
|
-
return resp.data;
|
|
99
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
131
100
|
});
|
|
132
101
|
}
|
|
133
102
|
/**
|
|
@@ -140,20 +109,49 @@ class FuseCronjob extends Base_1.default {
|
|
|
140
109
|
* @returns The patched cronjob
|
|
141
110
|
*/
|
|
142
111
|
patchCronjobEnabled(orgName_1, spaceName_1, cronjobId_1, enabled_1) {
|
|
143
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, enabled, exposeNextExecution = false) {
|
|
112
|
+
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, enabled, exposeNextExecution = false, raw) {
|
|
144
113
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/enabled?nextExecution=${exposeNextExecution}`), { enabled });
|
|
145
|
-
return resp.data;
|
|
114
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
146
115
|
});
|
|
147
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Enable a cronjob.
|
|
119
|
+
*
|
|
120
|
+
* This is a wrapper around patchCronjobEnabled.
|
|
121
|
+
*
|
|
122
|
+
* @param orgName Name of the organization
|
|
123
|
+
* @param spaceName Name of the space
|
|
124
|
+
* @param cronjobId ID of the cronjob
|
|
125
|
+
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
126
|
+
* @returns The patched cronjob
|
|
127
|
+
*/
|
|
128
|
+
enableCronjob(orgName, spaceName, cronjobId, exposeNextExecution = false, raw) {
|
|
129
|
+
return this.patchCronjobEnabled(orgName, spaceName, cronjobId, true, exposeNextExecution, raw);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Disable a cronjob.
|
|
133
|
+
*
|
|
134
|
+
* This is a wrapper around patchCronjobEnabled.
|
|
135
|
+
*
|
|
136
|
+
* @param orgName Name of the organization
|
|
137
|
+
* @param spaceName Name of the space
|
|
138
|
+
* @param cronjobId ID of the cronjob
|
|
139
|
+
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
140
|
+
* @returns The patched cronjob
|
|
141
|
+
*/
|
|
142
|
+
disableCronjob(orgName, spaceName, cronjobId, exposeNextExecution = false, raw) {
|
|
143
|
+
return this.patchCronjobEnabled(orgName, spaceName, cronjobId, false, exposeNextExecution, raw);
|
|
144
|
+
}
|
|
148
145
|
/**
|
|
149
146
|
* Deletes a cronjob by its ID
|
|
150
147
|
* @param orgName Name of the organization
|
|
151
148
|
* @param spaceName Name of the space
|
|
152
149
|
* @param cronjobId ID of the cronjob
|
|
153
150
|
*/
|
|
154
|
-
deleteCronjob(orgName, spaceName, cronjobId) {
|
|
151
|
+
deleteCronjob(orgName, spaceName, cronjobId, raw) {
|
|
155
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}`));
|
|
153
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}`));
|
|
154
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
157
155
|
});
|
|
158
156
|
}
|
|
159
157
|
/**
|
|
@@ -167,8 +165,8 @@ class FuseCronjob extends Base_1.default {
|
|
|
167
165
|
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the returned cronjob objects
|
|
168
166
|
* @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)
|
|
169
167
|
*/
|
|
170
|
-
searchCronjobs(_a) {
|
|
171
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, exposeNextExecution = false, }) {
|
|
168
|
+
searchCronjobs(_a, raw_1) {
|
|
169
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, exposeNextExecution = false, }, raw) {
|
|
172
170
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
173
171
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
174
172
|
});
|
|
@@ -176,7 +174,7 @@ class FuseCronjob extends Base_1.default {
|
|
|
176
174
|
filters: filtersDTO,
|
|
177
175
|
sorting,
|
|
178
176
|
});
|
|
179
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
177
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
|
|
180
178
|
});
|
|
181
179
|
}
|
|
182
180
|
/**
|
|
@@ -187,13 +185,13 @@ class FuseCronjob extends Base_1.default {
|
|
|
187
185
|
* @returns Array of Unix timestamps
|
|
188
186
|
*/
|
|
189
187
|
resolveCronPatternWithTimezone(expression_1, timezone_1) {
|
|
190
|
-
return __awaiter(this, arguments, void 0, function* (expression, timezone, amount = 3) {
|
|
188
|
+
return __awaiter(this, arguments, void 0, function* (expression, timezone, amount = 3, raw) {
|
|
191
189
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/cron/resolve`), {
|
|
192
190
|
expression: expression,
|
|
193
191
|
timezone: timezone,
|
|
194
192
|
amount: amount,
|
|
195
193
|
});
|
|
196
|
-
return resp.data;
|
|
194
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
197
195
|
});
|
|
198
196
|
}
|
|
199
197
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../Base";
|
|
2
2
|
import { CronjobLogDto } from "../../../../../interfaces/fuse/space/cronjob/CronjobLog";
|
|
3
3
|
import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
|
|
4
4
|
export declare class FuseCronjobLog extends Base {
|
|
@@ -13,11 +13,13 @@ export declare class FuseCronjobLog extends Base {
|
|
|
13
13
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
14
14
|
* @returns Object containing an array of filtered cronjob logs as well as the total number of results found in the database (independent of limit and page)
|
|
15
15
|
*/
|
|
16
|
-
searchCronjobLogs({ orgName, spaceName, cronjobId, filters, sorting, limit, page, }: SearchParams & {
|
|
16
|
+
searchCronjobLogs<R extends boolean = false>({ orgName, spaceName, cronjobId, filters, sorting, limit, page, }: SearchParams & {
|
|
17
17
|
orgName: string;
|
|
18
18
|
spaceName: string;
|
|
19
19
|
cronjobId: string;
|
|
20
|
-
}
|
|
20
|
+
}, raw?: {
|
|
21
|
+
raw: R;
|
|
22
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<CronjobLogDto>>>;
|
|
21
23
|
/**
|
|
22
24
|
* Retrieves a cronjob log by it's ID
|
|
23
25
|
* @param orgName Name of the organization
|
|
@@ -26,6 +28,8 @@ export declare class FuseCronjobLog extends Base {
|
|
|
26
28
|
* @param cronjobLogId ID of the cronjob log
|
|
27
29
|
* @returns the cronjob log
|
|
28
30
|
*/
|
|
29
|
-
getCronjobLog(orgName: string, spaceName: string, cronjobId: string, cronjobLogId: string
|
|
31
|
+
getCronjobLog<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, cronjobLogId: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, CronjobLogDto>>;
|
|
30
34
|
protected getEndpoint(endpoint: string): string;
|
|
31
35
|
}
|
|
@@ -25,8 +25,8 @@ class FuseCronjobLog extends Base_1.default {
|
|
|
25
25
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
26
26
|
* @returns Object containing an array of filtered cronjob logs as well as the total number of results found in the database (independent of limit and page)
|
|
27
27
|
*/
|
|
28
|
-
searchCronjobLogs(_a) {
|
|
29
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, cronjobId, filters, sorting, limit = 25, page = 0, }) {
|
|
28
|
+
searchCronjobLogs(_a, raw_1) {
|
|
29
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, cronjobId, filters, sorting, limit = 25, page = 0, }, raw) {
|
|
30
30
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
31
31
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
32
32
|
});
|
|
@@ -34,7 +34,7 @@ class FuseCronjobLog extends Base_1.default {
|
|
|
34
34
|
filters: filtersDTO,
|
|
35
35
|
sorting,
|
|
36
36
|
});
|
|
37
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
37
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
@@ -45,10 +45,10 @@ class FuseCronjobLog extends Base_1.default {
|
|
|
45
45
|
* @param cronjobLogId ID of the cronjob log
|
|
46
46
|
* @returns the cronjob log
|
|
47
47
|
*/
|
|
48
|
-
getCronjobLog(orgName, spaceName, cronjobId, cronjobLogId) {
|
|
48
|
+
getCronjobLog(orgName, spaceName, cronjobId, cronjobLogId, raw) {
|
|
49
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
50
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/logs/${cronjobLogId}`));
|
|
51
|
-
return resp.data;
|
|
51
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
getEndpoint(endpoint) {
|