@veltrixsecops/app-sdk 3.1.0 → 3.5.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 -1
- package/dist/byol/index.cjs +3802 -0
- package/dist/byol/index.cjs.map +1 -0
- package/dist/byol/index.d.cts +578 -0
- package/dist/byol/index.d.ts +578 -0
- package/dist/byol/index.js +2587 -0
- package/dist/byol/index.js.map +1 -0
- package/dist/chunk-3WK4EVQ3.js +842 -0
- package/dist/chunk-3WK4EVQ3.js.map +1 -0
- package/dist/{chunk-6KUTYJW5.js → chunk-HIL6RIDG.js} +107 -3
- package/dist/chunk-HIL6RIDG.js.map +1 -0
- package/dist/{chunk-VWFTOFTI.js → chunk-Y6XBNZGR.js} +8 -2
- package/dist/chunk-Y6XBNZGR.js.map +1 -0
- package/dist/client/index.cjs +112 -2
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +127 -6
- package/dist/client/index.d.ts +127 -6
- package/dist/client/index.js +13 -1
- package/dist/connections/index.cjs +1787 -0
- package/dist/connections/index.cjs.map +1 -0
- package/dist/connections/index.d.cts +78 -0
- package/dist/connections/index.d.ts +78 -0
- package/dist/connections/index.js +754 -0
- package/dist/connections/index.js.map +1 -0
- package/dist/hooks/index.cjs +7 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +24 -3
- package/dist/hooks/index.d.ts +24 -3
- package/dist/hooks/index.js +7 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/opentofu/index.cjs +138 -0
- package/dist/opentofu/index.cjs.map +1 -0
- package/dist/opentofu/index.d.cts +131 -0
- package/dist/opentofu/index.d.ts +131 -0
- package/dist/opentofu/index.js +109 -0
- package/dist/opentofu/index.js.map +1 -0
- package/dist/pipeline/index.cjs +7 -0
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.d.cts +9 -2
- package/dist/pipeline/index.d.ts +9 -2
- package/dist/pipeline/index.js +3 -1
- package/dist/pipeline-beeT8dje.d.cts +408 -0
- package/dist/pipeline-beeT8dje.d.ts +408 -0
- package/dist/ui/index.cjs +248 -0
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +238 -1
- package/dist/ui/index.d.ts +238 -1
- package/dist/ui/index.js +39 -573
- package/dist/ui/index.js.map +1 -1
- package/dist/{use-app-context-SEU1tyZd.d.cts → use-app-context-Byv_fam0.d.cts} +241 -4
- package/dist/{use-app-context-SEU1tyZd.d.ts → use-app-context-Byv_fam0.d.ts} +241 -4
- package/opentofu/README.md +114 -0
- package/opentofu/modules/aws/main.tf +1008 -0
- package/opentofu/modules/aws/outputs.tf +90 -0
- package/opentofu/modules/aws/variables.tf +437 -0
- package/opentofu/modules/aws/versions.tf +23 -0
- package/opentofu/modules/azure/main.tf +920 -0
- package/opentofu/modules/azure/outputs.tf +72 -0
- package/opentofu/modules/azure/variables.tf +498 -0
- package/opentofu/modules/azure/versions.tf +27 -0
- package/opentofu/modules/gcp/main.tf +645 -0
- package/opentofu/modules/gcp/outputs.tf +73 -0
- package/opentofu/modules/gcp/variables.tf +428 -0
- package/opentofu/modules/gcp/versions.tf +27 -0
- package/opentofu/modules/hetzner/main.tf +432 -0
- package/opentofu/modules/hetzner/outputs.tf +72 -0
- package/opentofu/modules/hetzner/variables.tf +423 -0
- package/opentofu/modules/hetzner/versions.tf +26 -0
- package/package.json +33 -1
- package/dist/chunk-6KUTYJW5.js.map +0 -1
- package/dist/chunk-VWFTOFTI.js.map +0 -1
- package/dist/pipeline-A-gSsPRR.d.cts +0 -189
- package/dist/pipeline-A-gSsPRR.d.ts +0 -189
package/dist/client/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType, LazyExoticComponent, Context } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import { E as EnvironmentRef } from '../pipeline-
|
|
2
|
+
import { F as InventoryItemInput, I as InventoryItem, y as ConnectivityProviderRef, B as CredentialInput, D as CredentialSummary, d as AppContextValue, r as AppPermissionsApi } from '../use-app-context-Byv_fam0.js';
|
|
3
|
+
export { b as AppBrandingDeclaration, z as Credential, P as PermissionCheckOptions, G as PermissionEntry } from '../use-app-context-Byv_fam0.js';
|
|
4
|
+
import { E as EnvironmentRef, B as TestConnectionResult } from '../pipeline-beeT8dje.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A platform Tool. Each installed app is upserted as a Tool keyed by its
|
|
@@ -18,8 +18,13 @@ interface Tool {
|
|
|
18
18
|
* when creating an inventory item, so call this once and pass the id as
|
|
19
19
|
* `toolId` to {@link addInventoryItem}. Returns null when no tool matches.
|
|
20
20
|
*
|
|
21
|
-
* GET /api/tools (
|
|
22
|
-
*
|
|
21
|
+
* GET /api/tools (paginated — `{ data, pagination }` — or a bare array; both are
|
|
22
|
+
* handled). We MUST filter server-side by name: the list is paginated (default 20,
|
|
23
|
+
* ordered by createdAt) so once a tenant has enough apps installed, a bare
|
|
24
|
+
* client-side find over just the first page silently misses a real tool whose row
|
|
25
|
+
* fell to a later page — surfacing a false "no <app> tool found, install the app
|
|
26
|
+
* first" error for an app that is in fact installed. `search` is a case-insensitive
|
|
27
|
+
* contains match, so we still exact-match `tool.name === name` on the result.
|
|
23
28
|
*/
|
|
24
29
|
declare function resolveTool(name: string): Promise<Tool | null>;
|
|
25
30
|
/** List the customer's inventory (deployment targets). GET /api/components */
|
|
@@ -71,6 +76,113 @@ declare function updateCredential(id: string, input: Partial<CredentialInput>):
|
|
|
71
76
|
/** Remove a credential. DELETE /api/credentials/:id. */
|
|
72
77
|
declare function removeCredential(id: string): Promise<void>;
|
|
73
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Test a Connection's endpoint + credential. The platform decrypts the secret,
|
|
81
|
+
* runs the owning app's connectivity-test handler in-process (the secret is
|
|
82
|
+
* never returned), and reports whether the endpoint + credentials actually work.
|
|
83
|
+
* A failed test resolves normally with `{ ok: false, message }` — it does not
|
|
84
|
+
* throw. Only transport/auth errors (401/404) surface as `{ ok: false }` too.
|
|
85
|
+
*
|
|
86
|
+
* @param appId the app that owns the connection, e.g. `splunk-cloud`
|
|
87
|
+
* @param credentialId the connection (credential) id
|
|
88
|
+
* @param opts.endpoint optional endpoint to test against instead of the one stored
|
|
89
|
+
* on the credential — e.g. an Access Server's reachable address
|
|
90
|
+
* (`<host>:<port>`). The host is scoped to the caller's tenant.
|
|
91
|
+
*/
|
|
92
|
+
declare function testConnection(appId: string, credentialId: string, opts?: {
|
|
93
|
+
endpoint?: string;
|
|
94
|
+
}): Promise<TestConnectionResult>;
|
|
95
|
+
/** Result of running an app operation. Mirrors the server operation handler's return. */
|
|
96
|
+
interface OperationResult {
|
|
97
|
+
ok: boolean;
|
|
98
|
+
message: string;
|
|
99
|
+
details?: string[];
|
|
100
|
+
/** Optional structured payload (e.g. an export download URL, a job id). */
|
|
101
|
+
data?: Record<string, unknown>;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Run an app operation — a one-off action (restart, export, retry, …), NOT a
|
|
105
|
+
* configuration deploy. The platform decrypts the chosen connection's secret and
|
|
106
|
+
* runs the app's operation handler in-process (the secret is never returned). A
|
|
107
|
+
* failed operation resolves normally with `{ ok: false, message }` rather than
|
|
108
|
+
* throwing.
|
|
109
|
+
*
|
|
110
|
+
* @param appId the app that owns the operation, e.g. `splunk-cloud`
|
|
111
|
+
* @param operationId the operation id declared in the app manifest
|
|
112
|
+
* @param opts the connection (credentialId) to authenticate with, + params
|
|
113
|
+
*/
|
|
114
|
+
declare function runOperation(appId: string, operationId: string, opts?: {
|
|
115
|
+
credentialId?: string;
|
|
116
|
+
params?: Record<string, unknown>;
|
|
117
|
+
}): Promise<OperationResult>;
|
|
118
|
+
|
|
119
|
+
/** The client-safe onboarding descriptor an app advertises in /apps/enabled. */
|
|
120
|
+
interface AppOnboardingDescriptor {
|
|
121
|
+
provider: string;
|
|
122
|
+
label: string;
|
|
123
|
+
brokered?: boolean;
|
|
124
|
+
requiredSettings?: string[];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Fetch an app's connection-onboarding descriptor from GET /api/apps/enabled,
|
|
128
|
+
* so the Connections UI can offer an "Integrate via OAuth" option without the
|
|
129
|
+
* app page having to pass it in. Returns null when the app declares no
|
|
130
|
+
* onboarding (its connections stay credential-only).
|
|
131
|
+
*/
|
|
132
|
+
declare function fetchAppOnboarding(appId: string): Promise<AppOnboardingDescriptor | null>;
|
|
133
|
+
interface StartOnboardingInput {
|
|
134
|
+
/** The deployment scope (environment) the new connection belongs to. */
|
|
135
|
+
environmentId: string;
|
|
136
|
+
/** Display name for the new connection. */
|
|
137
|
+
connectionName: string;
|
|
138
|
+
/**
|
|
139
|
+
* Settings the admin supplies BEFORE consent (e.g. Sentinel's
|
|
140
|
+
* subscription_id / resource_group / workspace_name, or a cloud override).
|
|
141
|
+
*/
|
|
142
|
+
settings?: Record<string, unknown>;
|
|
143
|
+
}
|
|
144
|
+
interface StartOnboardingResult {
|
|
145
|
+
/** Open this in the browser — the provider's hosted consent page. */
|
|
146
|
+
authorizeUrl: string;
|
|
147
|
+
provider: string;
|
|
148
|
+
}
|
|
149
|
+
/** Begin onboarding a connection. POST /api/apps/:appId/connections/onboard/start. */
|
|
150
|
+
declare function startOnboarding(appId: string, input: StartOnboardingInput): Promise<StartOnboardingResult>;
|
|
151
|
+
interface OnboardingStatus {
|
|
152
|
+
provider: string;
|
|
153
|
+
brokered: boolean;
|
|
154
|
+
tenantId: string | null;
|
|
155
|
+
cloud: string;
|
|
156
|
+
manualSteps: Array<{
|
|
157
|
+
type: string;
|
|
158
|
+
title: string;
|
|
159
|
+
description: string;
|
|
160
|
+
deepLink?: string;
|
|
161
|
+
cliCommand?: string;
|
|
162
|
+
verifiable: boolean;
|
|
163
|
+
}>;
|
|
164
|
+
verify?: {
|
|
165
|
+
effective: boolean;
|
|
166
|
+
message: string;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Read onboarding status for a connection, optionally running the verify probe
|
|
171
|
+
* for pending manual steps (e.g. the Sentinel role assignment).
|
|
172
|
+
* GET /api/apps/:appId/connections/:credentialId/onboard/status.
|
|
173
|
+
*/
|
|
174
|
+
declare function getOnboardingStatus(appId: string, credentialId: string, opts?: {
|
|
175
|
+
verify?: boolean;
|
|
176
|
+
}): Promise<OnboardingStatus>;
|
|
177
|
+
/**
|
|
178
|
+
* Disconnect an onboarded connection (best-effort tenant-side teardown, then
|
|
179
|
+
* delete). POST /api/apps/:appId/connections/:credentialId/onboard/revoke.
|
|
180
|
+
*/
|
|
181
|
+
declare function revokeOnboarding(appId: string, credentialId: string): Promise<{
|
|
182
|
+
cleaned: boolean;
|
|
183
|
+
message: string;
|
|
184
|
+
}>;
|
|
185
|
+
|
|
74
186
|
/** Name of the global the platform installs before loading app bundles. */
|
|
75
187
|
declare const HOST_RUNTIME_GLOBAL = "__VELTRIX_APP_RUNTIME__";
|
|
76
188
|
/**
|
|
@@ -105,6 +217,15 @@ interface VeltrixHostRuntime {
|
|
|
105
217
|
* DataTable, useToast, ...). Present only inside the platform.
|
|
106
218
|
*/
|
|
107
219
|
ui?: Record<string, unknown>;
|
|
220
|
+
/**
|
|
221
|
+
* Platform-scoped permission checks (RBAC/IdP hardening, Wave C4) —
|
|
222
|
+
* `opts.appId` is NOT defaulted here (omit for a platform-scoped check).
|
|
223
|
+
* App page code should prefer `usePermissions()`
|
|
224
|
+
* (`@veltrixsecops/app-sdk/hooks`), which defaults `opts.appId` to the
|
|
225
|
+
* app's own id. Optional for compatibility with a host that hasn't
|
|
226
|
+
* deployed this surface yet.
|
|
227
|
+
*/
|
|
228
|
+
permissions?: AppPermissionsApi;
|
|
108
229
|
}
|
|
109
230
|
/** Read the host runtime, or null outside the platform (tests, storybook). */
|
|
110
231
|
declare function getHostRuntime(): VeltrixHostRuntime | null;
|
|
@@ -132,4 +253,4 @@ interface AppClientModule {
|
|
|
132
253
|
sidebarItems?: AppSidebarItem[];
|
|
133
254
|
}
|
|
134
255
|
|
|
135
|
-
export { type AppClientModule, type AppSidebarItem, ConnectivityProviderRef, CredentialInput, CredentialSummary, EnvironmentRef, HOST_RUNTIME_GLOBAL, InventoryItem, InventoryItemInput, type Tool, type VeltrixHostRuntime, addInventoryItem, authFetch, createCredential, getHostRuntime, listConnectivityProviders, listCredentials, listEnvironments, listInventory, removeCredential, removeInventoryItem, requireHostRuntime, resolveTool, updateCredential, updateInventoryItem };
|
|
256
|
+
export { type AppClientModule, type AppOnboardingDescriptor, AppPermissionsApi, type AppSidebarItem, ConnectivityProviderRef, CredentialInput, CredentialSummary, EnvironmentRef, HOST_RUNTIME_GLOBAL, InventoryItem, InventoryItemInput, type OnboardingStatus, type OperationResult, type StartOnboardingInput, type StartOnboardingResult, TestConnectionResult, type Tool, type VeltrixHostRuntime, addInventoryItem, authFetch, createCredential, fetchAppOnboarding, getHostRuntime, getOnboardingStatus, listConnectivityProviders, listCredentials, listEnvironments, listInventory, removeCredential, removeInventoryItem, requireHostRuntime, resolveTool, revokeOnboarding, runOperation, startOnboarding, testConnection, updateCredential, updateInventoryItem };
|
package/dist/client/index.js
CHANGED
|
@@ -3,7 +3,9 @@ import {
|
|
|
3
3
|
addInventoryItem,
|
|
4
4
|
authFetch,
|
|
5
5
|
createCredential,
|
|
6
|
+
fetchAppOnboarding,
|
|
6
7
|
getHostRuntime,
|
|
8
|
+
getOnboardingStatus,
|
|
7
9
|
listConnectivityProviders,
|
|
8
10
|
listCredentials,
|
|
9
11
|
listEnvironments,
|
|
@@ -12,15 +14,21 @@ import {
|
|
|
12
14
|
removeInventoryItem,
|
|
13
15
|
requireHostRuntime,
|
|
14
16
|
resolveTool,
|
|
17
|
+
revokeOnboarding,
|
|
18
|
+
runOperation,
|
|
19
|
+
startOnboarding,
|
|
20
|
+
testConnection,
|
|
15
21
|
updateCredential,
|
|
16
22
|
updateInventoryItem
|
|
17
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-HIL6RIDG.js";
|
|
18
24
|
export {
|
|
19
25
|
HOST_RUNTIME_GLOBAL,
|
|
20
26
|
addInventoryItem,
|
|
21
27
|
authFetch,
|
|
22
28
|
createCredential,
|
|
29
|
+
fetchAppOnboarding,
|
|
23
30
|
getHostRuntime,
|
|
31
|
+
getOnboardingStatus,
|
|
24
32
|
listConnectivityProviders,
|
|
25
33
|
listCredentials,
|
|
26
34
|
listEnvironments,
|
|
@@ -29,6 +37,10 @@ export {
|
|
|
29
37
|
removeInventoryItem,
|
|
30
38
|
requireHostRuntime,
|
|
31
39
|
resolveTool,
|
|
40
|
+
revokeOnboarding,
|
|
41
|
+
runOperation,
|
|
42
|
+
startOnboarding,
|
|
43
|
+
testConnection,
|
|
32
44
|
updateCredential,
|
|
33
45
|
updateInventoryItem
|
|
34
46
|
};
|