hcloud-sdk 16.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 +178 -51
- package/lib/Base.d.ts +2 -1
- package/lib/Hcloud.d.ts +6 -0
- package/lib/Hcloud.js +18 -0
- package/lib/helper/ValidationHelper.d.ts +74 -0
- package/lib/helper/ValidationHelper.js +360 -0
- package/lib/interfaces/auditor/index.d.ts +17 -2
- package/lib/interfaces/auditor/index.js +12 -0
- 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/location/index.js +2 -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/frontend/config/index.d.ts +1 -0
- package/lib/interfaces/fuse/space/index.d.ts +1 -0
- package/lib/interfaces/global/Products.d.ts +3 -1
- package/lib/interfaces/global/Products.js +2 -0
- package/lib/interfaces/global/Views.d.ts +2 -1
- package/lib/interfaces/global/Views.js +1 -0
- package/lib/interfaces/high5/execution/index.d.ts +23 -2
- package/lib/interfaces/high5/execution/index.js +2 -0
- package/lib/interfaces/high5/index.d.ts +7 -7
- package/lib/interfaces/high5/index.js +7 -7
- package/lib/interfaces/high5/space/database/document/index.d.ts +34 -0
- package/lib/interfaces/high5/space/database/document/index.js +14 -0
- package/lib/interfaces/high5/space/database/index.d.ts +12 -0
- 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/event/stream/node/index.d.ts +10 -2
- package/lib/interfaces/high5/space/event/stream/node/index.js +6 -1
- package/lib/interfaces/high5/space/execution/index.d.ts +56 -2
- package/lib/interfaces/high5/space/execution/index.js +8 -0
- package/lib/interfaces/high5/space/index.d.ts +2 -0
- 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/space/pool/index.d.ts +5 -7
- package/lib/interfaces/high5/space/pool/index.js +0 -7
- package/lib/interfaces/high5/space/webhook/index.d.ts +3 -1
- package/lib/interfaces/high5/stats.d.ts +21 -0
- package/lib/interfaces/high5/stats.js +2 -0
- package/lib/interfaces/high5/wave/index.d.ts +8 -3
- package/lib/interfaces/idp/index.d.ts +1 -0
- package/lib/interfaces/idp/index.js +1 -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 -0
- package/lib/interfaces/idp/organization/member/index.d.ts +2 -0
- package/lib/interfaces/idp/organization/service-accounts.d.ts +8 -0
- package/lib/interfaces/idp/organization/service-accounts.js +2 -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/GeneralSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/GeneralSettings.js +1 -0
- 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 +8 -2
- package/lib/interfaces/idp/user/Scopes.js +9 -0
- 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 +98 -9
- package/lib/interfaces/nats/index.js +136 -19
- 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 +26 -7
- package/lib/service/agent/context/index.js +27 -12
- 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/DaliAvatar.d.ts +12 -0
- package/lib/service/dali/DaliAvatar.js +20 -0
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +32 -0
- package/lib/service/dali/avatar/DaliCosmoSpace.js +59 -0
- 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 +32 -0
- package/lib/service/dali/avatar/DaliServiceAccount.js +59 -0
- 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/high5/space/database/document/index.d.ts +74 -0
- package/lib/service/high5/space/database/document/index.js +112 -0
- 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/high5/space/database/index.d.ts +65 -0
- package/lib/service/high5/space/database/index.js +102 -0
- 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 +5 -3
- 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 +22 -7
- package/lib/service/high5/space/execution/index.js +23 -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 +18 -7
- package/lib/service/high5/space/execution/status/index.js +20 -8
- package/lib/service/high5/space/index.d.ts +56 -18
- package/lib/service/high5/space/index.js +65 -27
- 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 +52 -24
- 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 +25 -5
- package/lib/service/idp/organization/index.js +29 -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 +21 -8
- package/lib/service/idp/organization/member/index.js +16 -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 +76 -0
- package/lib/service/idp/organization/service-accounts/index.js +109 -0
- 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 +30 -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 +3 -3
- 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 -18
- package/lib/service/nats/index.js +58 -44
- package/lib/service/shorts/index.d.ts +18 -0
- package/lib/service/shorts/index.js +38 -0
- package/lib/service/shorts/internal/index.d.ts +72 -0
- package/lib/service/shorts/internal/index.js +104 -0
- package/lib/utils/bouncer/features/Provider.js +0 -3
- package/package.json +22 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
3
3
|
export declare class DaliOrganization extends Base {
|
|
4
4
|
/**
|
|
@@ -6,18 +6,24 @@ export declare class DaliOrganization extends Base {
|
|
|
6
6
|
* @param orgName Name of the organization
|
|
7
7
|
* @returns Public URL of the created avatar
|
|
8
8
|
*/
|
|
9
|
-
createAvatar(orgName: string
|
|
9
|
+
createAvatar<R extends boolean = false>(orgName: string, raw?: {
|
|
10
|
+
raw: R;
|
|
11
|
+
}): Promise<MaybeRaw<R, AvatarCreated>>;
|
|
10
12
|
/**
|
|
11
13
|
* Deletes the avatar of the organization from cloud storage. If you want to update it, use updateAvatar() instead.
|
|
12
14
|
* @param orgName Name of the organization
|
|
13
15
|
*/
|
|
14
|
-
deleteAvatar(orgName: string
|
|
16
|
+
deleteAvatar<R extends boolean = false>(orgName: string, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, string>>;
|
|
15
19
|
/**
|
|
16
20
|
* Updates the avatar of the specified organization.
|
|
17
21
|
* @param orgName Name of the organization
|
|
18
22
|
* @param file Image as Javascript File
|
|
19
23
|
* @returns Public URL of the new avatar
|
|
20
24
|
*/
|
|
21
|
-
updateAvatar(orgName: string, file: File
|
|
25
|
+
updateAvatar<R extends boolean = false>(orgName: string, file: File, raw?: {
|
|
26
|
+
raw: R;
|
|
27
|
+
}): Promise<MaybeRaw<R, AvatarCreated>>;
|
|
22
28
|
protected getEndpoint(endpoint: string): string;
|
|
23
29
|
}
|
|
@@ -17,19 +17,20 @@ class DaliOrganization extends Base_1.default {
|
|
|
17
17
|
* @param orgName Name of the organization
|
|
18
18
|
* @returns Public URL of the created avatar
|
|
19
19
|
*/
|
|
20
|
-
createAvatar(orgName) {
|
|
20
|
+
createAvatar(orgName, raw) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}`), {});
|
|
23
|
-
return resp.data;
|
|
23
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Deletes the avatar of the organization from cloud storage. If you want to update it, use updateAvatar() instead.
|
|
28
28
|
* @param orgName Name of the organization
|
|
29
29
|
*/
|
|
30
|
-
deleteAvatar(orgName) {
|
|
30
|
+
deleteAvatar(orgName, raw) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}`));
|
|
32
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}`));
|
|
33
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
@@ -38,14 +39,14 @@ class DaliOrganization extends Base_1.default {
|
|
|
38
39
|
* @param file Image as Javascript File
|
|
39
40
|
* @returns Public URL of the new avatar
|
|
40
41
|
*/
|
|
41
|
-
updateAvatar(orgName, file) {
|
|
42
|
+
updateAvatar(orgName, file, raw) {
|
|
42
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
44
|
const data = new FormData();
|
|
44
45
|
data.append("avatar", file);
|
|
45
46
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}`), data, {
|
|
46
47
|
headers: { "Content-Type": "multipart/form-data" },
|
|
47
48
|
});
|
|
48
|
-
return resp.data;
|
|
49
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
getEndpoint(endpoint) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { AvatarCreated } from "../../../interfaces/dali";
|
|
3
|
+
export declare class DaliServiceAccount extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a default avatar for the specified service account.
|
|
6
|
+
* @param orgName Name of the organization
|
|
7
|
+
* @param serviceAccountId ID of the service account
|
|
8
|
+
* @returns Public URL of the created avatar
|
|
9
|
+
*/
|
|
10
|
+
createAvatar<R extends boolean = false>(orgName: string, serviceAccountId: string, raw?: {
|
|
11
|
+
raw: R;
|
|
12
|
+
}): Promise<MaybeRaw<R, AvatarCreated>>;
|
|
13
|
+
/**
|
|
14
|
+
* Deletes the avatar of the service account from cloud storage. If you want to update it instead, use updateAvatar().
|
|
15
|
+
* @param orgName Name of the organization
|
|
16
|
+
* @param serviceAccountId ID of the service account
|
|
17
|
+
*/
|
|
18
|
+
deleteAvatar<R extends boolean = false>(orgName: string, serviceAccountId: string, raw?: {
|
|
19
|
+
raw: R;
|
|
20
|
+
}): Promise<MaybeRaw<R, string>>;
|
|
21
|
+
/**
|
|
22
|
+
* Updates the avatar of the specified service account.
|
|
23
|
+
* @param orgName Name of the organization
|
|
24
|
+
* @param serviceAccountId ID of the service account
|
|
25
|
+
* @param file Image as Javascript File
|
|
26
|
+
* @returns Public URL of the new avatar
|
|
27
|
+
*/
|
|
28
|
+
updateAvatar<R extends boolean = false>(orgName: string, serviceAccountId: string, file: File, raw?: {
|
|
29
|
+
raw: R;
|
|
30
|
+
}): Promise<MaybeRaw<R, AvatarCreated>>;
|
|
31
|
+
protected getEndpoint(endpoint: string): string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.DaliServiceAccount = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class DaliServiceAccount extends Base_1.default {
|
|
15
|
+
/**
|
|
16
|
+
* Creates a default avatar for the specified service account.
|
|
17
|
+
* @param orgName Name of the organization
|
|
18
|
+
* @param serviceAccountId ID of the service account
|
|
19
|
+
* @returns Public URL of the created avatar
|
|
20
|
+
*/
|
|
21
|
+
createAvatar(orgName, serviceAccountId, raw) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/service-accounts/${serviceAccountId}`), {});
|
|
24
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Deletes the avatar of the service account from cloud storage. If you want to update it instead, use updateAvatar().
|
|
29
|
+
* @param orgName Name of the organization
|
|
30
|
+
* @param serviceAccountId ID of the service account
|
|
31
|
+
*/
|
|
32
|
+
deleteAvatar(orgName, serviceAccountId, raw) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/service-accounts/${serviceAccountId}`));
|
|
35
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Updates the avatar of the specified service account.
|
|
40
|
+
* @param orgName Name of the organization
|
|
41
|
+
* @param serviceAccountId ID of the service account
|
|
42
|
+
* @param file Image as Javascript File
|
|
43
|
+
* @returns Public URL of the new avatar
|
|
44
|
+
*/
|
|
45
|
+
updateAvatar(orgName, serviceAccountId, 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}/service-accounts/${serviceAccountId}`), 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.DaliServiceAccount = DaliServiceAccount;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
3
3
|
export declare class DaliTeam extends Base {
|
|
4
4
|
/**
|
|
@@ -7,13 +7,17 @@ export declare class DaliTeam extends Base {
|
|
|
7
7
|
* @param teamName Name of the team
|
|
8
8
|
* @returns Public URL of the created avatar
|
|
9
9
|
*/
|
|
10
|
-
createAvatar(orgName: string, teamName: string
|
|
10
|
+
createAvatar<R extends boolean = false>(orgName: string, teamName: string, raw?: {
|
|
11
|
+
raw: R;
|
|
12
|
+
}): Promise<MaybeRaw<R, AvatarCreated>>;
|
|
11
13
|
/**
|
|
12
14
|
* Deletes the avatar of the team from cloud storage. If you want to update it instead, use updateAvatar().
|
|
13
15
|
* @param orgName Name of the organization
|
|
14
16
|
* @param teamName Name of the team
|
|
15
17
|
*/
|
|
16
|
-
deleteAvatar(orgName: string, teamName: string
|
|
18
|
+
deleteAvatar<R extends boolean = false>(orgName: string, teamName: string, raw?: {
|
|
19
|
+
raw: R;
|
|
20
|
+
}): Promise<MaybeRaw<R, string>>;
|
|
17
21
|
/**
|
|
18
22
|
* Updates the avatar of the specified team.
|
|
19
23
|
* @param orgName Name of the organization
|
|
@@ -21,6 +25,8 @@ export declare class DaliTeam extends Base {
|
|
|
21
25
|
* @param file Image as Javascript File
|
|
22
26
|
* @returns Public URL of the new avatar
|
|
23
27
|
*/
|
|
24
|
-
updateAvatar(orgName: string, teamName: string, file: File
|
|
28
|
+
updateAvatar<R extends boolean = false>(orgName: string, teamName: string, file: File, raw?: {
|
|
29
|
+
raw: R;
|
|
30
|
+
}): Promise<MaybeRaw<R, AvatarCreated>>;
|
|
25
31
|
protected getEndpoint(endpoint: string): string;
|
|
26
32
|
}
|
|
@@ -18,10 +18,10 @@ class DaliTeam extends Base_1.default {
|
|
|
18
18
|
* @param teamName Name of the team
|
|
19
19
|
* @returns Public URL of the created avatar
|
|
20
20
|
*/
|
|
21
|
-
createAvatar(orgName, teamName) {
|
|
21
|
+
createAvatar(orgName, teamName, raw) {
|
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/teams/${teamName}`), {});
|
|
24
|
-
return resp.data;
|
|
24
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
@@ -29,9 +29,10 @@ class DaliTeam extends Base_1.default {
|
|
|
29
29
|
* @param orgName Name of the organization
|
|
30
30
|
* @param teamName Name of the team
|
|
31
31
|
*/
|
|
32
|
-
deleteAvatar(orgName, teamName) {
|
|
32
|
+
deleteAvatar(orgName, teamName, raw) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/teams/${teamName}`));
|
|
34
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/teams/${teamName}`));
|
|
35
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
@@ -41,14 +42,14 @@ class DaliTeam extends Base_1.default {
|
|
|
41
42
|
* @param file Image as Javascript File
|
|
42
43
|
* @returns Public URL of the new avatar
|
|
43
44
|
*/
|
|
44
|
-
updateAvatar(orgName, teamName, file) {
|
|
45
|
+
updateAvatar(orgName, teamName, file, raw) {
|
|
45
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
47
|
const data = new FormData();
|
|
47
48
|
data.append("avatar", file);
|
|
48
49
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/teams/${teamName}`), data, {
|
|
49
50
|
headers: { "Content-Type": "multipart/form-data" },
|
|
50
51
|
});
|
|
51
|
-
return resp.data;
|
|
52
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
getEndpoint(endpoint) {
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { AvatarCreated } from "../../../interfaces/dali";
|
|
3
3
|
export declare class DaliUser extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* Creates a default avatar for the requesting user.
|
|
6
6
|
* @returns Public URL of the created avatar
|
|
7
7
|
*/
|
|
8
|
-
createAvatar(
|
|
8
|
+
createAvatar<R extends boolean = false>(raw?: {
|
|
9
|
+
raw: R;
|
|
10
|
+
}): Promise<MaybeRaw<R, AvatarCreated>>;
|
|
9
11
|
/**
|
|
10
12
|
* Deletes the avatar of the requesting user from cloud storage. If you want to update it instead, use updateAvatar().
|
|
11
13
|
*/
|
|
12
|
-
deleteAvatar(
|
|
14
|
+
deleteAvatar<R extends boolean = false>(raw?: {
|
|
15
|
+
raw: R;
|
|
16
|
+
}): Promise<MaybeRaw<R, string>>;
|
|
13
17
|
/**
|
|
14
18
|
* Updates the avatar of the requesting user.
|
|
15
19
|
* @param file Image as Javascript File
|
|
16
20
|
* @returns Public URL of the new avatar
|
|
17
21
|
*/
|
|
18
|
-
updateAvatar(file: File
|
|
22
|
+
updateAvatar<R extends boolean = false>(file: File, raw?: {
|
|
23
|
+
raw: R;
|
|
24
|
+
}): Promise<MaybeRaw<R, AvatarCreated>>;
|
|
19
25
|
protected getEndpoint(endpoint: string): string;
|
|
20
26
|
}
|
|
@@ -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
|
}
|