hcloud-sdk 0.0.16 → 15.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/README.md +1 -0
- package/changelog.md +45 -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 +90 -0
- package/lib/Hcloud.js +184 -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.d.ts → auditor/index.d.ts} +31 -5
- package/lib/interfaces/{Auditor.js → auditor/index.js} +15 -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 +7 -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/frontend/featureflags/index.d.ts +7 -0
- package/lib/interfaces/frontend/featureflags/index.js +2 -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 +62 -0
- package/lib/interfaces/high5/space/event/stream/node/index.js +7 -0
- package/lib/interfaces/high5/space/execution/index.d.ts +148 -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/changelog.d.ts +30 -0
- package/lib/interfaces/high5/wave/changelog.js +18 -0
- package/lib/interfaces/high5/wave/index.d.ts +201 -0
- package/lib/interfaces/high5/wave/index.js +61 -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 +45 -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 +28 -0
- package/lib/interfaces/mothership/index.js +8 -0
- package/lib/interfaces/nats/index.d.ts +239 -0
- package/lib/interfaces/nats/index.js +316 -0
- package/lib/service/agent/bundle/dev/index.d.ts +17 -0
- package/lib/service/agent/bundle/dev/index.js +44 -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 +35 -0
- package/lib/service/agent/context/index.js +90 -0
- package/lib/service/agent/index.d.ts +16 -0
- package/lib/service/agent/index.js +37 -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 +25 -0
- package/lib/service/auditor/index.js +55 -0
- package/lib/service/auditor/internal/index.d.ts +27 -0
- package/lib/service/auditor/internal/index.js +65 -0
- package/lib/service/bouncer/features/index.d.ts +8 -0
- package/lib/service/bouncer/features/index.js +27 -0
- package/lib/service/bouncer/index.d.ts +7 -0
- package/lib/service/bouncer/index.js +16 -0
- package/lib/service/dali/DaliAvatar.d.ts +40 -0
- package/lib/service/dali/DaliAvatar.js +70 -0
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +26 -0
- package/lib/service/dali/avatar/DaliFuseSpace.js +58 -0
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +26 -0
- package/lib/service/dali/avatar/DaliHigh5Space.js +58 -0
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +26 -0
- package/lib/service/dali/avatar/DaliOAuthApp.js +58 -0
- package/lib/service/dali/avatar/DaliOrganization.d.ts +23 -0
- package/lib/service/dali/avatar/DaliOrganization.js +55 -0
- package/lib/service/dali/avatar/DaliTeam.d.ts +26 -0
- package/lib/service/dali/avatar/DaliTeam.js +58 -0
- package/lib/service/dali/avatar/DaliUser.d.ts +20 -0
- package/lib/service/dali/avatar/DaliUser.js +52 -0
- package/lib/service/dali/index.d.ts +15 -0
- package/lib/service/dali/index.js +37 -0
- package/lib/service/fuse/index.d.ts +18 -0
- package/lib/service/fuse/index.js +48 -0
- package/lib/service/fuse/internal/index.d.ts +8 -0
- package/lib/service/fuse/internal/index.js +31 -0
- package/lib/service/fuse/internal/space/cronjob/index.d.ts +7 -0
- package/lib/service/fuse/internal/space/cronjob/index.js +17 -0
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +15 -0
- package/lib/service/fuse/internal/space/cronjob/log/index.js +34 -0
- package/lib/service/fuse/internal/space/index.d.ts +22 -0
- package/lib/service/fuse/internal/space/index.js +49 -0
- package/lib/service/fuse/space/cronjob/index.d.ts +123 -0
- package/lib/service/fuse/space/cronjob/index.js +203 -0
- package/lib/service/fuse/space/cronjob/log/index.d.ts +31 -0
- package/lib/service/fuse/space/cronjob/log/index.js +58 -0
- package/lib/service/fuse/space/index.d.ts +81 -0
- package/lib/service/fuse/space/index.js +152 -0
- package/lib/service/high5/execution/index.d.ts +10 -0
- package/lib/service/high5/execution/index.js +24 -0
- package/lib/service/high5/execution/log/index.d.ts +19 -0
- package/lib/service/high5/execution/log/index.js +40 -0
- package/lib/service/high5/execution/status/index.d.ts +18 -0
- package/lib/service/high5/execution/status/index.js +40 -0
- package/lib/service/high5/index.d.ts +25 -0
- package/lib/service/high5/index.js +63 -0
- package/lib/service/high5/internal/index.d.ts +8 -0
- package/lib/service/high5/internal/index.js +31 -0
- package/lib/service/high5/internal/space/index.d.ts +21 -0
- package/lib/service/high5/internal/space/index.js +45 -0
- package/lib/service/high5/joinToken/index.d.ts +40 -0
- package/lib/service/high5/joinToken/index.js +72 -0
- package/lib/service/high5/space/event/index.d.ts +55 -0
- package/lib/service/high5/space/event/index.js +101 -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 +53 -0
- package/lib/service/high5/space/event/stream/design/index.js +91 -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 +107 -0
- package/lib/service/high5/space/event/stream/index.d.ts +113 -0
- package/lib/service/high5/space/event/stream/index.js +186 -0
- package/lib/service/high5/space/execution/index.d.ts +48 -0
- package/lib/service/high5/space/execution/index.js +89 -0
- package/lib/service/high5/space/execution/log/index.d.ts +29 -0
- package/lib/service/high5/space/execution/log/index.js +58 -0
- package/lib/service/high5/space/execution/status/index.d.ts +16 -0
- package/lib/service/high5/space/execution/status/index.js +36 -0
- package/lib/service/high5/space/index.d.ts +111 -0
- package/lib/service/high5/space/index.js +205 -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 +102 -0
- package/lib/service/high5/space/wave/index.d.ts +36 -0
- package/lib/service/high5/space/wave/index.js +73 -0
- package/lib/service/high5/space/webhook/index.d.ts +90 -0
- package/lib/service/high5/space/webhook/index.js +165 -0
- package/lib/service/high5/space/webhook/log/index.d.ts +16 -0
- package/lib/service/high5/space/webhook/log/index.js +37 -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 +100 -0
- package/lib/service/idp/index.d.ts +84 -0
- package/lib/service/idp/index.js +185 -0
- package/lib/service/idp/internal/index.d.ts +17 -0
- package/lib/service/idp/internal/index.js +33 -0
- package/lib/service/idp/oauth/index.d.ts +49 -0
- package/lib/service/idp/oauth/index.js +117 -0
- package/lib/service/idp/organization/index.d.ts +56 -0
- package/lib/service/idp/organization/index.js +114 -0
- package/lib/service/idp/organization/license/index.d.ts +7 -0
- package/lib/service/idp/organization/license/index.js +31 -0
- package/lib/service/idp/organization/member/index.d.ts +57 -0
- package/lib/service/idp/organization/member/index.js +110 -0
- package/lib/service/idp/organization/member/invitations/index.d.ts +79 -0
- package/lib/service/idp/organization/member/invitations/index.js +122 -0
- package/lib/service/idp/organization/settings/domain/index.d.ts +37 -0
- package/lib/service/idp/organization/settings/domain/index.js +76 -0
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +43 -0
- package/lib/service/idp/organization/settings/domain/saml/index.js +98 -0
- package/lib/service/idp/organization/settings/index.d.ts +16 -0
- package/lib/service/idp/organization/settings/index.js +29 -0
- package/lib/service/idp/organization/settings/oauth/index.d.ts +62 -0
- package/lib/service/idp/organization/settings/oauth/index.js +117 -0
- package/lib/service/idp/organization/team/index.d.ts +72 -0
- package/lib/service/idp/organization/team/index.js +124 -0
- package/lib/service/idp/registration/index.d.ts +37 -0
- package/lib/service/idp/registration/index.js +87 -0
- package/lib/service/idp/user/index.d.ts +83 -0
- package/lib/service/idp/user/index.js +160 -0
- package/lib/service/idp/user/license/index.d.ts +7 -0
- package/lib/service/idp/user/license/index.js +31 -0
- package/lib/service/idp/user/password/index.d.ts +19 -0
- package/lib/service/idp/user/password/index.js +51 -0
- package/lib/service/idp/user/settings/connections/index.d.ts +13 -0
- package/lib/service/idp/user/settings/connections/index.js +32 -0
- package/lib/service/idp/user/settings/general/index.d.ts +22 -0
- package/lib/service/idp/user/settings/general/index.js +51 -0
- package/lib/service/idp/user/settings/index.d.ts +40 -0
- package/lib/service/idp/user/settings/index.js +70 -0
- package/lib/service/idp/user/settings/notifications/index.d.ts +16 -0
- package/lib/service/idp/user/settings/notifications/index.js +40 -0
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +20 -0
- package/lib/service/idp/user/settings/oauthApps/index.js +55 -0
- package/lib/service/idp/user/settings/pats/index.d.ts +48 -0
- package/lib/service/idp/user/settings/pats/index.js +104 -0
- package/lib/service/idp/user/settings/twoFactor/index.d.ts +10 -0
- package/lib/service/idp/user/settings/twoFactor/index.js +20 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +32 -0
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +72 -0
- package/lib/service/mailer/index.d.ts +13 -0
- package/lib/service/{Mailer.js → mailer/index.js} +17 -16
- package/lib/service/mailer/internal/index.d.ts +36 -0
- package/lib/service/mailer/internal/index.js +69 -0
- package/lib/service/mothership/index.d.ts +97 -0
- package/lib/service/mothership/index.js +149 -0
- package/lib/service/nats/index.d.ts +49 -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 +19 -0
- package/lib/utils/bouncer/features/Provider.js +101 -0
- package/package.json +37 -29
- package/lib/base.d.ts +0 -12
- package/lib/base.js +0 -8
- package/lib/hcloud.d.ts +0 -13
- package/lib/hcloud.js +0 -29
- package/lib/interfaces/Global.d.ts +0 -8
- package/lib/interfaces/IDP.d.ts +0 -9
- package/lib/interfaces/Mail.d.ts +0 -29
- package/lib/interfaces/Mail.js +0 -8
- package/lib/service/Auditor.d.ts +0 -22
- package/lib/service/Auditor.js +0 -61
- package/lib/service/AuditorInternal.d.ts +0 -28
- package/lib/service/AuditorInternal.js +0 -65
- 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/service/Mailer.d.ts +0 -13
- package/lib/service/MailerInternal.d.ts +0 -32
- package/lib/service/MailerInternal.js +0 -64
- /package/lib/interfaces/{Global.js → agent/bundle/dev/index.js} +0 -0
- /package/lib/interfaces/{IDP.js → agent/context/index.js} +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { Msg } from "nats";
|
|
2
|
+
import { Products } from "../global";
|
|
3
|
+
import { High5ExecuteOnAgentRequest, High5ExecutionCancelRequest } from "../high5/space/execution";
|
|
4
|
+
import { LicenseTier } from "../idp";
|
|
5
|
+
declare enum NatsSubject {
|
|
6
|
+
IDP_USER_GENERAL = "hcloud.idp.user.${userId}.general",
|
|
7
|
+
IDP_USER_PROFILE = "hcloud.idp.user.${userId}.profile",
|
|
8
|
+
IDP_USER_NOTIFICATIONS = "hcloud.idp.user.${userId}.notifications",
|
|
9
|
+
IDP_USER_ORGS = "hcloud.idp.user.${userId}.orgs",
|
|
10
|
+
IDP_USER_INVITATIONS = "hcloud.idp.user.${userId}.invitations",
|
|
11
|
+
IDP_USER_SECURITY_PATS = "hcloud.idp.user.${userId}.security.pats",
|
|
12
|
+
IDP_USER_SECURITY_GENERAL = "hcloud.idp.user.${userId}.security.general",
|
|
13
|
+
IDP_USER_LICENSE = "hcloud.idp.user.${userId}.license",
|
|
14
|
+
IDP_ORGANIZATION_INVITATIONS = "hcloud.idp.organization.${base64orgName}.invitations",
|
|
15
|
+
IDP_ORGANIZATION_MEMBERS = "hcloud.idp.organization.${base64orgName}.members",
|
|
16
|
+
IDP_ORGANIZATION_MEMBERS_EXECUTION_TARGET = "hcloud.idp.organization.${base64orgName}.members.${base64email}.executionTarget",
|
|
17
|
+
IDP_ORGANIZATION_TEAMS = "hcloud.idp.organization.${base64orgName}.teams",
|
|
18
|
+
IDP_ORGANIZATION_TEAM_MEMBERS = "hcloud.idp.organization.${base64orgName}.teams.${base64teamName}.members",
|
|
19
|
+
IDP_ORGANIZATION_LICENSE = "hcloud.idp.organization.${base64orgName}.license",
|
|
20
|
+
HIGH5_SPACES = "hcloud.high5.organization.${base64orgName}.spaces",
|
|
21
|
+
HIGH5_SPACE_PERMISSIONS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.permissions",
|
|
22
|
+
HIGH5_STREAM_EXECUTE = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}",
|
|
23
|
+
HIGH5_STREAM_CANCEL = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}",// eslint-disable-line @typescript-eslint/no-duplicate-enum-values
|
|
24
|
+
HIGH5_EVENTS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events",
|
|
25
|
+
HIGH5_STREAMS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.streams",
|
|
26
|
+
HIGH5_EVENT_STREAMS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams",
|
|
27
|
+
HIGH5_SECRETS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.secrets",
|
|
28
|
+
HIGH5_SETTINGS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.settings",
|
|
29
|
+
HIGH5_WEBHOOKS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.webhooks",
|
|
30
|
+
HIGH5_WEBHOOK_LOGS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.webhooks.${webhookId}.logs",
|
|
31
|
+
HIGH5_CATALOGS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.catalogs",
|
|
32
|
+
HIGH5_NODES = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.node",
|
|
33
|
+
High5_DESIGN = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design",
|
|
34
|
+
HIGH5_SNAPSHOTS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.snapshots",
|
|
35
|
+
HIGH5_WAVE_ENGINE_LATEST = "hcloud.high5.wave.engine.latest",
|
|
36
|
+
FUSE_SPACES = "hcloud.fuse.organization.${base64orgName}.spaces",
|
|
37
|
+
FUSE_SPACE_PERMISSIONS = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.permissions",
|
|
38
|
+
FUSE_JOBS = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs",
|
|
39
|
+
FUSE_JOB_LOGS = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs.${jobId}.logs",
|
|
40
|
+
AUDITOR_LOGS = "hcloud.auditor.organization.${base64orgName}.logs",
|
|
41
|
+
DEBUG_NAMESPACE = "hcloud.debug.namespace.${product}"
|
|
42
|
+
}
|
|
43
|
+
declare enum NatsMessageType {
|
|
44
|
+
ADD = "ADD",
|
|
45
|
+
UPDATE = "UPDATE",
|
|
46
|
+
DELETE = "DELETE",
|
|
47
|
+
EXECUTE = "EXECUTE",
|
|
48
|
+
CANCEL = "CANCEL"
|
|
49
|
+
}
|
|
50
|
+
declare enum NatsObjectType {
|
|
51
|
+
DEBUG = "DEBUG",
|
|
52
|
+
USER = "USER",
|
|
53
|
+
OAUTH = "OAUTH",
|
|
54
|
+
ORGANIZATION = "ORGANIZATION",
|
|
55
|
+
ORGANIZATION_INVITATION = "ORGANIZATION_INVITATION",
|
|
56
|
+
ORGANIZATION_MEMBER = "ORGANIZATION_MEMBER",
|
|
57
|
+
ORGANIZATION_LICENSE = "ORGANIZATION_LICENSE",
|
|
58
|
+
PAT = "PAT",
|
|
59
|
+
TEAM = "TEAM",
|
|
60
|
+
NOTIFICATIONS = "NOTIFICATIONS",
|
|
61
|
+
GENERAL_SETTINGS = "GENERAL_SETTINGS",
|
|
62
|
+
SPACE = "SPACE",
|
|
63
|
+
SPACE_PERMISSION = "SPACE_PERMISSION",
|
|
64
|
+
DESIGN = "DESIGN",
|
|
65
|
+
SNAPSHOT = "SNAPSHOT",
|
|
66
|
+
EVENT = "EVENT",
|
|
67
|
+
EXECUTION = "EXECUTION",
|
|
68
|
+
NODE = "NODE",
|
|
69
|
+
STREAM = "STREAM",
|
|
70
|
+
WEBHOOK = "WEBHOOK",
|
|
71
|
+
WEBHOOK_LOG = "WEBHOOK_LOG",
|
|
72
|
+
SECRET = "SECRET",
|
|
73
|
+
CATALOG = "CATALOG",
|
|
74
|
+
AUDIT_LOG = "AUDIT_LOG",
|
|
75
|
+
MAIL = "MAIL",
|
|
76
|
+
CRONJOB = "CRONJOB",
|
|
77
|
+
CRONJOB_ID = "CRONJOB_ID",
|
|
78
|
+
CRONJOB_LOG = "CRONJOB_LOG"
|
|
79
|
+
}
|
|
80
|
+
interface NatsMessage {
|
|
81
|
+
type: NatsMessageType;
|
|
82
|
+
object: NatsObject;
|
|
83
|
+
objectType: NatsObjectType;
|
|
84
|
+
}
|
|
85
|
+
interface NatsObject extends NatsNameObject, NatsIdObject, NatsMemberObject, NatsSecretObject, NatsExecTargetObject, High5ExecuteOnAgentRequest, High5ExecutionCancelRequest, NatsLicenseObject, NatsCustomNodeObject {
|
|
86
|
+
[NatsSubject.IDP_USER_GENERAL]: NatsIdObject;
|
|
87
|
+
[NatsSubject.IDP_USER_PROFILE]: NatsIdObject;
|
|
88
|
+
[NatsSubject.IDP_USER_SECURITY_PATS]: NatsIdObject;
|
|
89
|
+
[NatsSubject.IDP_USER_SECURITY_GENERAL]: unknown;
|
|
90
|
+
[NatsSubject.IDP_USER_NOTIFICATIONS]: NatsIdObject;
|
|
91
|
+
[NatsSubject.IDP_USER_INVITATIONS]: NatsIdObject;
|
|
92
|
+
[NatsSubject.IDP_USER_LICENSE]: NatsIdObject;
|
|
93
|
+
[NatsSubject.IDP_ORGANIZATION_INVITATIONS]: NatsIdObject;
|
|
94
|
+
[NatsSubject.IDP_ORGANIZATION_MEMBERS]: NatsMemberObject;
|
|
95
|
+
[NatsSubject.IDP_ORGANIZATION_MEMBERS_EXECUTION_TARGET]: NatsExecTargetObject;
|
|
96
|
+
[NatsSubject.IDP_ORGANIZATION_TEAMS]: NatsNameObject;
|
|
97
|
+
[NatsSubject.IDP_ORGANIZATION_TEAM_MEMBERS]: NatsIdObject;
|
|
98
|
+
[NatsSubject.IDP_ORGANIZATION_LICENSE]: NatsLicenseObject;
|
|
99
|
+
[NatsSubject.HIGH5_SPACES]: NatsNameObject;
|
|
100
|
+
[NatsSubject.HIGH5_SPACE_PERMISSIONS]: NatsIdObject;
|
|
101
|
+
[NatsSubject.HIGH5_STREAM_EXECUTE]: High5ExecuteOnAgentRequest | High5ExecutionCancelRequest;
|
|
102
|
+
[NatsSubject.HIGH5_STREAM_CANCEL]: High5ExecuteOnAgentRequest | High5ExecutionCancelRequest;
|
|
103
|
+
[NatsSubject.HIGH5_EVENTS]: NatsNameObject;
|
|
104
|
+
[NatsSubject.HIGH5_STREAMS]: NatsIdObject;
|
|
105
|
+
[NatsSubject.HIGH5_EVENT_STREAMS]: NatsIdObject;
|
|
106
|
+
[NatsSubject.High5_DESIGN]: NatsIdObject;
|
|
107
|
+
[NatsSubject.HIGH5_SNAPSHOTS]: NatsIdObject;
|
|
108
|
+
[NatsSubject.HIGH5_NODES]: NatsCustomNodeObject;
|
|
109
|
+
[NatsSubject.HIGH5_SECRETS]: NatsSecretObject;
|
|
110
|
+
[NatsSubject.HIGH5_SETTINGS]: unknown;
|
|
111
|
+
[NatsSubject.HIGH5_WEBHOOKS]: NatsIdObject;
|
|
112
|
+
[NatsSubject.HIGH5_WEBHOOK_LOGS]: NatsIdObject;
|
|
113
|
+
[NatsSubject.HIGH5_CATALOGS]: NatsIdObject;
|
|
114
|
+
[NatsSubject.FUSE_SPACES]: NatsNameObject;
|
|
115
|
+
[NatsSubject.FUSE_SPACE_PERMISSIONS]: NatsIdObject;
|
|
116
|
+
[NatsSubject.FUSE_JOBS]: NatsIdObject;
|
|
117
|
+
[NatsSubject.FUSE_JOB_LOGS]: NatsIdObject;
|
|
118
|
+
[NatsSubject.AUDITOR_LOGS]: NatsIdObject;
|
|
119
|
+
[NatsSubject.DEBUG_NAMESPACE]: string;
|
|
120
|
+
}
|
|
121
|
+
interface NatsNameObject {
|
|
122
|
+
name: string;
|
|
123
|
+
oldName?: string;
|
|
124
|
+
}
|
|
125
|
+
interface NatsIdObject {
|
|
126
|
+
_id: string;
|
|
127
|
+
}
|
|
128
|
+
interface NatsMemberObject {
|
|
129
|
+
userId: string;
|
|
130
|
+
}
|
|
131
|
+
interface NatsExecTargetObject extends NatsMemberObject {
|
|
132
|
+
executionTarget: boolean;
|
|
133
|
+
}
|
|
134
|
+
interface NatsSecretObject {
|
|
135
|
+
secretKey: string;
|
|
136
|
+
}
|
|
137
|
+
interface NatsLicenseObject {
|
|
138
|
+
newTier: LicenseTier;
|
|
139
|
+
}
|
|
140
|
+
interface NatsCustomNodeObject {
|
|
141
|
+
_id: string;
|
|
142
|
+
updatedNodeId?: string;
|
|
143
|
+
}
|
|
144
|
+
type NatsCallback = (err: Error | null, msg?: NatsMessage, rawMsg?: Msg) => void;
|
|
145
|
+
/**
|
|
146
|
+
* This helper class creates subject strings to be used with nats.subscribe and nats.publish
|
|
147
|
+
*/
|
|
148
|
+
declare class NatsSubjects {
|
|
149
|
+
static IDP: {
|
|
150
|
+
new (): {};
|
|
151
|
+
User: {
|
|
152
|
+
new (): {};
|
|
153
|
+
GENERAL: (userId: string) => string;
|
|
154
|
+
PROFILE: (userId: string) => string;
|
|
155
|
+
ORGS: (userId: string) => string;
|
|
156
|
+
INVITATIONS: (userId: string) => string;
|
|
157
|
+
NOTIFICATIONS: (userId: string) => string;
|
|
158
|
+
LICENSE: (userId: string) => string;
|
|
159
|
+
Security: {
|
|
160
|
+
new (): {};
|
|
161
|
+
PATS: (userId: string) => string;
|
|
162
|
+
GENERAL: (userId: string) => string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
Organization: {
|
|
166
|
+
new (): {};
|
|
167
|
+
INVITATIONS: (organizationName: string) => string;
|
|
168
|
+
MEMBERS: (organizationName: string) => string & {
|
|
169
|
+
EXECUTION_TARGET: (email: string) => string;
|
|
170
|
+
};
|
|
171
|
+
TEAMS: (organizationName: string) => string;
|
|
172
|
+
Teams: {
|
|
173
|
+
new (): {};
|
|
174
|
+
MEMBERS: (organizationName: string, teamName: string) => string;
|
|
175
|
+
};
|
|
176
|
+
LICENSE: (organizationName: string) => string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
static Fuse: {
|
|
180
|
+
new (): {};
|
|
181
|
+
SPACES: (organizationName: string) => string;
|
|
182
|
+
Space: {
|
|
183
|
+
new (): {};
|
|
184
|
+
PERMISSIONS: (organizationName: string, spaceName: string) => string;
|
|
185
|
+
Jobs: {
|
|
186
|
+
new (): {};
|
|
187
|
+
JOBS: (organizationName: string, spaceName: string) => string;
|
|
188
|
+
JOB_LOGS: (organizationName: string, spaceName: string, jobId: string) => string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
static High5: {
|
|
193
|
+
new (): {};
|
|
194
|
+
Execution: {
|
|
195
|
+
new (): {};
|
|
196
|
+
EXECUTE: (organizationId: string, email: string) => string;
|
|
197
|
+
CANCEL: (organizationId: string, email: string) => string;
|
|
198
|
+
};
|
|
199
|
+
SPACES: (organizationName: string) => string;
|
|
200
|
+
Space: {
|
|
201
|
+
new (): {};
|
|
202
|
+
PERMISSIONS: (organizationName: string, spaceName: string) => string;
|
|
203
|
+
EVENTS: (organizationName: string, spaceName: string) => string;
|
|
204
|
+
STREAMS: (organizationName: string, spaceName: string) => string;
|
|
205
|
+
Event: {
|
|
206
|
+
new (): {};
|
|
207
|
+
STREAMS: (organizationName: string, spaceName: string, eventName: string) => string;
|
|
208
|
+
Stream: {
|
|
209
|
+
new (): {};
|
|
210
|
+
DESIGN: (organizationName: string, spaceName: string, eventName: string, streamId: string) => string;
|
|
211
|
+
SNAPSHOTS: (organizationName: string, spaceName: string, eventName: string, streamId: string) => string;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
SECRETS: (organizationName: string, spaceName: string) => string;
|
|
215
|
+
WEBHOOKS: (organizationName: string, spaceName: string) => string;
|
|
216
|
+
Webhook: {
|
|
217
|
+
new (): {};
|
|
218
|
+
LOGS: (organizationName: string, spaceName: string, webhookId: string) => string;
|
|
219
|
+
};
|
|
220
|
+
SETTINGS: (organizationName: string, spaceName: string) => string;
|
|
221
|
+
CATALOGS: (organizationName: string, spaceName: string) => string;
|
|
222
|
+
NODES: (organizationName: string, spaceName: string) => string;
|
|
223
|
+
};
|
|
224
|
+
WAVE: {
|
|
225
|
+
new (): {};
|
|
226
|
+
ENGINE: {
|
|
227
|
+
new (): {};
|
|
228
|
+
LATEST: NatsSubject;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
static Auditor: {
|
|
233
|
+
new (): {};
|
|
234
|
+
LOGS: (organizationName: string) => string;
|
|
235
|
+
};
|
|
236
|
+
static Logging: (product: Products) => string;
|
|
237
|
+
private static replace;
|
|
238
|
+
}
|
|
239
|
+
export { NatsSubjects, NatsMessageType, NatsObjectType, NatsObject, NatsSubject, NatsMessage, NatsCallback, Msg as RawMsg };
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
3
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
4
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
5
|
+
};
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.NatsSubject = exports.NatsObjectType = exports.NatsMessageType = exports.NatsSubjects = void 0;
|
|
9
|
+
var NatsSubject;
|
|
10
|
+
(function (NatsSubject) {
|
|
11
|
+
NatsSubject["IDP_USER_GENERAL"] = "hcloud.idp.user.${userId}.general";
|
|
12
|
+
NatsSubject["IDP_USER_PROFILE"] = "hcloud.idp.user.${userId}.profile";
|
|
13
|
+
NatsSubject["IDP_USER_NOTIFICATIONS"] = "hcloud.idp.user.${userId}.notifications";
|
|
14
|
+
NatsSubject["IDP_USER_ORGS"] = "hcloud.idp.user.${userId}.orgs";
|
|
15
|
+
NatsSubject["IDP_USER_INVITATIONS"] = "hcloud.idp.user.${userId}.invitations";
|
|
16
|
+
NatsSubject["IDP_USER_SECURITY_PATS"] = "hcloud.idp.user.${userId}.security.pats";
|
|
17
|
+
NatsSubject["IDP_USER_SECURITY_GENERAL"] = "hcloud.idp.user.${userId}.security.general";
|
|
18
|
+
NatsSubject["IDP_USER_LICENSE"] = "hcloud.idp.user.${userId}.license";
|
|
19
|
+
NatsSubject["IDP_ORGANIZATION_INVITATIONS"] = "hcloud.idp.organization.${base64orgName}.invitations";
|
|
20
|
+
NatsSubject["IDP_ORGANIZATION_MEMBERS"] = "hcloud.idp.organization.${base64orgName}.members";
|
|
21
|
+
NatsSubject["IDP_ORGANIZATION_MEMBERS_EXECUTION_TARGET"] = "hcloud.idp.organization.${base64orgName}.members.${base64email}.executionTarget";
|
|
22
|
+
NatsSubject["IDP_ORGANIZATION_TEAMS"] = "hcloud.idp.organization.${base64orgName}.teams";
|
|
23
|
+
NatsSubject["IDP_ORGANIZATION_TEAM_MEMBERS"] = "hcloud.idp.organization.${base64orgName}.teams.${base64teamName}.members";
|
|
24
|
+
NatsSubject["IDP_ORGANIZATION_LICENSE"] = "hcloud.idp.organization.${base64orgName}.license";
|
|
25
|
+
NatsSubject["HIGH5_SPACES"] = "hcloud.high5.organization.${base64orgName}.spaces";
|
|
26
|
+
NatsSubject["HIGH5_SPACE_PERMISSIONS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
|
|
27
|
+
NatsSubject["HIGH5_STREAM_EXECUTE"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}";
|
|
28
|
+
NatsSubject["HIGH5_STREAM_CANCEL"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}";
|
|
29
|
+
NatsSubject["HIGH5_EVENTS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events";
|
|
30
|
+
NatsSubject["HIGH5_STREAMS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.streams";
|
|
31
|
+
NatsSubject["HIGH5_EVENT_STREAMS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams";
|
|
32
|
+
NatsSubject["HIGH5_SECRETS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.secrets";
|
|
33
|
+
NatsSubject["HIGH5_SETTINGS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.settings";
|
|
34
|
+
NatsSubject["HIGH5_WEBHOOKS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.webhooks";
|
|
35
|
+
NatsSubject["HIGH5_WEBHOOK_LOGS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.webhooks.${webhookId}.logs";
|
|
36
|
+
NatsSubject["HIGH5_CATALOGS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.catalogs";
|
|
37
|
+
NatsSubject["HIGH5_NODES"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.node";
|
|
38
|
+
NatsSubject["High5_DESIGN"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design";
|
|
39
|
+
NatsSubject["HIGH5_SNAPSHOTS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.snapshots";
|
|
40
|
+
NatsSubject["HIGH5_WAVE_ENGINE_LATEST"] = "hcloud.high5.wave.engine.latest";
|
|
41
|
+
NatsSubject["FUSE_SPACES"] = "hcloud.fuse.organization.${base64orgName}.spaces";
|
|
42
|
+
NatsSubject["FUSE_SPACE_PERMISSIONS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
|
|
43
|
+
NatsSubject["FUSE_JOBS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs";
|
|
44
|
+
NatsSubject["FUSE_JOB_LOGS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs.${jobId}.logs";
|
|
45
|
+
NatsSubject["AUDITOR_LOGS"] = "hcloud.auditor.organization.${base64orgName}.logs";
|
|
46
|
+
NatsSubject["DEBUG_NAMESPACE"] = "hcloud.debug.namespace.${product}";
|
|
47
|
+
})(NatsSubject || (exports.NatsSubject = NatsSubject = {}));
|
|
48
|
+
var NatsMessageType;
|
|
49
|
+
(function (NatsMessageType) {
|
|
50
|
+
NatsMessageType["ADD"] = "ADD";
|
|
51
|
+
NatsMessageType["UPDATE"] = "UPDATE";
|
|
52
|
+
NatsMessageType["DELETE"] = "DELETE";
|
|
53
|
+
NatsMessageType["EXECUTE"] = "EXECUTE";
|
|
54
|
+
NatsMessageType["CANCEL"] = "CANCEL";
|
|
55
|
+
})(NatsMessageType || (exports.NatsMessageType = NatsMessageType = {}));
|
|
56
|
+
var NatsObjectType;
|
|
57
|
+
(function (NatsObjectType) {
|
|
58
|
+
NatsObjectType["DEBUG"] = "DEBUG";
|
|
59
|
+
NatsObjectType["USER"] = "USER";
|
|
60
|
+
NatsObjectType["OAUTH"] = "OAUTH";
|
|
61
|
+
NatsObjectType["ORGANIZATION"] = "ORGANIZATION";
|
|
62
|
+
NatsObjectType["ORGANIZATION_INVITATION"] = "ORGANIZATION_INVITATION";
|
|
63
|
+
NatsObjectType["ORGANIZATION_MEMBER"] = "ORGANIZATION_MEMBER";
|
|
64
|
+
NatsObjectType["ORGANIZATION_LICENSE"] = "ORGANIZATION_LICENSE";
|
|
65
|
+
NatsObjectType["PAT"] = "PAT";
|
|
66
|
+
NatsObjectType["TEAM"] = "TEAM";
|
|
67
|
+
NatsObjectType["NOTIFICATIONS"] = "NOTIFICATIONS";
|
|
68
|
+
NatsObjectType["GENERAL_SETTINGS"] = "GENERAL_SETTINGS";
|
|
69
|
+
NatsObjectType["SPACE"] = "SPACE";
|
|
70
|
+
NatsObjectType["SPACE_PERMISSION"] = "SPACE_PERMISSION";
|
|
71
|
+
NatsObjectType["DESIGN"] = "DESIGN";
|
|
72
|
+
NatsObjectType["SNAPSHOT"] = "SNAPSHOT";
|
|
73
|
+
NatsObjectType["EVENT"] = "EVENT";
|
|
74
|
+
NatsObjectType["EXECUTION"] = "EXECUTION";
|
|
75
|
+
NatsObjectType["NODE"] = "NODE";
|
|
76
|
+
NatsObjectType["STREAM"] = "STREAM";
|
|
77
|
+
NatsObjectType["WEBHOOK"] = "WEBHOOK";
|
|
78
|
+
NatsObjectType["WEBHOOK_LOG"] = "WEBHOOK_LOG";
|
|
79
|
+
NatsObjectType["SECRET"] = "SECRET";
|
|
80
|
+
NatsObjectType["CATALOG"] = "CATALOG";
|
|
81
|
+
NatsObjectType["AUDIT_LOG"] = "AUDIT_LOG";
|
|
82
|
+
NatsObjectType["MAIL"] = "MAIL";
|
|
83
|
+
NatsObjectType["CRONJOB"] = "CRONJOB";
|
|
84
|
+
NatsObjectType["CRONJOB_ID"] = "CRONJOB_ID";
|
|
85
|
+
NatsObjectType["CRONJOB_LOG"] = "CRONJOB_LOG";
|
|
86
|
+
})(NatsObjectType || (exports.NatsObjectType = NatsObjectType = {}));
|
|
87
|
+
/**
|
|
88
|
+
* This helper class creates subject strings to be used with nats.subscribe and nats.publish
|
|
89
|
+
*/
|
|
90
|
+
class NatsSubjects {
|
|
91
|
+
}
|
|
92
|
+
exports.NatsSubjects = NatsSubjects;
|
|
93
|
+
NatsSubjects.IDP = (_a = class {
|
|
94
|
+
},
|
|
95
|
+
__setFunctionName(_a, "IDP"),
|
|
96
|
+
_a.User = (_b = class {
|
|
97
|
+
},
|
|
98
|
+
__setFunctionName(_b, "User"),
|
|
99
|
+
_b.GENERAL = (userId) => {
|
|
100
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_GENERAL, { userId });
|
|
101
|
+
},
|
|
102
|
+
_b.PROFILE = (userId) => {
|
|
103
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_PROFILE, { userId });
|
|
104
|
+
},
|
|
105
|
+
_b.ORGS = (userId) => {
|
|
106
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_ORGS, { userId });
|
|
107
|
+
},
|
|
108
|
+
_b.INVITATIONS = (userId) => {
|
|
109
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_INVITATIONS, { userId });
|
|
110
|
+
},
|
|
111
|
+
_b.NOTIFICATIONS = (userId) => {
|
|
112
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_NOTIFICATIONS, { userId });
|
|
113
|
+
},
|
|
114
|
+
_b.LICENSE = (userId) => {
|
|
115
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_LICENSE, { userId });
|
|
116
|
+
},
|
|
117
|
+
_b.Security = (_c = class {
|
|
118
|
+
},
|
|
119
|
+
__setFunctionName(_c, "Security"),
|
|
120
|
+
_c.PATS = (userId) => {
|
|
121
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_SECURITY_PATS, { userId });
|
|
122
|
+
},
|
|
123
|
+
_c.GENERAL = (userId) => {
|
|
124
|
+
return NatsSubjects.replace(NatsSubject.IDP_USER_SECURITY_GENERAL, { userId });
|
|
125
|
+
},
|
|
126
|
+
_c),
|
|
127
|
+
_b),
|
|
128
|
+
_a.Organization = (_d = class {
|
|
129
|
+
},
|
|
130
|
+
__setFunctionName(_d, "Organization"),
|
|
131
|
+
_d.INVITATIONS = (organizationName) => {
|
|
132
|
+
return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_INVITATIONS, { organizationName });
|
|
133
|
+
},
|
|
134
|
+
_d.MEMBERS = (organizationName) => {
|
|
135
|
+
return Object.defineProperty(Object(NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_MEMBERS, { organizationName })), "EXECUTION_TARGET", {
|
|
136
|
+
value: function (memberEmail) {
|
|
137
|
+
return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_MEMBERS_EXECUTION_TARGET, {
|
|
138
|
+
organizationName,
|
|
139
|
+
email: memberEmail,
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
writable: false,
|
|
143
|
+
enumerable: false,
|
|
144
|
+
configurable: true,
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
_d.TEAMS = (organizationName) => {
|
|
148
|
+
return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_TEAMS, { organizationName });
|
|
149
|
+
},
|
|
150
|
+
_d.Teams = (_e = class {
|
|
151
|
+
},
|
|
152
|
+
__setFunctionName(_e, "Teams"),
|
|
153
|
+
_e.MEMBERS = (organizationName, teamName) => {
|
|
154
|
+
return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_TEAM_MEMBERS, { organizationName, teamName });
|
|
155
|
+
},
|
|
156
|
+
_e),
|
|
157
|
+
_d.LICENSE = (organizationName) => {
|
|
158
|
+
return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_LICENSE, { organizationName });
|
|
159
|
+
},
|
|
160
|
+
_d),
|
|
161
|
+
_a);
|
|
162
|
+
NatsSubjects.Fuse = (_f = class {
|
|
163
|
+
},
|
|
164
|
+
__setFunctionName(_f, "Fuse"),
|
|
165
|
+
_f.SPACES = (organizationName) => {
|
|
166
|
+
return NatsSubjects.replace(NatsSubject.FUSE_SPACES, { organizationName });
|
|
167
|
+
},
|
|
168
|
+
_f.Space = (_g = class {
|
|
169
|
+
},
|
|
170
|
+
__setFunctionName(_g, "Space"),
|
|
171
|
+
_g.PERMISSIONS = (organizationName, spaceName) => {
|
|
172
|
+
return NatsSubjects.replace(NatsSubject.FUSE_SPACE_PERMISSIONS, { organizationName, spaceName });
|
|
173
|
+
},
|
|
174
|
+
_g.Jobs = (_h = class {
|
|
175
|
+
},
|
|
176
|
+
__setFunctionName(_h, "Jobs"),
|
|
177
|
+
_h.JOBS = (organizationName, spaceName) => {
|
|
178
|
+
return NatsSubjects.replace(NatsSubject.FUSE_JOBS, { organizationName, spaceName });
|
|
179
|
+
},
|
|
180
|
+
_h.JOB_LOGS = (organizationName, spaceName, jobId) => {
|
|
181
|
+
return NatsSubjects.replace(NatsSubject.FUSE_JOB_LOGS, { organizationName, spaceName, jobId });
|
|
182
|
+
},
|
|
183
|
+
_h),
|
|
184
|
+
_g),
|
|
185
|
+
_f);
|
|
186
|
+
NatsSubjects.High5 = (_j = class {
|
|
187
|
+
},
|
|
188
|
+
__setFunctionName(_j, "High5"),
|
|
189
|
+
_j.Execution = (_k = class {
|
|
190
|
+
},
|
|
191
|
+
__setFunctionName(_k, "Execution"),
|
|
192
|
+
_k.EXECUTE = (organizationId, email) => {
|
|
193
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_STREAM_EXECUTE, { organizationId, email });
|
|
194
|
+
},
|
|
195
|
+
_k.CANCEL = (organizationId, email) => {
|
|
196
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_STREAM_CANCEL, { organizationId, email });
|
|
197
|
+
},
|
|
198
|
+
_k),
|
|
199
|
+
_j.SPACES = (organizationName) => {
|
|
200
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_SPACES, { organizationName });
|
|
201
|
+
},
|
|
202
|
+
_j.Space = (_l = class {
|
|
203
|
+
},
|
|
204
|
+
__setFunctionName(_l, "Space"),
|
|
205
|
+
_l.PERMISSIONS = (organizationName, spaceName) => {
|
|
206
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_SPACE_PERMISSIONS, { organizationName, spaceName });
|
|
207
|
+
},
|
|
208
|
+
_l.EVENTS = (organizationName, spaceName) => {
|
|
209
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_EVENTS, { organizationName, spaceName });
|
|
210
|
+
},
|
|
211
|
+
_l.STREAMS = (organizationName, spaceName) => {
|
|
212
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_STREAMS, { organizationName, spaceName });
|
|
213
|
+
},
|
|
214
|
+
_l.Event = (_m = class {
|
|
215
|
+
},
|
|
216
|
+
__setFunctionName(_m, "Event"),
|
|
217
|
+
_m.STREAMS = (organizationName, spaceName, eventName) => {
|
|
218
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_EVENT_STREAMS, {
|
|
219
|
+
organizationName,
|
|
220
|
+
spaceName,
|
|
221
|
+
eventName,
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
_m.Stream = (_o = class {
|
|
225
|
+
},
|
|
226
|
+
__setFunctionName(_o, "Stream"),
|
|
227
|
+
_o.DESIGN = (organizationName, spaceName, eventName, streamId) => {
|
|
228
|
+
return NatsSubjects.replace(NatsSubject.High5_DESIGN, {
|
|
229
|
+
organizationName,
|
|
230
|
+
spaceName,
|
|
231
|
+
eventName,
|
|
232
|
+
streamId,
|
|
233
|
+
});
|
|
234
|
+
},
|
|
235
|
+
_o.SNAPSHOTS = (organizationName, spaceName, eventName, streamId) => {
|
|
236
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_SNAPSHOTS, {
|
|
237
|
+
organizationName,
|
|
238
|
+
spaceName,
|
|
239
|
+
eventName,
|
|
240
|
+
streamId,
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
_o),
|
|
244
|
+
_m),
|
|
245
|
+
_l.SECRETS = (organizationName, spaceName) => {
|
|
246
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_SECRETS, { organizationName, spaceName });
|
|
247
|
+
},
|
|
248
|
+
_l.WEBHOOKS = (organizationName, spaceName) => {
|
|
249
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_WEBHOOKS, { organizationName, spaceName });
|
|
250
|
+
},
|
|
251
|
+
_l.Webhook = (_p = class {
|
|
252
|
+
},
|
|
253
|
+
__setFunctionName(_p, "Webhook"),
|
|
254
|
+
_p.LOGS = (organizationName, spaceName, webhookId) => {
|
|
255
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_WEBHOOK_LOGS, {
|
|
256
|
+
organizationName,
|
|
257
|
+
spaceName,
|
|
258
|
+
webhookId,
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
_p),
|
|
262
|
+
_l.SETTINGS = (organizationName, spaceName) => {
|
|
263
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_SETTINGS, { organizationName, spaceName });
|
|
264
|
+
},
|
|
265
|
+
_l.CATALOGS = (organizationName, spaceName) => {
|
|
266
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_CATALOGS, { organizationName, spaceName });
|
|
267
|
+
},
|
|
268
|
+
_l.NODES = (organizationName, spaceName) => {
|
|
269
|
+
return NatsSubjects.replace(NatsSubject.HIGH5_NODES, { organizationName, spaceName });
|
|
270
|
+
},
|
|
271
|
+
_l),
|
|
272
|
+
_j.WAVE = (_q = class {
|
|
273
|
+
},
|
|
274
|
+
__setFunctionName(_q, "WAVE"),
|
|
275
|
+
_q.ENGINE = (_r = class {
|
|
276
|
+
},
|
|
277
|
+
__setFunctionName(_r, "ENGINE"),
|
|
278
|
+
_r.LATEST = NatsSubject.HIGH5_WAVE_ENGINE_LATEST,
|
|
279
|
+
_r),
|
|
280
|
+
_q),
|
|
281
|
+
_j);
|
|
282
|
+
NatsSubjects.Auditor = (_s = class {
|
|
283
|
+
},
|
|
284
|
+
__setFunctionName(_s, "Auditor"),
|
|
285
|
+
_s.LOGS = (organizationName) => {
|
|
286
|
+
return NatsSubjects.replace(NatsSubject.AUDITOR_LOGS, { organizationName });
|
|
287
|
+
},
|
|
288
|
+
_s);
|
|
289
|
+
NatsSubjects.Logging = (product) => {
|
|
290
|
+
return NatsSubjects.replace(NatsSubject.DEBUG_NAMESPACE, { product });
|
|
291
|
+
};
|
|
292
|
+
// eslint-disable-next-line complexity
|
|
293
|
+
NatsSubjects.replace = (subject, replacements) => {
|
|
294
|
+
subject = subject.replace("${userId}", replacements.userId || "null");
|
|
295
|
+
subject = subject.replace("${base64orgName}", replacements.organizationName ? base64Encode(replacements.organizationName) : "null");
|
|
296
|
+
subject = subject.replace("${organizationId}", replacements.organizationId || "null");
|
|
297
|
+
subject = subject.replace("${base64spaceName}", replacements.spaceName ? base64Encode(replacements.spaceName) : "null");
|
|
298
|
+
subject = subject.replace("${base64eventName}", replacements.eventName ? base64Encode(replacements.eventName) : "null");
|
|
299
|
+
subject = subject.replace("${streamId}", replacements.streamId || "null");
|
|
300
|
+
subject = subject.replace("${designId}", replacements.designId || "null");
|
|
301
|
+
subject = subject.replace("${nodeId}", replacements.nodeId || "null");
|
|
302
|
+
subject = subject.replace("${product}", replacements.product || "null");
|
|
303
|
+
subject = subject.replace("${base64email}", replacements.email ? base64Encode(replacements.email) : "null");
|
|
304
|
+
subject = subject.replace("${webhookId}", replacements.webhookId || "null");
|
|
305
|
+
subject = subject.replace("${jobId}", replacements.jobId || "null");
|
|
306
|
+
subject = subject.replace("${base64teamName}", replacements.teamName ? base64Encode(replacements.teamName) : "null");
|
|
307
|
+
return subject;
|
|
308
|
+
};
|
|
309
|
+
const base64Encode = (str) => {
|
|
310
|
+
if (typeof window === "undefined") {
|
|
311
|
+
return Buffer.from(str).toString("base64");
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
return btoa(str);
|
|
315
|
+
}
|
|
316
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../../Base";
|
|
3
|
+
import { ToggleDevBundle } from "../../../../interfaces/agent/bundle/dev";
|
|
4
|
+
export declare class DevBundle extends Base {
|
|
5
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves the current dev bundle state.
|
|
8
|
+
* @returns The current dev bundle state
|
|
9
|
+
*/
|
|
10
|
+
getDevBundleState(): Promise<ToggleDevBundle>;
|
|
11
|
+
/**
|
|
12
|
+
* Update the dev bundle state.
|
|
13
|
+
* @returns 204 - No content
|
|
14
|
+
*/
|
|
15
|
+
updateDevBundleState(allowDev: boolean): Promise<void>;
|
|
16
|
+
protected getEndpoint(endpoint: string): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
exports.DevBundle = void 0;
|
|
13
|
+
const Base_1 = require("../../../../Base");
|
|
14
|
+
class DevBundle extends Base_1.default {
|
|
15
|
+
constructor(options, axios) {
|
|
16
|
+
super(options, axios);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the current dev bundle state.
|
|
20
|
+
* @returns The current dev bundle state
|
|
21
|
+
*/
|
|
22
|
+
getDevBundleState() {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const resp = yield this.axios.get(this.getEndpoint(`/v1/bundle/dev`));
|
|
25
|
+
return resp.data;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Update the dev bundle state.
|
|
30
|
+
* @returns 204 - No content
|
|
31
|
+
*/
|
|
32
|
+
updateDevBundleState(allowDev) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/bundle/dev`), {
|
|
35
|
+
allowDev,
|
|
36
|
+
});
|
|
37
|
+
return resp.data;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
getEndpoint(endpoint) {
|
|
41
|
+
return `${this.options.server}/api/agent${endpoint}`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.DevBundle = DevBundle;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import Base, { Options } from "../../../Base";
|
|
3
|
+
import { AgentVersions, Version } from "../../../interfaces/agent";
|
|
4
|
+
export declare class AgentBundle extends Base {
|
|
5
|
+
private sourceServer;
|
|
6
|
+
constructor(options: Options, axios: AxiosInstance);
|
|
7
|
+
getVersions(): Promise<AgentVersions>;
|
|
8
|
+
getLatestVersion(): Promise<Version>;
|
|
9
|
+
getVersion(version: string): Promise<Version | void>;
|
|
10
|
+
protected getEndpoint(endpoint: string): string;
|
|
11
|
+
}
|