hcloud-sdk 17.0.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +87 -76
- package/lib/Base.d.ts +2 -1
- package/lib/Hcloud.d.ts +24 -6
- package/lib/Hcloud.js +127 -24
- package/lib/helper/ErrorHelper.js +5 -2
- package/lib/helper/ValidationHelper.d.ts +14 -4
- package/lib/helper/ValidationHelper.js +71 -11
- package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
- package/lib/interfaces/agent/logging/index.d.ts +2 -0
- package/lib/interfaces/{friday → agent/logging}/index.js +2 -3
- package/lib/interfaces/agent/logging/log-collector.d.ts +35 -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 +13 -3
- package/lib/interfaces/auditor/index.js +9 -2
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/cosmo/asset/index.d.ts +216 -0
- package/lib/interfaces/cosmo/asset/index.js +90 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +41 -0
- package/lib/interfaces/cosmo/comment/index.js +8 -0
- package/lib/interfaces/cosmo/event/index.d.ts +60 -0
- package/lib/interfaces/cosmo/event/index.js +31 -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 +110 -0
- package/lib/interfaces/cosmo/share/index.js +23 -0
- package/lib/interfaces/cosmo/space/index.d.ts +31 -0
- package/lib/interfaces/cosmo/space/index.js +2 -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 +13 -0
- package/lib/interfaces/cosmo/tag/tag.js +2 -0
- package/lib/interfaces/global/Products.d.ts +2 -3
- package/lib/interfaces/global/Products.js +1 -2
- package/lib/interfaces/global/Views.d.ts +0 -1
- package/lib/interfaces/global/Views.js +0 -1
- package/lib/interfaces/high5/index.d.ts +7 -7
- package/lib/interfaces/high5/index.js +7 -7
- package/lib/interfaces/{friday → high5}/space/database/document/index.d.ts +1 -1
- package/lib/interfaces/{friday → high5}/space/database/document/index.js +2 -1
- package/lib/interfaces/high5/space/database/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +10 -2
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +3 -1
- package/lib/interfaces/{fuse/space/cronjob/CronjobLog.d.ts → high5/space/job/JobLog.d.ts} +3 -3
- package/lib/interfaces/high5/space/job/JobLog.js +2 -0
- package/lib/interfaces/high5/space/job/index.d.ts +83 -0
- package/lib/interfaces/high5/space/job/index.js +11 -0
- package/lib/interfaces/high5/stats.d.ts +21 -0
- package/lib/interfaces/high5/stats.js +2 -0
- 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/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 +19 -5
- package/lib/interfaces/idp/organization/index.d.ts +2 -0
- package/lib/interfaces/idp/organization/index.js +2 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +13 -11
- package/lib/interfaces/idp/organization/member/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +4 -0
- package/lib/interfaces/idp/organization/stats.d.ts +7 -0
- package/lib/interfaces/idp/organization/stats.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
- package/lib/interfaces/idp/user/Message.d.ts +22 -0
- package/lib/interfaces/idp/user/Message.js +14 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -15
- package/lib/interfaces/idp/user/Scopes.js +0 -21
- package/lib/interfaces/idp/user/index.d.ts +5 -1
- package/lib/interfaces/mailer/index.d.ts +50 -2
- package/lib/interfaces/mailer/index.js +100 -2
- 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 +79 -51
- package/lib/interfaces/nats/index.js +140 -125
- package/lib/interfaces/shorts/index.d.ts +17 -0
- package/lib/interfaces/shorts/index.js +8 -0
- package/lib/service/agent/bundle/dev/index.d.ts +16 -6
- package/lib/service/agent/bundle/dev/index.js +16 -11
- package/lib/service/agent/bundle/index.d.ts +10 -4
- package/lib/service/agent/bundle/index.js +10 -7
- package/lib/service/agent/context/index.d.ts +22 -8
- package/lib/service/agent/context/index.js +19 -15
- 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.d.ts +8 -4
- package/lib/service/auditor/index.js +9 -6
- package/lib/service/auditor/internal/index.d.ts +27 -3
- package/lib/service/auditor/internal/index.js +38 -6
- package/lib/service/bouncer/features/index.d.ts +4 -2
- package/lib/service/bouncer/features/index.js +6 -3
- package/lib/service/bouncer/index.js +5 -2
- package/lib/service/cosmo/asset/index.d.ts +265 -0
- package/lib/service/cosmo/asset/index.js +420 -0
- package/lib/service/cosmo/comment/index.d.ts +93 -0
- package/lib/service/cosmo/comment/index.js +136 -0
- package/lib/service/cosmo/event/index.d.ts +23 -0
- package/lib/service/cosmo/event/index.js +43 -0
- package/lib/service/cosmo/folder/index.d.ts +27 -0
- package/lib/service/cosmo/folder/index.js +50 -0
- package/lib/service/cosmo/index.d.ts +52 -0
- package/lib/service/cosmo/index.js +129 -0
- package/lib/service/cosmo/internal/index.d.ts +7 -0
- package/lib/service/cosmo/internal/index.js +20 -0
- package/lib/service/cosmo/internal/space/index.d.ts +15 -0
- package/lib/service/cosmo/internal/space/index.js +37 -0
- package/lib/service/cosmo/location/index.d.ts +40 -0
- package/lib/service/cosmo/location/index.js +66 -0
- package/lib/service/cosmo/namespace/index.d.ts +56 -0
- package/lib/service/cosmo/namespace/index.js +85 -0
- package/lib/service/cosmo/organization/index.d.ts +47 -0
- package/lib/service/cosmo/organization/index.js +67 -0
- package/lib/service/cosmo/permissions/index.d.ts +131 -0
- package/lib/service/cosmo/permissions/index.js +184 -0
- package/lib/service/cosmo/production/index.d.ts +26 -0
- package/lib/service/cosmo/production/index.js +48 -0
- package/lib/service/cosmo/share/index.d.ts +169 -0
- package/lib/service/cosmo/share/index.js +227 -0
- package/lib/service/cosmo/space/index.d.ts +131 -0
- package/lib/service/cosmo/space/index.js +190 -0
- 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 +67 -0
- package/lib/service/cosmo/tag/index.js +96 -0
- package/lib/service/dali/DaliAvatar.d.ts +0 -6
- package/lib/service/dali/DaliAvatar.js +4 -11
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliCosmoSpace.js +12 -8
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +11 -4
- package/lib/service/dali/avatar/DaliHigh5Pool.js +12 -8
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +11 -4
- package/lib/service/dali/avatar/DaliHigh5Space.js +12 -8
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +11 -4
- package/lib/service/dali/avatar/DaliOAuthApp.js +12 -8
- package/lib/service/dali/avatar/DaliOrganization.d.ts +11 -4
- package/lib/service/dali/avatar/DaliOrganization.js +12 -8
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
- package/lib/service/dali/avatar/DaliServiceAccount.js +12 -8
- package/lib/service/dali/avatar/DaliTeam.d.ts +11 -4
- package/lib/service/dali/avatar/DaliTeam.js +12 -8
- package/lib/service/dali/avatar/DaliUser.d.ts +11 -4
- package/lib/service/dali/avatar/DaliUser.js +12 -8
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +6 -6
- package/lib/service/high5/execution/index.d.ts +4 -2
- package/lib/service/high5/execution/index.js +7 -3
- package/lib/service/high5/execution/log/index.js +4 -1
- package/lib/service/high5/execution/status/index.d.ts +5 -3
- package/lib/service/high5/execution/status/index.js +7 -4
- package/lib/service/high5/index.d.ts +7 -2
- package/lib/service/high5/index.js +13 -3
- package/lib/service/high5/internal/index.d.ts +4 -2
- package/lib/service/high5/internal/index.js +7 -3
- package/lib/service/high5/internal/space/index.d.ts +10 -3
- package/lib/service/high5/internal/space/index.js +17 -5
- package/lib/service/high5/internal/space/job/index.d.ts +7 -0
- package/lib/service/high5/internal/space/job/index.js +20 -0
- package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
- package/lib/service/{fuse/internal/space/cronjob → high5/internal/space/job}/log/index.js +13 -10
- package/lib/service/high5/joinToken/index.d.ts +14 -6
- package/lib/service/high5/joinToken/index.js +14 -10
- package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
- package/lib/service/high5/space/database/document/array/index.js +105 -0
- package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
- package/lib/service/{friday → high5}/space/database/document/index.js +35 -17
- package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
- package/lib/service/high5/space/database/document/number/index.js +80 -0
- package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
- package/lib/service/{friday → high5}/space/database/index.js +22 -18
- package/lib/service/high5/space/event/index.d.ts +17 -7
- package/lib/service/high5/space/event/index.js +16 -12
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +6 -3
- package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
- package/lib/service/high5/space/event/stream/design/index.js +13 -9
- 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 +16 -11
- package/lib/service/high5/space/event/stream/index.d.ts +32 -12
- package/lib/service/high5/space/event/stream/index.js +26 -22
- package/lib/service/high5/space/execution/index.d.ts +19 -7
- package/lib/service/high5/space/execution/index.js +21 -13
- package/lib/service/high5/space/execution/log/index.d.ts +8 -4
- package/lib/service/high5/space/execution/log/index.js +9 -6
- package/lib/service/high5/space/execution/status/index.d.ts +7 -3
- package/lib/service/high5/space/execution/status/index.js +8 -5
- package/lib/service/high5/space/index.d.ts +53 -14
- package/lib/service/high5/space/index.js +70 -28
- package/lib/service/{fuse/space/cronjob → high5/space/job}/index.d.ts +57 -35
- package/lib/service/{fuse/space/cronjob → high5/space/job}/index.js +88 -87
- package/lib/service/{fuse/space/cronjob → high5/space/job}/log/index.d.ts +15 -11
- package/lib/service/{fuse/space/cronjob → high5/space/job}/log/index.js +19 -16
- package/lib/service/high5/space/node/index.d.ts +20 -8
- package/lib/service/high5/space/node/index.js +18 -14
- package/lib/service/high5/space/pool/index.d.ts +38 -11
- package/lib/service/high5/space/pool/index.js +41 -19
- package/lib/service/high5/space/secret/index.d.ts +17 -7
- package/lib/service/high5/space/secret/index.js +16 -12
- package/lib/service/high5/space/stat/index.d.ts +12 -0
- package/lib/service/high5/space/stat/index.js +34 -0
- package/lib/service/high5/space/wave/index.d.ts +16 -6
- package/lib/service/high5/space/wave/index.js +15 -11
- package/lib/service/high5/space/webhook/index.d.ts +32 -12
- package/lib/service/high5/space/webhook/index.js +29 -22
- package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
- package/lib/service/high5/space/webhook/log/index.js +6 -3
- package/lib/service/high5/stat/index.d.ts +11 -0
- package/lib/service/{fuse/internal → high5/stat}/index.js +16 -14
- package/lib/service/high5/wave/index.js +4 -1
- package/lib/service/high5/wave/s3/index.d.ts +31 -8
- package/lib/service/high5/wave/s3/index.js +47 -23
- package/lib/service/idp/guest/index.d.ts +42 -0
- package/lib/service/idp/guest/index.js +69 -0
- package/lib/service/idp/index.d.ts +25 -7
- package/lib/service/idp/index.js +27 -13
- package/lib/service/idp/internal/index.d.ts +5 -3
- package/lib/service/idp/internal/index.js +9 -4
- 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 +19 -6
- package/lib/service/idp/oauth/index.js +26 -16
- package/lib/service/idp/organization/index.d.ts +28 -5
- package/lib/service/idp/organization/index.js +41 -11
- package/lib/service/idp/organization/license/index.d.ts +7 -3
- package/lib/service/idp/organization/license/index.js +8 -5
- package/lib/service/idp/organization/member/index.d.ts +20 -8
- package/lib/service/idp/organization/member/index.js +20 -15
- package/lib/service/idp/organization/member/invitations/index.d.ts +42 -9
- package/lib/service/idp/organization/member/invitations/index.js +94 -59
- package/lib/service/idp/organization/service-accounts/index.d.ts +31 -9
- package/lib/service/idp/organization/service-accounts/index.js +35 -14
- package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
- package/lib/service/idp/organization/settings/domain/index.js +13 -9
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
- package/lib/service/idp/organization/settings/domain/saml/index.js +23 -19
- package/lib/service/idp/organization/settings/index.js +4 -1
- package/lib/service/idp/organization/settings/oauth/index.d.ts +33 -9
- package/lib/service/idp/organization/settings/oauth/index.js +37 -16
- package/lib/service/idp/organization/stat/index.d.ts +11 -0
- package/lib/service/idp/organization/stat/index.js +33 -0
- package/lib/service/idp/organization/team/index.d.ts +32 -10
- package/lib/service/idp/organization/team/index.js +35 -14
- package/lib/service/idp/registration/index.d.ts +10 -4
- package/lib/service/idp/registration/index.js +19 -10
- package/lib/service/idp/user/index.d.ts +41 -11
- package/lib/service/idp/user/index.js +49 -19
- package/lib/service/idp/user/license/index.d.ts +7 -3
- package/lib/service/idp/user/license/index.js +8 -5
- package/lib/service/idp/user/message/index.d.ts +62 -0
- package/lib/service/idp/user/message/index.js +95 -0
- package/lib/service/idp/user/password/index.d.ts +4 -2
- package/lib/service/idp/user/password/index.js +6 -3
- package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
- package/lib/service/idp/user/settings/connections/index.js +6 -3
- package/lib/service/idp/user/settings/general/index.d.ts +10 -4
- package/lib/service/idp/user/settings/general/index.js +10 -7
- package/lib/service/idp/user/settings/index.js +4 -1
- package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
- package/lib/service/idp/user/settings/notifications/index.js +8 -5
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
- package/lib/service/idp/user/settings/oauthApps/index.js +10 -6
- package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
- package/lib/service/idp/user/settings/pats/index.js +21 -16
- package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +17 -11
- package/lib/service/mailer/index.d.ts +4 -2
- package/lib/service/mailer/index.js +7 -4
- package/lib/service/mailer/internal/index.d.ts +14 -6
- package/lib/service/mailer/internal/index.js +12 -9
- package/lib/service/mothership/index.d.ts +35 -13
- package/lib/service/mothership/index.js +36 -18
- package/lib/service/nats/index.d.ts +7 -0
- package/lib/service/nats/index.js +77 -44
- package/lib/service/shorts/index.d.ts +18 -0
- package/lib/service/{friday → shorts}/index.js +17 -11
- package/lib/service/shorts/internal/index.d.ts +75 -0
- package/lib/service/shorts/internal/index.js +118 -0
- package/lib/utils/bouncer/features/Provider.js +0 -1
- package/package.json +2 -2
- package/lib/interfaces/friday/index.d.ts +0 -3
- package/lib/interfaces/friday/space/index.d.ts +0 -21
- package/lib/interfaces/friday/space/index.js +0 -11
- package/lib/interfaces/fuse/index.d.ts +0 -3
- package/lib/interfaces/fuse/index.js +0 -19
- 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/index.d.ts +0 -22
- package/lib/interfaces/fuse/space/index.js +0 -11
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -26
- package/lib/service/dali/avatar/DaliFuseSpace.js +0 -58
- package/lib/service/friday/index.d.ts +0 -13
- package/lib/service/friday/space/index.d.ts +0 -81
- package/lib/service/friday/space/index.js +0 -150
- package/lib/service/fuse/index.d.ts +0 -18
- package/lib/service/fuse/index.js +0 -48
- package/lib/service/fuse/internal/index.d.ts +0 -8
- 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 -15
- package/lib/service/fuse/internal/space/index.d.ts +0 -22
- package/lib/service/fuse/internal/space/index.js +0 -49
- package/lib/service/fuse/space/index.d.ts +0 -81
- package/lib/service/fuse/space/index.js +0 -152
- /package/lib/interfaces/{friday/space/database/index.js → agent/logging/cloudwatch.js} +0 -0
- /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/log-collector.js} +0 -0
- /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
|
@@ -8,10 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const nats_1 = require("nats");
|
|
13
16
|
const nats_ws_1 = require("nats.ws");
|
|
14
|
-
const Base_1 = require("../../Base");
|
|
17
|
+
const Base_1 = __importDefault(require("../../Base"));
|
|
15
18
|
const isBrowser = typeof window !== "undefined";
|
|
16
19
|
class Nats extends Base_1.default {
|
|
17
20
|
constructor() {
|
|
@@ -24,6 +27,12 @@ class Nats extends Base_1.default {
|
|
|
24
27
|
}
|
|
25
28
|
connect(params) {
|
|
26
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
let previousSubs = [];
|
|
31
|
+
if (this.natsConnection && !this.natsConnection.isClosed()) {
|
|
32
|
+
previousSubs = [...this.subMap];
|
|
33
|
+
yield this.natsConnection.close();
|
|
34
|
+
this.subMap = [];
|
|
35
|
+
}
|
|
27
36
|
if (params.forceWebsocket) {
|
|
28
37
|
this.connection = nats_ws_1.connect;
|
|
29
38
|
}
|
|
@@ -46,55 +55,64 @@ class Nats extends Base_1.default {
|
|
|
46
55
|
user: params.email !== undefined ? params.email : params.username,
|
|
47
56
|
pass: params.jwt !== undefined ? params.jwt : params.password,
|
|
48
57
|
});
|
|
58
|
+
for (const entry of previousSubs) {
|
|
59
|
+
yield this.sub(entry.subject, (err, data, msg) => {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
(_b = (_a = entry.sub).callback) === null || _b === void 0 ? void 0 : _b.call(_a, err, msg ? msg : {});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
49
64
|
return this.natsConnection;
|
|
50
65
|
});
|
|
51
66
|
}
|
|
52
67
|
sub(subject, callback, options) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (err !== null) {
|
|
62
|
-
try {
|
|
63
|
-
callback(err);
|
|
64
|
-
}
|
|
65
|
-
catch (_a) {
|
|
66
|
-
// ignore callback errors
|
|
67
|
-
}
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
let parsedData;
|
|
71
|
-
try {
|
|
72
|
-
const data = new TextDecoder("utf-8").decode(msg.data);
|
|
73
|
-
parsedData = JSON.parse(data);
|
|
74
|
-
}
|
|
75
|
-
catch (e) {
|
|
76
|
-
callback(e);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
try {
|
|
80
|
-
callback(null, parsedData, msg);
|
|
81
|
-
}
|
|
82
|
-
catch (_b) {
|
|
83
|
-
// ignore callback errors
|
|
84
|
-
}
|
|
85
|
-
} });
|
|
86
|
-
setTimeout(() => {
|
|
87
|
-
var _a, _b;
|
|
88
|
-
if (!this.getConnection() || !((_a = this.getConnection()) === null || _a === void 0 ? void 0 : _a.isClosed)) {
|
|
89
|
-
reject(new Error("connection not established, can not subscribe"));
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const delay = 500;
|
|
70
|
+
const trySubscribe = () => __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const conn = this.getConnection();
|
|
72
|
+
// if connection not ready, retry after delay
|
|
73
|
+
if (!conn || conn.isClosed()) {
|
|
74
|
+
yield new Promise(res => setTimeout(res, delay));
|
|
75
|
+
return trySubscribe();
|
|
90
76
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
77
|
+
try {
|
|
78
|
+
const newOptions = Object.assign(Object.assign({}, options), { callback: (err, msg) => {
|
|
79
|
+
if (err) {
|
|
80
|
+
try {
|
|
81
|
+
callback(err);
|
|
82
|
+
}
|
|
83
|
+
catch (_a) {
|
|
84
|
+
// ignore callback errors
|
|
85
|
+
}
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
let parsedData;
|
|
89
|
+
try {
|
|
90
|
+
const data = new TextDecoder("utf-8").decode(msg.data);
|
|
91
|
+
parsedData = JSON.parse(data);
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
callback(e);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
callback(null, parsedData, msg);
|
|
99
|
+
}
|
|
100
|
+
catch (_b) {
|
|
101
|
+
// ignore callback errors
|
|
102
|
+
}
|
|
103
|
+
} });
|
|
104
|
+
const sub = conn.subscribe(subject, newOptions);
|
|
105
|
+
this.subMap.push({ subject, sub });
|
|
106
|
+
return sub;
|
|
95
107
|
}
|
|
96
|
-
|
|
97
|
-
|
|
108
|
+
catch (err) {
|
|
109
|
+
err;
|
|
110
|
+
// if subscription fails, retry after delay
|
|
111
|
+
yield new Promise(res => setTimeout(res, delay));
|
|
112
|
+
return trySubscribe();
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
return trySubscribe();
|
|
98
116
|
});
|
|
99
117
|
}
|
|
100
118
|
unsub(subject) {
|
|
@@ -133,5 +151,20 @@ class Nats extends Base_1.default {
|
|
|
133
151
|
getEndpoint(endpoint) {
|
|
134
152
|
return `${this.options.server}/ws/nats${endpoint}`;
|
|
135
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Gracefully closes the NATS connection.
|
|
156
|
+
* * This method uses 'drain' to ensure that all outgoing messages are sent
|
|
157
|
+
* and all buffered incoming messages are processed by their respective subscribers before the connection is physically closed
|
|
158
|
+
* * @returns {Promise<void>} A promise that resolves when the connection is fully drained and closed
|
|
159
|
+
*/
|
|
160
|
+
disconnect() {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
if (this.natsConnection && !this.natsConnection.isClosed()) {
|
|
163
|
+
yield this.natsConnection.drain();
|
|
164
|
+
this.natsConnection = undefined;
|
|
165
|
+
this.subMap = [];
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
136
169
|
}
|
|
137
170
|
exports.default = Nats;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../Base";
|
|
2
|
+
import { Version } from "../../interfaces/global";
|
|
3
|
+
import { ShortsInternal } from "./internal";
|
|
4
|
+
export default class Shorts extends Base {
|
|
5
|
+
/**
|
|
6
|
+
* Handles everything around internal endpoints
|
|
7
|
+
*/
|
|
8
|
+
get internal(): ShortsInternal;
|
|
9
|
+
private _internal?;
|
|
10
|
+
/**
|
|
11
|
+
* Requests the endpoint version
|
|
12
|
+
* @returns Version object
|
|
13
|
+
*/
|
|
14
|
+
version<R extends boolean = false>(raw?: {
|
|
15
|
+
raw: R;
|
|
16
|
+
}): Promise<MaybeRaw<R, Version>>;
|
|
17
|
+
protected getEndpoint(endpoint: string): string;
|
|
18
|
+
}
|
|
@@ -8,28 +8,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const Base_1 = require("../../Base");
|
|
13
|
-
const
|
|
14
|
-
class
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const Base_1 = __importDefault(require("../../Base"));
|
|
16
|
+
const internal_1 = require("./internal");
|
|
17
|
+
class Shorts extends Base_1.default {
|
|
18
|
+
/**
|
|
19
|
+
* Handles everything around internal endpoints
|
|
20
|
+
*/
|
|
21
|
+
get internal() {
|
|
22
|
+
if (this._internal === undefined) {
|
|
23
|
+
this._internal = new internal_1.ShortsInternal(this.options, this.axios);
|
|
18
24
|
}
|
|
19
|
-
return this.
|
|
25
|
+
return this._internal;
|
|
20
26
|
}
|
|
21
27
|
/**
|
|
22
28
|
* Requests the endpoint version
|
|
23
29
|
* @returns Version object
|
|
24
30
|
*/
|
|
25
|
-
version() {
|
|
31
|
+
version(raw) {
|
|
26
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
33
|
const resp = yield this.axios.get(this.getEndpoint("/v1/version"));
|
|
28
|
-
return resp.data;
|
|
34
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
29
35
|
});
|
|
30
36
|
}
|
|
31
37
|
getEndpoint(endpoint) {
|
|
32
|
-
return `${this.options.server}/api/
|
|
38
|
+
return `${this.options.server}/api/shorts${endpoint}`;
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
|
-
exports.default =
|
|
41
|
+
exports.default = Shorts;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { Short, ShortType } from "../../../interfaces/shorts";
|
|
3
|
+
export declare class ShortsInternal extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Generates a shortened alias for the provided long URL and sets a maximum number of allowed visits.
|
|
6
|
+
*
|
|
7
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
8
|
+
*
|
|
9
|
+
* @param organizationId ID of the organization
|
|
10
|
+
* @param spaceId ID of the space
|
|
11
|
+
* @param url Original long URL that needs to be shortened
|
|
12
|
+
* @param type Type of the short URL, can be GENERIC or COSMO
|
|
13
|
+
* @param visitsLimit Optional maximum number of times the shortened link can be accessed, after which it will become inactive (max 100 for GENERIC type)
|
|
14
|
+
* @param expireDate Optional expiration date for the shortened URL, represented as a timestamp in milliseconds
|
|
15
|
+
*
|
|
16
|
+
* @returns the created short url
|
|
17
|
+
*/
|
|
18
|
+
createShort<R extends boolean = false>(organizationId: string, spaceId: string, url: string, type?: ShortType, visitsLimit?: number, expireDate?: number, raw?: {
|
|
19
|
+
raw: R;
|
|
20
|
+
}): Promise<MaybeRaw<R, Short>>;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves the full data associated with a shortened URL slug, including the original long URL, the current number of visits, and the maximum allowed visit limit.
|
|
23
|
+
*
|
|
24
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
25
|
+
*
|
|
26
|
+
* @param slug Unique identifier or alias representing the shortened version of a URL
|
|
27
|
+
* @returns detailed information about this short url slug
|
|
28
|
+
*/
|
|
29
|
+
getShort<R extends boolean = false>(slug: string, raw?: {
|
|
30
|
+
raw: R;
|
|
31
|
+
}): Promise<MaybeRaw<R, Short>>;
|
|
32
|
+
/**
|
|
33
|
+
* Updates the maximum allowed visit limit for a shortened URL identified by its slug.
|
|
34
|
+
*
|
|
35
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
36
|
+
*
|
|
37
|
+
* @param slug Unique identifier representing the shortened version of a URL
|
|
38
|
+
* @param visitsLimit New maximum number of allowed visits for this shortened URL
|
|
39
|
+
* @returns The updated Short object with the new visit limit
|
|
40
|
+
*/
|
|
41
|
+
updateVisitsLimit<R extends boolean = false>(slug: string, visitsLimit: number, raw?: {
|
|
42
|
+
raw: R;
|
|
43
|
+
}): Promise<MaybeRaw<R, Short>>;
|
|
44
|
+
/**
|
|
45
|
+
* Deletes the shortened URL associated with the given slug.
|
|
46
|
+
*
|
|
47
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
48
|
+
*
|
|
49
|
+
* @param slug Unique identifier representing the shortened version of a URL
|
|
50
|
+
*/
|
|
51
|
+
deleteShort<R extends boolean = false>(slug: string, raw?: {
|
|
52
|
+
raw: R;
|
|
53
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
54
|
+
/**
|
|
55
|
+
* Deletes all shortened URLs associated with the given space ID.
|
|
56
|
+
*
|
|
57
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
58
|
+
*
|
|
59
|
+
* @param spaceId ID of the space whose shortened URLs should be deleted
|
|
60
|
+
*/
|
|
61
|
+
deleteSpaceShorts<R extends boolean = false>(spaceId: string, raw?: {
|
|
62
|
+
raw: R;
|
|
63
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
64
|
+
/**
|
|
65
|
+
* Deletes all shortened URLs associated with the given organization ID.
|
|
66
|
+
*
|
|
67
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
68
|
+
*
|
|
69
|
+
* @param orgId ID of the organization whose shortened URLs should be deleted
|
|
70
|
+
*/
|
|
71
|
+
deleteOrganizationShorts<R extends boolean = false>(orgId: string, raw?: {
|
|
72
|
+
raw: R;
|
|
73
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
74
|
+
protected getEndpoint(endpoint: string): string;
|
|
75
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ShortsInternal = void 0;
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
17
|
+
const shorts_1 = require("../../../interfaces/shorts");
|
|
18
|
+
class ShortsInternal extends Base_1.default {
|
|
19
|
+
/**
|
|
20
|
+
* Generates a shortened alias for the provided long URL and sets a maximum number of allowed visits.
|
|
21
|
+
*
|
|
22
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
23
|
+
*
|
|
24
|
+
* @param organizationId ID of the organization
|
|
25
|
+
* @param spaceId ID of the space
|
|
26
|
+
* @param url Original long URL that needs to be shortened
|
|
27
|
+
* @param type Type of the short URL, can be GENERIC or COSMO
|
|
28
|
+
* @param visitsLimit Optional maximum number of times the shortened link can be accessed, after which it will become inactive (max 100 for GENERIC type)
|
|
29
|
+
* @param expireDate Optional expiration date for the shortened URL, represented as a timestamp in milliseconds
|
|
30
|
+
*
|
|
31
|
+
* @returns the created short url
|
|
32
|
+
*/
|
|
33
|
+
createShort(organizationId_1, spaceId_1, url_1) {
|
|
34
|
+
return __awaiter(this, arguments, void 0, function* (organizationId, spaceId, url, type = shorts_1.ShortType.GENERIC, visitsLimit, expireDate, raw) {
|
|
35
|
+
const res = yield this.axios.post(this.getEndpoint(`/internal/v1/short`), {
|
|
36
|
+
organizationId,
|
|
37
|
+
spaceId,
|
|
38
|
+
url,
|
|
39
|
+
type,
|
|
40
|
+
visitsLimit,
|
|
41
|
+
expireDate,
|
|
42
|
+
});
|
|
43
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves the full data associated with a shortened URL slug, including the original long URL, the current number of visits, and the maximum allowed visit limit.
|
|
48
|
+
*
|
|
49
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
50
|
+
*
|
|
51
|
+
* @param slug Unique identifier or alias representing the shortened version of a URL
|
|
52
|
+
* @returns detailed information about this short url slug
|
|
53
|
+
*/
|
|
54
|
+
getShort(slug, raw) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const res = yield this.axios.get(this.getEndpoint(`/internal/v1/short/${slug}`));
|
|
57
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Updates the maximum allowed visit limit for a shortened URL identified by its slug.
|
|
62
|
+
*
|
|
63
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
64
|
+
*
|
|
65
|
+
* @param slug Unique identifier representing the shortened version of a URL
|
|
66
|
+
* @param visitsLimit New maximum number of allowed visits for this shortened URL
|
|
67
|
+
* @returns The updated Short object with the new visit limit
|
|
68
|
+
*/
|
|
69
|
+
updateVisitsLimit(slug, visitsLimit, raw) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/internal/v1/short/${slug}/limit`), { visitsLimit });
|
|
72
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Deletes the shortened URL associated with the given slug.
|
|
77
|
+
*
|
|
78
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
79
|
+
*
|
|
80
|
+
* @param slug Unique identifier representing the shortened version of a URL
|
|
81
|
+
*/
|
|
82
|
+
deleteShort(slug, raw) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/internal/v1/short/${slug}`));
|
|
85
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Deletes all shortened URLs associated with the given space ID.
|
|
90
|
+
*
|
|
91
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
92
|
+
*
|
|
93
|
+
* @param spaceId ID of the space whose shortened URLs should be deleted
|
|
94
|
+
*/
|
|
95
|
+
deleteSpaceShorts(spaceId, raw) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/internal/v1/short/space/${spaceId}`));
|
|
98
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Deletes all shortened URLs associated with the given organization ID.
|
|
103
|
+
*
|
|
104
|
+
* This is an internal endpoint and can only be used from backends within the hcloud deployment.
|
|
105
|
+
*
|
|
106
|
+
* @param orgId ID of the organization whose shortened URLs should be deleted
|
|
107
|
+
*/
|
|
108
|
+
deleteOrganizationShorts(orgId, raw) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/internal/v1/short/org/${orgId}`));
|
|
111
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
getEndpoint(endpoint) {
|
|
115
|
+
return `${this.options.server}/api/shorts${endpoint}`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.ShortsInternal = ShortsInternal;
|
|
@@ -11,7 +11,6 @@ class BouncerProvider {
|
|
|
11
11
|
this.context = context;
|
|
12
12
|
this.logger = logger;
|
|
13
13
|
}
|
|
14
|
-
/* eslint-disable complexity */
|
|
15
14
|
isEnabled(featureName, defaultValue, context) {
|
|
16
15
|
const feature = this.features.find(f => f.name === featureName);
|
|
17
16
|
let result = defaultValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hcloud-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"description": "hcloud platform sdk",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"typescript": "^5.8.3"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"axios": "^1.
|
|
53
|
+
"axios": "^1.13.2",
|
|
54
54
|
"nats": "^2.29.3",
|
|
55
55
|
"nats.ws": "^1.30.3"
|
|
56
56
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ReducedSpace, Space, SpaceEntity } from "../../global";
|
|
2
|
-
import { ReducedOrganization } from "../../idp";
|
|
3
|
-
export interface FridaySpace extends Space {
|
|
4
|
-
highestPermissionOfUser: FridaySpacePermission;
|
|
5
|
-
}
|
|
6
|
-
export interface FridaySpaceEntityPermission {
|
|
7
|
-
organization: ReducedOrganization;
|
|
8
|
-
space: ReducedSpace;
|
|
9
|
-
entityId: string;
|
|
10
|
-
entityName: string;
|
|
11
|
-
type: SpaceEntity;
|
|
12
|
-
permission: FridaySpacePermission;
|
|
13
|
-
avatarUrl: string;
|
|
14
|
-
}
|
|
15
|
-
export declare enum FridaySpacePermission {
|
|
16
|
-
NONE = "NONE",
|
|
17
|
-
READ = "READ",
|
|
18
|
-
WRITE = "WRITE",
|
|
19
|
-
MANAGE = "MANAGE",
|
|
20
|
-
OWNER = "OWNER"
|
|
21
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FridaySpacePermission = void 0;
|
|
4
|
-
var FridaySpacePermission;
|
|
5
|
-
(function (FridaySpacePermission) {
|
|
6
|
-
FridaySpacePermission["NONE"] = "NONE";
|
|
7
|
-
FridaySpacePermission["READ"] = "READ";
|
|
8
|
-
FridaySpacePermission["WRITE"] = "WRITE";
|
|
9
|
-
FridaySpacePermission["MANAGE"] = "MANAGE";
|
|
10
|
-
FridaySpacePermission["OWNER"] = "OWNER";
|
|
11
|
-
})(FridaySpacePermission || (exports.FridaySpacePermission = FridaySpacePermission = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./space"), exports);
|
|
18
|
-
__exportStar(require("./space/cronjob/Cronjob"), exports);
|
|
19
|
-
__exportStar(require("./space/cronjob/CronjobLog"), exports);
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Select } from "../../../../utils/Types";
|
|
2
|
-
import { Header, HttpMethod, ReducedSpace } from "../../../global";
|
|
3
|
-
import { ReducedOrganization } from "../../../idp/organization";
|
|
4
|
-
import { ReducedUser } from "../../../idp/user";
|
|
5
|
-
export interface Cronjob {
|
|
6
|
-
_id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
expression: string;
|
|
9
|
-
organization: ReducedOrganization;
|
|
10
|
-
creator: ReducedUser;
|
|
11
|
-
space: ReducedSpace;
|
|
12
|
-
targetUrl: string;
|
|
13
|
-
httpMethod: HttpMethod;
|
|
14
|
-
acceptInvalidSSL: boolean;
|
|
15
|
-
timezone: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
headers?: Header[];
|
|
18
|
-
body?: string;
|
|
19
|
-
enabled?: boolean;
|
|
20
|
-
createDate: number;
|
|
21
|
-
modifyDate: number;
|
|
22
|
-
nextExecution?: number[];
|
|
23
|
-
lastStatus?: number;
|
|
24
|
-
lastTriggered?: number;
|
|
25
|
-
hmacSettings?: HmacSettings;
|
|
26
|
-
}
|
|
27
|
-
export type HmacSettings = {
|
|
28
|
-
headerName: string;
|
|
29
|
-
secret: string;
|
|
30
|
-
algorithm: HmacHashingAlgo;
|
|
31
|
-
};
|
|
32
|
-
export declare enum HmacHashingAlgo {
|
|
33
|
-
SHA_1 = "SHA-1",
|
|
34
|
-
SHA_256 = "SHA-256"
|
|
35
|
-
}
|
|
36
|
-
export type CronjobCreate = Pick<Cronjob, "name" | "expression" | "targetUrl" | "httpMethod" | "headers" | "body" | "enabled" | "description" | "lastStatus" | "lastTriggered"> & Partial<Pick<Cronjob, "acceptInvalidSSL" | "timezone">> & {
|
|
37
|
-
hmacSettings: Select<HmacSettings, "headerName" | "algorithm", "secret">;
|
|
38
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HmacHashingAlgo = void 0;
|
|
4
|
-
var HmacHashingAlgo;
|
|
5
|
-
(function (HmacHashingAlgo) {
|
|
6
|
-
HmacHashingAlgo["SHA_1"] = "SHA-1";
|
|
7
|
-
HmacHashingAlgo["SHA_256"] = "SHA-256";
|
|
8
|
-
})(HmacHashingAlgo || (exports.HmacHashingAlgo = HmacHashingAlgo = {}));
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ReducedSpace, Space, SpaceEntity } from "../../global";
|
|
2
|
-
import { ReducedOrganization } from "../../idp";
|
|
3
|
-
export interface FuseSpace extends Space {
|
|
4
|
-
highestPermissionOfUser: FuseSpacePermission;
|
|
5
|
-
}
|
|
6
|
-
export interface FuseSpaceEntityPermission {
|
|
7
|
-
organization: ReducedOrganization;
|
|
8
|
-
space: ReducedSpace;
|
|
9
|
-
entityId: string;
|
|
10
|
-
entityName: string;
|
|
11
|
-
type: SpaceEntity;
|
|
12
|
-
permission: FuseSpacePermission;
|
|
13
|
-
avatarUrl: string;
|
|
14
|
-
serviceAccount?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare enum FuseSpacePermission {
|
|
17
|
-
NONE = "NONE",
|
|
18
|
-
READ = "READ",
|
|
19
|
-
WRITE = "WRITE",
|
|
20
|
-
MANAGE = "MANAGE",
|
|
21
|
-
OWNER = "OWNER"
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FuseSpacePermission = void 0;
|
|
4
|
-
var FuseSpacePermission;
|
|
5
|
-
(function (FuseSpacePermission) {
|
|
6
|
-
FuseSpacePermission["NONE"] = "NONE";
|
|
7
|
-
FuseSpacePermission["READ"] = "READ";
|
|
8
|
-
FuseSpacePermission["WRITE"] = "WRITE";
|
|
9
|
-
FuseSpacePermission["MANAGE"] = "MANAGE";
|
|
10
|
-
FuseSpacePermission["OWNER"] = "OWNER";
|
|
11
|
-
})(FuseSpacePermission || (exports.FuseSpacePermission = FuseSpacePermission = {}));
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
2
|
-
import { AvatarCreated } from "../../../interfaces/dali";
|
|
3
|
-
export declare class DaliFuseSpace extends Base {
|
|
4
|
-
/**
|
|
5
|
-
* Creates a default avatar for the specified Fuse space.
|
|
6
|
-
* @param orgName Name of the organization
|
|
7
|
-
* @param spaceName Name of the space
|
|
8
|
-
* @returns Public URL of the created avatar
|
|
9
|
-
*/
|
|
10
|
-
createAvatar(orgName: string, spaceName: string): Promise<AvatarCreated>;
|
|
11
|
-
/**
|
|
12
|
-
* Deletes the avatar of the Fuse space from cloud storage. If you want to update it instead, use updateAvatar().
|
|
13
|
-
* @param orgName Name of the organization
|
|
14
|
-
* @param spaceName Name of the space
|
|
15
|
-
*/
|
|
16
|
-
deleteAvatar(orgName: string, spaceName: string): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Updates the avatar of the specified Fuse space
|
|
19
|
-
* @param orgName Name of the organization
|
|
20
|
-
* @param spaceName Name of the space
|
|
21
|
-
* @param file Image as Javascript File
|
|
22
|
-
* @returns Public URL of the new avatar
|
|
23
|
-
*/
|
|
24
|
-
updateAvatar(orgName: string, spaceName: string, file: File): Promise<AvatarCreated>;
|
|
25
|
-
protected getEndpoint(endpoint: string): string;
|
|
26
|
-
}
|