@veltdev/types 6.0.0-beta.6 → 6.0.0-beta.8
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.
|
@@ -66,6 +66,127 @@ export declare class Config {
|
|
|
66
66
|
* Configuration for routing all traffic through reverse proxies.
|
|
67
67
|
*/
|
|
68
68
|
proxyConfig?: ProxyConfig;
|
|
69
|
+
/**
|
|
70
|
+
* Self-hosting / on-prem backend configuration. When set, a deployment can point
|
|
71
|
+
* Velt-infra endpoints (Firebase config, cloud-function URLs, the notifications-hub
|
|
72
|
+
* RTDB URL, the regional setEncryptedData endpoints) at the customer's own infra.
|
|
73
|
+
*
|
|
74
|
+
* Every field is OPTIONAL and every unspecified value falls back to the per-build
|
|
75
|
+
* default in `src/environments/*` — so an existing SaaS build with no `selfHosted`
|
|
76
|
+
* config behaves exactly as before (behavior-preserving).
|
|
77
|
+
*/
|
|
78
|
+
selfHosted?: SelfHostedConfig;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* VENDORED from the backend deployment-profile manifest — source of truth:
|
|
82
|
+
* `shared-firebase-function` repo, `functions/src/deployment-profiles/modules.manifest.ts`
|
|
83
|
+
* (`DeploymentModuleId`, 13 modules; backend plan §8.3, ratified 2026-07-03; `console`
|
|
84
|
+
* split added in backend iteration-4). Do NOT add, remove, or rename ids here without a
|
|
85
|
+
* matching manifest change — the endpoint→module map in `endpoints.service.ts` and its
|
|
86
|
+
* cross-repo drift-fence test key off this list.
|
|
87
|
+
*/
|
|
88
|
+
export declare const DEPLOYMENT_MODULE_IDS: readonly ["core", "notifications", "recorder-media", "ai", "agents", "huddle-webrtc", "integrations-workflow", "superflow", "billing-stripe", "analytics-telemetry", "migrations", "velt-internal", "console"];
|
|
89
|
+
/** A backend feature-module id (see {@link DEPLOYMENT_MODULE_IDS} for provenance). */
|
|
90
|
+
export type DeploymentModuleId = typeof DEPLOYMENT_MODULE_IDS[number];
|
|
91
|
+
/**
|
|
92
|
+
* Per-endpoint overrides for the cloud-function fleet. Each value is a fully-configurable
|
|
93
|
+
* ABSOLUTE base URL — do NOT assume the `*.cloudfunctions.net` shape (Tier A now serves the
|
|
94
|
+
* fleet from Cloud Run with arbitrary hostnames). Keys mirror `environment.cloudFunction.*`.
|
|
95
|
+
* Unspecified keys fall back to the `environment` default.
|
|
96
|
+
*/
|
|
97
|
+
export interface SelfHostedCloudFunctionConfig {
|
|
98
|
+
validateClient?: string;
|
|
99
|
+
getPlanDetails?: string;
|
|
100
|
+
sa?: string;
|
|
101
|
+
getIceServers?: string;
|
|
102
|
+
chatgptCompletion?: string;
|
|
103
|
+
rewriterAskAi?: string;
|
|
104
|
+
whisperTranscription?: string;
|
|
105
|
+
getAllowedDocuments?: string;
|
|
106
|
+
getNotificationsForDocuments?: string;
|
|
107
|
+
videoBackend?: string;
|
|
108
|
+
convertRecording?: string;
|
|
109
|
+
processRecording?: string;
|
|
110
|
+
sdkProxy?: string;
|
|
111
|
+
screenshot?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Single override for the write endpoint that collapses the ×5 regional
|
|
114
|
+
* `setEncryptedData` split — when set, it is used for ALL regions. Self-hosted
|
|
115
|
+
* deployments typically run a single region.
|
|
116
|
+
*/
|
|
117
|
+
setEncryptedData?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Optional per-region overrides (used only if the single `setEncryptedData` above is
|
|
120
|
+
* unset). Keys are the `FirebaseRegion` values (`usCentral1`, `asiaSouthEast1`, ...).
|
|
121
|
+
*/
|
|
122
|
+
regions?: {
|
|
123
|
+
[region: string]: {
|
|
124
|
+
setEncryptedData?: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export interface SelfHostedConfig {
|
|
129
|
+
/**
|
|
130
|
+
* Strict (full self-hosted) mode. Default `false`.
|
|
131
|
+
*
|
|
132
|
+
* - `false` (hybrid / staged rollout): any endpoint WITHOUT an injected override falls
|
|
133
|
+
* back to the Velt default in `src/environments/*` — useful for testing one
|
|
134
|
+
* self-hosted endpoint at a time while the rest stay on Velt SaaS.
|
|
135
|
+
* - `true` (full self-hosting / data sovereignty): there is NO fallback to Velt. An
|
|
136
|
+
* endpoint without an injected override resolves to an inert
|
|
137
|
+
* `velt://self-hosted-disabled/<endpoint>` sentinel that can never produce network
|
|
138
|
+
* egress — the feature behind it is effectively disabled. Missing CORE endpoints
|
|
139
|
+
* (`validateClient`, `sdkProxy`, `setEncryptedData`, `getNotificationsForDocuments`,
|
|
140
|
+
* the notifications DB URL, `firebaseConfig`) are additionally
|
|
141
|
+
* reported once as a loud misconfiguration error, since the SDK cannot function
|
|
142
|
+
* without them (plan §4.3: every endpoint runs in the customer cloud or is disabled).
|
|
143
|
+
*/
|
|
144
|
+
strict?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Firebase config override (deep-merged over `environment.firebaseConfig`). Injected
|
|
147
|
+
* keys win; unspecified keys keep the `environment` default. Per-tenant auth-token
|
|
148
|
+
* claims still override this at runtime (within-project tenant routing is preserved).
|
|
149
|
+
*
|
|
150
|
+
* NOTE (strict mode): this is the ONE value that still falls back to the `environment`
|
|
151
|
+
* default when unset, because an undefined base config would break the Firebase
|
|
152
|
+
* bootstrap chain outright. The miss is still reported as a core misconfiguration, and
|
|
153
|
+
* the `identify()` response config overrides this base at runtime anyway. Making the
|
|
154
|
+
* bootstrap itself injectable is the tracked Phase A gap (`app.module.ts` static
|
|
155
|
+
* `initializeApp`).
|
|
156
|
+
*/
|
|
157
|
+
firebaseConfig?: Partial<FirebaseOptions>;
|
|
158
|
+
/** Override for the notifications-hub RTDB URL (`firebaseNotificationsDatabaseURL`). */
|
|
159
|
+
firebaseNotificationsDatabaseURL?: string;
|
|
160
|
+
/** Per-endpoint cloud-function URL overrides. */
|
|
161
|
+
cloudFunction?: SelfHostedCloudFunctionConfig;
|
|
162
|
+
/**
|
|
163
|
+
* Enables defensive consumption of the portable-backend `identify()` response
|
|
164
|
+
* (`{ token, backend, wsEndpoint, apiEndpoint }`, backend §6.1). Default `false`:
|
|
165
|
+
* when false, a portable response is ignored and the existing Firebase path runs
|
|
166
|
+
* unchanged — no behavior change when the backend does not send it.
|
|
167
|
+
*/
|
|
168
|
+
enablePortableBackend?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* The RESOLVED module closure of the deployment profile (backend plan §8.3) — the
|
|
171
|
+
* enabled-module-id list the backend deploy tooling emits in
|
|
172
|
+
* `velt-deployment-profile.json`. The customer's tooling inlines it at init; the SDK
|
|
173
|
+
* does NOT fetch it at runtime and does NOT re-resolve module dependencies (the
|
|
174
|
+
* backend's `profile-resolver.ts` already computed the fail-closed closure).
|
|
175
|
+
*
|
|
176
|
+
* Semantics (ratified — SDK-side synthesis, no Tier A server router):
|
|
177
|
+
* - Absent, not an array, or an EMPTY array (a valid resolved closure is never empty):
|
|
178
|
+
* ALL modules enabled — byte-identical to today for SaaS and existing selfHosted
|
|
179
|
+
* configs.
|
|
180
|
+
* - Non-empty: LITERAL membership — any endpoint whose module is NOT in the list
|
|
181
|
+
* resolves to the inert `velt://self-hosted-disabled/*` sentinel, so the denial
|
|
182
|
+
* normalizer synthesizes `'unimplemented'` locally with zero egress. Works with or
|
|
183
|
+
* without `strict`. Unknown/typo'd ids enable nothing (fail-closed, mirroring the
|
|
184
|
+
* backend resolver — a malformed profile must not silently re-open Velt egress).
|
|
185
|
+
* - A profile opt-out is authoritative: it wins over an injected endpoint URL, and its
|
|
186
|
+
* endpoints degrade silently even when classified `core` (opt-out ≠ misconfiguration
|
|
187
|
+
* — they are excluded from the strict-mode core-misconfiguration report).
|
|
188
|
+
*/
|
|
189
|
+
deploymentProfile?: DeploymentModuleId[];
|
|
69
190
|
}
|
|
70
191
|
export interface ProxyConfig {
|
|
71
192
|
/** Custom host for the Velt CDN (e.g., 'cdn-proxy.customer.com') */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/types",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.8",
|
|
4
4
|
"description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
|
|
5
5
|
"homepage": "https://velt.dev",
|
|
6
6
|
"keywords": [
|