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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShortType = void 0;
|
|
4
|
+
var ShortType;
|
|
5
|
+
(function (ShortType) {
|
|
6
|
+
ShortType["GENERIC"] = "GENERIC";
|
|
7
|
+
ShortType["COSMO"] = "COSMO";
|
|
8
|
+
})(ShortType || (exports.ShortType = ShortType = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import Base, { Options } from "../../../../Base";
|
|
2
|
+
import Base, { MaybeRaw, Options } from "../../../../Base";
|
|
3
3
|
import { ToggleDevBundle } from "../../../../interfaces/agent/bundle/dev";
|
|
4
4
|
export declare class DevBundle extends Base {
|
|
5
5
|
constructor(options: Options, axios: AxiosInstance);
|
|
@@ -7,14 +7,24 @@ export declare class DevBundle extends Base {
|
|
|
7
7
|
* Retrieves the current dev bundle state.
|
|
8
8
|
* @returns The current dev bundle state
|
|
9
9
|
*/
|
|
10
|
-
getDevBundleState(
|
|
10
|
+
getDevBundleState<R extends boolean = false>(raw?: {
|
|
11
|
+
raw: R;
|
|
12
|
+
}): Promise<MaybeRaw<R, ToggleDevBundle>>;
|
|
11
13
|
/**
|
|
12
14
|
* Update the dev bundle state.
|
|
13
15
|
* @returns 204 - No content
|
|
14
16
|
*/
|
|
15
|
-
updateDevBundleState(allowDev: boolean
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
updateDevBundleState<R extends boolean = false>(allowDev: boolean, raw?: {
|
|
18
|
+
raw: R;
|
|
19
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
20
|
+
getCurrentVersion<R extends boolean = false>(raw?: {
|
|
21
|
+
raw: R;
|
|
22
|
+
}): Promise<MaybeRaw<R, string>>;
|
|
23
|
+
setCurrentVersion<R extends boolean = false>(version: string, raw?: {
|
|
24
|
+
raw: R;
|
|
25
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
26
|
+
restart<R extends boolean = false>(raw?: {
|
|
27
|
+
raw: R;
|
|
28
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
19
29
|
protected getEndpoint(endpoint: string): string;
|
|
20
30
|
}
|
|
@@ -8,9 +8,12 @@ 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
|
exports.DevBundle = void 0;
|
|
13
|
-
const Base_1 = require("../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
14
17
|
class DevBundle extends Base_1.default {
|
|
15
18
|
constructor(options, axios) {
|
|
16
19
|
super(options, axios);
|
|
@@ -19,38 +22,40 @@ class DevBundle extends Base_1.default {
|
|
|
19
22
|
* Retrieves the current dev bundle state.
|
|
20
23
|
* @returns The current dev bundle state
|
|
21
24
|
*/
|
|
22
|
-
getDevBundleState() {
|
|
25
|
+
getDevBundleState(raw) {
|
|
23
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
27
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/bundle/dev`));
|
|
25
|
-
return resp.data;
|
|
28
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
31
|
/**
|
|
29
32
|
* Update the dev bundle state.
|
|
30
33
|
* @returns 204 - No content
|
|
31
34
|
*/
|
|
32
|
-
updateDevBundleState(allowDev) {
|
|
35
|
+
updateDevBundleState(allowDev, raw) {
|
|
33
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
37
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/bundle/dev`), {
|
|
35
38
|
allowDev,
|
|
36
39
|
});
|
|
37
|
-
return resp
|
|
40
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
38
41
|
});
|
|
39
42
|
}
|
|
40
|
-
getCurrentVersion() {
|
|
43
|
+
getCurrentVersion(raw) {
|
|
41
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
45
|
const resp = yield this.axios.get(this.getEndpoint("/v1/bundle/version"));
|
|
43
|
-
return resp.data;
|
|
46
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
44
47
|
});
|
|
45
48
|
}
|
|
46
|
-
setCurrentVersion(version) {
|
|
49
|
+
setCurrentVersion(version, raw) {
|
|
47
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
yield this.axios.put(this.getEndpoint("/v1/bundle/version"), { version }, { headers: { "Content-Type": "application/x-www-form-urlencoded" } });
|
|
51
|
+
const resp = yield this.axios.put(this.getEndpoint("/v1/bundle/version"), { version }, { headers: { "Content-Type": "application/x-www-form-urlencoded" } });
|
|
52
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
|
-
restart() {
|
|
55
|
+
restart(raw) {
|
|
52
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
yield this.axios.post(this.getEndpoint("/v1/bundle/restart"));
|
|
57
|
+
const resp = yield this.axios.post(this.getEndpoint("/v1/bundle/restart"));
|
|
58
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
54
59
|
});
|
|
55
60
|
}
|
|
56
61
|
getEndpoint(endpoint) {
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import Base, { Options } from "../../../Base";
|
|
2
|
+
import Base, { MaybeRaw, Options } from "../../../Base";
|
|
3
3
|
import { AgentVersions, Version } from "../../../interfaces/agent";
|
|
4
4
|
export declare class AgentBundle extends Base {
|
|
5
5
|
private sourceServer;
|
|
6
6
|
constructor(options: Options, axios: AxiosInstance);
|
|
7
|
-
getVersions(
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
getVersions<R extends boolean = false>(raw?: {
|
|
8
|
+
raw: R;
|
|
9
|
+
}): Promise<MaybeRaw<R, AgentVersions>>;
|
|
10
|
+
getLatestVersion<R extends boolean = false>(raw?: {
|
|
11
|
+
raw: R;
|
|
12
|
+
}): Promise<MaybeRaw<R, Version>>;
|
|
13
|
+
getVersion<R extends boolean = false>(version: string, raw?: {
|
|
14
|
+
raw: R;
|
|
15
|
+
}): Promise<MaybeRaw<R, Version | void>>;
|
|
10
16
|
protected getEndpoint(endpoint: string): string;
|
|
11
17
|
}
|
|
@@ -8,9 +8,12 @@ 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
|
exports.AgentBundle = void 0;
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
14
17
|
const axios_1 = require("../../../interfaces/axios");
|
|
15
18
|
class AgentBundle extends Base_1.default {
|
|
16
19
|
constructor(options, axios) {
|
|
@@ -18,26 +21,26 @@ class AgentBundle extends Base_1.default {
|
|
|
18
21
|
super(options, axios);
|
|
19
22
|
this.sourceServer = ((_a = options.agent) === null || _a === void 0 ? void 0 : _a.server) || "https://agent.s3.helmut.cloud";
|
|
20
23
|
}
|
|
21
|
-
getVersions() {
|
|
24
|
+
getVersions(raw) {
|
|
22
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
26
|
const resp = yield this.axios.get(this.getEndpoint("/bundles/index.json"), { headers: axios_1.disableCacheHeaders });
|
|
24
27
|
const registry = resp.data;
|
|
25
28
|
for (const v in registry.versions) {
|
|
26
29
|
setDev(registry.versions[v]);
|
|
27
30
|
}
|
|
28
|
-
return resp.data;
|
|
31
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
29
32
|
});
|
|
30
33
|
}
|
|
31
|
-
getLatestVersion() {
|
|
34
|
+
getLatestVersion(raw) {
|
|
32
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33
36
|
const resp = yield this.getVersions();
|
|
34
|
-
return setDev(resp.versions[resp.latest]);
|
|
37
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: setDev(resp.versions[resp.latest]) }) : setDev(resp.versions[resp.latest]));
|
|
35
38
|
});
|
|
36
39
|
}
|
|
37
|
-
getVersion(version) {
|
|
40
|
+
getVersion(version, raw) {
|
|
38
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
42
|
const resp = yield this.getVersions();
|
|
40
|
-
return setDev(resp.versions[version]);
|
|
43
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: setDev(resp.versions[version]) }) : setDev(resp.versions[version]));
|
|
41
44
|
});
|
|
42
45
|
}
|
|
43
46
|
getEndpoint(endpoint) {
|
|
@@ -1,40 +1,54 @@
|
|
|
1
|
-
import Base from "../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
2
|
import { Context } from "../../../interfaces/agent/context";
|
|
3
3
|
export declare class AgentContext extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* Retrieves all contexts.
|
|
6
6
|
* @returns The requested contexts
|
|
7
7
|
*/
|
|
8
|
-
getContexts(
|
|
8
|
+
getContexts<R extends boolean = false>(raw?: {
|
|
9
|
+
raw: R;
|
|
10
|
+
}): Promise<MaybeRaw<R, Context[]>>;
|
|
9
11
|
/**
|
|
10
12
|
* Add a new context.
|
|
11
13
|
* @returns The newly created context
|
|
12
14
|
*/
|
|
13
|
-
addContext(server: string, email: string, token: string, enabled: boolean
|
|
15
|
+
addContext<R extends boolean = false>(server: string, email: string, token: string, enabled: boolean, raw?: {
|
|
16
|
+
raw: R;
|
|
17
|
+
}): Promise<MaybeRaw<R, Context>>;
|
|
14
18
|
/**
|
|
15
19
|
* Add a new context by using a service accounts PAT token.
|
|
16
20
|
* @returns The newly created context
|
|
17
21
|
*/
|
|
18
|
-
addServiceAccountContext(server: string, token: string, enabled: boolean
|
|
22
|
+
addServiceAccountContext<R extends boolean = false>(server: string, token: string, enabled: boolean, raw?: {
|
|
23
|
+
raw: R;
|
|
24
|
+
}): Promise<MaybeRaw<R, Context>>;
|
|
19
25
|
/**
|
|
20
26
|
* Update an existing context.
|
|
21
27
|
* @returns The updated context
|
|
22
28
|
*/
|
|
23
|
-
updateContext(uuid: string, server: string, email: string, token: string, enabled: boolean
|
|
29
|
+
updateContext<R extends boolean = false>(uuid: string, server: string, email: string, token: string, enabled: boolean, raw?: {
|
|
30
|
+
raw: R;
|
|
31
|
+
}): Promise<MaybeRaw<R, Context>>;
|
|
24
32
|
/**
|
|
25
33
|
* Get an existing context.
|
|
26
34
|
* @returns The requested context
|
|
27
35
|
*/
|
|
28
|
-
getContext(uuid: string
|
|
36
|
+
getContext<R extends boolean = false>(uuid: string, raw?: {
|
|
37
|
+
raw: R;
|
|
38
|
+
}): Promise<MaybeRaw<R, Context>>;
|
|
29
39
|
/**
|
|
30
40
|
* Delete a context.
|
|
31
41
|
* @returns void
|
|
32
42
|
*/
|
|
33
|
-
deleteContext(uuid: string
|
|
43
|
+
deleteContext<R extends boolean = false>(uuid: string, raw?: {
|
|
44
|
+
raw: R;
|
|
45
|
+
}): Promise<MaybeRaw<R, Context>>;
|
|
34
46
|
/**
|
|
35
47
|
* Patch the enabled property of a Context.
|
|
36
48
|
* @returns Updated Context
|
|
37
49
|
*/
|
|
38
|
-
patchContextEnabled(uuid: string, enabled: boolean
|
|
50
|
+
patchContextEnabled<R extends boolean = false>(uuid: string, enabled: boolean, raw?: {
|
|
51
|
+
raw: R;
|
|
52
|
+
}): Promise<MaybeRaw<R, Context>>;
|
|
39
53
|
protected getEndpoint(endpoint: string): string;
|
|
40
54
|
}
|
|
@@ -8,25 +8,28 @@ 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
|
exports.AgentContext = void 0;
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
14
17
|
class AgentContext extends Base_1.default {
|
|
15
18
|
/**
|
|
16
19
|
* Retrieves all contexts.
|
|
17
20
|
* @returns The requested contexts
|
|
18
21
|
*/
|
|
19
|
-
getContexts() {
|
|
22
|
+
getContexts(raw) {
|
|
20
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
24
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/context`));
|
|
22
|
-
return resp.data;
|
|
25
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
23
26
|
});
|
|
24
27
|
}
|
|
25
28
|
/**
|
|
26
29
|
* Add a new context.
|
|
27
30
|
* @returns The newly created context
|
|
28
31
|
*/
|
|
29
|
-
addContext(server, email, token, enabled) {
|
|
32
|
+
addContext(server, email, token, enabled, raw) {
|
|
30
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
34
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/context`), {
|
|
32
35
|
server,
|
|
@@ -34,28 +37,28 @@ class AgentContext extends Base_1.default {
|
|
|
34
37
|
token,
|
|
35
38
|
enabled,
|
|
36
39
|
});
|
|
37
|
-
return resp.data;
|
|
40
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
38
41
|
});
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* Add a new context by using a service accounts PAT token.
|
|
42
45
|
* @returns The newly created context
|
|
43
46
|
*/
|
|
44
|
-
addServiceAccountContext(server, token, enabled) {
|
|
47
|
+
addServiceAccountContext(server, token, enabled, raw) {
|
|
45
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
49
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/context`), {
|
|
47
50
|
server,
|
|
48
51
|
token: token.toLowerCase().startsWith("bearer") ? token : `Bearer ${token}`,
|
|
49
52
|
enabled,
|
|
50
53
|
});
|
|
51
|
-
return resp.data;
|
|
54
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
52
55
|
});
|
|
53
56
|
}
|
|
54
57
|
/**
|
|
55
58
|
* Update an existing context.
|
|
56
59
|
* @returns The updated context
|
|
57
60
|
*/
|
|
58
|
-
updateContext(uuid, server, email, token, enabled) {
|
|
61
|
+
updateContext(uuid, server, email, token, enabled, raw) {
|
|
59
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
63
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/context/${uuid}`), {
|
|
61
64
|
server,
|
|
@@ -63,38 +66,39 @@ class AgentContext extends Base_1.default {
|
|
|
63
66
|
token,
|
|
64
67
|
enabled,
|
|
65
68
|
});
|
|
66
|
-
return resp.data;
|
|
69
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
67
70
|
});
|
|
68
71
|
}
|
|
69
72
|
/**
|
|
70
73
|
* Get an existing context.
|
|
71
74
|
* @returns The requested context
|
|
72
75
|
*/
|
|
73
|
-
getContext(uuid) {
|
|
76
|
+
getContext(uuid, raw) {
|
|
74
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
78
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/context/${uuid}`));
|
|
76
|
-
return resp.data;
|
|
79
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
77
80
|
});
|
|
78
81
|
}
|
|
79
82
|
/**
|
|
80
83
|
* Delete a context.
|
|
81
84
|
* @returns void
|
|
82
85
|
*/
|
|
83
|
-
deleteContext(uuid) {
|
|
86
|
+
deleteContext(uuid, raw) {
|
|
84
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
yield this.axios.delete(this.getEndpoint(`/v1/context/${uuid}`));
|
|
88
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/context/${uuid}`));
|
|
89
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
86
90
|
});
|
|
87
91
|
}
|
|
88
92
|
/**
|
|
89
93
|
* Patch the enabled property of a Context.
|
|
90
94
|
* @returns Updated Context
|
|
91
95
|
*/
|
|
92
|
-
patchContextEnabled(uuid, enabled) {
|
|
96
|
+
patchContextEnabled(uuid, enabled, raw) {
|
|
93
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
98
|
const res = yield this.axios.patch(this.getEndpoint(`/v1/context/${uuid}/enabled`), {
|
|
95
99
|
enabled,
|
|
96
100
|
});
|
|
97
|
-
return res.data;
|
|
101
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
98
102
|
});
|
|
99
103
|
}
|
|
100
104
|
getEndpoint(endpoint) {
|
|
@@ -3,6 +3,8 @@ import { AgentBundle } from "./bundle";
|
|
|
3
3
|
import { DevBundle } from "./bundle/dev";
|
|
4
4
|
import { AgentContext } from "./context";
|
|
5
5
|
import { AgentInstaller } from "./installer";
|
|
6
|
+
import { AgentLogging } from "./logging";
|
|
7
|
+
import { AgentModule } from "./module";
|
|
6
8
|
export default class Agent extends Base {
|
|
7
9
|
get context(): AgentContext;
|
|
8
10
|
private _context?;
|
|
@@ -12,5 +14,9 @@ export default class Agent extends Base {
|
|
|
12
14
|
private _devBundle?;
|
|
13
15
|
get installer(): AgentInstaller;
|
|
14
16
|
private _installer?;
|
|
17
|
+
get logging(): AgentLogging;
|
|
18
|
+
private _logging?;
|
|
19
|
+
get module(): AgentModule;
|
|
20
|
+
private _module?;
|
|
15
21
|
protected getEndpoint(endpoint: string): string;
|
|
16
22
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const Base_1 = require("../../Base");
|
|
6
|
+
const Base_1 = __importDefault(require("../../Base"));
|
|
4
7
|
const bundle_1 = require("./bundle");
|
|
5
8
|
const dev_1 = require("./bundle/dev");
|
|
6
9
|
const context_1 = require("./context");
|
|
7
10
|
const installer_1 = require("./installer");
|
|
11
|
+
const logging_1 = require("./logging");
|
|
12
|
+
const module_1 = require("./module");
|
|
8
13
|
class Agent extends Base_1.default {
|
|
9
14
|
get context() {
|
|
10
15
|
if (this._context === undefined) {
|
|
@@ -30,6 +35,18 @@ class Agent extends Base_1.default {
|
|
|
30
35
|
}
|
|
31
36
|
return this._installer;
|
|
32
37
|
}
|
|
38
|
+
get logging() {
|
|
39
|
+
if (this._logging === undefined) {
|
|
40
|
+
this._logging = new logging_1.AgentLogging(this.options, this.axios);
|
|
41
|
+
}
|
|
42
|
+
return this._logging;
|
|
43
|
+
}
|
|
44
|
+
get module() {
|
|
45
|
+
if (this._module === undefined) {
|
|
46
|
+
this._module = new module_1.AgentModule(this.options, this.axios);
|
|
47
|
+
}
|
|
48
|
+
return this._module;
|
|
49
|
+
}
|
|
33
50
|
getEndpoint(endpoint) {
|
|
34
51
|
return `${this.options.server}/api/agent${endpoint}`;
|
|
35
52
|
}
|
|
@@ -8,9 +8,12 @@ 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
|
exports.AgentInstaller = void 0;
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
14
17
|
const axios_1 = require("../../../interfaces/axios");
|
|
15
18
|
class AgentInstaller extends Base_1.default {
|
|
16
19
|
constructor(options, axios) {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { AddCloudWatchDto, AddLogCollectorDto, CloudWatchDto, LogCollectorDto } from "../../../interfaces/agent/logging";
|
|
3
|
+
export declare class AgentLogging extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves a list of all currently registered and connected external logging destinations.
|
|
6
|
+
* @returns List of active external log collector configurations
|
|
7
|
+
*/
|
|
8
|
+
getLogCollectors<R extends boolean = false>(raw?: {
|
|
9
|
+
raw: R;
|
|
10
|
+
}): Promise<MaybeRaw<R, LogCollectorDto[]>>;
|
|
11
|
+
/**
|
|
12
|
+
* Registers a new external destination and initializes a persistent Winston HTTP transport for log forwarding.
|
|
13
|
+
* @param collector - The configuration for the new log collector
|
|
14
|
+
* @returns The newly created log collector details
|
|
15
|
+
*/
|
|
16
|
+
addLogCollector<R extends boolean = false>(collector: AddLogCollectorDto, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, LogCollectorDto>>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves configuration and status information for a specific external log collector by its name.
|
|
21
|
+
* @param name - Unique identifier of the external log collector
|
|
22
|
+
* @returns The requested log collector details
|
|
23
|
+
*/
|
|
24
|
+
getLogCollector<R extends boolean = false>(name: string, raw?: {
|
|
25
|
+
raw: R;
|
|
26
|
+
}): Promise<MaybeRaw<R, LogCollectorDto>>;
|
|
27
|
+
/**
|
|
28
|
+
* Removes an external log destination and immediately terminates the associated Winston transport.
|
|
29
|
+
* @param name - Unique identifier of the external log collector to be deleted
|
|
30
|
+
* @returns void (or raw response)
|
|
31
|
+
*/
|
|
32
|
+
deleteLogCollector<R extends boolean = false>(name: string, raw?: {
|
|
33
|
+
raw: R;
|
|
34
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
35
|
+
/**
|
|
36
|
+
* Updates the activation status of a specific log collector,
|
|
37
|
+
* this toggles log forwarding to the destination without removing its configuration.
|
|
38
|
+
* @param name - Unique identifier of the external log collector
|
|
39
|
+
* @param enabled - Flag to enable or disable the collector
|
|
40
|
+
* @returns The updated log collector details
|
|
41
|
+
*/
|
|
42
|
+
patchLogCollectorEnabled<R extends boolean = false>(name: string, enabled: boolean, raw?: {
|
|
43
|
+
raw: R;
|
|
44
|
+
}): Promise<MaybeRaw<R, LogCollectorDto>>;
|
|
45
|
+
/**
|
|
46
|
+
* Registers and initializes a new Amazon CloudWatch transport for log forwarding
|
|
47
|
+
* @param options - AWS credentials and CloudWatch group/stream configuration
|
|
48
|
+
* @returns The registered CloudWatch collector details
|
|
49
|
+
*/
|
|
50
|
+
addCloudWatch<R extends boolean = false>(options: AddCloudWatchDto, raw?: {
|
|
51
|
+
raw: R;
|
|
52
|
+
}): Promise<MaybeRaw<R, CloudWatchDto>>;
|
|
53
|
+
/**
|
|
54
|
+
* Removes the Amazon CloudWatch logging destination and terminates its Winston transport
|
|
55
|
+
* @returns void (or raw response)
|
|
56
|
+
*/
|
|
57
|
+
deleteCloudWatch<R extends boolean = false>(raw?: {
|
|
58
|
+
raw: R;
|
|
59
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
60
|
+
/**
|
|
61
|
+
* Establishes a persistent Server-Sent Events (SSE) connection to stream logs in real-time.
|
|
62
|
+
* Note: This method returns the raw Axios response because SSE requires stream handling.
|
|
63
|
+
* @param level - Optional filter by severity level
|
|
64
|
+
* @param entity - Optional filter by originating component
|
|
65
|
+
* @returns Raw response with the event stream
|
|
66
|
+
*/
|
|
67
|
+
streamLogs(level?: string, entity?: string): Promise<any>;
|
|
68
|
+
protected getEndpoint(endpoint: string): string;
|
|
69
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
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.AgentLogging = void 0;
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
17
|
+
class AgentLogging extends Base_1.default {
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves a list of all currently registered and connected external logging destinations.
|
|
20
|
+
* @returns List of active external log collector configurations
|
|
21
|
+
*/
|
|
22
|
+
getLogCollectors(raw) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/log/collectors`));
|
|
25
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Registers a new external destination and initializes a persistent Winston HTTP transport for log forwarding.
|
|
30
|
+
* @param collector - The configuration for the new log collector
|
|
31
|
+
* @returns The newly created log collector details
|
|
32
|
+
*/
|
|
33
|
+
addLogCollector(collector, raw) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/log/collectors`), collector);
|
|
36
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves configuration and status information for a specific external log collector by its name.
|
|
41
|
+
* @param name - Unique identifier of the external log collector
|
|
42
|
+
* @returns The requested log collector details
|
|
43
|
+
*/
|
|
44
|
+
getLogCollector(name, raw) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/log/collectors/${name}`));
|
|
47
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Removes an external log destination and immediately terminates the associated Winston transport.
|
|
52
|
+
* @param name - Unique identifier of the external log collector to be deleted
|
|
53
|
+
* @returns void (or raw response)
|
|
54
|
+
*/
|
|
55
|
+
deleteLogCollector(name, raw) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/log/collectors/${name}`));
|
|
58
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Updates the activation status of a specific log collector,
|
|
63
|
+
* this toggles log forwarding to the destination without removing its configuration.
|
|
64
|
+
* @param name - Unique identifier of the external log collector
|
|
65
|
+
* @param enabled - Flag to enable or disable the collector
|
|
66
|
+
* @returns The updated log collector details
|
|
67
|
+
*/
|
|
68
|
+
patchLogCollectorEnabled(name, enabled, raw) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/log/collectors/${name}/enabled`), { enabled });
|
|
71
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Registers and initializes a new Amazon CloudWatch transport for log forwarding
|
|
76
|
+
* @param options - AWS credentials and CloudWatch group/stream configuration
|
|
77
|
+
* @returns The registered CloudWatch collector details
|
|
78
|
+
*/
|
|
79
|
+
addCloudWatch(options, raw) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/log/cloudwatch`), options);
|
|
82
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Removes the Amazon CloudWatch logging destination and terminates its Winston transport
|
|
87
|
+
* @returns void (or raw response)
|
|
88
|
+
*/
|
|
89
|
+
deleteCloudWatch(raw) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/log/cloudwatch`));
|
|
92
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Establishes a persistent Server-Sent Events (SSE) connection to stream logs in real-time.
|
|
97
|
+
* Note: This method returns the raw Axios response because SSE requires stream handling.
|
|
98
|
+
* @param level - Optional filter by severity level
|
|
99
|
+
* @param entity - Optional filter by originating component
|
|
100
|
+
* @returns Raw response with the event stream
|
|
101
|
+
*/
|
|
102
|
+
streamLogs(level, entity) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
return this.axios.get(this.getEndpoint(`/v1/logs`), {
|
|
105
|
+
params: { level, entity },
|
|
106
|
+
responseType: "stream",
|
|
107
|
+
headers: {
|
|
108
|
+
Accept: "text/event-stream",
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
getEndpoint(endpoint) {
|
|
114
|
+
return `${this.options.server}/api/agent${endpoint}`;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.AgentLogging = AgentLogging;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { ModuleDto } from "../../../interfaces/agent/module";
|
|
3
|
+
export declare class AgentModule extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves a list of all loaded modules available in the agent.
|
|
6
|
+
* @returns A list of modules metadata
|
|
7
|
+
*/
|
|
8
|
+
listModules<R extends boolean = false>(raw?: {
|
|
9
|
+
raw: R;
|
|
10
|
+
}): Promise<MaybeRaw<R, ModuleDto[]>>;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new module template based on the received metadata.
|
|
13
|
+
* @param module - Metadata for the new module template
|
|
14
|
+
* @returns Newly created module data
|
|
15
|
+
*/
|
|
16
|
+
addModule<R extends boolean = false>(module: ModuleDto, raw?: {
|
|
17
|
+
raw: R;
|
|
18
|
+
}): Promise<MaybeRaw<R, ModuleDto>>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves detailed information about a specific module by its name.
|
|
21
|
+
* @param modName - Unique name identifier of the module
|
|
22
|
+
* @returns Requested module details
|
|
23
|
+
*/
|
|
24
|
+
getModule<R extends boolean = false>(modName: string, raw?: {
|
|
25
|
+
raw: R;
|
|
26
|
+
}): Promise<MaybeRaw<R, ModuleDto>>;
|
|
27
|
+
/**
|
|
28
|
+
* Removes the module from the agent by its name.
|
|
29
|
+
* @param modName - Unique name identifier of the module to be deleted
|
|
30
|
+
* @returns void (or raw response)
|
|
31
|
+
*/
|
|
32
|
+
deleteModule<R extends boolean = false>(modName: string, raw?: {
|
|
33
|
+
raw: R;
|
|
34
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
35
|
+
protected getEndpoint(endpoint: string): string;
|
|
36
|
+
}
|