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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { SpacePatchWaveCatalog, SpacePatchWaveEngine, WaveCatalog, WaveEngine } from "../../../../interfaces/high5";
|
|
3
3
|
export default class High5Wave extends Base {
|
|
4
4
|
/**
|
|
@@ -8,14 +8,18 @@ export default class High5Wave extends Base {
|
|
|
8
8
|
* @param spacePatchWaveEngine - Patch wave engine object holding url and version
|
|
9
9
|
* @returns WaveEngine object
|
|
10
10
|
*/
|
|
11
|
-
patchSpaceWaveEngine(orgName: string, spaceName: string, spacePatchWaveEngine: SpacePatchWaveEngine
|
|
11
|
+
patchSpaceWaveEngine<R extends boolean = false>(orgName: string, spaceName: string, spacePatchWaveEngine: SpacePatchWaveEngine, raw?: {
|
|
12
|
+
raw: R;
|
|
13
|
+
}): Promise<MaybeRaw<R, WaveEngine>>;
|
|
12
14
|
/**
|
|
13
15
|
* Get wave engine version currently active for the space
|
|
14
16
|
* @param orgName - Name of the organization
|
|
15
17
|
* @param spaceName - Name of the space
|
|
16
18
|
* @returns WaveEngine object
|
|
17
19
|
*/
|
|
18
|
-
getSpaceWaveEngine(orgName: string, spaceName: string
|
|
20
|
+
getSpaceWaveEngine<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
|
|
21
|
+
raw: R;
|
|
22
|
+
}): Promise<MaybeRaw<R, WaveEngine>>;
|
|
19
23
|
/**
|
|
20
24
|
* Adds a new wave catalog version for a space or updates existing
|
|
21
25
|
* @param orgName - Name of the organization
|
|
@@ -23,14 +27,20 @@ export default class High5Wave extends Base {
|
|
|
23
27
|
* @param spacePatchWaveCatalog - Patch wave catalog object holding url, version and optionally a minimumEngineVersion
|
|
24
28
|
* @returns WaveCatalog object
|
|
25
29
|
*/
|
|
26
|
-
addUpdateSpaceWaveCatalog(orgName: string, spaceName: string, spacePatchCatalog: SpacePatchWaveCatalog
|
|
30
|
+
addUpdateSpaceWaveCatalog<R extends boolean = false>(orgName: string, spaceName: string, spacePatchCatalog: SpacePatchWaveCatalog, raw?: {
|
|
31
|
+
raw: R;
|
|
32
|
+
}): Promise<MaybeRaw<R, WaveCatalog>>;
|
|
27
33
|
/**
|
|
28
34
|
* Get wave catalogs currently active for the space
|
|
29
35
|
* @param orgName - Name of the organization
|
|
30
36
|
* @param spaceName - Name of the space
|
|
31
37
|
* @returns WaveCatalog array
|
|
32
38
|
*/
|
|
33
|
-
getSpaceWaveCatalogs(orgName: string, spaceName: string
|
|
34
|
-
|
|
39
|
+
getSpaceWaveCatalogs<R extends boolean = false>(orgName: string, spaceName: string, raw?: {
|
|
40
|
+
raw: R;
|
|
41
|
+
}): Promise<MaybeRaw<R, WaveCatalog[]>>;
|
|
42
|
+
deleteSpaceWaveCatalog<R extends boolean = false>(orgName: string, spaceName: string, catalogId: string, raw?: {
|
|
43
|
+
raw: R;
|
|
44
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
35
45
|
protected getEndpoint(endpoint: string): string;
|
|
36
46
|
}
|
|
@@ -8,8 +8,11 @@ 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");
|
|
15
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
13
16
|
class High5Wave extends Base_1.default {
|
|
14
17
|
/**
|
|
15
18
|
* Patch wave engine version for a space
|
|
@@ -18,10 +21,10 @@ class High5Wave extends Base_1.default {
|
|
|
18
21
|
* @param spacePatchWaveEngine - Patch wave engine object holding url and version
|
|
19
22
|
* @returns WaveEngine object
|
|
20
23
|
*/
|
|
21
|
-
patchSpaceWaveEngine(orgName, spaceName, spacePatchWaveEngine) {
|
|
24
|
+
patchSpaceWaveEngine(orgName, spaceName, spacePatchWaveEngine, raw) {
|
|
22
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
26
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/engine`), spacePatchWaveEngine);
|
|
24
|
-
return resp.data;
|
|
27
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
25
28
|
});
|
|
26
29
|
}
|
|
27
30
|
/**
|
|
@@ -30,10 +33,10 @@ class High5Wave extends Base_1.default {
|
|
|
30
33
|
* @param spaceName - Name of the space
|
|
31
34
|
* @returns WaveEngine object
|
|
32
35
|
*/
|
|
33
|
-
getSpaceWaveEngine(orgName, spaceName) {
|
|
36
|
+
getSpaceWaveEngine(orgName, spaceName, raw) {
|
|
34
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
38
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/engine`));
|
|
36
|
-
return resp.data;
|
|
39
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
37
40
|
});
|
|
38
41
|
}
|
|
39
42
|
/**
|
|
@@ -43,10 +46,10 @@ class High5Wave extends Base_1.default {
|
|
|
43
46
|
* @param spacePatchWaveCatalog - Patch wave catalog object holding url, version and optionally a minimumEngineVersion
|
|
44
47
|
* @returns WaveCatalog object
|
|
45
48
|
*/
|
|
46
|
-
addUpdateSpaceWaveCatalog(orgName, spaceName, spacePatchCatalog) {
|
|
49
|
+
addUpdateSpaceWaveCatalog(orgName, spaceName, spacePatchCatalog, raw) {
|
|
47
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
51
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog`), spacePatchCatalog);
|
|
49
|
-
return resp.data;
|
|
52
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
50
53
|
});
|
|
51
54
|
}
|
|
52
55
|
/**
|
|
@@ -55,15 +58,16 @@ class High5Wave extends Base_1.default {
|
|
|
55
58
|
* @param spaceName - Name of the space
|
|
56
59
|
* @returns WaveCatalog array
|
|
57
60
|
*/
|
|
58
|
-
getSpaceWaveCatalogs(orgName, spaceName) {
|
|
61
|
+
getSpaceWaveCatalogs(orgName, spaceName, raw) {
|
|
59
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
63
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog`));
|
|
61
|
-
return resp.data;
|
|
64
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
62
65
|
});
|
|
63
66
|
}
|
|
64
|
-
deleteSpaceWaveCatalog(orgName, spaceName, catalogId) {
|
|
67
|
+
deleteSpaceWaveCatalog(orgName, spaceName, catalogId, raw) {
|
|
65
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog/${catalogId}`));
|
|
69
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/wave/catalog/${catalogId}`));
|
|
70
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
67
71
|
});
|
|
68
72
|
}
|
|
69
73
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../Base";
|
|
2
2
|
import { PaginatedResponse, SearchParams } from "../../../../interfaces/global";
|
|
3
3
|
import { KeyValuePair, Webhook, WebhookCreate, WebhookUpdate } from "../../../../interfaces/high5/space/webhook";
|
|
4
4
|
import { High5WebhookLog } from "./log";
|
|
@@ -15,10 +15,12 @@ export declare class High5Webhook extends Base {
|
|
|
15
15
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
16
16
|
* @returns Object containing an array of Webhooks and the total number of results found in the database (independent of limit and page)
|
|
17
17
|
*/
|
|
18
|
-
searchWebhooks({ orgName, spaceName, filters, sorting, limit, page
|
|
18
|
+
searchWebhooks<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & {
|
|
19
19
|
orgName: string;
|
|
20
20
|
spaceName: string;
|
|
21
|
-
}
|
|
21
|
+
}, raw?: {
|
|
22
|
+
raw: R;
|
|
23
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<Webhook>>>;
|
|
22
24
|
/**
|
|
23
25
|
* Requests a Webhhok by its ID.
|
|
24
26
|
* @param orgName Name of the Organization
|
|
@@ -26,7 +28,9 @@ export declare class High5Webhook extends Base {
|
|
|
26
28
|
* @param webhookId ID of the Webhook
|
|
27
29
|
* @returns The requested Webhook
|
|
28
30
|
*/
|
|
29
|
-
getWebhook(orgName: string, spaceName: string, webhookId: string
|
|
31
|
+
getWebhook<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, Webhook>>;
|
|
30
34
|
/**
|
|
31
35
|
* Generates a new URL for the specified Webhook. This is suggested if a leak of the current URL is likely.
|
|
32
36
|
* @param orgName Name of the Organization
|
|
@@ -34,7 +38,9 @@ export declare class High5Webhook extends Base {
|
|
|
34
38
|
* @param webhookId ID of the Webhook
|
|
35
39
|
* @returns The updated Webhook
|
|
36
40
|
*/
|
|
37
|
-
regenerateWebhookUrl(orgName: string, spaceName: string, webhookId: string
|
|
41
|
+
regenerateWebhookUrl<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, raw?: {
|
|
42
|
+
raw: R;
|
|
43
|
+
}): Promise<MaybeRaw<R, Webhook>>;
|
|
38
44
|
/**
|
|
39
45
|
* Creates a new Webhook in the specified High5 space.
|
|
40
46
|
* @param orgName Name of the Organization
|
|
@@ -42,7 +48,9 @@ export declare class High5Webhook extends Base {
|
|
|
42
48
|
* @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the new webhook
|
|
43
49
|
* @returns The created Webhook
|
|
44
50
|
*/
|
|
45
|
-
createWebhook(orgName: string, spaceName: string, WebhookCreate: WebhookCreate
|
|
51
|
+
createWebhook<R extends boolean = false>(orgName: string, spaceName: string, WebhookCreate: WebhookCreate, raw?: {
|
|
52
|
+
raw: R;
|
|
53
|
+
}): Promise<MaybeRaw<R, Webhook>>;
|
|
46
54
|
/**
|
|
47
55
|
* Updates an existing Webhook.
|
|
48
56
|
* @param orgName Name of the Organization
|
|
@@ -51,26 +59,34 @@ export declare class High5Webhook extends Base {
|
|
|
51
59
|
* @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the updated webhook
|
|
52
60
|
* @returns the updated Webhook
|
|
53
61
|
*/
|
|
54
|
-
updateWebhook(orgName: string, spaceName: string, webhookId: string, webhookUpdate: WebhookUpdate
|
|
62
|
+
updateWebhook<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, webhookUpdate: WebhookUpdate, raw?: {
|
|
63
|
+
raw: R;
|
|
64
|
+
}): Promise<MaybeRaw<R, Webhook>>;
|
|
55
65
|
/**
|
|
56
66
|
* Deletes a Webhook by its ID.
|
|
57
67
|
* @param orgName Name of the Organization
|
|
58
68
|
* @param spaceName Name of the Space
|
|
59
69
|
* @param webhookId ID of the webhook to be deleted
|
|
60
70
|
*/
|
|
61
|
-
deleteWebhook(orgName: string, spaceName: string, webhookId: string
|
|
71
|
+
deleteWebhook<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, raw?: {
|
|
72
|
+
raw: R;
|
|
73
|
+
}): Promise<MaybeRaw<R, Webhook[]>>;
|
|
62
74
|
/**
|
|
63
75
|
* Executes all Events and Streams connected to the specified Webhook.
|
|
64
76
|
* @param webhookUrl URL of the webhook to be triggered / executed
|
|
65
77
|
*/
|
|
66
|
-
triggerWebhook(webhookUrl: string
|
|
78
|
+
triggerWebhook<R extends boolean = false>(webhookUrl: string, raw?: {
|
|
79
|
+
raw: R;
|
|
80
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
67
81
|
/**
|
|
68
82
|
* Executes a webhook by its URL.
|
|
69
83
|
* @param webhookUrl Webhook URL to be triggered / executed (your hcloud domain + webhook.relativeUrl)
|
|
70
84
|
* @param payload Payload to be used in the event execution that will be triggered by the webhook, as JSON.
|
|
71
85
|
* @param headers (optional) Security headers.
|
|
72
86
|
*/
|
|
73
|
-
executeWebhookByUrl(webhookUrl: string, payload: unknown, headers?: KeyValuePair<string
|
|
87
|
+
executeWebhookByUrl<R extends boolean = false>(webhookUrl: string, payload: unknown, headers?: KeyValuePair<string>, raw?: {
|
|
88
|
+
raw: R;
|
|
89
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
74
90
|
/**
|
|
75
91
|
* Respond to a webhook via callback.
|
|
76
92
|
* @param callbackURL Full or partial URL callback URL. This URL is unique per webhook execution
|
|
@@ -78,13 +94,17 @@ export declare class High5Webhook extends Base {
|
|
|
78
94
|
* @param headers (optional) HTTP headers to send in the response
|
|
79
95
|
* @param body (optional) Body to send in the HTTP response
|
|
80
96
|
*/
|
|
81
|
-
respondToWebhook(callbackURL: string, status: number, headers?: Record<string, string | string[]>, body?: string
|
|
97
|
+
respondToWebhook<R extends boolean = false>(callbackURL: string, status: number, headers?: Record<string, string | string[]>, body?: string, raw?: {
|
|
98
|
+
raw: R;
|
|
99
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
82
100
|
/**
|
|
83
101
|
* Validates the provided webhook URL by sending a challenge query parameter.
|
|
84
102
|
* @param url Webhook URL to be validated (your hcloud domain + webhook.relativeUrl)
|
|
85
103
|
* @param challenge String to be returned
|
|
86
104
|
* @returns The provided challenge string as plaint text
|
|
87
105
|
*/
|
|
88
|
-
validateWebhookUrl(webhookUrl: string, challenge: string
|
|
106
|
+
validateWebhookUrl<R extends boolean = false>(webhookUrl: string, challenge: string, raw?: {
|
|
107
|
+
raw: R;
|
|
108
|
+
}): Promise<MaybeRaw<R, string>>;
|
|
89
109
|
protected getEndpoint(endpoint: string): string;
|
|
90
110
|
}
|
|
@@ -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.High5Webhook = void 0;
|
|
13
|
-
const Base_1 = require("../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../helper/paginatedResponseHelper");
|
|
15
18
|
const searchFilter_1 = require("../../../../helper/searchFilter");
|
|
16
19
|
const log_1 = require("./log");
|
|
@@ -31,14 +34,14 @@ class High5Webhook extends Base_1.default {
|
|
|
31
34
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
32
35
|
* @returns Object containing an array of Webhooks and the total number of results found in the database (independent of limit and page)
|
|
33
36
|
*/
|
|
34
|
-
searchWebhooks(_a) {
|
|
35
|
-
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0,
|
|
37
|
+
searchWebhooks(_a, raw_1) {
|
|
38
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit = 25, page = 0 }, raw) {
|
|
36
39
|
const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
|
|
37
40
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/search?limit=${limit}&page=${page}`), {
|
|
38
41
|
filters: filtersDTO,
|
|
39
42
|
sorting: sorting,
|
|
40
43
|
});
|
|
41
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
44
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
|
|
42
45
|
});
|
|
43
46
|
}
|
|
44
47
|
/**
|
|
@@ -48,10 +51,10 @@ class High5Webhook extends Base_1.default {
|
|
|
48
51
|
* @param webhookId ID of the Webhook
|
|
49
52
|
* @returns The requested Webhook
|
|
50
53
|
*/
|
|
51
|
-
getWebhook(orgName, spaceName, webhookId) {
|
|
54
|
+
getWebhook(orgName, spaceName, webhookId, raw) {
|
|
52
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
56
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}`));
|
|
54
|
-
return resp.data;
|
|
57
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
@@ -61,10 +64,10 @@ class High5Webhook extends Base_1.default {
|
|
|
61
64
|
* @param webhookId ID of the Webhook
|
|
62
65
|
* @returns The updated Webhook
|
|
63
66
|
*/
|
|
64
|
-
regenerateWebhookUrl(orgName, spaceName, webhookId) {
|
|
67
|
+
regenerateWebhookUrl(orgName, spaceName, webhookId, raw) {
|
|
65
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
69
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}/regenerateUrl`));
|
|
67
|
-
return resp.data;
|
|
70
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
73
|
/**
|
|
@@ -74,10 +77,10 @@ class High5Webhook extends Base_1.default {
|
|
|
74
77
|
* @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the new webhook
|
|
75
78
|
* @returns The created Webhook
|
|
76
79
|
*/
|
|
77
|
-
createWebhook(orgName, spaceName, WebhookCreate) {
|
|
80
|
+
createWebhook(orgName, spaceName, WebhookCreate, raw) {
|
|
78
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
82
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks`), WebhookCreate);
|
|
80
|
-
return resp.data;
|
|
83
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
81
84
|
});
|
|
82
85
|
}
|
|
83
86
|
/**
|
|
@@ -88,10 +91,10 @@ class High5Webhook extends Base_1.default {
|
|
|
88
91
|
* @param WebhookCreate Object/JSON containing the name, token, eventId, spaceId, target and (optionally) security headers for the updated webhook
|
|
89
92
|
* @returns the updated Webhook
|
|
90
93
|
*/
|
|
91
|
-
updateWebhook(orgName, spaceName, webhookId, webhookUpdate) {
|
|
94
|
+
updateWebhook(orgName, spaceName, webhookId, webhookUpdate, raw) {
|
|
92
95
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
96
|
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}`), webhookUpdate);
|
|
94
|
-
return resp.data;
|
|
97
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
95
98
|
});
|
|
96
99
|
}
|
|
97
100
|
/**
|
|
@@ -100,18 +103,20 @@ class High5Webhook extends Base_1.default {
|
|
|
100
103
|
* @param spaceName Name of the Space
|
|
101
104
|
* @param webhookId ID of the webhook to be deleted
|
|
102
105
|
*/
|
|
103
|
-
deleteWebhook(orgName, spaceName, webhookId) {
|
|
106
|
+
deleteWebhook(orgName, spaceName, webhookId, raw) {
|
|
104
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}`));
|
|
108
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}`));
|
|
109
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
106
110
|
});
|
|
107
111
|
}
|
|
108
112
|
/**
|
|
109
113
|
* Executes all Events and Streams connected to the specified Webhook.
|
|
110
114
|
* @param webhookUrl URL of the webhook to be triggered / executed
|
|
111
115
|
*/
|
|
112
|
-
triggerWebhook(webhookUrl) {
|
|
116
|
+
triggerWebhook(webhookUrl, raw) {
|
|
113
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
yield this.axios.post(this.getEndpoint(webhookUrl));
|
|
118
|
+
const resp = yield this.axios.post(this.getEndpoint(webhookUrl));
|
|
119
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
115
120
|
});
|
|
116
121
|
}
|
|
117
122
|
/**
|
|
@@ -120,7 +125,7 @@ class High5Webhook extends Base_1.default {
|
|
|
120
125
|
* @param payload Payload to be used in the event execution that will be triggered by the webhook, as JSON.
|
|
121
126
|
* @param headers (optional) Security headers.
|
|
122
127
|
*/
|
|
123
|
-
executeWebhookByUrl(webhookUrl, payload, headers) {
|
|
128
|
+
executeWebhookByUrl(webhookUrl, payload, headers, raw) {
|
|
124
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
130
|
const h = {};
|
|
126
131
|
if (headers) {
|
|
@@ -128,9 +133,10 @@ class High5Webhook extends Base_1.default {
|
|
|
128
133
|
h[key] = headers[key];
|
|
129
134
|
});
|
|
130
135
|
}
|
|
131
|
-
yield this.axios.post(this.getEndpoint(webhookUrl), payload, {
|
|
136
|
+
const resp = yield this.axios.post(this.getEndpoint(webhookUrl), payload, {
|
|
132
137
|
headers: h,
|
|
133
138
|
});
|
|
139
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
134
140
|
});
|
|
135
141
|
}
|
|
136
142
|
/**
|
|
@@ -140,10 +146,11 @@ class High5Webhook extends Base_1.default {
|
|
|
140
146
|
* @param headers (optional) HTTP headers to send in the response
|
|
141
147
|
* @param body (optional) Body to send in the HTTP response
|
|
142
148
|
*/
|
|
143
|
-
respondToWebhook(callbackURL, status, headers, body) {
|
|
149
|
+
respondToWebhook(callbackURL, status, headers, body, raw) {
|
|
144
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
151
|
const url = callbackURL.startsWith("http") ? callbackURL : this.getEndpoint(callbackURL);
|
|
146
|
-
yield this.axios.post(url, { status, headers: headers !== null && headers !== void 0 ? headers : {}, body }, { headers: { "Content-Type": "application/json" } });
|
|
152
|
+
const resp = yield this.axios.post(url, { status, headers: headers !== null && headers !== void 0 ? headers : {}, body }, { headers: { "Content-Type": "application/json" } });
|
|
153
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
147
154
|
});
|
|
148
155
|
}
|
|
149
156
|
/**
|
|
@@ -152,10 +159,10 @@ class High5Webhook extends Base_1.default {
|
|
|
152
159
|
* @param challenge String to be returned
|
|
153
160
|
* @returns The provided challenge string as plaint text
|
|
154
161
|
*/
|
|
155
|
-
validateWebhookUrl(webhookUrl, challenge) {
|
|
162
|
+
validateWebhookUrl(webhookUrl, challenge, raw) {
|
|
156
163
|
return __awaiter(this, void 0, void 0, function* () {
|
|
157
164
|
const resp = yield this.axios.get(this.getEndpoint(`${webhookUrl}?challenge=${challenge}`));
|
|
158
|
-
return resp.data;
|
|
165
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
159
166
|
});
|
|
160
167
|
}
|
|
161
168
|
getEndpoint(endpoint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Base from "../../../../../Base";
|
|
1
|
+
import Base, { MaybeRaw } from "../../../../../Base";
|
|
2
2
|
import { PaginatedResponse } from "../../../../../interfaces/global";
|
|
3
3
|
import { WebhookLog } from "../../../../../interfaces/high5/space/webhook";
|
|
4
4
|
export declare class High5WebhookLog extends Base {
|
|
@@ -11,6 +11,8 @@ export declare class High5WebhookLog extends Base {
|
|
|
11
11
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
12
12
|
* @returns Object containing an array of Webhook logs and the total number of results found in the database (independent of limit and page)
|
|
13
13
|
*/
|
|
14
|
-
getWebhookLogs(orgName: string, spaceName: string, webhookId: string, limit?: number, page?: number
|
|
14
|
+
getWebhookLogs<R extends boolean = false>(orgName: string, spaceName: string, webhookId: string, limit?: number, page?: number, raw?: {
|
|
15
|
+
raw: R;
|
|
16
|
+
}): Promise<MaybeRaw<R, PaginatedResponse<WebhookLog>>>;
|
|
15
17
|
protected getEndpoint(endpoint: string): string;
|
|
16
18
|
}
|
|
@@ -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.High5WebhookLog = void 0;
|
|
13
|
-
const Base_1 = require("../../../../../Base");
|
|
16
|
+
const Base_1 = __importDefault(require("../../../../../Base"));
|
|
14
17
|
const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
|
|
15
18
|
class High5WebhookLog extends Base_1.default {
|
|
16
19
|
/**
|
|
@@ -22,12 +25,12 @@ class High5WebhookLog extends Base_1.default {
|
|
|
22
25
|
* @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
|
|
23
26
|
* @returns Object containing an array of Webhook logs and the total number of results found in the database (independent of limit and page)
|
|
24
27
|
*/
|
|
25
|
-
getWebhookLogs(orgName, spaceName, webhookId, limit, page) {
|
|
28
|
+
getWebhookLogs(orgName, spaceName, webhookId, limit, page, raw) {
|
|
26
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
30
|
limit = limit || 25;
|
|
28
31
|
page = page || 0;
|
|
29
32
|
const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/webhooks/${webhookId}/logs?limit=${limit}&page=${page}`));
|
|
30
|
-
return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
|
|
33
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
|
|
31
34
|
});
|
|
32
35
|
}
|
|
33
36
|
getEndpoint(endpoint) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Base from "../../../Base";
|
|
2
|
+
import { Stats } from "../../../interfaces/high5/stats";
|
|
3
|
+
export declare class High5OrgStat extends Base {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves usage statistics for a specific organization.
|
|
6
|
+
* @param orgName Name of the organization
|
|
7
|
+
* @returns Statistics information
|
|
8
|
+
*/
|
|
9
|
+
getStats(orgName: string): Promise<Stats>;
|
|
10
|
+
protected getEndpoint(endpoint: string): string;
|
|
11
|
+
}
|
|
@@ -8,24 +8,26 @@ 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
|
-
exports.
|
|
13
|
-
const Base_1 = require("../../../Base");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
deleteUsers(userIds) {
|
|
15
|
+
exports.High5OrgStat = void 0;
|
|
16
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
17
|
+
class High5OrgStat extends Base_1.default {
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves usage statistics for a specific organization.
|
|
20
|
+
* @param orgName Name of the organization
|
|
21
|
+
* @returns Statistics information
|
|
22
|
+
*/
|
|
23
|
+
getStats(orgName) {
|
|
23
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
yield this.axios.
|
|
25
|
+
const resp = yield this.axios.get(this.getEndpoint(`/org/${orgName}/stats`));
|
|
26
|
+
return resp.data;
|
|
25
27
|
});
|
|
26
28
|
}
|
|
27
29
|
getEndpoint(endpoint) {
|
|
28
|
-
return `${this.options.server}/api/
|
|
30
|
+
return `${this.options.server}/api/high5/v1${endpoint}`;
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
|
-
exports.
|
|
33
|
+
exports.High5OrgStat = High5OrgStat;
|
|
@@ -1,7 +1,10 @@
|
|
|
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
6
|
exports.High5Wave = void 0;
|
|
4
|
-
const Base_1 = require("../../../Base");
|
|
7
|
+
const Base_1 = __importDefault(require("../../../Base"));
|
|
5
8
|
const s3_1 = require("./s3");
|
|
6
9
|
class High5Wave extends Base_1.default {
|
|
7
10
|
constructor(options, axios) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import Base, { Options } from "../../../../Base";
|
|
2
|
+
import Base, { MaybeRaw, Options } from "../../../../Base";
|
|
3
3
|
import { Catalog, CatalogRegistry, Engine, EngineRegistry, StreamNodeSpecifications, StreamNodeSpecificationWrappedWithEngineVersion, WildcardRegistry } from "../../../../interfaces/high5";
|
|
4
|
+
import { Release } from "../../../../interfaces/high5/wave/changelog";
|
|
4
5
|
/**
|
|
5
6
|
* Class for reading the S3 bucket of a wave engine and catalogs
|
|
6
7
|
*/
|
|
@@ -11,45 +12,67 @@ export declare class S3 extends Base {
|
|
|
11
12
|
* @param waveBucketUrl Public base url to S3 bucket
|
|
12
13
|
* @returns registry.json
|
|
13
14
|
*/
|
|
14
|
-
getCatalogRegistry(waveBucketUrl: string
|
|
15
|
+
getCatalogRegistry<R extends boolean = false>(waveBucketUrl: string, raw?: {
|
|
16
|
+
raw: R;
|
|
17
|
+
}): Promise<MaybeRaw<R, CatalogRegistry>>;
|
|
15
18
|
/**
|
|
16
19
|
* Get the registry.json of the default wave engine from the S3 bucket
|
|
17
20
|
* @param waveBucketUrl Public base url to S3 bucket
|
|
18
21
|
* @returns registry.json
|
|
19
22
|
*/
|
|
20
|
-
getEngineRegistry(waveBucketUrl: string
|
|
23
|
+
getEngineRegistry<R extends boolean = false>(waveBucketUrl: string, raw?: {
|
|
24
|
+
raw: R;
|
|
25
|
+
}): Promise<MaybeRaw<R, EngineRegistry>>;
|
|
21
26
|
/**
|
|
22
27
|
* Get the catalog.json from the S3 bucket
|
|
23
28
|
* @param catalogUrl Public url of the catalog
|
|
24
29
|
* @returns index.json of catalog
|
|
25
30
|
*/
|
|
26
|
-
getCatalog(catalogUrl: string
|
|
31
|
+
getCatalog<R extends boolean = false>(catalogUrl: string, raw?: {
|
|
32
|
+
raw: R;
|
|
33
|
+
}): Promise<MaybeRaw<R, Catalog>>;
|
|
27
34
|
/**
|
|
28
35
|
* Get the catalog.json from the S3 bucket
|
|
29
36
|
* @param catalogUrl Public url of the catalog
|
|
30
37
|
* @returns index.json of catalog
|
|
31
38
|
*/
|
|
32
|
-
getEngine(engineUrl: string
|
|
39
|
+
getEngine<R extends boolean = false>(engineUrl: string, raw?: {
|
|
40
|
+
raw: R;
|
|
41
|
+
}): Promise<MaybeRaw<R, Engine>>;
|
|
33
42
|
/**
|
|
34
43
|
* Get a list of available wildcards of a specific engine version from the S3 bucket
|
|
35
44
|
* @param engineUrl Public url of the engine
|
|
36
45
|
* @param engineVersion Version of the enigne
|
|
37
46
|
* @returns Wildcards.json list of available wildcards
|
|
38
47
|
*/
|
|
39
|
-
getWildcardsOfEngine(engineUrl: string, engineVersion: string
|
|
48
|
+
getWildcardsOfEngine<R extends boolean = false>(engineUrl: string, engineVersion: string, raw?: {
|
|
49
|
+
raw: R;
|
|
50
|
+
}): Promise<MaybeRaw<R, WildcardRegistry>>;
|
|
40
51
|
/**
|
|
41
52
|
* Get the node specifications of all nodes of a specific catalog version from the S3 bucket
|
|
42
53
|
* @param catalogUrl Public url of the catalog
|
|
43
54
|
* @param version The catalog version
|
|
44
55
|
* @returns StreamNodeSpecification[] | StreamNodeSpecificationWrappedWithEngineVersion an array of all node specification of that catalog version, maybe wrapped in an object with the engine version
|
|
45
56
|
*/
|
|
46
|
-
getCatalogVersion(catalogUrl: string, version: string
|
|
57
|
+
getCatalogVersion<R extends boolean = false>(catalogUrl: string, version: string, raw?: {
|
|
58
|
+
raw: R;
|
|
59
|
+
}): Promise<MaybeRaw<R, StreamNodeSpecifications[] | StreamNodeSpecificationWrappedWithEngineVersion>>;
|
|
47
60
|
/**
|
|
48
61
|
* Get the node documentation from the S3 bucket
|
|
49
62
|
* @param catalogUrl Public url of the catalog
|
|
50
63
|
* @param version The catalog version
|
|
51
64
|
* @returns string the markdown documentation of the node
|
|
52
65
|
*/
|
|
53
|
-
getNodeDocumentation(catalogUrl: string, version: string, nodeName: string
|
|
66
|
+
getNodeDocumentation<R extends boolean = false>(catalogUrl: string, version: string, nodeName: string, raw?: {
|
|
67
|
+
raw: R;
|
|
68
|
+
}): Promise<MaybeRaw<R, string>>;
|
|
69
|
+
/**
|
|
70
|
+
* Get the catalogs changelog from the S3 bucket
|
|
71
|
+
* @param catalogUrl Public url of the catalog
|
|
72
|
+
* @returns string the changelog.json of the node
|
|
73
|
+
*/
|
|
74
|
+
getChangelog<R extends boolean = false>(catalogUrl: string, raw?: {
|
|
75
|
+
raw: R;
|
|
76
|
+
}): Promise<MaybeRaw<R, Release[]>>;
|
|
54
77
|
protected getEndpoint(): string;
|
|
55
78
|
}
|