hcloud-sdk 15.0.0 → 17.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 +78 -33
- package/lib/Hcloud.d.ts +3 -0
- package/lib/Hcloud.js +7 -0
- package/lib/helper/ValidationHelper.d.ts +66 -0
- package/lib/helper/ValidationHelper.js +312 -0
- package/lib/interfaces/auditor/index.d.ts +10 -4
- package/lib/interfaces/auditor/index.js +4 -0
- package/lib/interfaces/friday/index.d.ts +3 -0
- package/lib/interfaces/friday/index.js +19 -0
- package/lib/interfaces/friday/space/database/document/index.d.ts +34 -0
- package/lib/interfaces/friday/space/database/document/index.js +13 -0
- package/lib/interfaces/friday/space/database/index.d.ts +12 -0
- package/lib/interfaces/friday/space/database/index.js +2 -0
- package/lib/interfaces/friday/space/index.d.ts +21 -0
- package/lib/interfaces/friday/space/index.js +11 -0
- package/lib/interfaces/frontend/config/index.d.ts +1 -0
- package/lib/interfaces/fuse/space/index.d.ts +1 -0
- package/lib/interfaces/global/Products.d.ts +3 -1
- package/lib/interfaces/global/Products.js +2 -0
- package/lib/interfaces/global/Views.d.ts +2 -1
- package/lib/interfaces/global/Views.js +1 -0
- package/lib/interfaces/high5/execution/index.d.ts +43 -0
- package/lib/interfaces/high5/execution/index.js +12 -0
- package/lib/interfaces/high5/index.d.ts +2 -2
- package/lib/interfaces/high5/index.js +2 -2
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
- package/lib/interfaces/high5/space/event/stream/node/index.d.ts +22 -1
- package/lib/interfaces/high5/space/event/stream/node/index.js +6 -1
- package/lib/interfaces/high5/space/execution/index.d.ts +57 -1
- package/lib/interfaces/high5/space/execution/index.js +8 -0
- package/lib/interfaces/high5/space/index.d.ts +2 -0
- package/lib/interfaces/high5/space/pool/index.d.ts +28 -0
- package/lib/interfaces/high5/space/pool/index.js +2 -0
- package/lib/interfaces/high5/space/webhook/index.d.ts +3 -1
- package/lib/interfaces/high5/wave/index.d.ts +26 -4
- package/lib/interfaces/high5/wave/index.js +4 -0
- package/lib/interfaces/idp/index.d.ts +1 -0
- package/lib/interfaces/idp/index.js +1 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +11 -0
- package/lib/interfaces/idp/organization/member/index.d.ts +3 -0
- package/lib/interfaces/idp/organization/service-accounts.d.ts +8 -0
- package/lib/interfaces/idp/organization/service-accounts.js +2 -0
- package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +1 -0
- package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/GeneralSettings.js +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +15 -2
- package/lib/interfaces/idp/user/Scopes.js +39 -1
- package/lib/interfaces/idp/user/Totp.d.ts +4 -2
- package/lib/interfaces/idp/user/index.d.ts +1 -0
- package/lib/interfaces/nats/index.d.ts +92 -5
- package/lib/interfaces/nats/index.js +155 -11
- package/lib/service/agent/bundle/dev/index.d.ts +3 -0
- package/lib/service/agent/bundle/dev/index.js +16 -0
- package/lib/service/agent/context/index.d.ts +5 -0
- package/lib/service/agent/context/index.js +14 -0
- package/lib/service/dali/DaliAvatar.d.ts +22 -4
- package/lib/service/dali/DaliAvatar.js +32 -2
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +26 -0
- package/lib/service/dali/avatar/DaliCosmoSpace.js +58 -0
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +1 -1
- package/lib/service/dali/avatar/DaliFuseSpace.js +3 -3
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +29 -0
- package/lib/service/dali/avatar/DaliHigh5Pool.js +61 -0
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +1 -1
- package/lib/service/dali/avatar/DaliHigh5Space.js +3 -3
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +26 -0
- package/lib/service/dali/avatar/DaliServiceAccount.js +58 -0
- package/lib/service/friday/index.d.ts +13 -0
- package/lib/service/friday/index.js +35 -0
- package/lib/service/friday/space/database/document/index.d.ts +58 -0
- package/lib/service/friday/space/database/document/index.js +97 -0
- package/lib/service/friday/space/database/index.d.ts +55 -0
- package/lib/service/friday/space/database/index.js +101 -0
- package/lib/service/friday/space/index.d.ts +81 -0
- package/lib/service/friday/space/index.js +150 -0
- package/lib/service/high5/execution/index.d.ts +8 -0
- package/lib/service/high5/execution/index.js +21 -0
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +1 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +5 -1
- package/lib/service/high5/space/execution/index.d.ts +31 -1
- package/lib/service/high5/space/execution/index.js +47 -2
- package/lib/service/high5/space/execution/status/index.d.ts +13 -6
- package/lib/service/high5/space/execution/status/index.js +20 -8
- package/lib/service/high5/space/index.d.ts +18 -6
- package/lib/service/high5/space/index.js +30 -7
- package/lib/service/high5/space/pool/index.d.ts +97 -0
- package/lib/service/high5/space/pool/index.js +171 -0
- package/lib/service/high5/wave/s3/index.d.ts +8 -1
- package/lib/service/high5/wave/s3/index.js +29 -8
- package/lib/service/idp/oauth/index.d.ts +2 -2
- package/lib/service/idp/oauth/index.js +12 -13
- package/lib/service/idp/organization/index.d.ts +6 -0
- package/lib/service/idp/organization/index.js +10 -0
- package/lib/service/idp/organization/member/index.d.ts +2 -1
- package/lib/service/idp/organization/member/index.js +2 -1
- package/lib/service/idp/organization/service-accounts/index.d.ts +64 -0
- package/lib/service/idp/organization/service-accounts/index.js +108 -0
- package/lib/service/idp/registration/index.d.ts +1 -1
- package/lib/service/idp/registration/index.js +2 -2
- package/lib/service/idp/user/index.d.ts +4 -0
- package/lib/service/idp/user/index.js +9 -0
- package/lib/service/idp/user/password/index.js +1 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +1 -1
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +1 -1
- package/lib/service/mothership/index.js +0 -1
- package/lib/service/nats/index.js +2 -3
- package/lib/utils/bouncer/features/Provider.js +0 -3
- package/package.json +22 -24
|
@@ -29,6 +29,7 @@ export interface OAuthApp {
|
|
|
29
29
|
export type OAuthAppWithConsent = OAuthApp & Omit<OAuthApp, "hcloudClientId" | "clientSecrets" | "callback"> & {
|
|
30
30
|
scopes: Record<Scope, number>;
|
|
31
31
|
};
|
|
32
|
+
export type OAuthAppPublicInfo = Omit<OAuthApp, "clientSecrets" | "callback" | "patId">;
|
|
32
33
|
export interface OAuthAppCreate {
|
|
33
34
|
name: string;
|
|
34
35
|
description?: string;
|
|
@@ -16,10 +16,17 @@ export declare enum Scope {
|
|
|
16
16
|
FUSE_SPACE_READ = "fuse:space:read",
|
|
17
17
|
FUSE_SPACE_EXECUTE = "fuse:space:execute",
|
|
18
18
|
FUSE_SPACE_WRITE = "fuse:space:write",
|
|
19
|
-
FUSE_SPACE_DELETE = "fuse:space:delete"
|
|
19
|
+
FUSE_SPACE_DELETE = "fuse:space:delete",
|
|
20
|
+
FRIDAY_SPACE_READ = "friday:space:read",
|
|
21
|
+
FRIDAY_SPACE_WRITE = "friday:space:write",
|
|
22
|
+
FRIDAY_SPACE_DELETE = "friday:space:delete",
|
|
23
|
+
COSMO_SPACE_READ = "cosmo:space:read",
|
|
24
|
+
COSMO_SPACE_WRITE = "cosmo:space:write",
|
|
25
|
+
COSMO_SPACE_DELETE = "cosmo:space:delete"
|
|
20
26
|
}
|
|
27
|
+
export declare const ScopeDescriptions: Map<string, string>;
|
|
21
28
|
export declare const ScopeDependencies: {
|
|
22
|
-
"hcloud:full": (Scope.IDP_EMAIL_READ | Scope.IDP_USER_READ | Scope.IDP_USER_WRITE | Scope.IDP_USER_DELETE | Scope.IDP_USER_OPEN_ID | Scope.IDP_ORGANIZATION_READ | Scope.IDP_ORGANIZATION_WRITE | Scope.IDP_ORGANIZATION_DELETE | Scope.IDP_ORGANIZATION_ADMIN | Scope.HIGH5_SPACE_READ | Scope.HIGH5_SPACE_EXECUTE | Scope.HIGH5_SPACE_WRITE | Scope.HIGH5_SPACE_DELETE | Scope.FUSE_SPACE_READ | Scope.FUSE_SPACE_EXECUTE | Scope.FUSE_SPACE_WRITE | Scope.FUSE_SPACE_DELETE)[];
|
|
29
|
+
"hcloud:full": (Scope.IDP_EMAIL_READ | Scope.IDP_USER_READ | Scope.IDP_USER_WRITE | Scope.IDP_USER_DELETE | Scope.IDP_USER_OPEN_ID | Scope.IDP_ORGANIZATION_READ | Scope.IDP_ORGANIZATION_WRITE | Scope.IDP_ORGANIZATION_DELETE | Scope.IDP_ORGANIZATION_ADMIN | Scope.HIGH5_SPACE_READ | Scope.HIGH5_SPACE_EXECUTE | Scope.HIGH5_SPACE_WRITE | Scope.HIGH5_SPACE_DELETE | Scope.FUSE_SPACE_READ | Scope.FUSE_SPACE_EXECUTE | Scope.FUSE_SPACE_WRITE | Scope.FUSE_SPACE_DELETE | Scope.FRIDAY_SPACE_READ | Scope.FRIDAY_SPACE_WRITE | Scope.FRIDAY_SPACE_DELETE | Scope.COSMO_SPACE_READ | Scope.COSMO_SPACE_WRITE | Scope.COSMO_SPACE_DELETE)[];
|
|
23
30
|
"idp:email:read": never[];
|
|
24
31
|
"idp:user:read": never[];
|
|
25
32
|
"idp:user:write": Scope[];
|
|
@@ -37,4 +44,10 @@ export declare const ScopeDependencies: {
|
|
|
37
44
|
"fuse:space:execute": never[];
|
|
38
45
|
"fuse:space:write": Scope[];
|
|
39
46
|
"fuse:space:delete": Scope[];
|
|
47
|
+
"friday:space:read": Scope[];
|
|
48
|
+
"friday:space:write": Scope[];
|
|
49
|
+
"friday:space:delete": Scope[];
|
|
50
|
+
"cosmo:space:read": Scope[];
|
|
51
|
+
"cosmo:space:write": Scope[];
|
|
52
|
+
"cosmo:space:delete": Scope[];
|
|
40
53
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ScopeDependencies = exports.Scope = void 0;
|
|
3
|
+
exports.ScopeDependencies = exports.ScopeDescriptions = exports.Scope = void 0;
|
|
4
4
|
var Scope;
|
|
5
5
|
(function (Scope) {
|
|
6
6
|
Scope["HCLOUD_FULL"] = "hcloud:full";
|
|
@@ -21,7 +21,39 @@ var Scope;
|
|
|
21
21
|
Scope["FUSE_SPACE_EXECUTE"] = "fuse:space:execute";
|
|
22
22
|
Scope["FUSE_SPACE_WRITE"] = "fuse:space:write";
|
|
23
23
|
Scope["FUSE_SPACE_DELETE"] = "fuse:space:delete";
|
|
24
|
+
Scope["FRIDAY_SPACE_READ"] = "friday:space:read";
|
|
25
|
+
Scope["FRIDAY_SPACE_WRITE"] = "friday:space:write";
|
|
26
|
+
Scope["FRIDAY_SPACE_DELETE"] = "friday:space:delete";
|
|
27
|
+
Scope["COSMO_SPACE_READ"] = "cosmo:space:read";
|
|
28
|
+
Scope["COSMO_SPACE_WRITE"] = "cosmo:space:write";
|
|
29
|
+
Scope["COSMO_SPACE_DELETE"] = "cosmo:space:delete";
|
|
24
30
|
})(Scope || (exports.Scope = Scope = {}));
|
|
31
|
+
exports.ScopeDescriptions = new Map([
|
|
32
|
+
[Scope.HCLOUD_FULL, "Full access to helmut.cloud."],
|
|
33
|
+
[Scope.IDP_EMAIL_READ, "Read user's email address."],
|
|
34
|
+
[Scope.IDP_USER_READ, "Read user details."],
|
|
35
|
+
[Scope.IDP_USER_WRITE, "Create or update users."],
|
|
36
|
+
[Scope.IDP_USER_DELETE, "Delete users."],
|
|
37
|
+
[Scope.IDP_USER_OPEN_ID, "OpenID Connect access."],
|
|
38
|
+
[Scope.IDP_ORGANIZATION_READ, "Read organization info."],
|
|
39
|
+
[Scope.IDP_ORGANIZATION_WRITE, "Create or update organization."],
|
|
40
|
+
[Scope.IDP_ORGANIZATION_DELETE, "Delete organization info."],
|
|
41
|
+
[Scope.IDP_ORGANIZATION_ADMIN, "Full organization admin access."],
|
|
42
|
+
[Scope.HIGH5_SPACE_READ, "Read High5 space data."],
|
|
43
|
+
[Scope.HIGH5_SPACE_EXECUTE, "Execute tasks in High5."],
|
|
44
|
+
[Scope.HIGH5_SPACE_WRITE, "Create or update High5 data."],
|
|
45
|
+
[Scope.HIGH5_SPACE_DELETE, "Delete High5 data."],
|
|
46
|
+
[Scope.FUSE_SPACE_READ, "Read Fuse space data."],
|
|
47
|
+
[Scope.FUSE_SPACE_EXECUTE, "Execute tasks in Fuse."],
|
|
48
|
+
[Scope.FUSE_SPACE_WRITE, "Create or update Fuse data."],
|
|
49
|
+
[Scope.FUSE_SPACE_DELETE, "Delete Fuse data."],
|
|
50
|
+
[Scope.FRIDAY_SPACE_READ, "Read Friday space data."],
|
|
51
|
+
[Scope.FRIDAY_SPACE_WRITE, "Create or update Friday data."],
|
|
52
|
+
[Scope.FRIDAY_SPACE_DELETE, "Delete Friday data."],
|
|
53
|
+
[Scope.COSMO_SPACE_READ, "Read Cosmo space data."],
|
|
54
|
+
[Scope.COSMO_SPACE_WRITE, "Create or update Cosmo data."],
|
|
55
|
+
[Scope.COSMO_SPACE_DELETE, "Delete Cosmo data."],
|
|
56
|
+
]);
|
|
25
57
|
exports.ScopeDependencies = {
|
|
26
58
|
[Scope.HCLOUD_FULL]: [...Object.values(Scope).filter(s => s !== Scope.HCLOUD_FULL)],
|
|
27
59
|
[Scope.IDP_EMAIL_READ]: [],
|
|
@@ -47,4 +79,10 @@ exports.ScopeDependencies = {
|
|
|
47
79
|
[Scope.FUSE_SPACE_EXECUTE]: [],
|
|
48
80
|
[Scope.FUSE_SPACE_WRITE]: [Scope.IDP_ORGANIZATION_READ, Scope.IDP_USER_READ, Scope.FUSE_SPACE_READ],
|
|
49
81
|
[Scope.FUSE_SPACE_DELETE]: [Scope.IDP_ORGANIZATION_READ, Scope.IDP_USER_READ, Scope.FUSE_SPACE_READ, Scope.FUSE_SPACE_WRITE],
|
|
82
|
+
[Scope.FRIDAY_SPACE_READ]: [Scope.IDP_ORGANIZATION_READ, Scope.IDP_USER_READ],
|
|
83
|
+
[Scope.FRIDAY_SPACE_WRITE]: [Scope.IDP_ORGANIZATION_READ, Scope.IDP_USER_READ, Scope.FRIDAY_SPACE_READ],
|
|
84
|
+
[Scope.FRIDAY_SPACE_DELETE]: [Scope.IDP_ORGANIZATION_READ, Scope.IDP_USER_READ, Scope.FRIDAY_SPACE_READ, Scope.FRIDAY_SPACE_WRITE],
|
|
85
|
+
[Scope.COSMO_SPACE_READ]: [Scope.IDP_ORGANIZATION_READ, Scope.IDP_USER_READ],
|
|
86
|
+
[Scope.COSMO_SPACE_WRITE]: [Scope.IDP_ORGANIZATION_READ, Scope.IDP_USER_READ, Scope.COSMO_SPACE_READ],
|
|
87
|
+
[Scope.COSMO_SPACE_DELETE]: [Scope.IDP_ORGANIZATION_READ, Scope.IDP_USER_READ, Scope.COSMO_SPACE_READ, Scope.COSMO_SPACE_WRITE],
|
|
50
88
|
};
|
|
@@ -5,9 +5,11 @@ interface Totp {
|
|
|
5
5
|
}
|
|
6
6
|
export interface DeactivatedTotp extends Totp {
|
|
7
7
|
activated: false;
|
|
8
|
-
otpAuthUrl: string;
|
|
9
|
-
qrcode: string;
|
|
10
8
|
secret: string;
|
|
9
|
+
algorithm: string;
|
|
10
|
+
digits: number;
|
|
11
|
+
period: number;
|
|
12
|
+
issuer: string;
|
|
11
13
|
}
|
|
12
14
|
export interface ActivatedTotp extends Totp {
|
|
13
15
|
activated: true;
|
|
@@ -11,16 +11,22 @@ declare enum NatsSubject {
|
|
|
11
11
|
IDP_USER_SECURITY_PATS = "hcloud.idp.user.${userId}.security.pats",
|
|
12
12
|
IDP_USER_SECURITY_GENERAL = "hcloud.idp.user.${userId}.security.general",
|
|
13
13
|
IDP_USER_LICENSE = "hcloud.idp.user.${userId}.license",
|
|
14
|
+
IDP_USER_SETTINGS_OAUTH_REVOKE = "hcloud.idp.user.${userId}.settings.oauth.${oAuthAppId}.revoke",
|
|
15
|
+
IDP_ORGANIZATION = "hcloud.idp.organization.${base64orgName}",
|
|
14
16
|
IDP_ORGANIZATION_INVITATIONS = "hcloud.idp.organization.${base64orgName}.invitations",
|
|
15
17
|
IDP_ORGANIZATION_MEMBERS = "hcloud.idp.organization.${base64orgName}.members",
|
|
16
18
|
IDP_ORGANIZATION_MEMBERS_EXECUTION_TARGET = "hcloud.idp.organization.${base64orgName}.members.${base64email}.executionTarget",
|
|
17
19
|
IDP_ORGANIZATION_TEAMS = "hcloud.idp.organization.${base64orgName}.teams",
|
|
18
20
|
IDP_ORGANIZATION_TEAM_MEMBERS = "hcloud.idp.organization.${base64orgName}.teams.${base64teamName}.members",
|
|
19
21
|
IDP_ORGANIZATION_LICENSE = "hcloud.idp.organization.${base64orgName}.license",
|
|
22
|
+
IDP_ORGANIZATION_SETTINGS_OAUTHAPP = "hcloud.idp.organization.${base64orgName}.settings.oauthapp.${oAuthAppId}",
|
|
23
|
+
IDP_ORGANIZATION_SERVICE_ACCOUNTS = "hcloud.idp.organization.${base64orgName}.serviceAccounts",
|
|
20
24
|
HIGH5_SPACES = "hcloud.high5.organization.${base64orgName}.spaces",
|
|
21
25
|
HIGH5_SPACE_PERMISSIONS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.permissions",
|
|
22
26
|
HIGH5_STREAM_EXECUTE = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}",
|
|
23
27
|
HIGH5_STREAM_CANCEL = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}",// eslint-disable-line @typescript-eslint/no-duplicate-enum-values
|
|
28
|
+
HIGH5_STREAM_DEBUG_STOPPED = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}.${executionId}.stopped",
|
|
29
|
+
HIGH5_STREAM_DEBUG_COMMAND = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}.${executionSecret}.command",
|
|
24
30
|
HIGH5_EVENTS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events",
|
|
25
31
|
HIGH5_STREAMS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.streams",
|
|
26
32
|
HIGH5_EVENT_STREAMS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams",
|
|
@@ -31,12 +37,24 @@ declare enum NatsSubject {
|
|
|
31
37
|
HIGH5_CATALOGS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.catalogs",
|
|
32
38
|
HIGH5_NODES = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.node",
|
|
33
39
|
High5_DESIGN = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design",
|
|
40
|
+
High5_DESIGN_DELTA = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design.delta",
|
|
34
41
|
HIGH5_SNAPSHOTS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.snapshots",
|
|
35
42
|
HIGH5_WAVE_ENGINE_LATEST = "hcloud.high5.wave.engine.latest",
|
|
43
|
+
HIGH5_SPACES_POOLS = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.pools.>",
|
|
44
|
+
HIGH5_SPACES_POOL = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.pools.${base64poolName}",
|
|
36
45
|
FUSE_SPACES = "hcloud.fuse.organization.${base64orgName}.spaces",
|
|
37
46
|
FUSE_SPACE_PERMISSIONS = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.permissions",
|
|
38
47
|
FUSE_JOBS = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs",
|
|
39
48
|
FUSE_JOB_LOGS = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs.${jobId}.logs",
|
|
49
|
+
FRIDAY_SPACES = "hcloud.friday.organization.${base64orgName}.spaces",
|
|
50
|
+
FRIDAY_SPACE_PERMISSIONS = "hcloud.friday.organization.${base64orgName}.spaces.${base64spaceName}.permissions",
|
|
51
|
+
FRIDAY_DATABASES = "hcloud.friday.organization.${base64orgName}.spaces.${base64spaceName}.databases",
|
|
52
|
+
FRIDAY_DOCUMENTS = "hcloud.friday.organization.${base64orgName}.spaces.${base64spaceName}.databases.${base64databaseName}.documents",
|
|
53
|
+
COSMO_SPACES = "hcloud.cosmo.organization.${base64orgName}.spaces",
|
|
54
|
+
COSMO_NAMESPACES = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces",
|
|
55
|
+
COSMO_ASSETS = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.assets",
|
|
56
|
+
COSMO_COMMENTS = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.assets.${assetId}.comments",
|
|
57
|
+
MOTHERSHIP_AGENT_CONNECTION = "hcloud.mothership.organization.${base64orgName}.agent.connection",
|
|
40
58
|
AUDITOR_LOGS = "hcloud.auditor.organization.${base64orgName}.logs",
|
|
41
59
|
DEBUG_NAMESPACE = "hcloud.debug.namespace.${product}"
|
|
42
60
|
}
|
|
@@ -71,18 +89,22 @@ declare enum NatsObjectType {
|
|
|
71
89
|
WEBHOOK_LOG = "WEBHOOK_LOG",
|
|
72
90
|
SECRET = "SECRET",
|
|
73
91
|
CATALOG = "CATALOG",
|
|
92
|
+
POOL = "POOL",
|
|
74
93
|
AUDIT_LOG = "AUDIT_LOG",
|
|
75
94
|
MAIL = "MAIL",
|
|
76
95
|
CRONJOB = "CRONJOB",
|
|
77
96
|
CRONJOB_ID = "CRONJOB_ID",
|
|
78
|
-
CRONJOB_LOG = "CRONJOB_LOG"
|
|
97
|
+
CRONJOB_LOG = "CRONJOB_LOG",
|
|
98
|
+
DATABASE = "DATABASE",
|
|
99
|
+
DOCUMENT = "DOCUMENT",
|
|
100
|
+
AGENT = "AGENT"
|
|
79
101
|
}
|
|
80
102
|
interface NatsMessage {
|
|
81
103
|
type: NatsMessageType;
|
|
82
104
|
object: NatsObject;
|
|
83
105
|
objectType: NatsObjectType;
|
|
84
106
|
}
|
|
85
|
-
interface NatsObject extends NatsNameObject, NatsIdObject, NatsMemberObject, NatsSecretObject, NatsExecTargetObject, High5ExecuteOnAgentRequest, High5ExecutionCancelRequest, NatsLicenseObject, NatsCustomNodeObject {
|
|
107
|
+
interface NatsObject extends NatsNameObject, NatsIdObject, NatsMemberObject, NatsSecretObject, NatsExecTargetObject, High5ExecuteOnAgentRequest, High5ExecutionCancelRequest, NatsLicenseObject, NatsCustomNodeObject, NatsAssetObject, NatsTargetObject {
|
|
86
108
|
[NatsSubject.IDP_USER_GENERAL]: NatsIdObject;
|
|
87
109
|
[NatsSubject.IDP_USER_PROFILE]: NatsIdObject;
|
|
88
110
|
[NatsSubject.IDP_USER_SECURITY_PATS]: NatsIdObject;
|
|
@@ -104,17 +126,25 @@ interface NatsObject extends NatsNameObject, NatsIdObject, NatsMemberObject, Nat
|
|
|
104
126
|
[NatsSubject.HIGH5_STREAMS]: NatsIdObject;
|
|
105
127
|
[NatsSubject.HIGH5_EVENT_STREAMS]: NatsIdObject;
|
|
106
128
|
[NatsSubject.High5_DESIGN]: NatsIdObject;
|
|
129
|
+
[NatsSubject.High5_DESIGN_DELTA]: NatsIdObject;
|
|
107
130
|
[NatsSubject.HIGH5_SNAPSHOTS]: NatsIdObject;
|
|
108
131
|
[NatsSubject.HIGH5_NODES]: NatsCustomNodeObject;
|
|
109
132
|
[NatsSubject.HIGH5_SECRETS]: NatsSecretObject;
|
|
110
133
|
[NatsSubject.HIGH5_SETTINGS]: unknown;
|
|
111
134
|
[NatsSubject.HIGH5_WEBHOOKS]: NatsIdObject;
|
|
135
|
+
[NatsSubject.HIGH5_SPACES_POOLS]: NatsPoolObject;
|
|
112
136
|
[NatsSubject.HIGH5_WEBHOOK_LOGS]: NatsIdObject;
|
|
113
137
|
[NatsSubject.HIGH5_CATALOGS]: NatsIdObject;
|
|
114
138
|
[NatsSubject.FUSE_SPACES]: NatsNameObject;
|
|
115
139
|
[NatsSubject.FUSE_SPACE_PERMISSIONS]: NatsIdObject;
|
|
116
140
|
[NatsSubject.FUSE_JOBS]: NatsIdObject;
|
|
117
141
|
[NatsSubject.FUSE_JOB_LOGS]: NatsIdObject;
|
|
142
|
+
[NatsSubject.COSMO_ASSETS]: NatsAssetObject;
|
|
143
|
+
[NatsSubject.FRIDAY_SPACES]: NatsNameObject;
|
|
144
|
+
[NatsSubject.FRIDAY_SPACE_PERMISSIONS]: NatsIdObject;
|
|
145
|
+
[NatsSubject.FRIDAY_DATABASES]: NatsNameObject;
|
|
146
|
+
[NatsSubject.FRIDAY_DOCUMENTS]: NatsNameObject;
|
|
147
|
+
[NatsSubject.MOTHERSHIP_AGENT_CONNECTION]: NatsTargetObject;
|
|
118
148
|
[NatsSubject.AUDITOR_LOGS]: NatsIdObject;
|
|
119
149
|
[NatsSubject.DEBUG_NAMESPACE]: string;
|
|
120
150
|
}
|
|
@@ -125,6 +155,10 @@ interface NatsNameObject {
|
|
|
125
155
|
interface NatsIdObject {
|
|
126
156
|
_id: string;
|
|
127
157
|
}
|
|
158
|
+
interface NatsAssetObject {
|
|
159
|
+
_id: string;
|
|
160
|
+
type: "ASSET" | "SPACE" | "PRODUCTION" | "PROJECT" | "FOLDER";
|
|
161
|
+
}
|
|
128
162
|
interface NatsMemberObject {
|
|
129
163
|
userId: string;
|
|
130
164
|
}
|
|
@@ -137,10 +171,16 @@ interface NatsSecretObject {
|
|
|
137
171
|
interface NatsLicenseObject {
|
|
138
172
|
newTier: LicenseTier;
|
|
139
173
|
}
|
|
140
|
-
interface NatsCustomNodeObject {
|
|
141
|
-
_id: string;
|
|
174
|
+
interface NatsCustomNodeObject extends NatsIdObject {
|
|
142
175
|
updatedNodeId?: string;
|
|
143
176
|
}
|
|
177
|
+
interface NatsPoolObject extends NatsIdObject {
|
|
178
|
+
name: string;
|
|
179
|
+
targets: string[];
|
|
180
|
+
}
|
|
181
|
+
interface NatsTargetObject {
|
|
182
|
+
target: string;
|
|
183
|
+
}
|
|
144
184
|
type NatsCallback = (err: Error | null, msg?: NatsMessage, rawMsg?: Msg) => void;
|
|
145
185
|
/**
|
|
146
186
|
* This helper class creates subject strings to be used with nats.subscribe and nats.publish
|
|
@@ -161,7 +201,13 @@ declare class NatsSubjects {
|
|
|
161
201
|
PATS: (userId: string) => string;
|
|
162
202
|
GENERAL: (userId: string) => string;
|
|
163
203
|
};
|
|
204
|
+
Settings: (userId: string) => {
|
|
205
|
+
OAuth: {
|
|
206
|
+
REVOKE: (oAuthAppId: string) => string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
164
209
|
};
|
|
210
|
+
ORGANIZATION: (organizationName: string) => string;
|
|
165
211
|
Organization: {
|
|
166
212
|
new (): {};
|
|
167
213
|
INVITATIONS: (organizationName: string) => string;
|
|
@@ -174,6 +220,10 @@ declare class NatsSubjects {
|
|
|
174
220
|
MEMBERS: (organizationName: string, teamName: string) => string;
|
|
175
221
|
};
|
|
176
222
|
LICENSE: (organizationName: string) => string;
|
|
223
|
+
Settings: (organizationName: string) => {
|
|
224
|
+
OAuthApp: (oAuthAppId: string) => string;
|
|
225
|
+
};
|
|
226
|
+
ServiceAccounts: (organizationName: string) => string;
|
|
177
227
|
};
|
|
178
228
|
};
|
|
179
229
|
static Fuse: {
|
|
@@ -195,10 +245,16 @@ declare class NatsSubjects {
|
|
|
195
245
|
new (): {};
|
|
196
246
|
EXECUTE: (organizationId: string, email: string) => string;
|
|
197
247
|
CANCEL: (organizationId: string, email: string) => string;
|
|
248
|
+
DEBUG: (organizationId: string, email: string) => {
|
|
249
|
+
STOPPED: (executionId: string) => string;
|
|
250
|
+
COMMAND: (executionSecret: string) => string;
|
|
251
|
+
};
|
|
198
252
|
};
|
|
199
253
|
SPACES: (organizationName: string) => string;
|
|
200
254
|
Space: {
|
|
201
255
|
new (): {};
|
|
256
|
+
POOLS: (organizationName: string, spaceName: string) => string;
|
|
257
|
+
POOL: (organizationName: string, spaceName: string, poolName: string) => string;
|
|
202
258
|
PERMISSIONS: (organizationName: string, spaceName: string) => string;
|
|
203
259
|
EVENTS: (organizationName: string, spaceName: string) => string;
|
|
204
260
|
STREAMS: (organizationName: string, spaceName: string) => string;
|
|
@@ -208,6 +264,7 @@ declare class NatsSubjects {
|
|
|
208
264
|
Stream: {
|
|
209
265
|
new (): {};
|
|
210
266
|
DESIGN: (organizationName: string, spaceName: string, eventName: string, streamId: string) => string;
|
|
267
|
+
DESIGN_DELTA: (organizationName: string, spaceName: string, eventName: string, streamId: string) => string;
|
|
211
268
|
SNAPSHOTS: (organizationName: string, spaceName: string, eventName: string, streamId: string) => string;
|
|
212
269
|
};
|
|
213
270
|
};
|
|
@@ -229,11 +286,41 @@ declare class NatsSubjects {
|
|
|
229
286
|
};
|
|
230
287
|
};
|
|
231
288
|
};
|
|
289
|
+
static Friday: {
|
|
290
|
+
new (): {};
|
|
291
|
+
SPACES: (organizationName: string) => string;
|
|
292
|
+
Space: {
|
|
293
|
+
new (): {};
|
|
294
|
+
PERMISSIONS: (organizationName: string, spaceName: string) => string;
|
|
295
|
+
DATABASES: (organizationName: string, spaceName: string) => string;
|
|
296
|
+
Database: {
|
|
297
|
+
new (): {};
|
|
298
|
+
DOCUMENTS: (organizationName: string, spaceName: string, databaseName: string) => string;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
static Mothership: {
|
|
303
|
+
new (): {};
|
|
304
|
+
CONNECTION: (organizationName: string) => string;
|
|
305
|
+
};
|
|
232
306
|
static Auditor: {
|
|
233
307
|
new (): {};
|
|
234
308
|
LOGS: (organizationName: string) => string;
|
|
235
309
|
};
|
|
236
310
|
static Logging: (product: Products) => string;
|
|
311
|
+
static Cosmo: {
|
|
312
|
+
new (): {};
|
|
313
|
+
SPACES: (organizationName: string) => string;
|
|
314
|
+
Space: {
|
|
315
|
+
new (): {};
|
|
316
|
+
NAMESPACES: (organizationName: string, spaceName: string) => string;
|
|
317
|
+
Namespace: {
|
|
318
|
+
new (): {};
|
|
319
|
+
COMMENTS: (organizationName: string, spaceName: string, namespaceName: string, assetId: string) => string;
|
|
320
|
+
};
|
|
321
|
+
ASSETS: (organizationName: string, spaceName: string) => string;
|
|
322
|
+
};
|
|
323
|
+
};
|
|
237
324
|
private static replace;
|
|
238
325
|
}
|
|
239
|
-
export {
|
|
326
|
+
export { NatsCallback, NatsMessage, NatsMessageType, NatsObject, NatsObjectType, NatsSubject, NatsSubjects, Msg as RawMsg };
|