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
|
@@ -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) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { FuseSpace as IFuseSpace, FuseSpaceEntityPermission as SpaceEntityPermission, FuseSpacePermission as SpacePermission } from "../../../interfaces/fuse/space";
|
|
3
3
|
import { PaginatedResponse, SearchParams } from "../../../interfaces/global";
|
|
4
4
|
import { FuseCronjob } from "./cronjob";
|
|
@@ -11,20 +11,26 @@ export declare class FuseSpace extends Base {
|
|
|
11
11
|
* @param spaceName Name of the space
|
|
12
12
|
* @returns The requested space
|
|
13
13
|
*/
|
|
14
|
-
getSpace(orgName: string, spaceName: string
|
|
14
|
+
getSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
|
|
15
|
+
raw: R;
|
|
16
|
+
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
15
17
|
/**
|
|
16
18
|
* Creates a new Fuse space
|
|
17
19
|
* @param orgName Name of the organization
|
|
18
20
|
* @param name Name of the space to be created
|
|
19
21
|
* @returns The created space
|
|
20
22
|
*/
|
|
21
|
-
createSpace(orgName: string, name: string
|
|
23
|
+
createSpace<R extends boolean = false>(orgName: string, name: string, raw?: {
|
|
24
|
+
raw: R;
|
|
25
|
+
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
22
26
|
/**
|
|
23
27
|
* Deletes a space by its name
|
|
24
28
|
* @param orgName Name of the organization
|
|
25
29
|
* @param spaceName Name of the space
|
|
26
30
|
*/
|
|
27
|
-
deleteSpace(orgName: string, spaceName: string
|
|
31
|
+
deleteSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
28
34
|
/**
|
|
29
35
|
* Adds/Updates/Removes the permission a user has in the specified space.
|
|
30
36
|
* @param orgName Name of the organization
|
|
@@ -33,7 +39,9 @@ export declare class FuseSpace extends Base {
|
|
|
33
39
|
* @param permission New permission
|
|
34
40
|
* @returns The Fuse space with the updated permissions
|
|
35
41
|
*/
|
|
36
|
-
updateUserSpacePermission(orgName: string, spaceName: string, userId: string, permission: SpacePermission
|
|
42
|
+
updateUserSpacePermission<R extends boolean = false>(orgName: string, spaceName: string, userId: string, permission: SpacePermission, raw?: {
|
|
43
|
+
raw: R;
|
|
44
|
+
}): Promise<MaybeRaw<R, SpaceEntityPermission>>;
|
|
37
45
|
/**
|
|
38
46
|
* Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
|
|
39
47
|
* @param orgName Name of the organization
|
|
@@ -42,7 +50,9 @@ export declare class FuseSpace extends Base {
|
|
|
42
50
|
* @param permission New permission
|
|
43
51
|
* @returns The Fuse space with the updated permissions
|
|
44
52
|
*/
|
|
45
|
-
updateTeamSpacePermission(orgName: string, spaceName: string, teamName: string, permission: SpacePermission
|
|
53
|
+
updateTeamSpacePermission<R extends boolean = false>(orgName: string, spaceName: string, teamName: string, permission: SpacePermission, raw?: {
|
|
54
|
+
raw: R;
|
|
55
|
+
}): Promise<MaybeRaw<R, SpaceEntityPermission>>;
|
|
46
56
|
/**
|
|
47
57
|
* Retrieves all Fuse spaces of an organization which match the provided search filter(s). Will return all spaces of the organization if no filter is provided.
|
|
48
58
|
* @param orgName Name of the organization
|
|
@@ -52,9 +62,11 @@ export declare class FuseSpace extends Base {
|
|
|
52
62
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
53
63
|
* @returns Object containing an array of filtered Fuse spaces as well as the total number of results found in the database (independent of limit and page)
|
|
54
64
|
*/
|
|
55
|
-
searchSpaces({ orgName, filters, sorting, limit, page
|
|
65
|
+
searchSpaces<R extends boolean = false>({ orgName, filters, sorting, limit, page }: SearchParams & {
|
|
56
66
|
orgName: string;
|
|
57
|
-
}
|
|
67
|
+
}, raw?: {
|
|
68
|
+
raw: R;
|
|
69
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<IFuseSpace>>>;
|
|
58
70
|
/**
|
|
59
71
|
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
60
72
|
* @param orgName Name of the organization
|
|
@@ -65,10 +77,12 @@ export declare class FuseSpace extends Base {
|
|
|
65
77
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
66
78
|
* @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
|
|
67
79
|
*/
|
|
68
|
-
searchSpacePermissions({ orgName, spaceName, filters, sorting, limit, page
|
|
80
|
+
searchSpacePermissions<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
|
|
69
81
|
orgName: string;
|
|
70
82
|
spaceName: string;
|
|
71
|
-
}
|
|
83
|
+
}, raw?: {
|
|
84
|
+
raw: R;
|
|
85
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<SpaceEntityPermission>>>;
|
|
72
86
|
/**
|
|
73
87
|
* Updates the name of a space.
|
|
74
88
|
* @param orgName Name of the organization
|
|
@@ -76,6 +90,8 @@ export declare class FuseSpace extends Base {
|
|
|
76
90
|
* @param newSpaceName New name for the space
|
|
77
91
|
* @returns The updated space
|
|
78
92
|
*/
|
|
79
|
-
renameSpace(orgName: string, spaceName: string, newSpaceName: string
|
|
93
|
+
renameSpace<R extends boolean = false>(orgName: string, spaceName: string, newSpaceName: string, raw?: {
|
|
94
|
+
raw: R;
|
|
95
|
+
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
80
96
|
protected getEndpoint(endpoint: string): string;
|
|
81
97
|
}
|
|
@@ -27,10 +27,10 @@ class FuseSpace extends Base_1.default {
|
|
|
27
27
|
* @param spaceName Name of the space
|
|
28
28
|
* @returns The requested space
|
|
29
29
|
*/
|
|
30
|
-
getSpace(orgName, spaceName) {
|
|
30
|
+
getSpace(orgName, spaceName, raw) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
33
|
-
return resp.data;
|
|
33
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -39,10 +39,10 @@ class FuseSpace extends Base_1.default {
|
|
|
39
39
|
* @param name Name of the space to be created
|
|
40
40
|
* @returns The created space
|
|
41
41
|
*/
|
|
42
|
-
createSpace(orgName, name) {
|
|
42
|
+
createSpace(orgName, name, raw) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
|
|
45
|
-
return resp.data;
|
|
45
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
@@ -50,9 +50,10 @@ class FuseSpace extends Base_1.default {
|
|
|
50
50
|
* @param orgName Name of the organization
|
|
51
51
|
* @param spaceName Name of the space
|
|
52
52
|
*/
|
|
53
|
-
deleteSpace(orgName, spaceName) {
|
|
53
|
+
deleteSpace(orgName, spaceName, raw) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
55
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
56
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
/**
|
|
@@ -63,13 +64,13 @@ class FuseSpace extends Base_1.default {
|
|
|
63
64
|
* @param permission New permission
|
|
64
65
|
* @returns The Fuse space with the updated permissions
|
|
65
66
|
*/
|
|
66
|
-
updateUserSpacePermission(orgName, spaceName, userId, permission) {
|
|
67
|
+
updateUserSpacePermission(orgName, spaceName, userId, permission, raw) {
|
|
67
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
69
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
|
|
69
70
|
userId,
|
|
70
71
|
permission,
|
|
71
72
|
});
|
|
72
|
-
return resp.data;
|
|
73
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
@@ -80,13 +81,13 @@ class FuseSpace extends Base_1.default {
|
|
|
80
81
|
* @param permission New permission
|
|
81
82
|
* @returns The Fuse space with the updated permissions
|
|
82
83
|
*/
|
|
83
|
-
updateTeamSpacePermission(orgName, spaceName, teamName, permission) {
|
|
84
|
+
updateTeamSpacePermission(orgName, spaceName, teamName, permission, raw) {
|
|
84
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
86
|
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
|
|
86
87
|
teamName,
|
|
87
88
|
permission,
|
|
88
89
|
});
|
|
89
|
-
return resp.data;
|
|
90
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
/**
|
|
@@ -98,8 +99,8 @@ class FuseSpace extends Base_1.default {
|
|
|
98
99
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
99
100
|
* @returns Object containing an array of filtered Fuse spaces as well as the total number of results found in the database (independent of limit and page)
|
|
100
101
|
*/
|
|
101
|
-
searchSpaces(_a) {
|
|
102
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0,
|
|
102
|
+
searchSpaces(_a, raw_1) {
|
|
103
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
103
104
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
104
105
|
return new searchFilter_1.SearchFilterDTO(f);
|
|
105
106
|
});
|
|
@@ -107,7 +108,7 @@ class FuseSpace extends Base_1.default {
|
|
|
107
108
|
filters: filtersDTO,
|
|
108
109
|
sorting,
|
|
109
110
|
});
|
|
110
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
111
|
+
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));
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
/**
|
|
@@ -120,14 +121,14 @@ class FuseSpace extends Base_1.default {
|
|
|
120
121
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
121
122
|
* @returns Object containing an array of High5 Space Permissions and the total number of results found in the database (independent of limit and page)
|
|
122
123
|
*/
|
|
123
|
-
searchSpacePermissions(_a) {
|
|
124
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0,
|
|
124
|
+
searchSpacePermissions(_a, raw_1) {
|
|
125
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
125
126
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
126
127
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
|
|
127
128
|
filters: filtersDTO,
|
|
128
129
|
sorting: sorting,
|
|
129
130
|
});
|
|
130
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
131
|
+
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));
|
|
131
132
|
});
|
|
132
133
|
}
|
|
133
134
|
/**
|
|
@@ -137,12 +138,12 @@ class FuseSpace extends Base_1.default {
|
|
|
137
138
|
* @param newSpaceName New name for the space
|
|
138
139
|
* @returns The updated space
|
|
139
140
|
*/
|
|
140
|
-
renameSpace(orgName, spaceName, newSpaceName) {
|
|
141
|
+
renameSpace(orgName, spaceName, newSpaceName, raw) {
|
|
141
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
143
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
|
|
143
144
|
newSpaceName,
|
|
144
145
|
});
|
|
145
|
-
return resp.data;
|
|
146
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
146
147
|
});
|
|
147
148
|
}
|
|
148
149
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { High5OrganizationExecutionLogs } from "./log/index";
|
|
3
3
|
import { High5OrganizationExecutionStates } from "./status/index";
|
|
4
4
|
export declare class High5OrganizationExecute extends Base {
|
|
@@ -13,6 +13,8 @@ export declare class High5OrganizationExecute extends Base {
|
|
|
13
13
|
* @param high5ExecutionId ID of the stream execution
|
|
14
14
|
* @returns 204 No Content
|
|
15
15
|
*/
|
|
16
|
-
cancelExecution(orgName: string, spaceName: string, high5ExecutionId: string
|
|
16
|
+
cancelExecution<R extends boolean = false>(orgName: string, spaceName: string, high5ExecutionId: string, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
17
19
|
protected getEndpoint(endpoint: string): string;
|
|
18
20
|
}
|
|
@@ -33,9 +33,10 @@ class High5OrganizationExecute extends Base_1.default {
|
|
|
33
33
|
* @param high5ExecutionId ID of the stream execution
|
|
34
34
|
* @returns 204 No Content
|
|
35
35
|
*/
|
|
36
|
-
cancelExecution(orgName, spaceName, high5ExecutionId) {
|
|
36
|
+
cancelExecution(orgName, spaceName, high5ExecutionId, raw) {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/${high5ExecutionId}/cancel`));
|
|
38
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/execution/${high5ExecutionId}/cancel`));
|
|
39
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
42
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
3
3
|
import { High5ExecutionStatus } from "../../../../interfaces/high5/space/execution";
|
|
4
4
|
export declare class High5OrganizationExecutionStates extends Base {
|
|
@@ -11,8 +11,10 @@ export declare class High5OrganizationExecutionStates extends Base {
|
|
|
11
11
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
12
12
|
* @returns Object containing an array of Stream execution logs as well as the total number of results
|
|
13
13
|
*/
|
|
14
|
-
searchExecutionStates({ orgName, filters, sorting, limit, page
|
|
14
|
+
searchExecutionStates<R extends boolean = false>({ orgName, filters, sorting, limit, page }: SearchParams & {
|
|
15
15
|
orgName: string;
|
|
16
|
-
}
|
|
16
|
+
}, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<High5ExecutionStatus>>>;
|
|
17
19
|
protected getEndpoint(endpoint: string): string;
|
|
18
20
|
}
|
|
@@ -23,14 +23,14 @@ class High5OrganizationExecutionStates extends Base_1.default {
|
|
|
23
23
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
24
24
|
* @returns Object containing an array of Stream execution logs as well as the total number of results
|
|
25
25
|
*/
|
|
26
|
-
searchExecutionStates(_a) {
|
|
27
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0,
|
|
26
|
+
searchExecutionStates(_a, raw_1) {
|
|
27
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
28
28
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
29
29
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/execution/status/search?page=${page}&limit=${limit}`), {
|
|
30
30
|
filters: filtersDTO,
|
|
31
31
|
sorting: sorting,
|
|
32
32
|
});
|
|
33
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
33
|
+
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));
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
getEndpoint(endpoint) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import Base from "../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../Base";
|
|
2
2
|
import { Version } from "../../interfaces/global";
|
|
3
3
|
import { High5OrganizationExecute } from "./execution";
|
|
4
4
|
import { High5Internal } from "./internal";
|
|
5
5
|
import { High5JoinToken } from "./joinToken";
|
|
6
6
|
import { High5Space } from "./space";
|
|
7
|
+
import { High5OrgStat } from "./stat";
|
|
7
8
|
import { High5Wave } from "./wave";
|
|
8
9
|
export default class High5 extends Base {
|
|
9
10
|
get space(): High5Space;
|
|
@@ -16,10 +17,14 @@ export default class High5 extends Base {
|
|
|
16
17
|
private _joinToken?;
|
|
17
18
|
get execution(): High5OrganizationExecute;
|
|
18
19
|
private _execution?;
|
|
20
|
+
get stat(): High5OrgStat;
|
|
21
|
+
private _stat?;
|
|
19
22
|
/**
|
|
20
23
|
* Requests the endpoint version
|
|
21
24
|
* @returns Version object
|
|
22
25
|
*/
|
|
23
|
-
version(
|
|
26
|
+
version<R extends boolean = false>(raw?: {
|
|
27
|
+
raw: R;
|
|
28
|
+
}): Promise<MaybeRaw<R, Version>>;
|
|
24
29
|
protected getEndpoint(endpoint: string): string;
|
|
25
30
|
}
|
|
@@ -14,6 +14,7 @@ const execution_1 = require("./execution");
|
|
|
14
14
|
const internal_1 = require("./internal");
|
|
15
15
|
const joinToken_1 = require("./joinToken");
|
|
16
16
|
const space_1 = require("./space");
|
|
17
|
+
const stat_1 = require("./stat");
|
|
17
18
|
const wave_1 = require("./wave");
|
|
18
19
|
class High5 extends Base_1.default {
|
|
19
20
|
get space() {
|
|
@@ -46,14 +47,20 @@ class High5 extends Base_1.default {
|
|
|
46
47
|
}
|
|
47
48
|
return this._execution;
|
|
48
49
|
}
|
|
50
|
+
get stat() {
|
|
51
|
+
if (this._stat === undefined) {
|
|
52
|
+
this._stat = new stat_1.High5OrgStat(this.options, this.axios);
|
|
53
|
+
}
|
|
54
|
+
return this._stat;
|
|
55
|
+
}
|
|
49
56
|
/**
|
|
50
57
|
* Requests the endpoint version
|
|
51
58
|
* @returns Version object
|
|
52
59
|
*/
|
|
53
|
-
version() {
|
|
60
|
+
version(raw) {
|
|
54
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
62
|
const resp = yield this.axios.get(this.getEndpoint("/v1/version"));
|
|
56
|
-
return resp.data;
|
|
63
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
57
64
|
});
|
|
58
65
|
}
|
|
59
66
|
getEndpoint(endpoint) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { High5SpaceInternal } from "./space";
|
|
3
3
|
export declare class High5Internal extends Base {
|
|
4
4
|
get space(): High5SpaceInternal;
|
|
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 High5Internal 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) {
|