@veltdev/types 6.0.0-beta.8 → 6.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.
@@ -283,6 +283,16 @@ export declare class Snippyly {
283
283
  */
284
284
  setDarkMode: (darkMode: boolean) => void;
285
285
 
286
+ /**
287
+ * Removes (or restores) ALL Velt visual styling at once — headless mode.
288
+ * By default a derived "functional-only" layer is kept so Velt UI retains
289
+ * its layout, positioning and show/hide behavior. Pass
290
+ * `keepFunctionalStyles: false` for total removal. Fully reversible.
291
+ * @param value {boolean} true = unstyled, false = styled (default)
292
+ * @param config {object} { keepFunctionalStyles?: boolean } defaults to true
293
+ */
294
+ setUnstyledMode: (value: boolean, config?: { keepFunctionalStyles?: boolean }) => void;
295
+
286
296
  /**
287
297
  * To check if user allowed in provided document or not.
288
298
  */
@@ -91,6 +91,7 @@ export type CommentEventTypesMap = {
91
91
  [CommentEventTypes.SIDEBAR_BUTTON_CLICKED]: SidebarButtonClickedEvent;
92
92
  [CommentEventTypes.SIDEBAR_OPEN]: SidebarOpenEvent;
93
93
  [CommentEventTypes.SIDEBAR_CLOSE]: SidebarCloseEvent;
94
+ [CommentEventTypes.FULLSCREEN_CLICK]: FullscreenClickEvent;
94
95
  [CommentEventTypes.COMMENT_CLICK]: CommentClickEvent;
95
96
  [CommentEventTypes.COMMENT_NAVIGATION_BUTTON_CLICK]: CommentNavigationButtonClickEvent;
96
97
  [CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
@@ -359,6 +360,15 @@ export interface SidebarOpenEvent {
359
360
  export interface SidebarCloseEvent {
360
361
  metadata?: VeltEventMetadata;
361
362
  }
363
+ /**
364
+ * Fired when the sidebar fullscreen toggle is clicked. Subscribe via
365
+ * `commentElement.on('fullscreenClick')`. `fullScreen` is the NEW state after the toggle.
366
+ * (Also surfaced as the `onFullscreenClick` @Output on the sidebar component.)
367
+ */
368
+ export interface FullscreenClickEvent {
369
+ fullScreen: boolean;
370
+ metadata?: VeltEventMetadata;
371
+ }
362
372
  /** Fired when a comment is clicked in the sidebar list. Subscribe via `commentElement.on('commentClick')`. */
363
373
  export interface CommentClickEvent {
364
374
  documentId?: string | null;
@@ -80,12 +80,21 @@ export declare class Config {
80
80
  /**
81
81
  * VENDORED from the backend deployment-profile manifest — source of truth:
82
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.
83
+ * (`DeploymentModuleId`, 12 modules; backend plan §8.3; restructured 2026-07-10 in backend
84
+ * iteration-10, owner-directed). Do NOT add, remove, or rename ids here without a matching
85
+ * manifest change — the endpoint→module map in `endpoints.service.ts` and its cross-repo
86
+ * drift-fence test key off this list.
87
+ *
88
+ * 2026-07-10 restructure summary:
89
+ * - DELETED (absorbed into `core`): `notifications`, `analytics-telemetry`, `console`.
90
+ * The agents RUNTIME also moved to `core` (`agents` keeps only the approval engine).
91
+ * - NEW `rest-api`: the customer-facing REST CFs (`commentsapibe`, `documentsapibe`, …),
92
+ * now opt-in (hardDep `core`). None of the SDK's own runtime endpoints live there.
93
+ * - NEW `legacy-v1`: the ~55 standalone V1 REST CFs — EXCLUDED, never provisioned on any
94
+ * self-hosted profile, so this id never appears in a valid `deploymentProfile`.
95
+ * - `core` is the SOLE mandatory module.
87
96
  */
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"];
97
+ export declare const DEPLOYMENT_MODULE_IDS: readonly ["core", "rest-api", "recorder-media", "ai", "agents", "huddle-webrtc", "integrations-workflow", "superflow", "billing-stripe", "migrations", "legacy-v1", "velt-internal"];
89
98
  /** A backend feature-module id (see {@link DEPLOYMENT_MODULE_IDS} for provenance). */
90
99
  export type DeploymentModuleId = typeof DEPLOYMENT_MODULE_IDS[number];
91
100
  /**
@@ -187,6 +196,30 @@ export interface SelfHostedConfig {
187
196
  * — they are excluded from the strict-mode core-misconfiguration report).
188
197
  */
189
198
  deploymentProfile?: DeploymentModuleId[];
199
+ /**
200
+ * The `dataRegions` field of the `velt-deployment-profile.json` v1 document (additive
201
+ * 2026-07-10, GTK-005-safe): which regional `setencrypteddata*` variants the deployment
202
+ * provisioned. Inlined by the customer's tooling alongside {@link deploymentProfile}.
203
+ *
204
+ * - `undefined` / `null` — no region filter (all regional variants provisioned; the
205
+ * SaaS shape). `null` and `[]` are DIFFERENT fleets — never coalesce them.
206
+ * - `[]` — ONLY the base `setencrypteddata` (in the deployment's own region) exists.
207
+ * - `['europe-west1', …]` — the base plus the variants for exactly those GCP regions
208
+ * (known: `europe-west1`, `asia-southeast1`, `australia-southeast1`,
209
+ * `asia-northeast1`).
210
+ *
211
+ * The SDK uses this as a pre-call provisioning check in
212
+ * `EndpointsService.getSetEncryptedDataUrl`: a tenant routed to an UNPROVISIONED
213
+ * regional variant degrades to the base `setEncryptedData` resolution instead of
214
+ * calling a URL that would 404.
215
+ *
216
+ * The filter is AUTHORITATIVE over injected per-region URLs (mirroring how a
217
+ * `deploymentProfile` opt-out wins over an injected endpoint URL): an injected
218
+ * `cloudFunction.regions[X]` override for a region excluded by `dataRegions` is
219
+ * never consulted — the write resolves through the base slot. Don't inject overrides
220
+ * for regions the deployment did not provision.
221
+ */
222
+ dataRegions?: string[] | null;
190
223
  }
191
224
  export interface ProxyConfig {
192
225
  /** Custom host for the Velt CDN (e.g., 'cdn-proxy.customer.com') */
@@ -28,6 +28,20 @@ export declare class NotificationRawData {
28
28
  * Annotation object
29
29
  */
30
30
  annotationData?: any;
31
+ /**
32
+ * Comment-visibility stamp for private comments
33
+ * (PM-2026-07-28-private-comment-notification-leak). Absent = public (legacy).
34
+ * The backend enforces visibility from this stamp on the per-user notification
35
+ * fan-out and on every notification read path.
36
+ * - `accessTokens`: the annotation's hashed visibility tokens (authoritative match)
37
+ * - `userIds` / `organizationIds`: the readable mirror (client ids)
38
+ */
39
+ visibility?: {
40
+ type: string;
41
+ userIds?: string[];
42
+ organizationIds?: string[];
43
+ accessTokens: string[];
44
+ };
31
45
  /**
32
46
  * Comment object for comment annotation
33
47
  */
@@ -98,8 +98,24 @@ export interface TargetEditDetails<T = unknown> {
98
98
  * auto-commit so a subscriber to `targetEditCommit` can drive it explicitly.
99
99
  */
100
100
  export interface TargetEditCommitResult {
101
- /** Override the SDK's default `${targetId}: ${old} → ${new}` summary. */
101
+ /**
102
+ * Override the SDK's default diff summary (`Replace: "{old}" with "{new}"`;
103
+ * `Add:`/`Remove:` when one side is absent; a per-key op list when both
104
+ * values are plain objects). When provided without `summaryHtml`, it is
105
+ * used for BOTH the plain `commentText` and (escaped) the `commentHtml`
106
+ * of the seeded first comment.
107
+ */
102
108
  summary?: string;
109
+ /**
110
+ * Optional HTML version of the summary, used as the `commentHtml` of the
111
+ * suggestion's seeded first comment (the plain `summary` — or the SDK's
112
+ * default diff summary — stays in `commentText`). When BOTH are omitted,
113
+ * the SDK renders a default styled HTML diff (old/removed values in red
114
+ * italic, new/added values in green italic). Sanitized with DOMPurify at
115
+ * render time — script/event-handler content is stripped; inline `style`
116
+ * attributes are preserved.
117
+ */
118
+ summaryHtml?: string;
103
119
  /** Customer metadata persisted on the resulting Suggestion. */
104
120
  metadata?: Record<string, unknown>;
105
121
  }
@@ -134,6 +150,24 @@ export interface EnableSuggestionModeConfig {
134
150
  * to event subscribers.
135
151
  */
136
152
  onTargetEditCommit?: TargetEditCommitHandler;
153
+ /**
154
+ * When active AND no `onTargetEditCommit` handler is provided, every
155
+ * detected commit auto-commits with the SDK's default summary/summaryHtml
156
+ * (equivalent to a handler returning `{}`).
157
+ *
158
+ * **Default: true** — a bare `enableSuggestionMode()` turns edits into
159
+ * suggestions with zero config. Pass `autoCommit: false` for detect-only
160
+ * mode (events fire, nothing commits until a subscriber calls the event's
161
+ * `commitSuggestion` builder).
162
+ *
163
+ * A provided `onTargetEditCommit` handler always wins — including its
164
+ * null-return deferral contract — so handler-based integrations are
165
+ * unaffected. The `targetEditCommit` event still fires; its pre-bound
166
+ * `commitSuggestion` builder becomes a no-op for edits already
167
+ * auto-committed by this flag (same double-commit guard as the handler
168
+ * path).
169
+ */
170
+ autoCommit?: boolean;
137
171
  }
138
172
  /**
139
173
  * SDK-managed suggestion data persisted on a CommentAnnotation.
@@ -245,8 +279,24 @@ export interface CommitSuggestionConfig<T = unknown> {
245
279
  targetId: string;
246
280
  /** Any JSON-serializable value. Customer's apply handler interprets it. */
247
281
  newValue: T;
248
- /** Optional human-readable string for logs and notifications. */
282
+ /**
283
+ * Optional human-readable string for logs and notifications. When provided
284
+ * without `summaryHtml`, it is used for BOTH the seeded comment's plain
285
+ * `commentText` and (escaped) its `commentHtml`. When omitted, the seeded
286
+ * comment falls back to the SDK's default diff summary
287
+ * (`Replace: "{old}" with "{new}"`; `Add:`/`Remove:` when one side is
288
+ * absent; a per-key op list when both values are plain objects).
289
+ */
249
290
  summary?: string;
291
+ /**
292
+ * Optional HTML version of the summary — becomes the `commentHtml` of the
293
+ * suggestion's seeded first comment (plain `summary` or the default diff
294
+ * summary stays in `commentText`). When BOTH are omitted, the SDK renders
295
+ * a default styled HTML diff (old/removed values in red italic, new/added
296
+ * values in green italic). Sanitized with DOMPurify at render time; inline
297
+ * `style` attributes are preserved so rich diff styling survives.
298
+ */
299
+ summaryHtml?: string;
250
300
  /** Optional customer-defined metadata. Stored on Suggestion.metadata. */
251
301
  metadata?: Record<string, unknown>;
252
302
  }
@@ -12,6 +12,7 @@ export declare class Constants {
12
12
  static LISTENER_CONTEXT_BATCH_SIZE: number;
13
13
  static DEFAULT_VELT_CONTEXT: string;
14
14
  static VISIBILITY_SELF_PREFIX: string;
15
+ static VISIBILITY_ORG_PREFIX: string;
15
16
  static FIREBASE_PARTIAL_PATH_ORGANIZATIONS: string;
16
17
  static FIREBASE_PARTIAL_PATH_FOLDERS: string;
17
18
  static FIREBASE_PARTIAL_PATH_DOCS: string;
@@ -100,6 +100,7 @@ export declare const CommentEventTypes: {
100
100
  readonly SIDEBAR_BUTTON_CLICKED: "sidebarButtonClicked";
101
101
  readonly SIDEBAR_OPEN: "sidebarOpen";
102
102
  readonly SIDEBAR_CLOSE: "sidebarClose";
103
+ readonly FULLSCREEN_CLICK: "fullscreenClick";
103
104
  readonly COMMENT_CLICK: "commentClick";
104
105
  readonly COMMENT_NAVIGATION_BUTTON_CLICK: "commentNavigationButtonClick";
105
106
  readonly ATTACHMENT_DOWNLOAD_CLICKED: "attachmentDownloadClicked";
@@ -332,7 +333,7 @@ export type RecorderType = 'audio' | 'video' | 'screen';
332
333
  export type RecorderFileFormat = 'mp3' | 'mp4' | 'webm';
333
334
  export type RecorderLayoutMode = 'floating' | 'thread';
334
335
  export type SupportedMimeType = 'audio' | 'video';
335
- export type FirebaseRegion = 'usCentral1' | 'asiaSouthEast1' | 'europeWest1' | 'australiaSouthEast1';
336
+ export type FirebaseRegion = 'usCentral1' | 'asiaSouthEast1' | 'europeWest1' | 'australiaSouthEast1' | 'asiaNorthEast1';
336
337
  export type VideoEventType = 'play' | 'pause' | 'ratechange' | 'seeked' | 'timeupdate' | 'volumechange';
337
338
  export type RewriterType = 'copywriter' | 'generic';
338
339
  export type RecorderStatusType = 'started' | 'paused' | 'resumed' | 'stopped' | 'error' | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/types",
3
- "version": "6.0.0-beta.8",
3
+ "version": "6.0.0",
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": [