hcloud-sdk 0.0.15 → 14.13.2
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/README.md +1 -0
- package/changelog.md +809 -0
- package/index.d.ts +3 -2
- package/index.js +5 -2
- package/lib/Base.d.ts +26 -0
- package/lib/Base.js +12 -0
- package/lib/Hcloud.d.ts +80 -0
- package/lib/Hcloud.js +134 -0
- package/lib/helper/ErrorHelper.d.ts +7 -0
- package/lib/helper/ErrorHelper.js +19 -0
- package/lib/helper/paginatedResponseHelper.d.ts +3 -0
- package/lib/helper/paginatedResponseHelper.js +9 -0
- package/lib/helper/searchFilter.d.ts +9 -0
- package/lib/helper/searchFilter.js +12 -0
- package/lib/interfaces/agent/bundle/dev/index.d.ts +3 -0
- package/lib/interfaces/agent/context/index.d.ts +19 -0
- package/lib/interfaces/agent/index.d.ts +21 -0
- package/lib/interfaces/agent/index.js +2 -0
- package/lib/interfaces/auditor/index.d.ts +72 -0
- package/lib/interfaces/{Auditor.js → auditor/index.js} +21 -5
- package/lib/interfaces/axios/index.d.ts +5 -0
- package/lib/interfaces/axios/index.js +8 -0
- package/lib/interfaces/bouncer/features/index.d.ts +10 -0
- package/lib/interfaces/bouncer/features/index.js +2 -0
- package/lib/interfaces/bouncer/index.d.ts +6 -0
- package/lib/interfaces/bouncer/index.js +17 -0
- package/lib/interfaces/dali/index.d.ts +3 -0
- package/lib/interfaces/dali/index.js +2 -0
- package/lib/interfaces/frontend/config/index.d.ts +33 -0
- package/lib/interfaces/frontend/config/index.js +10 -0
- package/lib/interfaces/fuse/index.d.ts +3 -0
- package/lib/interfaces/fuse/index.js +19 -0
- package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +38 -0
- package/lib/interfaces/fuse/space/cronjob/Cronjob.js +8 -0
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.d.ts +16 -0
- package/lib/interfaces/fuse/space/cronjob/CronjobLog.js +2 -0
- package/lib/interfaces/fuse/space/index.d.ts +21 -0
- package/lib/interfaces/fuse/space/index.js +11 -0
- package/lib/interfaces/global/HCloudError.d.ts +8 -0
- package/lib/interfaces/global/HCloudError.js +13 -0
- package/lib/interfaces/global/Header.d.ts +4 -0
- package/lib/interfaces/global/Header.js +2 -0
- package/lib/interfaces/global/HttpMethod.d.ts +7 -0
- package/lib/interfaces/global/HttpMethod.js +11 -0
- package/lib/interfaces/global/PaginatedResponse.d.ts +4 -0
- package/lib/interfaces/global/PaginatedResponse.js +2 -0
- package/lib/interfaces/global/Products.d.ts +11 -0
- package/lib/interfaces/global/Products.js +15 -0
- package/lib/interfaces/global/SearchFilters.d.ts +86 -0
- package/lib/interfaces/global/SearchFilters.js +49 -0
- package/lib/interfaces/global/Space.d.ts +20 -0
- package/lib/interfaces/global/Space.js +8 -0
- package/lib/interfaces/global/Version.d.ts +3 -0
- package/lib/interfaces/global/Version.js +2 -0
- package/lib/interfaces/global/Views.d.ts +8 -0
- package/lib/interfaces/global/Views.js +12 -0
- package/lib/interfaces/global/index.d.ts +9 -0
- package/lib/interfaces/global/index.js +25 -0
- package/lib/interfaces/high5/index.d.ts +16 -0
- package/lib/interfaces/high5/index.js +32 -0
- package/lib/interfaces/high5/joinToken/index.d.ts +10 -0
- package/lib/interfaces/high5/joinToken/index.js +2 -0
- package/lib/interfaces/high5/space/event/index.d.ts +15 -0
- package/lib/interfaces/high5/space/event/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/DesignOperation.d.ts +68 -0
- package/lib/interfaces/high5/space/event/stream/design/DesignOperation.js +20 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +92 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.js +20 -0
- package/lib/interfaces/high5/space/event/stream/design/index.d.ts +22 -0
- package/lib/interfaces/high5/space/event/stream/design/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/snapshot/index.d.ts +30 -0
- package/lib/interfaces/high5/space/event/stream/design/snapshot/index.js +8 -0
- package/lib/interfaces/high5/space/event/stream/index.d.ts +77 -0
- package/lib/interfaces/high5/space/event/stream/index.js +13 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +60 -0
- package/lib/interfaces/high5/space/event/stream/node/index.js +7 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +137 -0
- package/lib/interfaces/high5/space/execution/index.js +21 -0
- package/lib/interfaces/high5/space/index.d.ts +23 -0
- package/lib/interfaces/high5/space/index.js +12 -0
- package/lib/interfaces/high5/space/secret/index.d.ts +12 -0
- package/lib/interfaces/high5/space/secret/index.js +2 -0
- package/lib/interfaces/high5/space/webhook/index.d.ts +75 -0
- package/lib/interfaces/high5/space/webhook/index.js +9 -0
- package/lib/interfaces/high5/wave/index.d.ts +171 -0
- package/lib/interfaces/high5/wave/index.js +52 -0
- package/lib/interfaces/idp/index.d.ts +26 -0
- package/lib/interfaces/idp/index.js +38 -0
- package/lib/interfaces/idp/oauth/index.d.ts +19 -0
- package/lib/interfaces/idp/oauth/index.js +8 -0
- package/lib/interfaces/idp/organization/index.d.ts +32 -0
- package/lib/interfaces/idp/organization/index.js +25 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +84 -0
- package/lib/interfaces/idp/organization/license/index.js +15 -0
- package/lib/interfaces/idp/organization/member/index.d.ts +15 -0
- package/lib/interfaces/idp/organization/member/index.js +2 -0
- package/lib/interfaces/idp/organization/member/invitations/index.d.ts +26 -0
- package/lib/interfaces/idp/organization/member/invitations/index.js +18 -0
- package/lib/interfaces/idp/organization/settings/domain/index.d.ts +19 -0
- package/lib/interfaces/idp/organization/settings/domain/index.js +8 -0
- package/lib/interfaces/idp/organization/settings/domain/saml/index.d.ts +10 -0
- package/lib/interfaces/idp/organization/settings/domain/saml/index.js +2 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +37 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +24 -0
- package/lib/interfaces/idp/organization/team/index.js +9 -0
- package/lib/interfaces/idp/user/ConnectionSettings.d.ts +6 -0
- package/lib/interfaces/idp/user/ConnectionSettings.js +2 -0
- package/lib/interfaces/idp/user/GeneralSettings.d.ts +44 -0
- package/lib/interfaces/idp/user/GeneralSettings.js +38 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +8 -0
- package/lib/interfaces/idp/user/NotificationSettings.js +2 -0
- package/lib/interfaces/idp/user/Pat.d.ts +19 -0
- package/lib/interfaces/idp/user/Pat.js +2 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +40 -0
- package/lib/interfaces/idp/user/Scopes.js +50 -0
- package/lib/interfaces/idp/user/SuccessfulAuth.d.ts +5 -0
- package/lib/interfaces/idp/user/SuccessfulAuth.js +2 -0
- package/lib/interfaces/idp/user/Totp.d.ts +20 -0
- package/lib/interfaces/idp/user/Totp.js +2 -0
- package/lib/interfaces/idp/user/index.d.ts +23 -0
- package/lib/interfaces/idp/user/index.js +2 -0
- package/lib/interfaces/mailer/index.d.ts +66 -0
- package/lib/interfaces/mailer/index.js +81 -0
- package/lib/interfaces/mothership/index.d.ts +27 -0
- package/lib/interfaces/mothership/index.js +8 -0
- package/lib/interfaces/nats/index.d.ts +252 -0
- package/lib/interfaces/nats/index.js +334 -0
- package/lib/service/agent/bundle/dev/index.d.ts +17 -0
- package/lib/service/agent/bundle/dev/index.js +40 -0
- package/lib/service/agent/bundle/index.d.ts +11 -0
- package/lib/service/agent/bundle/index.js +55 -0
- package/lib/service/agent/context/index.d.ts +37 -0
- package/lib/service/agent/context/index.js +81 -0
- package/lib/service/agent/index.d.ts +14 -0
- package/lib/service/agent/index.js +20 -0
- package/lib/service/agent/installer/index.d.ts +15 -0
- package/lib/service/agent/installer/index.js +97 -0
- package/lib/service/auditor/index.d.ts +26 -0
- package/lib/service/auditor/index.js +49 -0
- package/lib/service/auditor/internal/index.d.ts +27 -0
- package/lib/service/auditor/internal/index.js +61 -0
- package/lib/service/bouncer/features/index.d.ts +8 -0
- package/lib/service/bouncer/features/index.js +25 -0
- package/lib/service/bouncer/index.d.ts +14 -0
- package/lib/service/bouncer/index.js +31 -0
- package/lib/service/dali/DaliAvatar.d.ts +36 -0
- package/lib/service/dali/DaliAvatar.js +25 -0
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +28 -0
- package/lib/service/dali/avatar/DaliFuseSpace.js +55 -0
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +28 -0
- package/lib/service/dali/avatar/DaliHigh5Space.js +55 -0
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +28 -0
- package/lib/service/dali/avatar/DaliOAuthApp.js +55 -0
- package/lib/service/dali/avatar/DaliOrganization.d.ts +25 -0
- package/lib/service/dali/avatar/DaliOrganization.js +52 -0
- package/lib/service/dali/avatar/DaliTeam.d.ts +28 -0
- package/lib/service/dali/avatar/DaliTeam.js +55 -0
- package/lib/service/dali/avatar/DaliUser.d.ts +22 -0
- package/lib/service/dali/avatar/DaliUser.js +49 -0
- package/lib/service/dali/index.d.ts +16 -0
- package/lib/service/dali/index.js +30 -0
- package/lib/service/fuse/index.d.ts +17 -0
- package/lib/service/fuse/index.js +34 -0
- package/lib/service/fuse/internal/index.d.ts +9 -0
- package/lib/service/fuse/internal/index.js +29 -0
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +8 -0
- package/lib/service/fuse/internal/space/cronjob/index.js +15 -0
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +17 -0
- package/lib/service/fuse/internal/space/cronjob/log/index.js +35 -0
- package/lib/service/fuse/internal/space/index.d.ts +23 -0
- package/lib/service/fuse/internal/space/index.js +43 -0
- package/lib/service/fuse/space/cronjob/index.d.ts +123 -0
- package/lib/service/fuse/space/cronjob/index.js +175 -0
- package/lib/service/fuse/space/cronjob/log/index.d.ts +31 -0
- package/lib/service/fuse/space/cronjob/log/index.js +57 -0
- package/lib/service/fuse/space/index.d.ts +82 -0
- package/lib/service/fuse/space/index.js +134 -0
- package/lib/service/high5/execution/index.d.ts +10 -0
- package/lib/service/high5/execution/index.js +17 -0
- package/lib/service/high5/execution/log/index.d.ts +19 -0
- package/lib/service/high5/execution/log/index.js +41 -0
- package/lib/service/high5/execution/status/index.d.ts +18 -0
- package/lib/service/high5/execution/status/index.js +41 -0
- package/lib/service/high5/index.d.ts +22 -0
- package/lib/service/high5/index.js +39 -0
- package/lib/service/high5/internal/index.d.ts +9 -0
- package/lib/service/high5/internal/index.js +29 -0
- package/lib/service/high5/internal/space/index.d.ts +21 -0
- package/lib/service/high5/internal/space/index.js +41 -0
- package/lib/service/high5/joinToken/index.d.ts +40 -0
- package/lib/service/high5/joinToken/index.js +64 -0
- package/lib/service/high5/space/event/index.d.ts +56 -0
- package/lib/service/high5/space/event/index.js +89 -0
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +31 -0
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +117 -0
- package/lib/service/high5/space/event/stream/design/index.d.ts +38 -0
- package/lib/service/high5/space/event/stream/design/index.js +56 -0
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +62 -0
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +100 -0
- package/lib/service/high5/space/event/stream/index.d.ts +114 -0
- package/lib/service/high5/space/event/stream/index.js +164 -0
- package/lib/service/high5/space/execution/index.d.ts +48 -0
- package/lib/service/high5/space/execution/index.js +74 -0
- package/lib/service/high5/space/execution/log/index.d.ts +31 -0
- package/lib/service/high5/space/execution/log/index.js +57 -0
- package/lib/service/high5/space/execution/status/index.d.ts +16 -0
- package/lib/service/high5/space/execution/status/index.js +34 -0
- package/lib/service/high5/space/index.d.ts +107 -0
- package/lib/service/high5/space/index.js +160 -0
- package/lib/service/high5/space/node/index.d.ts +58 -0
- package/lib/service/high5/space/node/index.js +116 -0
- package/lib/service/high5/space/secret/index.d.ts +60 -0
- package/lib/service/high5/space/secret/index.js +92 -0
- package/lib/service/high5/space/wave/index.d.ts +38 -0
- package/lib/service/high5/space/wave/index.js +66 -0
- package/lib/service/high5/space/webhook/index.d.ts +83 -0
- package/lib/service/high5/space/webhook/index.js +132 -0
- package/lib/service/high5/space/webhook/log/index.d.ts +18 -0
- package/lib/service/high5/space/webhook/log/index.js +38 -0
- package/lib/service/high5/wave/index.d.ts +8 -0
- package/lib/service/high5/wave/index.js +15 -0
- package/lib/service/high5/wave/s3/index.d.ts +48 -0
- package/lib/service/high5/wave/s3/index.js +88 -0
- package/lib/service/idp/index.d.ts +82 -0
- package/lib/service/idp/index.js +137 -0
- package/lib/service/idp/internal/index.d.ts +19 -0
- package/lib/service/idp/internal/index.js +34 -0
- package/lib/service/idp/oauth/index.d.ts +45 -0
- package/lib/service/idp/oauth/index.js +105 -0
- package/lib/service/idp/organization/index.d.ts +54 -0
- package/lib/service/idp/organization/index.js +79 -0
- package/lib/service/idp/organization/license/index.d.ts +7 -0
- package/lib/service/idp/organization/license/index.js +30 -0
- package/lib/service/idp/organization/member/index.d.ts +58 -0
- package/lib/service/idp/organization/member/index.js +96 -0
- package/lib/service/idp/organization/member/invitations/index.d.ts +79 -0
- package/lib/service/idp/organization/member/invitations/index.js +118 -0
- package/lib/service/idp/organization/settings/domain/index.d.ts +38 -0
- package/lib/service/idp/organization/settings/domain/index.js +63 -0
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +43 -0
- package/lib/service/idp/organization/settings/domain/saml/index.js +88 -0
- package/lib/service/idp/organization/settings/index.d.ts +16 -0
- package/lib/service/idp/organization/settings/index.js +16 -0
- package/lib/service/idp/organization/settings/oauth/index.d.ts +64 -0
- package/lib/service/idp/organization/settings/oauth/index.js +106 -0
- package/lib/service/idp/organization/team/index.d.ts +72 -0
- package/lib/service/idp/organization/team/index.js +115 -0
- package/lib/service/idp/registration/index.d.ts +39 -0
- package/lib/service/idp/registration/index.js +84 -0
- package/lib/service/idp/user/index.d.ts +82 -0
- package/lib/service/idp/user/index.js +125 -0
- package/lib/service/idp/user/license/index.d.ts +7 -0
- package/lib/service/idp/user/license/index.js +30 -0
- package/lib/service/idp/user/password/index.d.ts +19 -0
- package/lib/service/idp/user/password/index.js +52 -0
- package/lib/service/idp/user/settings/connections/index.d.ts +15 -0
- package/lib/service/idp/user/settings/connections/index.js +33 -0
- package/lib/service/idp/user/settings/general/index.d.ts +18 -0
- package/lib/service/idp/user/settings/general/index.js +39 -0
- package/lib/service/idp/user/settings/index.d.ts +36 -0
- package/lib/service/idp/user/settings/index.js +25 -0
- package/lib/service/idp/user/settings/notifications/index.d.ts +18 -0
- package/lib/service/idp/user/settings/notifications/index.js +39 -0
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +22 -0
- package/lib/service/idp/user/settings/oauthApps/index.js +54 -0
- package/lib/service/idp/user/settings/pats/index.d.ts +50 -0
- package/lib/service/idp/user/settings/pats/index.js +93 -0
- package/lib/service/idp/user/settings/twoFactor/index.d.ts +11 -0
- package/lib/service/idp/user/settings/twoFactor/index.js +15 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +34 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +65 -0
- package/lib/service/mailer/index.d.ts +14 -0
- package/lib/service/mailer/index.js +31 -0
- package/lib/service/mailer/internal/index.d.ts +36 -0
- package/lib/service/mailer/internal/index.js +64 -0
- package/lib/service/mothership/index.d.ts +97 -0
- package/lib/service/mothership/index.js +136 -0
- package/lib/service/nats/index.d.ts +51 -0
- package/lib/service/nats/index.js +138 -0
- package/lib/utils/Types.d.ts +1 -0
- package/lib/utils/Types.js +2 -0
- package/lib/utils/bouncer/features/Provider.d.ts +16 -0
- package/lib/utils/bouncer/features/Provider.js +83 -0
- package/package.json +36 -27
- package/lib/base.d.ts +0 -12
- package/lib/base.js +0 -8
- package/lib/hcloud.d.ts +0 -11
- package/lib/hcloud.js +0 -27
- package/lib/interfaces/Auditor.d.ts +0 -40
- package/lib/interfaces/Global.d.ts +0 -8
- package/lib/interfaces/IDP.d.ts +0 -9
- package/lib/service/Auditor.d.ts +0 -42
- package/lib/service/Auditor.js +0 -101
- package/lib/service/High5.d.ts +0 -4
- package/lib/service/High5.js +0 -9
- package/lib/service/IDP.d.ts +0 -39
- package/lib/service/IDP.js +0 -84
- /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
- /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
package/package.json
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hcloud-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.13.2",
|
|
4
4
|
"description": "hcloud platform sdk",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "mocha -r ts-node/register tests/**/*.test.ts",
|
|
9
|
+
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.test.ts\"",
|
|
10
|
+
"lint": "eslint --max-warnings=0 --fix src/ tests/ --ext .ts",
|
|
11
|
+
"doc:build": "vuepress build _docs/src",
|
|
12
|
+
"doc:dev": "vuepress dev _docs/src",
|
|
13
|
+
"doc:export": "vuepress export _docs/src",
|
|
14
|
+
"build": "tsc"
|
|
15
|
+
},
|
|
7
16
|
"repository": {
|
|
8
17
|
"type": "git",
|
|
9
18
|
"url": "git+https://github.com/moovit-sp-gmbh/hcloud-sdk-js.git"
|
|
@@ -19,32 +28,32 @@
|
|
|
19
28
|
"author": "moovit-sp-gmbh",
|
|
20
29
|
"homepage": "https://github.com/moovit-sp-gmbh/hcloud-sdk-js#readme",
|
|
21
30
|
"devDependencies": {
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"mocha": "^10.0.
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
31
|
+
"@commitlint/cli": "^18.6.1",
|
|
32
|
+
"@commitlint/config-conventional": "^18.6.3",
|
|
33
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
34
|
+
"@semantic-release/git": "^10.0.1",
|
|
35
|
+
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
36
|
+
"@types/chai": "^4.3.17",
|
|
37
|
+
"@types/mocha": "^10.0.7",
|
|
38
|
+
"@types/node": "^20.14.8",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
40
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
41
|
+
"chai": "^4.5.0",
|
|
42
|
+
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
43
|
+
"dayjs": "^1.11.12",
|
|
44
|
+
"eslint": "^8.57.0",
|
|
45
|
+
"eslint-config-prettier": "^8.10.0",
|
|
46
|
+
"eslint-plugin-import": "^2.29.1",
|
|
47
|
+
"mocha": "^10.7.3",
|
|
48
|
+
"prettier": "^3.3.3",
|
|
49
|
+
"semantic-release": "^23.1.1",
|
|
50
|
+
"semantic-release-telegram": "^1.6.2",
|
|
51
|
+
"ts-node": "^10.9.2",
|
|
52
|
+
"typescript": "^5.5.4"
|
|
37
53
|
},
|
|
38
54
|
"dependencies": {
|
|
39
|
-
"axios": "^
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"test": "mocha -r ts-node/register tests/**/*.test.ts",
|
|
43
|
-
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.test.ts\"",
|
|
44
|
-
"lint": "tslint -p tsconfig.json",
|
|
45
|
-
"doc:build": "vuepress build _docs/src",
|
|
46
|
-
"doc:dev": "vuepress dev _docs/src",
|
|
47
|
-
"doc:export": "vuepress export _docs/src",
|
|
48
|
-
"build": "tsc"
|
|
55
|
+
"axios": "^1.7.3",
|
|
56
|
+
"nats": "^2.28.2",
|
|
57
|
+
"nats.ws": "^1.29.2"
|
|
49
58
|
}
|
|
50
|
-
}
|
|
59
|
+
}
|
package/lib/base.d.ts
DELETED
package/lib/base.js
DELETED
package/lib/hcloud.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import base, { Options } from "./base";
|
|
2
|
-
import IDPService from "./service/IDP";
|
|
3
|
-
import AuditorService from "./service/Auditor";
|
|
4
|
-
import High5Service from "./service/High5";
|
|
5
|
-
export default class hcloud extends base {
|
|
6
|
-
Auditor: AuditorService;
|
|
7
|
-
High5: High5Service;
|
|
8
|
-
IDP: IDPService;
|
|
9
|
-
constructor(opts: Options);
|
|
10
|
-
setAuthToken(token: string): hcloud;
|
|
11
|
-
}
|
package/lib/hcloud.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const base_1 = require("./base");
|
|
4
|
-
const IDP_1 = require("./service/IDP");
|
|
5
|
-
const Auditor_1 = require("./service/Auditor");
|
|
6
|
-
const High5_1 = require("./service/High5");
|
|
7
|
-
const axios_1 = require("axios");
|
|
8
|
-
const package_json_1 = require("../package.json");
|
|
9
|
-
// tslint:disable-next-line
|
|
10
|
-
class hcloud extends base_1.default {
|
|
11
|
-
constructor(opts) {
|
|
12
|
-
super(opts);
|
|
13
|
-
this.Auditor = new Auditor_1.default(this.opts);
|
|
14
|
-
this.High5 = new High5_1.default(this.opts);
|
|
15
|
-
this.IDP = new IDP_1.default(this.opts);
|
|
16
|
-
axios_1.default.defaults.headers.common = {
|
|
17
|
-
"User-Agent": "hcloud-sdk-js/v" + package_json_1.version,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
setAuthToken(token) {
|
|
21
|
-
axios_1.default.defaults.headers.common = Object.assign(axios_1.default.defaults.headers.common, {
|
|
22
|
-
Authorization: token,
|
|
23
|
-
});
|
|
24
|
-
return this;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.default = hcloud;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare enum Level {
|
|
2
|
-
INFO = "info",
|
|
3
|
-
WARN = "warn",
|
|
4
|
-
ERROR = "error",
|
|
5
|
-
DEBUG = "debug"
|
|
6
|
-
}
|
|
7
|
-
export declare enum Origin {
|
|
8
|
-
IDP = "idp",
|
|
9
|
-
High5 = "high5"
|
|
10
|
-
}
|
|
11
|
-
export declare enum Event {
|
|
12
|
-
Login = "login",
|
|
13
|
-
Logout = "logout",
|
|
14
|
-
User = "user",
|
|
15
|
-
Organization = "organization",
|
|
16
|
-
App = "app",
|
|
17
|
-
Event = "event",
|
|
18
|
-
Stream = "stream"
|
|
19
|
-
}
|
|
20
|
-
export declare enum Type {
|
|
21
|
-
Read = "read",
|
|
22
|
-
Create = "create",
|
|
23
|
-
Update = "update",
|
|
24
|
-
Delete = "delete",
|
|
25
|
-
Execute = "execute",
|
|
26
|
-
Connect = "connect",
|
|
27
|
-
Disconnect = "disconnect",
|
|
28
|
-
Add = "add",
|
|
29
|
-
Remove = "remove"
|
|
30
|
-
}
|
|
31
|
-
export interface AuditLog {
|
|
32
|
-
level: Level;
|
|
33
|
-
origin: Origin;
|
|
34
|
-
organization?: string;
|
|
35
|
-
event: Event;
|
|
36
|
-
user: string;
|
|
37
|
-
type?: Type;
|
|
38
|
-
timestamp: number;
|
|
39
|
-
message?: any;
|
|
40
|
-
}
|
package/lib/interfaces/IDP.d.ts
DELETED
package/lib/service/Auditor.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import base from "../base";
|
|
2
|
-
import { AuditLog } from "../interfaces/Auditor";
|
|
3
|
-
import { Version } from "../interfaces/Global";
|
|
4
|
-
export default class Auditor extends base {
|
|
5
|
-
private queueExecutionInterval;
|
|
6
|
-
private logQueue;
|
|
7
|
-
private logQueueTimer;
|
|
8
|
-
/**
|
|
9
|
-
* Version requests the endpoint version
|
|
10
|
-
* @returns Version object
|
|
11
|
-
*/
|
|
12
|
-
version: () => Promise<Version>;
|
|
13
|
-
/**
|
|
14
|
-
* GetAuditLog requests logs from
|
|
15
|
-
* @param organizationId an optional organization ID to receive audit logs for
|
|
16
|
-
* @param limit an opitional response limit (1-1000; dafaults to 500)
|
|
17
|
-
* @param page an opitional page to skip certain results (page * limit; defaults to 0)
|
|
18
|
-
* @returns User object
|
|
19
|
-
*/
|
|
20
|
-
getAuditLogs: (organizationId: string | null, limit: number | null, page: number | null) => Promise<AuditLog[]>;
|
|
21
|
-
/**
|
|
22
|
-
* AddAuditLogs adds log entries
|
|
23
|
-
*
|
|
24
|
-
* THIS ENDPOINT WORKS INTERNALLY ONLY
|
|
25
|
-
*
|
|
26
|
-
* CAN ONLY BE USED FROM BACKENDS WITHIN THE hcloud DEPLOYMENT AS THE ENDPOINT IS NOT PUBLICLY EXPOSED
|
|
27
|
-
* @param logs array (add multiple logs entries at once)
|
|
28
|
-
* @returns AuditLog array
|
|
29
|
-
*/
|
|
30
|
-
addAuditLogs: (logs: AuditLog[]) => Promise<AuditLog[]>;
|
|
31
|
-
/**
|
|
32
|
-
* QueueAuditLogs adds log entries to a queue that will be processed periodically
|
|
33
|
-
*
|
|
34
|
-
* THIS COMES WITH DOWNSIDE OF LOG TIMESTAMPS BEING INACCURATE AS THEY ARE CREATED BY THE Auditor SERVER
|
|
35
|
-
*
|
|
36
|
-
* TIMESTAMPS MIGHT DIFFER AS MUCH AS: this.opts.auditor.queue.executionInterval || 500
|
|
37
|
-
* @param logs array (add multiple logs entries at once)
|
|
38
|
-
*/
|
|
39
|
-
queueAuditLogs: (logs: AuditLog[]) => Promise<void>;
|
|
40
|
-
private startQueue;
|
|
41
|
-
private getEndpoint;
|
|
42
|
-
}
|
package/lib/service/Auditor.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const base_1 = require("../base");
|
|
13
|
-
const axios_1 = require("axios");
|
|
14
|
-
class Auditor extends base_1.default {
|
|
15
|
-
constructor() {
|
|
16
|
-
var _a, _b;
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.queueExecutionInterval = ((_b = (_a = this.opts.auditor) === null || _a === void 0 ? void 0 : _a.queue) === null || _b === void 0 ? void 0 : _b.executionInterval) || 500;
|
|
19
|
-
this.logQueue = [];
|
|
20
|
-
/**
|
|
21
|
-
* Version requests the endpoint version
|
|
22
|
-
* @returns Version object
|
|
23
|
-
*/
|
|
24
|
-
this.version = () => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const resp = yield axios_1.default.get(this.getEndpoint("/v1/version"), {}).catch((err) => {
|
|
26
|
-
throw err;
|
|
27
|
-
});
|
|
28
|
-
return resp.data;
|
|
29
|
-
});
|
|
30
|
-
/**
|
|
31
|
-
* GetAuditLog requests logs from
|
|
32
|
-
* @param organizationId an optional organization ID to receive audit logs for
|
|
33
|
-
* @param limit an opitional response limit (1-1000; dafaults to 500)
|
|
34
|
-
* @param page an opitional page to skip certain results (page * limit; defaults to 0)
|
|
35
|
-
* @returns User object
|
|
36
|
-
*/
|
|
37
|
-
this.getAuditLogs = (organizationId, limit, page) => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const parameters = [];
|
|
39
|
-
let url = "";
|
|
40
|
-
if (organizationId !== null) {
|
|
41
|
-
parameters.push("organization=" + organizationId);
|
|
42
|
-
}
|
|
43
|
-
if (limit !== null) {
|
|
44
|
-
parameters.push("limit=" + limit);
|
|
45
|
-
}
|
|
46
|
-
if (page !== null) {
|
|
47
|
-
parameters.push("page=" + page);
|
|
48
|
-
}
|
|
49
|
-
if (parameters.length > 0) {
|
|
50
|
-
url = "?" + parameters.join("&");
|
|
51
|
-
}
|
|
52
|
-
const resp = yield axios_1.default.get(this.getEndpoint("/v1/logs") + url, {}).catch((err) => {
|
|
53
|
-
throw err;
|
|
54
|
-
});
|
|
55
|
-
return resp.data;
|
|
56
|
-
});
|
|
57
|
-
/**
|
|
58
|
-
* AddAuditLogs adds log entries
|
|
59
|
-
*
|
|
60
|
-
* THIS ENDPOINT WORKS INTERNALLY ONLY
|
|
61
|
-
*
|
|
62
|
-
* CAN ONLY BE USED FROM BACKENDS WITHIN THE hcloud DEPLOYMENT AS THE ENDPOINT IS NOT PUBLICLY EXPOSED
|
|
63
|
-
* @param logs array (add multiple logs entries at once)
|
|
64
|
-
* @returns AuditLog array
|
|
65
|
-
*/
|
|
66
|
-
this.addAuditLogs = (logs) => __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
const resp = yield axios_1.default.post(this.getEndpoint("/logs"), logs).catch((err) => {
|
|
68
|
-
throw err;
|
|
69
|
-
});
|
|
70
|
-
return resp.data;
|
|
71
|
-
});
|
|
72
|
-
/**
|
|
73
|
-
* QueueAuditLogs adds log entries to a queue that will be processed periodically
|
|
74
|
-
*
|
|
75
|
-
* THIS COMES WITH DOWNSIDE OF LOG TIMESTAMPS BEING INACCURATE AS THEY ARE CREATED BY THE Auditor SERVER
|
|
76
|
-
*
|
|
77
|
-
* TIMESTAMPS MIGHT DIFFER AS MUCH AS: this.opts.auditor.queue.executionInterval || 500
|
|
78
|
-
* @param logs array (add multiple logs entries at once)
|
|
79
|
-
*/
|
|
80
|
-
this.queueAuditLogs = (logs) => __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
if (!this.logQueueTimer) {
|
|
82
|
-
this.startQueue();
|
|
83
|
-
}
|
|
84
|
-
this.logQueue = this.logQueue.concat(logs);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
startQueue() {
|
|
88
|
-
if (!this.logQueueTimer) {
|
|
89
|
-
this.logQueueTimer = setTimeout(() => {
|
|
90
|
-
if (this.logQueue.length > 0) {
|
|
91
|
-
this.addAuditLogs(this.logQueue);
|
|
92
|
-
this.logQueue = [];
|
|
93
|
-
}
|
|
94
|
-
}, this.queueExecutionInterval);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
getEndpoint(endpoint) {
|
|
98
|
-
return `${this.opts.api}/api/auditor${endpoint}`;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.default = Auditor;
|
package/lib/service/High5.d.ts
DELETED
package/lib/service/High5.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const base_1 = require("../base");
|
|
4
|
-
class High5 extends base_1.default {
|
|
5
|
-
getEndpoint(endpoint) {
|
|
6
|
-
return `${this.opts.api}/api/high5${endpoint}`;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
exports.default = High5;
|
package/lib/service/IDP.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import base from "../base";
|
|
2
|
-
import { Token, User } from "../interfaces/IDP";
|
|
3
|
-
import { Version } from "../interfaces/Global";
|
|
4
|
-
export default class IDP extends base {
|
|
5
|
-
/**
|
|
6
|
-
* Version requests the endpoint version
|
|
7
|
-
* @returns Version object
|
|
8
|
-
*/
|
|
9
|
-
version: () => Promise<Version>;
|
|
10
|
-
/**
|
|
11
|
-
* Authorize validates a token
|
|
12
|
-
* @param token
|
|
13
|
-
* @returns User object
|
|
14
|
-
*/
|
|
15
|
-
authorize: () => Promise<User>;
|
|
16
|
-
/**
|
|
17
|
-
* Register against the identity provider
|
|
18
|
-
* @param name
|
|
19
|
-
* @param email
|
|
20
|
-
* @param password
|
|
21
|
-
* @returns Bearer Token
|
|
22
|
-
*/
|
|
23
|
-
register: (name: string, email: string, password: string) => Promise<User>;
|
|
24
|
-
/**
|
|
25
|
-
* Authenticate against the identity provider with a given email and password.
|
|
26
|
-
* @param email
|
|
27
|
-
* @param password
|
|
28
|
-
* @returns Bearer Token
|
|
29
|
-
*/
|
|
30
|
-
authenticate: (email: string, password: string) => Promise<Token>;
|
|
31
|
-
/**
|
|
32
|
-
* authenticateReturnUser against the identity provider with a given email and password.
|
|
33
|
-
* @param email
|
|
34
|
-
* @param password
|
|
35
|
-
* @returns User object
|
|
36
|
-
*/
|
|
37
|
-
authenticateReturnUser: (email: string, password: string) => Promise<User>;
|
|
38
|
-
private getEndpoint;
|
|
39
|
-
}
|
package/lib/service/IDP.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const base_1 = require("../base");
|
|
13
|
-
const axios_1 = require("axios");
|
|
14
|
-
class IDP extends base_1.default {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
/**
|
|
18
|
-
* Version requests the endpoint version
|
|
19
|
-
* @returns Version object
|
|
20
|
-
*/
|
|
21
|
-
this.version = () => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const resp = yield axios_1.default.get(this.getEndpoint("/v1/version"), {}).catch((err) => {
|
|
23
|
-
throw err;
|
|
24
|
-
});
|
|
25
|
-
return resp.data;
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* Authorize validates a token
|
|
29
|
-
* @param token
|
|
30
|
-
* @returns User object
|
|
31
|
-
*/
|
|
32
|
-
this.authorize = () => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
const resp = yield axios_1.default.get(this.getEndpoint("/v1/authorize"), {}).catch((err) => {
|
|
34
|
-
throw err;
|
|
35
|
-
});
|
|
36
|
-
return resp.data;
|
|
37
|
-
});
|
|
38
|
-
/**
|
|
39
|
-
* Register against the identity provider
|
|
40
|
-
* @param name
|
|
41
|
-
* @param email
|
|
42
|
-
* @param password
|
|
43
|
-
* @returns Bearer Token
|
|
44
|
-
*/
|
|
45
|
-
this.register = (name, email, password) => __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
const resp = yield axios_1.default
|
|
47
|
-
.post(this.getEndpoint("/v1/registration"), { name: name, email: email, password: password })
|
|
48
|
-
.catch((err) => {
|
|
49
|
-
throw err;
|
|
50
|
-
});
|
|
51
|
-
return resp.data;
|
|
52
|
-
});
|
|
53
|
-
/**
|
|
54
|
-
* Authenticate against the identity provider with a given email and password.
|
|
55
|
-
* @param email
|
|
56
|
-
* @param password
|
|
57
|
-
* @returns Bearer Token
|
|
58
|
-
*/
|
|
59
|
-
this.authenticate = (email, password) => __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
const resp = yield axios_1.default.post(this.getEndpoint("/v1/authenticate"), { email: email, password: password }).catch((err) => {
|
|
61
|
-
throw err;
|
|
62
|
-
});
|
|
63
|
-
// tslint-disable: no-string-literal
|
|
64
|
-
const token = { token: resp.headers.authorization };
|
|
65
|
-
return token;
|
|
66
|
-
});
|
|
67
|
-
/**
|
|
68
|
-
* authenticateReturnUser against the identity provider with a given email and password.
|
|
69
|
-
* @param email
|
|
70
|
-
* @param password
|
|
71
|
-
* @returns User object
|
|
72
|
-
*/
|
|
73
|
-
this.authenticateReturnUser = (email, password) => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
const resp = yield axios_1.default.post(this.getEndpoint("/v1/authenticate"), { email: email, password: password }).catch((err) => {
|
|
75
|
-
throw err;
|
|
76
|
-
});
|
|
77
|
-
return resp.data;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
getEndpoint(endpoint) {
|
|
81
|
-
return `${this.opts.api}/api/account${endpoint}`;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.default = IDP;
|
|
File without changes
|
|
File without changes
|