hcloud-sdk 18.0.0 → 19.1.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 +17 -184
- package/lib/Hcloud.d.ts +18 -3
- package/lib/Hcloud.js +113 -21
- package/lib/helper/ErrorHelper.js +5 -2
- package/lib/helper/ValidationHelper.d.ts +6 -4
- package/lib/helper/ValidationHelper.js +30 -18
- package/lib/interfaces/agent/index.d.ts +1 -0
- package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
- package/lib/interfaces/agent/logging/index.d.ts +2 -0
- package/lib/interfaces/{fuse → agent/logging}/index.js +2 -3
- package/lib/interfaces/agent/logging/log-collector.d.ts +35 -0
- package/lib/interfaces/agent/logging/log-collector.js +2 -0
- package/lib/interfaces/agent/module/index.d.ts +7 -0
- package/lib/interfaces/agent/module/index.js +2 -0
- package/lib/interfaces/auditor/index.d.ts +0 -1
- package/lib/interfaces/auditor/index.js +0 -1
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/cosmo/asset/index.d.ts +45 -9
- package/lib/interfaces/cosmo/asset/index.js +9 -1
- package/lib/interfaces/cosmo/comment/index.d.ts +18 -1
- package/lib/interfaces/cosmo/comment/index.js +13 -1
- package/lib/interfaces/cosmo/event/index.d.ts +34 -5
- package/lib/interfaces/cosmo/event/index.js +16 -2
- package/lib/interfaces/cosmo/share/index.d.ts +100 -8
- package/lib/interfaces/cosmo/share/index.js +21 -0
- package/lib/interfaces/cosmo/space/index.d.ts +6 -0
- package/lib/interfaces/cosmo/stats/index.d.ts +11 -0
- package/lib/interfaces/cosmo/stats/index.js +2 -0
- package/lib/interfaces/cosmo/tag/tag.d.ts +3 -1
- package/lib/interfaces/global/Products.d.ts +0 -1
- package/lib/interfaces/global/Products.js +0 -1
- package/lib/interfaces/global/Views.d.ts +0 -1
- package/lib/interfaces/global/Views.js +0 -1
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +5 -1
- package/lib/interfaces/high5/space/job/JobLog.d.ts +10 -6
- package/lib/interfaces/high5/space/job/index.d.ts +65 -20
- package/lib/interfaces/high5/space/job/index.js +9 -6
- package/lib/interfaces/high5/wave/dependentInputs.d.ts +42 -0
- package/lib/interfaces/high5/wave/dependentInputs.js +144 -0
- package/lib/interfaces/high5/wave/dependentInputsValidation.d.ts +22 -0
- package/lib/interfaces/high5/wave/dependentInputsValidation.js +220 -0
- package/lib/interfaces/high5/wave/index.d.ts +9 -0
- package/lib/interfaces/high5/wave/index.js +4 -0
- package/lib/interfaces/idp/index.d.ts +3 -3
- package/lib/interfaces/idp/index.js +3 -3
- package/lib/interfaces/idp/oauth/device.d.ts +18 -0
- package/lib/interfaces/idp/oauth/device.js +2 -0
- package/lib/interfaces/idp/oauth/index.d.ts +17 -4
- package/lib/interfaces/idp/organization/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/index.js +1 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +4 -0
- package/lib/interfaces/idp/user/Message.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -9
- package/lib/interfaces/idp/user/Scopes.js +0 -12
- package/lib/interfaces/idp/user/index.d.ts +3 -0
- package/lib/interfaces/mailer/index.d.ts +20 -1
- package/lib/interfaces/mailer/index.js +14 -2
- package/lib/interfaces/nats/index.d.ts +30 -32
- package/lib/interfaces/nats/index.js +103 -117
- package/lib/interfaces/shorts/index.d.ts +7 -0
- package/lib/interfaces/shorts/index.js +6 -0
- package/lib/service/agent/bundle/dev/index.js +4 -1
- package/lib/service/agent/bundle/index.js +4 -1
- package/lib/service/agent/context/index.js +4 -1
- package/lib/service/agent/index.d.ts +6 -0
- package/lib/service/agent/index.js +18 -1
- package/lib/service/agent/installer/index.js +4 -1
- package/lib/service/agent/logging/index.d.ts +69 -0
- package/lib/service/agent/logging/index.js +117 -0
- package/lib/service/agent/module/index.d.ts +36 -0
- package/lib/service/agent/module/index.js +65 -0
- package/lib/service/auditor/index.js +4 -1
- package/lib/service/auditor/internal/index.js +4 -1
- package/lib/service/bouncer/features/index.js +4 -1
- package/lib/service/bouncer/index.js +5 -2
- package/lib/service/cosmo/asset/index.d.ts +49 -3
- package/lib/service/cosmo/asset/index.js +111 -5
- package/lib/service/cosmo/comment/index.d.ts +10 -37
- package/lib/service/cosmo/comment/index.js +20 -43
- package/lib/service/cosmo/event/index.js +4 -1
- package/lib/service/cosmo/folder/index.js +4 -1
- package/lib/service/cosmo/index.d.ts +3 -0
- package/lib/service/cosmo/index.js +11 -1
- package/lib/service/cosmo/internal/index.js +4 -1
- package/lib/service/cosmo/internal/space/index.js +4 -1
- package/lib/service/cosmo/location/index.js +4 -1
- package/lib/service/cosmo/namespace/index.d.ts +15 -1
- package/lib/service/cosmo/namespace/index.js +21 -1
- package/lib/service/cosmo/organization/index.js +4 -1
- package/lib/service/cosmo/permissions/index.js +4 -1
- package/lib/service/cosmo/production/index.js +4 -1
- package/lib/service/cosmo/share/index.d.ts +55 -29
- package/lib/service/cosmo/share/index.js +71 -35
- package/lib/service/cosmo/space/index.d.ts +28 -1
- package/lib/service/cosmo/space/index.js +45 -1
- package/lib/service/cosmo/stats/index.d.ts +35 -0
- package/lib/service/cosmo/stats/index.js +58 -0
- package/lib/service/cosmo/tag/index.d.ts +13 -0
- package/lib/service/cosmo/tag/index.js +22 -1
- package/lib/service/dali/DaliAvatar.d.ts +0 -6
- package/lib/service/dali/DaliAvatar.js +4 -11
- package/lib/service/dali/avatar/DaliCosmoSpace.js +4 -1
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +2 -1
- package/lib/service/dali/avatar/DaliHigh5Pool.js +5 -2
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +2 -1
- package/lib/service/dali/avatar/DaliHigh5Space.js +5 -2
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +2 -1
- package/lib/service/dali/avatar/DaliOAuthApp.js +5 -2
- package/lib/service/dali/avatar/DaliOrganization.d.ts +2 -1
- package/lib/service/dali/avatar/DaliOrganization.js +5 -2
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +1 -1
- package/lib/service/dali/avatar/DaliServiceAccount.js +6 -3
- package/lib/service/dali/avatar/DaliTeam.d.ts +2 -1
- package/lib/service/dali/avatar/DaliTeam.js +5 -2
- package/lib/service/dali/avatar/DaliUser.d.ts +2 -1
- package/lib/service/dali/avatar/DaliUser.js +5 -2
- package/lib/service/dali/index.js +4 -1
- package/lib/service/high5/execution/index.js +4 -1
- package/lib/service/high5/execution/log/index.js +4 -1
- package/lib/service/high5/execution/status/index.js +4 -1
- package/lib/service/high5/index.js +4 -1
- package/lib/service/high5/internal/index.js +4 -1
- package/lib/service/high5/internal/space/index.js +4 -1
- package/lib/service/high5/internal/space/job/index.js +4 -1
- package/lib/service/high5/internal/space/job/log/index.js +4 -1
- package/lib/service/high5/joinToken/index.js +4 -1
- package/lib/service/high5/space/database/document/array/index.js +4 -1
- package/lib/service/high5/space/database/document/index.js +4 -1
- package/lib/service/high5/space/database/document/number/index.js +4 -1
- package/lib/service/high5/space/database/index.js +4 -1
- package/lib/service/high5/space/event/index.js +4 -1
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +4 -1
- package/lib/service/high5/space/event/stream/design/index.js +6 -3
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +4 -1
- package/lib/service/high5/space/event/stream/index.js +4 -1
- package/lib/service/high5/space/execution/index.d.ts +2 -1
- package/lib/service/high5/space/execution/index.js +7 -3
- package/lib/service/high5/space/execution/log/index.js +4 -1
- package/lib/service/high5/space/execution/status/index.js +4 -1
- package/lib/service/high5/space/index.d.ts +10 -0
- package/lib/service/high5/space/index.js +25 -5
- package/lib/service/high5/space/job/index.js +4 -1
- package/lib/service/high5/space/job/log/index.js +4 -1
- package/lib/service/high5/space/node/index.js +4 -1
- package/lib/service/high5/space/pool/index.d.ts +11 -0
- package/lib/service/high5/space/pool/index.js +22 -1
- package/lib/service/high5/space/secret/index.js +4 -1
- package/lib/service/high5/space/stat/index.js +4 -1
- package/lib/service/high5/space/wave/index.js +4 -1
- package/lib/service/high5/space/webhook/index.js +4 -1
- package/lib/service/high5/space/webhook/log/index.js +4 -1
- package/lib/service/high5/stat/index.js +4 -1
- package/lib/service/high5/wave/index.js +4 -1
- package/lib/service/high5/wave/s3/index.js +5 -2
- package/lib/service/idp/guest/index.js +4 -1
- package/lib/service/idp/index.js +4 -1
- package/lib/service/idp/internal/index.js +4 -1
- package/lib/service/idp/oauth/device.d.ts +131 -0
- package/lib/service/idp/oauth/device.js +177 -0
- package/lib/service/idp/oauth/index.d.ts +3 -0
- package/lib/service/idp/oauth/index.js +11 -1
- package/lib/service/idp/organization/index.d.ts +9 -0
- package/lib/service/idp/organization/index.js +22 -3
- package/lib/service/idp/organization/license/index.js +4 -1
- package/lib/service/idp/organization/member/index.js +5 -2
- package/lib/service/idp/organization/member/invitations/index.d.ts +19 -0
- package/lib/service/idp/organization/member/invitations/index.js +23 -1
- package/lib/service/idp/organization/service-accounts/index.d.ts +11 -1
- package/lib/service/idp/organization/service-accounts/index.js +22 -2
- package/lib/service/idp/organization/settings/domain/index.js +4 -1
- package/lib/service/idp/organization/settings/domain/saml/index.js +4 -1
- package/lib/service/idp/organization/settings/index.js +4 -1
- package/lib/service/idp/organization/settings/oauth/index.d.ts +10 -0
- package/lib/service/idp/organization/settings/oauth/index.js +21 -1
- package/lib/service/idp/organization/stat/index.js +4 -1
- package/lib/service/idp/organization/team/index.d.ts +10 -0
- package/lib/service/idp/organization/team/index.js +21 -1
- package/lib/service/idp/registration/index.js +4 -1
- package/lib/service/idp/user/index.d.ts +8 -0
- package/lib/service/idp/user/index.js +20 -3
- package/lib/service/idp/user/license/index.js +4 -1
- package/lib/service/idp/user/message/index.d.ts +1 -0
- package/lib/service/idp/user/message/index.js +4 -1
- package/lib/service/idp/user/password/index.js +4 -1
- package/lib/service/idp/user/settings/connections/index.js +4 -1
- package/lib/service/idp/user/settings/general/index.js +4 -1
- package/lib/service/idp/user/settings/index.js +4 -1
- package/lib/service/idp/user/settings/notifications/index.js +4 -1
- package/lib/service/idp/user/settings/oauthApps/index.js +4 -1
- package/lib/service/idp/user/settings/pats/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +4 -1
- package/lib/service/mailer/index.js +5 -2
- package/lib/service/mailer/internal/index.d.ts +2 -2
- package/lib/service/mailer/internal/index.js +5 -2
- package/lib/service/mothership/index.js +4 -1
- package/lib/service/nats/index.d.ts +7 -0
- package/lib/service/nats/index.js +19 -1
- package/lib/service/shorts/index.js +4 -1
- package/lib/service/shorts/internal/index.d.ts +6 -3
- package/lib/service/shorts/internal/index.js +20 -6
- package/lib/utils/bouncer/features/Provider.js +0 -1
- package/package.json +2 -2
- package/lib/interfaces/fuse/index.d.ts +0 -3
- package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +0 -38
- package/lib/interfaces/fuse/space/cronjob/Cronjob.js +0 -8
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +0 -16
- package/lib/interfaces/fuse/space/index.d.ts +0 -22
- package/lib/interfaces/fuse/space/index.js +0 -11
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -32
- package/lib/service/dali/avatar/DaliFuseSpace.js +0 -59
- package/lib/service/fuse/index.d.ts +0 -20
- package/lib/service/fuse/index.js +0 -48
- package/lib/service/fuse/internal/index.d.ts +0 -10
- package/lib/service/fuse/internal/index.js +0 -32
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +0 -7
- package/lib/service/fuse/internal/space/cronjob/index.js +0 -17
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +0 -17
- package/lib/service/fuse/internal/space/cronjob/log/index.js +0 -34
- package/lib/service/fuse/internal/space/index.d.ts +0 -26
- package/lib/service/fuse/internal/space/index.js +0 -51
- package/lib/service/fuse/space/cronjob/index.d.ts +0 -145
- package/lib/service/fuse/space/cronjob/index.js +0 -201
- package/lib/service/fuse/space/cronjob/log/index.d.ts +0 -35
- package/lib/service/fuse/space/cronjob/log/index.js +0 -58
- package/lib/service/fuse/space/index.d.ts +0 -97
- package/lib/service/fuse/space/index.js +0 -153
- /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/cloudwatch.js} +0 -0
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FuseCronjob = void 0;
|
|
13
|
-
const Base_1 = require("../../../../Base");
|
|
14
|
-
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
15
|
-
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
|
-
const log_1 = require("../../internal/space/cronjob/log");
|
|
17
|
-
const log_2 = require("./log");
|
|
18
|
-
class FuseCronjob extends Base_1.default {
|
|
19
|
-
get cronjobLog() {
|
|
20
|
-
if (this._cronjobLog === undefined) {
|
|
21
|
-
this._cronjobLog = new log_2.FuseCronjobLog(this.options, this.axios);
|
|
22
|
-
}
|
|
23
|
-
return this._cronjobLog;
|
|
24
|
-
}
|
|
25
|
-
get cronjobLogInternal() {
|
|
26
|
-
if (this._cronjobLogInternal === undefined) {
|
|
27
|
-
this._cronjobLogInternal = new log_1.FuseCronjobLogInternal(this.options, this.axios);
|
|
28
|
-
}
|
|
29
|
-
return this._cronjobLogInternal;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Retrieves a cronjob by it's ID.
|
|
33
|
-
* @param orgName Name of the organization
|
|
34
|
-
* @param spaceName Name of the Fuse space
|
|
35
|
-
* @param cronjobId ID of the cronjob
|
|
36
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
37
|
-
* @returns The requested cronjob
|
|
38
|
-
*/
|
|
39
|
-
getCronjob(orgName_1, spaceName_1, cronjobId_1) {
|
|
40
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, exposeNextExecution = false, raw) {
|
|
41
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}?nextExecution=${exposeNextExecution}`));
|
|
42
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves the next n cronjob executions as Unix timestamps (in milliseconds).
|
|
47
|
-
* @param orgName Name of the organization
|
|
48
|
-
* @param spaceName Name of the space
|
|
49
|
-
* @param cronjobId ID of the cronjob
|
|
50
|
-
* @returns Array of Unix timestamps
|
|
51
|
-
*/
|
|
52
|
-
getNextCronjobExecutions(orgName, spaceName, cronjobId, raw) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/next`));
|
|
55
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Creates a new cronjob in the specified Fuse space.
|
|
60
|
-
* @param orgName Name of the organisation
|
|
61
|
-
* @param spaceName Name of the Fuse space
|
|
62
|
-
* @param createCronjob Cronjob to be created
|
|
63
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
64
|
-
* @returns Created cronjob
|
|
65
|
-
*/
|
|
66
|
-
createCronjob(orgName_1, spaceName_1, createCronjob_1) {
|
|
67
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, createCronjob, exposeNextExecution = false, raw) {
|
|
68
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs?nextExecution=${exposeNextExecution}`), createCronjob);
|
|
69
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Updates an existing cronjob.
|
|
74
|
-
* @param orgName Name of the organization
|
|
75
|
-
* @param spaceName Name of the space
|
|
76
|
-
* @param cronjobId ID of the cronjob
|
|
77
|
-
* @param createCronjob Cronjob to be updated
|
|
78
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
79
|
-
* @returns Updated cronjob
|
|
80
|
-
*/
|
|
81
|
-
updateCronjob(orgName_1, spaceName_1, cronjobId_1, createCronjob_1) {
|
|
82
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, createCronjob, exposeNextExecution = false, raw) {
|
|
83
|
-
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}?nextExecution=${exposeNextExecution}`), createCronjob);
|
|
84
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Change the cron expression of an existing cronjob
|
|
89
|
-
* @param orgName Name of the organization
|
|
90
|
-
* @param spaceName Name of the space
|
|
91
|
-
* @param cronjobId ID of the cronjob
|
|
92
|
-
* @param expression New cron expression
|
|
93
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
94
|
-
* @returns The patched cronjob
|
|
95
|
-
*/
|
|
96
|
-
patchCronjobExpression(orgName_1, spaceName_1, cronjobId_1, expression_1) {
|
|
97
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, expression, exposeNextExecution = false, raw) {
|
|
98
|
-
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/expression?nextExecution=${exposeNextExecution}`), { expression: expression });
|
|
99
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Change the enabled flag of an existing cronjob
|
|
104
|
-
* @param orgName Name of the organization
|
|
105
|
-
* @param spaceName Name of the space
|
|
106
|
-
* @param cronjobId ID of the cronjob
|
|
107
|
-
* @param enabled Boolean flag to set
|
|
108
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the response object
|
|
109
|
-
* @returns The patched cronjob
|
|
110
|
-
*/
|
|
111
|
-
patchCronjobEnabled(orgName_1, spaceName_1, cronjobId_1, enabled_1) {
|
|
112
|
-
return __awaiter(this, arguments, void 0, function* (orgName, spaceName, cronjobId, enabled, exposeNextExecution = false, raw) {
|
|
113
|
-
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/enabled?nextExecution=${exposeNextExecution}`), { enabled });
|
|
114
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
115
|
-
});
|
|
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
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Deletes a cronjob by its ID
|
|
147
|
-
* @param orgName Name of the organization
|
|
148
|
-
* @param spaceName Name of the space
|
|
149
|
-
* @param cronjobId ID of the cronjob
|
|
150
|
-
*/
|
|
151
|
-
deleteCronjob(orgName, spaceName, cronjobId, raw) {
|
|
152
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
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);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Retrieves all cronjobs of a Fuse space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
|
|
159
|
-
* @param orgName Name of the organization
|
|
160
|
-
* @param spaceName Name of the space
|
|
161
|
-
* @param filters (optional) Array of search filters
|
|
162
|
-
* @param sorting (optional) Sorting object
|
|
163
|
-
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
164
|
-
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
165
|
-
* @param exposeNextExecution (optional) Show the next execution as a Unix timestamp (in milliseconds) in the returned cronjob objects
|
|
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)
|
|
167
|
-
*/
|
|
168
|
-
searchCronjobs(_a, raw_1) {
|
|
169
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0, exposeNextExecution = false, }, raw) {
|
|
170
|
-
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
171
|
-
return new searchFilter_1.SearchFilterDTO(f);
|
|
172
|
-
});
|
|
173
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/search?limit=${limit}&page=${page}&nextExecution=${exposeNextExecution}`), {
|
|
174
|
-
filters: filtersDTO,
|
|
175
|
-
sorting,
|
|
176
|
-
});
|
|
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));
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Resolve a cron pattern along with a timezone to get the next executions in mili-seconds.
|
|
182
|
-
* @param expression The cron expression
|
|
183
|
-
* @param timezone The target IANA timezone
|
|
184
|
-
* @param amount The amount of returned execution-dates (limited between 1 and 10, default is 3)
|
|
185
|
-
* @returns Array of Unix timestamps
|
|
186
|
-
*/
|
|
187
|
-
resolveCronPatternWithTimezone(expression_1, timezone_1) {
|
|
188
|
-
return __awaiter(this, arguments, void 0, function* (expression, timezone, amount = 3, raw) {
|
|
189
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/cron/resolve`), {
|
|
190
|
-
expression: expression,
|
|
191
|
-
timezone: timezone,
|
|
192
|
-
amount: amount,
|
|
193
|
-
});
|
|
194
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
getEndpoint(endpoint) {
|
|
198
|
-
return `${this.options.server}/api/fuse${endpoint}`;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
exports.FuseCronjob = FuseCronjob;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import Base, { MaybeRaw } from "../../../../../Base";
|
|
2
|
-
import { CronjobLogDto } from "../../../../../interfaces/fuse/space/cronjob/CronjobLog";
|
|
3
|
-
import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
|
|
4
|
-
export declare class FuseCronjobLog extends Base {
|
|
5
|
-
/**
|
|
6
|
-
* Retrieves all cronjobs of a Fuse space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
|
|
7
|
-
* @param orgName Name of the organization
|
|
8
|
-
* @param spaceName Name of the space
|
|
9
|
-
* @param cronjobId ID of the cronjob
|
|
10
|
-
* @param filters (optional) Array of search filters
|
|
11
|
-
* @param sorting (optional) Sorting object
|
|
12
|
-
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
13
|
-
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
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
|
-
*/
|
|
16
|
-
searchCronjobLogs<R extends boolean = false>({ orgName, spaceName, cronjobId, filters, sorting, limit, page, }: SearchParams & {
|
|
17
|
-
orgName: string;
|
|
18
|
-
spaceName: string;
|
|
19
|
-
cronjobId: string;
|
|
20
|
-
}, raw?: {
|
|
21
|
-
raw: R;
|
|
22
|
-
}): Promise<MaybeRaw<R, PaginatedResponse<CronjobLogDto>>>;
|
|
23
|
-
/**
|
|
24
|
-
* Retrieves a cronjob log by it's ID
|
|
25
|
-
* @param orgName Name of the organization
|
|
26
|
-
* @param spaceName Name of the space
|
|
27
|
-
* @param cronjobId ID of the cronjob
|
|
28
|
-
* @param cronjobLogId ID of the cronjob log
|
|
29
|
-
* @returns the cronjob log
|
|
30
|
-
*/
|
|
31
|
-
getCronjobLog<R extends boolean = false>(orgName: string, spaceName: string, cronjobId: string, cronjobLogId: string, raw?: {
|
|
32
|
-
raw: R;
|
|
33
|
-
}): Promise<MaybeRaw<R, CronjobLogDto>>;
|
|
34
|
-
protected getEndpoint(endpoint: string): string;
|
|
35
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FuseCronjobLog = void 0;
|
|
13
|
-
const Base_1 = require("../../../../../Base");
|
|
14
|
-
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
|
-
const searchFilter_1 = require("../../../../../helper/searchFilter");
|
|
16
|
-
class FuseCronjobLog extends Base_1.default {
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves all cronjobs of a Fuse space which match the provided search filter(s). Will return all cronjobs if no filter is provided.
|
|
19
|
-
* @param orgName Name of the organization
|
|
20
|
-
* @param spaceName Name of the space
|
|
21
|
-
* @param cronjobId ID of the cronjob
|
|
22
|
-
* @param filters (optional) Array of search filters
|
|
23
|
-
* @param sorting (optional) Sorting object
|
|
24
|
-
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
25
|
-
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
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
|
-
*/
|
|
28
|
-
searchCronjobLogs(_a, raw_1) {
|
|
29
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, cronjobId, filters, sorting, limit = 25, page = 0, }, raw) {
|
|
30
|
-
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
31
|
-
return new searchFilter_1.SearchFilterDTO(f);
|
|
32
|
-
});
|
|
33
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/logs/search?page=${page}&limit=${limit}`), {
|
|
34
|
-
filters: filtersDTO,
|
|
35
|
-
sorting,
|
|
36
|
-
});
|
|
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
|
-
});
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Retrieves a cronjob log by it's ID
|
|
42
|
-
* @param orgName Name of the organization
|
|
43
|
-
* @param spaceName Name of the space
|
|
44
|
-
* @param cronjobId ID of the cronjob
|
|
45
|
-
* @param cronjobLogId ID of the cronjob log
|
|
46
|
-
* @returns the cronjob log
|
|
47
|
-
*/
|
|
48
|
-
getCronjobLog(orgName, spaceName, cronjobId, cronjobLogId, raw) {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/logs/${cronjobLogId}`));
|
|
51
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
getEndpoint(endpoint) {
|
|
55
|
-
return `${this.options.server}/api/fuse${endpoint}`;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.FuseCronjobLog = FuseCronjobLog;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
-
import { FuseSpace as IFuseSpace, FuseSpaceEntityPermission as SpaceEntityPermission, FuseSpacePermission as SpacePermission } from "../../../interfaces/fuse/space";
|
|
3
|
-
import { PaginatedResponse, SearchParams } from "../../../interfaces/global";
|
|
4
|
-
import { FuseCronjob } from "./cronjob";
|
|
5
|
-
export declare class FuseSpace extends Base {
|
|
6
|
-
get cronjob(): FuseCronjob;
|
|
7
|
-
private _cronjob?;
|
|
8
|
-
/**
|
|
9
|
-
* Retrieves a Fuse space by its name
|
|
10
|
-
* @param orgName Name of the organization
|
|
11
|
-
* @param spaceName Name of the space
|
|
12
|
-
* @returns The requested space
|
|
13
|
-
*/
|
|
14
|
-
getSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
|
|
15
|
-
raw: R;
|
|
16
|
-
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
17
|
-
/**
|
|
18
|
-
* Creates a new Fuse space
|
|
19
|
-
* @param orgName Name of the organization
|
|
20
|
-
* @param name Name of the space to be created
|
|
21
|
-
* @returns The created space
|
|
22
|
-
*/
|
|
23
|
-
createSpace<R extends boolean = false>(orgName: string, name: string, raw?: {
|
|
24
|
-
raw: R;
|
|
25
|
-
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
26
|
-
/**
|
|
27
|
-
* Deletes a space by its name
|
|
28
|
-
* @param orgName Name of the organization
|
|
29
|
-
* @param spaceName Name of the space
|
|
30
|
-
*/
|
|
31
|
-
deleteSpace<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
|
|
32
|
-
raw: R;
|
|
33
|
-
}): Promise<MaybeRaw<R, void>>;
|
|
34
|
-
/**
|
|
35
|
-
* Adds/Updates/Removes the permission a user has in the specified space.
|
|
36
|
-
* @param orgName Name of the organization
|
|
37
|
-
* @param spaceName Name of the space
|
|
38
|
-
* @param userId ID of the user
|
|
39
|
-
* @param permission New permission
|
|
40
|
-
* @returns The Fuse space with the updated permissions
|
|
41
|
-
*/
|
|
42
|
-
updateUserSpacePermission<R extends boolean = false>(orgName: string, spaceName: string, userId: string, permission: SpacePermission, raw?: {
|
|
43
|
-
raw: R;
|
|
44
|
-
}): Promise<MaybeRaw<R, SpaceEntityPermission>>;
|
|
45
|
-
/**
|
|
46
|
-
* Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
|
|
47
|
-
* @param orgName Name of the organization
|
|
48
|
-
* @param spaceName Name of the space
|
|
49
|
-
* @param teamName Name of the team
|
|
50
|
-
* @param permission New permission
|
|
51
|
-
* @returns The Fuse space with the updated permissions
|
|
52
|
-
*/
|
|
53
|
-
updateTeamSpacePermission<R extends boolean = false>(orgName: string, spaceName: string, teamName: string, permission: SpacePermission, raw?: {
|
|
54
|
-
raw: R;
|
|
55
|
-
}): Promise<MaybeRaw<R, SpaceEntityPermission>>;
|
|
56
|
-
/**
|
|
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.
|
|
58
|
-
* @param orgName Name of the organization
|
|
59
|
-
* @param filters (optional) Array of search filters
|
|
60
|
-
* @param sorting (optional) Sorting object
|
|
61
|
-
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
62
|
-
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
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)
|
|
64
|
-
*/
|
|
65
|
-
searchSpaces<R extends boolean = false>({ orgName, filters, sorting, limit, page }: SearchParams & {
|
|
66
|
-
orgName: string;
|
|
67
|
-
}, raw?: {
|
|
68
|
-
raw: R;
|
|
69
|
-
}): Promise<MaybeRaw<R, PaginatedResponse<IFuseSpace>>>;
|
|
70
|
-
/**
|
|
71
|
-
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
72
|
-
* @param orgName Name of the organization
|
|
73
|
-
* @param spaceName Name of the space
|
|
74
|
-
* @param filters (optional) Array of search filters
|
|
75
|
-
* @param sorting (optional) Sorting object
|
|
76
|
-
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
77
|
-
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
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)
|
|
79
|
-
*/
|
|
80
|
-
searchSpacePermissions<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
|
|
81
|
-
orgName: string;
|
|
82
|
-
spaceName: string;
|
|
83
|
-
}, raw?: {
|
|
84
|
-
raw: R;
|
|
85
|
-
}): Promise<MaybeRaw<R, PaginatedResponse<SpaceEntityPermission>>>;
|
|
86
|
-
/**
|
|
87
|
-
* Updates the name of a space.
|
|
88
|
-
* @param orgName Name of the organization
|
|
89
|
-
* @param spaceName Current name of the space
|
|
90
|
-
* @param newSpaceName New name for the space
|
|
91
|
-
* @returns The updated space
|
|
92
|
-
*/
|
|
93
|
-
renameSpace<R extends boolean = false>(orgName: string, spaceName: string, newSpaceName: string, raw?: {
|
|
94
|
-
raw: R;
|
|
95
|
-
}): Promise<MaybeRaw<R, IFuseSpace>>;
|
|
96
|
-
protected getEndpoint(endpoint: string): string;
|
|
97
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FuseSpace = void 0;
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
14
|
-
const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelper");
|
|
15
|
-
const searchFilter_1 = require("../../../helper/searchFilter");
|
|
16
|
-
const cronjob_1 = require("./cronjob");
|
|
17
|
-
class FuseSpace extends Base_1.default {
|
|
18
|
-
get cronjob() {
|
|
19
|
-
if (this._cronjob === undefined) {
|
|
20
|
-
this._cronjob = new cronjob_1.FuseCronjob(this.options, this.axios);
|
|
21
|
-
}
|
|
22
|
-
return this._cronjob;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Retrieves a Fuse space by its name
|
|
26
|
-
* @param orgName Name of the organization
|
|
27
|
-
* @param spaceName Name of the space
|
|
28
|
-
* @returns The requested space
|
|
29
|
-
*/
|
|
30
|
-
getSpace(orgName, spaceName, raw) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}`));
|
|
33
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Creates a new Fuse space
|
|
38
|
-
* @param orgName Name of the organization
|
|
39
|
-
* @param name Name of the space to be created
|
|
40
|
-
* @returns The created space
|
|
41
|
-
*/
|
|
42
|
-
createSpace(orgName, name, raw) {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces`), { name: name });
|
|
45
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Deletes a space by its name
|
|
50
|
-
* @param orgName Name of the organization
|
|
51
|
-
* @param spaceName Name of the space
|
|
52
|
-
*/
|
|
53
|
-
deleteSpace(orgName, spaceName, raw) {
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
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);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Adds/Updates/Removes the permission a user has in the specified space.
|
|
61
|
-
* @param orgName Name of the organization
|
|
62
|
-
* @param spaceName Name of the space
|
|
63
|
-
* @param userId ID of the user
|
|
64
|
-
* @param permission New permission
|
|
65
|
-
* @returns The Fuse space with the updated permissions
|
|
66
|
-
*/
|
|
67
|
-
updateUserSpacePermission(orgName, spaceName, userId, permission, raw) {
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/user`), {
|
|
70
|
-
userId,
|
|
71
|
-
permission,
|
|
72
|
-
});
|
|
73
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Adds/Updates/Removes the permission a team has in the specified space. Note: A team cannot be an owner of a Space.
|
|
78
|
-
* @param orgName Name of the organization
|
|
79
|
-
* @param spaceName Name of the space
|
|
80
|
-
* @param teamName Name of the team
|
|
81
|
-
* @param permission New permission
|
|
82
|
-
* @returns The Fuse space with the updated permissions
|
|
83
|
-
*/
|
|
84
|
-
updateTeamSpacePermission(orgName, spaceName, teamName, permission, raw) {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/team`), {
|
|
87
|
-
teamName,
|
|
88
|
-
permission,
|
|
89
|
-
});
|
|
90
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* 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.
|
|
95
|
-
* @param orgName Name of the organization
|
|
96
|
-
* @param filters (optional) Array of search filters
|
|
97
|
-
* @param sorting (optional) Sorting object
|
|
98
|
-
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
99
|
-
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
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)
|
|
101
|
-
*/
|
|
102
|
-
searchSpaces(_a, raw_1) {
|
|
103
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
104
|
-
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
|
|
105
|
-
return new searchFilter_1.SearchFilterDTO(f);
|
|
106
|
-
});
|
|
107
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/search?limit=${limit}&page=${page}`), {
|
|
108
|
-
filters: filtersDTO,
|
|
109
|
-
sorting,
|
|
110
|
-
});
|
|
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));
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Retrieves permissions of a space matching the search filter(s). Will return all permissions of the space if no search filter is provided.
|
|
116
|
-
* @param orgName Name of the organization
|
|
117
|
-
* @param spaceName Name of the space
|
|
118
|
-
* @param filters (optional) Array of search filters
|
|
119
|
-
* @param sorting (optional) Sorting object
|
|
120
|
-
* @param limit (optional) Max number of results (1-100; defaults to 25)
|
|
121
|
-
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
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)
|
|
123
|
-
*/
|
|
124
|
-
searchSpacePermissions(_a, raw_1) {
|
|
125
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
126
|
-
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
127
|
-
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/permissions/search?page=${page}&limit=${limit}`), {
|
|
128
|
-
filters: filtersDTO,
|
|
129
|
-
sorting: sorting,
|
|
130
|
-
});
|
|
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));
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Updates the name of a space.
|
|
136
|
-
* @param orgName Name of the organization
|
|
137
|
-
* @param spaceName Current name of the space
|
|
138
|
-
* @param newSpaceName New name for the space
|
|
139
|
-
* @returns The updated space
|
|
140
|
-
*/
|
|
141
|
-
renameSpace(orgName, spaceName, newSpaceName, raw) {
|
|
142
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
-
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/name`), {
|
|
144
|
-
newSpaceName,
|
|
145
|
-
});
|
|
146
|
-
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
getEndpoint(endpoint) {
|
|
150
|
-
return `${this.options.server}/api/fuse${endpoint}`;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
exports.FuseSpace = FuseSpace;
|
|
File without changes
|