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
package/changelog.md
CHANGED
|
@@ -1,90 +1,101 @@
|
|
|
1
|
-
## [
|
|
1
|
+
## [19.0.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v18.0.0...v19.0.0) (2026-04-10)
|
|
2
2
|
|
|
3
3
|
### ⚠ BREAKING CHANGES
|
|
4
4
|
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* always clone with history
|
|
6
|
+
* **dali:** drop legacy Fuse backend support
|
|
7
|
+
* update Cronjob interfaces to match High5 API
|
|
8
|
+
* add backend-specific avatar upload methods
|
|
9
|
+
* remove deprecated fetchSharedAssets endpoint
|
|
10
10
|
|
|
11
11
|
### Features
|
|
12
12
|
|
|
13
|
-
* add
|
|
14
|
-
* add
|
|
15
|
-
* add
|
|
16
|
-
* add
|
|
17
|
-
* add
|
|
18
|
-
* add
|
|
19
|
-
* add
|
|
20
|
-
* add
|
|
21
|
-
* add
|
|
22
|
-
* add
|
|
23
|
-
* add
|
|
24
|
-
* add
|
|
25
|
-
* add
|
|
26
|
-
* add
|
|
27
|
-
* add
|
|
28
|
-
* add
|
|
29
|
-
* add
|
|
30
|
-
* add
|
|
31
|
-
* add
|
|
32
|
-
* add
|
|
33
|
-
* add
|
|
34
|
-
* add
|
|
35
|
-
* add
|
|
36
|
-
* add
|
|
37
|
-
* add
|
|
38
|
-
* add
|
|
39
|
-
* add
|
|
40
|
-
* add
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
13
|
+
* add asset clone method ([5ece50d](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/5ece50ddbed7be615a1d2d411f859c1cbac5e99d))
|
|
14
|
+
* add asset subscribe endpoints ([a36cecc](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/a36cecc1eebf39f4bc7849e576187568abc5e7eb))
|
|
15
|
+
* add backend-specific avatar upload methods ([4ceeef9](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/4ceeef9dae844d6a679725c9c39e91483855ffcb))
|
|
16
|
+
* add BASE namespace permission group ([b6ef88e](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/b6ef88eae404f5de475288130f5f1f8b183b1783))
|
|
17
|
+
* add cross-space asset search subject to nats ([cc110f6](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/cc110f69a3d67ae5c83f5886efe1a798ac8c05ec))
|
|
18
|
+
* add deferred shares ([4b6703c](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/4b6703cb2f1e7e59059002dd8fb23c4adc446d3c))
|
|
19
|
+
* add endpoints to resend share emails ([2d55e8f](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/2d55e8f1602f4e670a078a129b438a3188df5eaf))
|
|
20
|
+
* add expiry date and type to shorts interface and short create endpoint ([7597b6b](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/7597b6b45d4c4fa76a0737c6c2c0b262f58bc94f))
|
|
21
|
+
* add external logging collector management methods ([3be9b29](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/3be9b2912d7326fd38107ed76ddf442b70100cfc))
|
|
22
|
+
* add flags to toggle OAuth flows in OAuth apps ([dd98180](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/dd9818014a373f07d4a450f30e95b9fabbac6b7f))
|
|
23
|
+
* add groups ([8fb439b](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/8fb439b1248de03ec08adfc94528efadbeed4a38))
|
|
24
|
+
* add helper to validate mongo-style query ([3423109](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/342310962a1bc850879a61ef61740719a46b1e25))
|
|
25
|
+
* add IDP_ACCOUNT_APPROVED template and corresponding mail DTO ([2785432](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/27854324188277879486329f0716309f8dbc00e5))
|
|
26
|
+
* add info about origin stream to stream nodes ([54611b1](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/54611b137a20287ba8fb5c827708147b19eb2d5f))
|
|
27
|
+
* add linked status to reduced user interface and create a new one for invited non linked users ([9ba46de](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/9ba46de8bf8c89ca71e55ee8d6d2ae2e9f41d806))
|
|
28
|
+
* add long url slug validation ([831df1d](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/831df1dd1d756c79903d541d2d0170fdc716f9e7))
|
|
29
|
+
* add MAYBE_GUEST role to OrgnaizationRoles ([25ea3dc](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/25ea3dcb0a230b329a8bf311bf6d4f4cd65c5f13))
|
|
30
|
+
* add mentions teams ([7ab4246](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/7ab4246f68e00d99bb20253a2073db5a44374822))
|
|
31
|
+
* add metadata to namespace references ([f6678f2](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/f6678f23c8fdd2461a5146f0185662fc4dbbbd1b))
|
|
32
|
+
* add missing emptyTrash endpoint ([48b838e](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/48b838eec59c56f1623a1b081f348cb1440a171b))
|
|
33
|
+
* add mongo-style query to check node input dependencies ([e72322a](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/e72322ae3f0636a41ebf48a6ace53c5a2972d38a))
|
|
34
|
+
* add name and company to the registration email ([95b33fd](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/95b33fdf2f837298aa934fb3bc466b729798928c))
|
|
35
|
+
* add namespaces to share objects ([4886049](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/4886049a670a30bad91e957a004990fe5253c2d9))
|
|
36
|
+
* add optional auto refresh logic to SDK if a refreshToken is set ([1451208](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/1451208d8625f7cbe004a9f51e2bd86329f96f5d))
|
|
37
|
+
* add optional custom metadata to namespaces ([fbfa0d9](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/fbfa0d9c572cc04312da78ae9e28606cf5b42da6))
|
|
38
|
+
* add optional parent to nats asset object ([3db614c](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/3db614ca973ebadbdb28e1f488708c99bb8353fa))
|
|
39
|
+
* add parentId to cloneAsset ([b407771](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/b407771b5a45313b8ba19db95442e4f3417d6bf6))
|
|
40
|
+
* add permission groups to the share obj ([cd420e7](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/cd420e79a089bbcab7bdfd4d0726ea9243279588))
|
|
41
|
+
* add PKCE support to OAuth ([31957e9](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/31957e93f13f500d425f7fd7ba59b93de61b89e8))
|
|
42
|
+
* add POST_PROCESSING status to UploadStatus enum ([fe41516](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/fe415161125d835ff79e81b5dc1e4f8e8b6e1e04))
|
|
43
|
+
* add stats related endpoints + interface ([43fb797](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/43fb797f6290fdf06b3b7c7eebd3babe91ab7396))
|
|
44
|
+
* add support for mentions in editComment method ([886c403](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/886c403fb04191beb02dca9220a2b41b8042e24b))
|
|
45
|
+
* add support for OAuth 2.0 Device Flow ([293fde5](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/293fde5bdb71890e669d027c93aa4475a28547eb))
|
|
46
|
+
* add target to JobCreate ([ff3662a](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/ff3662a4091b125272e5df1ecbabfddf8643324a))
|
|
47
|
+
* add updateTrashbinPolicy ([afce986](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/afce9867284d12a3755023a58fee6dd20833f4ca))
|
|
48
|
+
* add validation rule for agent module name ([623759e](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/623759e68d2a58fc0dc569893275ca7f3371d990))
|
|
49
|
+
* add validation rules for oauth secret name ([97c81b9](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/97c81b93e28e6e3d3a001505fa91e3ce2c16ded2))
|
|
50
|
+
* add validation rules for user password ([68cb6a4](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/68cb6a43c198ad1586c7b6c398883b436d30605b))
|
|
51
|
+
* add vtt field and type ([072dce8](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/072dce84084717bd972613fbaeb572f3c9a06563))
|
|
52
|
+
* add vtt thumbnail request helper ([616ed60](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/616ed602f103433d45644f95ca9ab052db15d284))
|
|
53
|
+
* **agent:** add Amazon CloudWatch logging management methods ([b7c0ba0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/b7c0ba06c18bad87fda8d1c753b41b7148dd1953))
|
|
54
|
+
* **agent:** add method for ext logging collector state management ([4ec2789](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/4ec27891eb657f2a15e918d2b65ece8c31946b68))
|
|
55
|
+
* **agent:** implement methods for module management ([25deb42](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/25deb421f11b278592b39f38f1c7abf3604b358b))
|
|
56
|
+
* allow tag name to be patched ([85536d2](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/85536d2cf7d08683c423f4c59cd57b74885c5d02))
|
|
57
|
+
* always clone with history ([44616b6](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/44616b6747e0533fff862e93c068a2aacf642e7a))
|
|
58
|
+
* export type Mentionable ([77b3a4f](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/77b3a4f987b0ff8b161e11564743f9315f3ea0b4))
|
|
59
|
+
* extend create and patch share interfaces by users array ([a2c72dc](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/a2c72dc01c8a081bf080482ba3b45d5c647a6f3e))
|
|
60
|
+
* extend nats asset object by multiple missing fields ([1366748](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/1366748e1abdce786916fb76d0aba624373d0843))
|
|
61
|
+
* extend share and share create interfaces ([9803689](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/98036890a4e8d1eb965c09dfb707f9e6e1409859))
|
|
62
|
+
* forward the mailjet API response ([5e5db28](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/5e5db282fb61b1231beaae48496eaec6c2eebc9c))
|
|
63
|
+
* implement filters for asset and space subscriptions ([34c3f57](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/34c3f572df90acc9943b0e223f445d8defd386dc))
|
|
64
|
+
* implement video timecode offset ([313d8c3](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/313d8c34e5975a8056bd057ed6b032c91742abcb))
|
|
65
|
+
* introduce optional link field to message ([cf45f95](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/cf45f95b9d5fdc623da4e59c9688150ea4583676))
|
|
66
|
+
* **job:** add target field to Job entity ([6cc2812](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/6cc281256a90f332ac365af8329f242bce8f35b4))
|
|
67
|
+
* **nats:** implement graceful close with connection draining ([1887252](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/18872528bc793d8a551654b75620e2f2c97ead03))
|
|
68
|
+
* new version ([4f2dc46](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/4f2dc4682315304ccf8f39e3ea9378f46c7b270e))
|
|
69
|
+
* remove endpoint for linking users to shares ([b710053](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/b710053ae2ca3957e20f399d7de3968392291310))
|
|
70
|
+
* rework Asset interface to apply BaseAsset globally ([f0ce45f](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/f0ce45fbf3b321ea608c6a23783ddcf0ed981756))
|
|
71
|
+
* **sds:** add optional expression property do DesignerNodeInput ([15f9f4a](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/15f9f4a4bace97cde51c945ade64ef43b93307a6))
|
|
72
|
+
* update listComments endpoint & extend complexity warning threshold ([70f278a](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/70f278a6f9ce0cbf44520352c07898a00e3f0ed3))
|
|
73
|
+
* update share objects to fullfil user updates ([2582134](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/2582134bce6b0b18409882d29239ed14d5f18ef7))
|
|
74
|
+
* **validation:** include logging collector names in entity validation list ([7f70a25](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/7f70a2507ed2f64392ab956faedad9ad97db0b8d))
|
|
53
75
|
|
|
54
76
|
### Bug Fixes
|
|
55
77
|
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* revert introduction of 'parents' field in High5ExecutionStauts and High5ExecutionRequest ([ed6ba17](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/ed6ba17839db12095c3ddcf43b62fd59b5e0825e))
|
|
68
|
-
* update dependencies remove test scripts and workflows ([498c0b0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/498c0b024ec7b59b9c201d779e957d691deb6296))
|
|
69
|
-
* use names for pools over ids ([71165d2](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/71165d2bb6a5ef7258277f410b53c5198f9d76c8))
|
|
78
|
+
* add missing progress to assets of type MEDIA_ASSET ([cb95586](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/cb955867ff36706b6ec1168430daadd713c06fe1))
|
|
79
|
+
* correct OAuth token endpoint request object ([b62521e](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/b62521e69a084c90227c47fd38b3592c73b239a2))
|
|
80
|
+
* correct returntype of listUsersAllowedToMention to a mentionable type ([7cc57e2](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/7cc57e23c52a116cb75c6dc94d6f3d99fafc0bd7))
|
|
81
|
+
* **cosmo:** skip metadata property and Record only ([f8f9199](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/f8f919957a1fa8cadeed43b02be4567d6fd82d59))
|
|
82
|
+
* remove authorization header when fetching an assets VTT ([7ea5165](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/7ea5165e0e6e2861e8e3ecb47b8b0ec174ff9727))
|
|
83
|
+
* rename assetPermissionGroups to permissionsGroups ([a7c824c](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/a7c824ce96d3575ba99d98a32b92561a0f2bd320))
|
|
84
|
+
* rename mentionsTeams to mentionedTeams ([8be98d7](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/8be98d709f4031924cfda6f07683dd9ff65c58fb))
|
|
85
|
+
* rework status and tags subjects ([87e79b2](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/87e79b2096c8d8417ad68ee270595db3e54be88b))
|
|
86
|
+
* shorts url ([11357d9](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/11357d9615f5d7f4999f3e702384ac75c8def213))
|
|
87
|
+
* update cosmo events ([e4c57ee](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/e4c57ee94d430621072034a7f791d91d62ef4f69))
|
|
88
|
+
* use assetPermissionsGroups over permissionGroups ([d4155d5](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/d4155d5700d221a1bd88ea6573563f78e6cb33fb))
|
|
70
89
|
|
|
71
90
|
### Performance Improvements
|
|
72
91
|
|
|
73
|
-
* add
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* add Nats subjects for Friday service ([237b226](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/237b2263c62652e063eada5d929152e7d7c74853))
|
|
78
|
-
* add new property to the High5 Space object ([0962b0d](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/0962b0d66d5eeafbe649db59a7ea736a0858248b))
|
|
79
|
-
* add sanitazation function to entity names validator ([5c16153](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/5c161533a7876d470d7e755fe972742d3806e226))
|
|
80
|
-
* add support for cosmo spaces in Dali ([30e3462](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/30e346227d1b83c7d66b3bcdc16881d0cdeb57e0))
|
|
81
|
-
* add validation rule for friday database name ([ff4d853](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/ff4d853bf59648ab204fe50df200d4f01ca1328b))
|
|
82
|
-
* add validation rule for Friday document key ([8780dba](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/8780dbafe7fd267b3575b9a7f5cad0398c4114cd))
|
|
83
|
-
* extend space permission interface in High5 and Fuse ([27b4a12](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/27b4a12902e678a2c041359b487716ef13c750d5))
|
|
84
|
-
* implement NATS updates for SDS ([2a43e35](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/2a43e350a02a2435afedf01e2dee8bed495e3859))
|
|
85
|
-
* migrate eslint to version 9 ([f59b2d2](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/f59b2d2f67f1652fb878202b49ed1b106dbef4f5))
|
|
86
|
-
* update collection of path parameters in validation helper ([b3059f4](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/b3059f4f45a62cbefe6f5a1ab693eba385c6f3a4))
|
|
92
|
+
* add bulk invitation method ([e8e198a](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/e8e198aed018817f5046508558a337cb945862d5))
|
|
93
|
+
* Dali methods restored for avatar update integration ([c355521](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/c355521c7d4d169fd1dd2505fbf1ed2a2ed7d790))
|
|
94
|
+
* **high5:** use target event name instead of _id for job ([521d35e](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/521d35ec7c6757f673bee341ba6fbeb8179f21cd))
|
|
95
|
+
* update axios ([4fa933b](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/4fa933bb0da15624bde586e9b81c7ead15059f3c))
|
|
87
96
|
|
|
88
|
-
###
|
|
97
|
+
### Code Refactoring
|
|
89
98
|
|
|
90
|
-
*
|
|
99
|
+
* **dali:** drop legacy Fuse backend support ([56f40bd](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/56f40bdd30d52e97fbd570c620621ffaacd5a034))
|
|
100
|
+
* remove deprecated fetchSharedAssets endpoint ([178ed9d](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/178ed9d0381e95d3c6f3f5fb75400dcc44456d1d))
|
|
101
|
+
* update Cronjob interfaces to match High5 API ([8896112](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/88961120a90e4e203ffc40e62f660a75a26d43ad))
|
package/lib/Base.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { AxiosInstance } from "axios";
|
|
1
|
+
import { AxiosInstance, AxiosResponse } from "axios";
|
|
2
2
|
export interface HcloudLogger {
|
|
3
3
|
info(msg: string, ...args: any): void;
|
|
4
4
|
debug(msg: string, ...args: any): void;
|
|
5
5
|
warn(msg: string, ...args: any): void;
|
|
6
6
|
error(msg: string, ...args: any): void;
|
|
7
7
|
}
|
|
8
|
+
export type MaybeRaw<R extends boolean, T> = R extends true ? AxiosResponse<T> : T;
|
|
8
9
|
export interface Options {
|
|
9
10
|
server: string;
|
|
10
11
|
auditor?: {
|
package/lib/Hcloud.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { HcloudLogger, Options } from "./Base";
|
|
3
|
+
import { RefreshToken } from "./interfaces/axios";
|
|
3
4
|
import AgentService from "./service/agent";
|
|
4
5
|
import AuditorService from "./service/auditor";
|
|
5
6
|
import BouncerService from "./service/bouncer";
|
|
7
|
+
import CosmoService from "./service/cosmo";
|
|
6
8
|
import DaliService from "./service/dali";
|
|
7
|
-
import FridayService from "./service/friday";
|
|
8
|
-
import FuseService from "./service/fuse";
|
|
9
9
|
import High5Service from "./service/high5";
|
|
10
10
|
import IdpService from "./service/idp";
|
|
11
11
|
import MailerService from "./service/mailer";
|
|
12
12
|
import MothershipService from "./service/mothership";
|
|
13
13
|
import NatsService from "./service/nats";
|
|
14
|
+
import ShortsService from "./service/shorts";
|
|
14
15
|
export declare class HCloud {
|
|
15
16
|
get Agent(): AgentService;
|
|
16
17
|
private _Agent?;
|
|
@@ -18,24 +19,26 @@ export declare class HCloud {
|
|
|
18
19
|
private _Auditor?;
|
|
19
20
|
get Bouncer(): BouncerService;
|
|
20
21
|
private _Bouncer?;
|
|
22
|
+
get Cosmo(): CosmoService;
|
|
23
|
+
private _Cosmo?;
|
|
21
24
|
get High5(): High5Service;
|
|
22
25
|
private _High5?;
|
|
23
26
|
get Idp(): IdpService;
|
|
24
27
|
private _Idp?;
|
|
25
|
-
get Fuse(): FuseService;
|
|
26
|
-
private _Fuse?;
|
|
27
28
|
get Dali(): DaliService;
|
|
28
29
|
private _Dali?;
|
|
29
30
|
get Mailer(): MailerService;
|
|
30
31
|
private _Mailer?;
|
|
31
32
|
get Mothership(): MothershipService;
|
|
32
33
|
private _Mothership?;
|
|
33
|
-
get
|
|
34
|
-
private
|
|
34
|
+
get Shorts(): ShortsService;
|
|
35
|
+
private _Shorts?;
|
|
35
36
|
get Nats(): NatsService;
|
|
36
37
|
private _Nats?;
|
|
37
38
|
private options;
|
|
38
39
|
private axios;
|
|
40
|
+
private refreshToken;
|
|
41
|
+
private refreshPromise;
|
|
39
42
|
constructor(options: Options);
|
|
40
43
|
/**
|
|
41
44
|
* Sets the server url that the SDK shall do a request to.
|
|
@@ -57,6 +60,14 @@ export declare class HCloud {
|
|
|
57
60
|
* Returns the currently set auth token.
|
|
58
61
|
*/
|
|
59
62
|
getAuthToken(): string | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the refresh token and enables auto-fresh
|
|
65
|
+
*/
|
|
66
|
+
setRefreshToken(refreshToken: RefreshToken): HCloud;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the currently set refresh token.
|
|
69
|
+
*/
|
|
70
|
+
getRefreshToken(): RefreshToken | null;
|
|
60
71
|
/**
|
|
61
72
|
* Sets the correlationID which will be sent to hcloud with each request and appears in all
|
|
62
73
|
* logs that are made on behalf of this request, making it easier to debug the application.
|
|
@@ -90,4 +101,11 @@ export declare class HCloud {
|
|
|
90
101
|
* @returns {AxiosInstance} The new AxiosInstance
|
|
91
102
|
*/
|
|
92
103
|
setAxios(axios: AxiosInstance): AxiosInstance;
|
|
104
|
+
/**
|
|
105
|
+
* refreshAccessToken will refresh the access_token using a given refresh_token and set the new access_token and refresh_token in the SDK.
|
|
106
|
+
* If multiple requests trigger a token refresh at the same time, only one request will actually call the token endpoint, while the others will wait for the result of that request and use the same new token.
|
|
107
|
+
*
|
|
108
|
+
* This method will trigger a callback? to enable the returned values to be persisted
|
|
109
|
+
*/
|
|
110
|
+
private refreshAccessToken;
|
|
93
111
|
}
|
package/lib/Hcloud.js
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
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
|
+
};
|
|
2
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
15
|
exports.HCloud = void 0;
|
|
4
|
-
const axios_1 = require("axios");
|
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
|
5
17
|
const package_json_1 = require("../package.json");
|
|
6
|
-
const ErrorHelper_1 = require("./helper/ErrorHelper");
|
|
18
|
+
const ErrorHelper_1 = __importDefault(require("./helper/ErrorHelper"));
|
|
7
19
|
const axios_2 = require("./interfaces/axios");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const high5_1 = require("./service/high5");
|
|
15
|
-
const
|
|
16
|
-
const mailer_1 = require("./service/mailer");
|
|
17
|
-
const mothership_1 = require("./service/mothership");
|
|
18
|
-
const nats_1 = require("./service/nats");
|
|
20
|
+
const idp_1 = require("./interfaces/idp");
|
|
21
|
+
const agent_1 = __importDefault(require("./service/agent"));
|
|
22
|
+
const auditor_1 = __importDefault(require("./service/auditor"));
|
|
23
|
+
const bouncer_1 = __importDefault(require("./service/bouncer"));
|
|
24
|
+
const cosmo_1 = __importDefault(require("./service/cosmo"));
|
|
25
|
+
const dali_1 = __importDefault(require("./service/dali"));
|
|
26
|
+
const high5_1 = __importDefault(require("./service/high5"));
|
|
27
|
+
const idp_2 = __importDefault(require("./service/idp"));
|
|
28
|
+
const mailer_1 = __importDefault(require("./service/mailer"));
|
|
29
|
+
const mothership_1 = __importDefault(require("./service/mothership"));
|
|
30
|
+
const nats_1 = __importDefault(require("./service/nats"));
|
|
31
|
+
const shorts_1 = __importDefault(require("./service/shorts"));
|
|
19
32
|
// tslint:disable-next-line
|
|
20
33
|
class HCloud {
|
|
21
34
|
get Agent() {
|
|
@@ -36,6 +49,12 @@ class HCloud {
|
|
|
36
49
|
}
|
|
37
50
|
return this._Bouncer;
|
|
38
51
|
}
|
|
52
|
+
get Cosmo() {
|
|
53
|
+
if (this._Cosmo === undefined) {
|
|
54
|
+
this._Cosmo = new cosmo_1.default(this.options, this.axios);
|
|
55
|
+
}
|
|
56
|
+
return this._Cosmo;
|
|
57
|
+
}
|
|
39
58
|
get High5() {
|
|
40
59
|
if (this._High5 === undefined) {
|
|
41
60
|
this._High5 = new high5_1.default(this.options, this.axios);
|
|
@@ -44,16 +63,10 @@ class HCloud {
|
|
|
44
63
|
}
|
|
45
64
|
get Idp() {
|
|
46
65
|
if (this._Idp === undefined) {
|
|
47
|
-
this._Idp = new
|
|
66
|
+
this._Idp = new idp_2.default(this.options, this.axios);
|
|
48
67
|
}
|
|
49
68
|
return this._Idp;
|
|
50
69
|
}
|
|
51
|
-
get Fuse() {
|
|
52
|
-
if (this._Fuse === undefined) {
|
|
53
|
-
this._Fuse = new fuse_1.default(this.options, this.axios);
|
|
54
|
-
}
|
|
55
|
-
return this._Fuse;
|
|
56
|
-
}
|
|
57
70
|
get Dali() {
|
|
58
71
|
if (this._Dali === undefined) {
|
|
59
72
|
this._Dali = new dali_1.default(this.options, this.axios);
|
|
@@ -72,11 +85,11 @@ class HCloud {
|
|
|
72
85
|
}
|
|
73
86
|
return this._Mothership;
|
|
74
87
|
}
|
|
75
|
-
get
|
|
76
|
-
if (this.
|
|
77
|
-
this.
|
|
88
|
+
get Shorts() {
|
|
89
|
+
if (this._Shorts === undefined) {
|
|
90
|
+
this._Shorts = new shorts_1.default(this.options, this.axios);
|
|
78
91
|
}
|
|
79
|
-
return this.
|
|
92
|
+
return this._Shorts;
|
|
80
93
|
}
|
|
81
94
|
get Nats() {
|
|
82
95
|
if (this._Nats === undefined) {
|
|
@@ -85,6 +98,8 @@ class HCloud {
|
|
|
85
98
|
return this._Nats;
|
|
86
99
|
}
|
|
87
100
|
constructor(options) {
|
|
101
|
+
this.refreshToken = null;
|
|
102
|
+
this.refreshPromise = null;
|
|
88
103
|
this.options = options;
|
|
89
104
|
this.axios = axios_1.default.create({
|
|
90
105
|
transformRequest: axios_1.default.defaults.transformRequest,
|
|
@@ -96,11 +111,44 @@ class HCloud {
|
|
|
96
111
|
// also set 'user-agent' header in non-browser environments
|
|
97
112
|
this.axios.defaults.headers.common["user-agent"] = "hcloud-sdk-js/v" + package_json_1.version;
|
|
98
113
|
}
|
|
114
|
+
else {
|
|
115
|
+
// eslint-disable-next-line
|
|
116
|
+
this.axios.defaults.headers.common["x-hcloud-origin"] = `${window === null || window === void 0 ? void 0 : window.location.protocol}//${window === null || window === void 0 ? void 0 : window.location.host}`;
|
|
117
|
+
}
|
|
99
118
|
this.axios.interceptors.response.use(response => response, error => {
|
|
100
119
|
var _a;
|
|
101
120
|
(_a = this.options.logger) === null || _a === void 0 ? void 0 : _a.error(String(error), error);
|
|
102
121
|
return Promise.reject((0, ErrorHelper_1.default)(error));
|
|
103
122
|
});
|
|
123
|
+
// add request interceptor to handle auto token refresh if set
|
|
124
|
+
this.axios.interceptors.request.use((config) => __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
if (!this.refreshToken)
|
|
126
|
+
return config;
|
|
127
|
+
const isExpired = Date.now() >= this.refreshToken.expiresAt - 120 * 1000; // consider token expired if it will expire in the next 120 seconds
|
|
128
|
+
if (isExpired) {
|
|
129
|
+
yield this.refreshAccessToken();
|
|
130
|
+
}
|
|
131
|
+
else if (this.refreshPromise) {
|
|
132
|
+
yield this.refreshPromise;
|
|
133
|
+
}
|
|
134
|
+
return config;
|
|
135
|
+
}));
|
|
136
|
+
// trigger refresh logic in case of 401 has been received and a refresh token is set
|
|
137
|
+
this.axios.interceptors.response.use(res => res, (error) => __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
var _a;
|
|
139
|
+
const originalRequest = error.config;
|
|
140
|
+
if (this.refreshToken) {
|
|
141
|
+
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 401 && !originalRequest._retry) {
|
|
142
|
+
originalRequest._retry = true;
|
|
143
|
+
const newToken = yield this.refreshAccessToken();
|
|
144
|
+
if (newToken) {
|
|
145
|
+
originalRequest.headers.Authorization = `Bearer ${newToken.access_token}`;
|
|
146
|
+
}
|
|
147
|
+
return this.axios(originalRequest);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return Promise.reject(error);
|
|
151
|
+
}));
|
|
104
152
|
}
|
|
105
153
|
/**
|
|
106
154
|
* Sets the server url that the SDK shall do a request to.
|
|
@@ -136,6 +184,19 @@ class HCloud {
|
|
|
136
184
|
var _a;
|
|
137
185
|
return (_a = this.axios.defaults.headers.common["authorization"]) === null || _a === void 0 ? void 0 : _a.toString();
|
|
138
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Sets the refresh token and enables auto-fresh
|
|
189
|
+
*/
|
|
190
|
+
setRefreshToken(refreshToken) {
|
|
191
|
+
this.refreshToken = refreshToken;
|
|
192
|
+
return this;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Returns the currently set refresh token.
|
|
196
|
+
*/
|
|
197
|
+
getRefreshToken() {
|
|
198
|
+
return this.refreshToken;
|
|
199
|
+
}
|
|
139
200
|
/**
|
|
140
201
|
* Sets the correlationID which will be sent to hcloud with each request and appears in all
|
|
141
202
|
* logs that are made on behalf of this request, making it easier to debug the application.
|
|
@@ -187,5 +248,47 @@ class HCloud {
|
|
|
187
248
|
setAxios(axios) {
|
|
188
249
|
return (this.axios = axios);
|
|
189
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* refreshAccessToken will refresh the access_token using a given refresh_token and set the new access_token and refresh_token in the SDK.
|
|
253
|
+
* If multiple requests trigger a token refresh at the same time, only one request will actually call the token endpoint, while the others will wait for the result of that request and use the same new token.
|
|
254
|
+
*
|
|
255
|
+
* This method will trigger a callback? to enable the returned values to be persisted
|
|
256
|
+
*/
|
|
257
|
+
refreshAccessToken() {
|
|
258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
+
if (!this.refreshToken)
|
|
260
|
+
throw new Error("no refresh token set");
|
|
261
|
+
if (!this.refreshPromise) {
|
|
262
|
+
this.refreshPromise = this.Idp.oAuth
|
|
263
|
+
.exchangeCodeForToken({
|
|
264
|
+
// eslint-disable-next-line camelcase
|
|
265
|
+
grant_type: idp_1.GrantType.REFRESH_TOKEN,
|
|
266
|
+
// eslint-disable-next-line camelcase
|
|
267
|
+
refresh_token: this.refreshToken.token,
|
|
268
|
+
})
|
|
269
|
+
.then(res => {
|
|
270
|
+
var _a, _b, _c, _d;
|
|
271
|
+
this.refreshPromise = null;
|
|
272
|
+
if (res.access_token) {
|
|
273
|
+
this.setAuthToken(`Bearer ${res.access_token}`);
|
|
274
|
+
const newRefreshToken = {
|
|
275
|
+
token: res.refresh_token,
|
|
276
|
+
expiresAt: Date.now() + ((_a = res.expires_in) !== null && _a !== void 0 ? _a : 0) * 1000,
|
|
277
|
+
callback: (_b = this.refreshToken) === null || _b === void 0 ? void 0 : _b.callback,
|
|
278
|
+
};
|
|
279
|
+
this.setRefreshToken(newRefreshToken);
|
|
280
|
+
(_d = (_c = this.refreshToken) === null || _c === void 0 ? void 0 : _c.callback) === null || _d === void 0 ? void 0 : _d.call(_c, res.access_token, newRefreshToken); // call callback to hydrate localStorage with the new refresh token for example
|
|
281
|
+
}
|
|
282
|
+
return res;
|
|
283
|
+
})
|
|
284
|
+
.catch(err => {
|
|
285
|
+
this.refreshPromise = null;
|
|
286
|
+
this.refreshToken = null;
|
|
287
|
+
throw err;
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return this.refreshPromise;
|
|
291
|
+
});
|
|
292
|
+
}
|
|
190
293
|
}
|
|
191
294
|
exports.HCloud = HCloud;
|
|
@@ -1,9 +1,12 @@
|
|
|
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.default = wrapError;
|
|
4
7
|
exports.isHCloudError = isHCloudError;
|
|
5
|
-
const axios_1 = require("axios");
|
|
6
|
-
const HCloudError_1 = require("../interfaces/global/HCloudError");
|
|
8
|
+
const axios_1 = __importDefault(require("axios"));
|
|
9
|
+
const HCloudError_1 = __importDefault(require("../interfaces/global/HCloudError"));
|
|
7
10
|
function wrapError(error) {
|
|
8
11
|
if (axios_1.default.isAxiosError(error) && error.response) {
|
|
9
12
|
return new HCloudError_1.default(error.response.status, error.response.statusText, error.response.data.code, error.response.data.error, error.response.data.message);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
declare enum Entity {
|
|
2
2
|
USER_NAME = "USER_NAME",
|
|
3
|
+
USER_PASSWORD = "USER_PASSWORD",
|
|
4
|
+
OAUTH_SECRET_NAME = "OAUTH_SECRET_NAME",
|
|
3
5
|
ORGANIZATION_NAME = "ORGANIZATION_NAME",
|
|
4
6
|
USER_ORGANIZATION_NAME = "USER_ORGANIZATION_NAME",
|
|
5
7
|
TEAM_NAME = "TEAM_NAME",
|
|
@@ -15,7 +17,6 @@ declare enum Entity {
|
|
|
15
17
|
SECRET_KEY = "SECRET_KEY",
|
|
16
18
|
SECRET_VALUE = "SECRET_VALUE",
|
|
17
19
|
POOL_NAME = "POOL_NAME",
|
|
18
|
-
FUSE_JOB = "FUSE_JOB",
|
|
19
20
|
WAVE_ENGINE_RELEASE = "WAVE_ENGINE_RELEASE",
|
|
20
21
|
CHALLENGE_STRING = "CHALLENGE_STRING",
|
|
21
22
|
DATABASE_NAME = "DATABASE_NAME",
|
|
@@ -36,9 +37,18 @@ declare enum Entity {
|
|
|
36
37
|
CATALOG_ID = "CATALOG_ID",
|
|
37
38
|
WEBHOOK_ID = "WEBHOOK_ID",
|
|
38
39
|
WEBHOOK_TOKEN = "WEBHOOK_TOKEN",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
JOB = "JOB",
|
|
41
|
+
JOB_ID = "JOB_ID",
|
|
42
|
+
JOB_LOG_ID = "JOB_LOG_ID",
|
|
43
|
+
NAMESPACE_NAME = "NAMESPACE_NAME",
|
|
44
|
+
MESSAGE_ID = "MESSAGE_ID",
|
|
45
|
+
ARRAY_INDEX = "ARRAY_INDEX",
|
|
46
|
+
URL_SLUG = "URL_SLUG",
|
|
47
|
+
LONG_URL_SLUG = "LONG_URL_SLUG",
|
|
48
|
+
TAG_NAME = "TAG_NAME",
|
|
49
|
+
TAG_COLOR = "TAG_COLOR",
|
|
50
|
+
MODULE_NAME = "MODULE_NAME",
|
|
51
|
+
LOG_COLLECTOR_NAME = "LOG_COLLECTOR_NAME"
|
|
42
52
|
}
|
|
43
53
|
declare class EntityDetails {
|
|
44
54
|
private entity;
|