@veltdev/sdk-dev 6.0.0-beta.2 → 6.0.0-beta.20

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.
Files changed (90) hide show
  1. package/app/client/snippyly.model.d.ts +2 -3
  2. package/app/models/data/comment-events.data.model.d.ts +29 -0
  3. package/app/models/data/config.data.model.d.ts +121 -0
  4. package/app/models/data/reaction-resolver.data.model.d.ts +1 -0
  5. package/app/models/data/selection.model.d.ts +10 -8
  6. package/app/models/data/user-resolver.data.model.d.ts +11 -9
  7. package/app/models/data/user.data.model.d.ts +21 -18
  8. package/app/models/element/activity-element.model.d.ts +0 -1
  9. package/app/models/element/area-element.model.d.ts +0 -1
  10. package/app/models/element/arrow-element.model.d.ts +1 -2
  11. package/app/models/element/autocomplete-element.model.d.ts +0 -1
  12. package/app/models/element/comment-element.model.d.ts +103 -77
  13. package/app/models/element/contact-element.model.d.ts +1 -2
  14. package/app/models/element/crdt-element.model.d.ts +1 -1
  15. package/app/models/element/cursor-element.model.d.ts +1 -2
  16. package/app/models/element/huddle-element.model.d.ts +1 -2
  17. package/app/models/element/live-state-sync-element.model.d.ts +1 -1
  18. package/app/models/element/notification-element.model.d.ts +33 -2
  19. package/app/models/element/presence-element.model.d.ts +32 -11
  20. package/app/models/element/reaction-element.model.d.ts +1 -1
  21. package/app/models/element/recorder-element.model.d.ts +21 -2
  22. package/app/models/element/rewriter-element.model.d.ts +43 -1
  23. package/app/models/element/selection-element.model.d.ts +1 -1
  24. package/app/models/element/suggestion-element.model.d.ts +0 -1
  25. package/app/models/element/tag-element.model.d.ts +7 -8
  26. package/app/models/element/views-element.model.d.ts +1 -1
  27. package/app/utils/enums.d.ts +95 -82
  28. package/chunk-2JYR3ESH.js +1 -0
  29. package/{chunk-N4SGYLNB.js → chunk-45CK3G4S.js} +1 -1
  30. package/{chunk-JFRM6MNS.js → chunk-63NMA3AQ.js} +1 -1
  31. package/chunk-6ILQARGU.js +1 -0
  32. package/{chunk-7ZOGXD6Z.js → chunk-6LUTL3DR.js} +1 -1
  33. package/{chunk-IXZIBE27.js → chunk-6RA26UDR.js} +1 -1
  34. package/{chunk-Y6QKEGWK.js → chunk-6WCUWRDH.js} +1 -1
  35. package/{chunk-2KJNXU43.js → chunk-A6QXRF3G.js} +1 -1
  36. package/chunk-ATB2ZI7G.js +1 -0
  37. package/chunk-BCSVTVMJ.js +167 -0
  38. package/{chunk-TXOYHDVN.js → chunk-BSYABMZE.js} +1 -1
  39. package/{chunk-D3B2IHCD.js → chunk-CECXGS4N.js} +1 -1
  40. package/chunk-DAHES7KJ.js +1 -0
  41. package/{chunk-25GEE4UD.js → chunk-DEGPUOWQ.js} +1 -1
  42. package/{chunk-Q7BPHHBS.js → chunk-FLGROJQW.js} +1 -1
  43. package/{chunk-447SWJD2.js → chunk-G4N6XTDS.js} +1 -1
  44. package/{chunk-XMYVEF74.js → chunk-GW63A52V.js} +1 -1
  45. package/{chunk-ZVY2YW2G.js → chunk-HEIW3Q3Z.js} +1 -1
  46. package/{chunk-YBQBSGLX.js → chunk-HRHOJT33.js} +1 -1
  47. package/{chunk-5FKOPJVO.js → chunk-HZBOX5Z7.js} +7 -7
  48. package/{chunk-DX4SZFHQ.js → chunk-IE6GR57U.js} +1 -1
  49. package/{chunk-UJMFCXYS.js → chunk-KAYQA4GH.js} +1 -1
  50. package/{chunk-6SOP2T3L.js → chunk-KBKI4VKD.js} +1 -1
  51. package/{chunk-J6J7I3SW.js → chunk-NBO7Z72Y.js} +1 -1
  52. package/{chunk-AOHSD4YE.js → chunk-NVZIS23N.js} +2 -2
  53. package/chunk-S4SWAWDX.js +13 -0
  54. package/chunk-SLIE6W2D.js +193 -0
  55. package/{chunk-QE2MK6NF.js → chunk-TJFCTUCM.js} +1 -1
  56. package/{chunk-SALUJBOS.js → chunk-TNSFEAOB.js} +1 -1
  57. package/{chunk-2HGBJS2C.js → chunk-UQ2QOHQZ.js} +1 -1
  58. package/{chunk-BG6MNCDK.js → chunk-WXTTF7HW.js} +1 -1
  59. package/{chunk-7W553TUZ.js → chunk-Z54SH2OU.js} +1 -1
  60. package/{chunk-USRSVPHC.js → chunk-ZZK5UGYN.js} +1 -1
  61. package/package.json +1 -1
  62. package/types.d.ts +22 -22
  63. package/velt-activity-log.js +1 -1
  64. package/velt-area.js +1 -1
  65. package/velt-arrow.js +2 -2
  66. package/velt-comment.js +8 -8
  67. package/velt-crdt.js +1 -1
  68. package/velt-cursor.js +2 -2
  69. package/velt-huddle.js +3 -3
  70. package/velt-live-state-sync.js +2 -2
  71. package/velt-notification.js +1 -1
  72. package/velt-presence.js +1 -1
  73. package/velt-reaction.js +1 -1
  74. package/velt-recorder.js +1 -1
  75. package/velt-rewriter.js +2 -2
  76. package/velt-selection.js +1 -1
  77. package/velt-tag.js +1 -1
  78. package/velt-user-invite.js +1 -1
  79. package/velt-user-request.js +1 -1
  80. package/velt-video-player.js +1 -1
  81. package/velt-views.js +3 -3
  82. package/velt.d.ts +2 -3
  83. package/velt.js +268 -26
  84. package/chunk-5B5CQEDX.js +0 -1
  85. package/chunk-APIRNTKO.js +0 -1
  86. package/chunk-AVMLJMVU.js +0 -1
  87. package/chunk-BLIJMW4Z.js +0 -13
  88. package/chunk-BY627CV6.js +0 -1
  89. package/chunk-J7HMAXBH.js +0 -193
  90. package/chunk-JWLHBAMV.js +0 -167
@@ -1,9 +1,8 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { Config, DisableLogsConfig } from "../models/data/config.data.model";
4
3
  import { DocumentUser } from "../models/data/document-user.data.model";
5
4
  import { Location } from "../models/data/location.model";
6
- import { User, UserOptions, VeltAuthProvider, VeltPermissionProvider } from "../models/data/user.data.model";
5
+ import { User, Options, VeltAuthProvider, VeltPermissionProvider } from "../models/data/user.data.model";
7
6
  import { CustomCss } from "../models/data/custom-css.data.model";
8
7
  import { ActivityElement } from "../models/element/activity-element.model";
9
8
  import { AreaElement } from "../models/element/area-element.model";
@@ -40,7 +39,7 @@ import { HeartbeatConfig, Heartbeat, GetHeartbeatResponse } from "../models/data
40
39
  export declare class Snippyly {
41
40
  constructor();
42
41
  initConfig: (apiKey: string, config?: Config) => void;
43
- identify: (user: User, userOptions?: UserOptions) => Promise<unknown>;
42
+ identify: (user: User, userOptions?: Options) => Promise<unknown>;
44
43
  setVeltAuthProvider: (veltAuthProvider: VeltAuthProvider) => Promise<User | null>;
45
44
  /**
46
45
  * Tell us who the currently logged in user is.
@@ -89,6 +89,10 @@ export type CommentEventTypesMap = {
89
89
  [CommentEventTypes.COMMENT_TOOL_CLICKED]: CommentToolClickedEvent;
90
90
  [CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
91
91
  [CommentEventTypes.SIDEBAR_BUTTON_CLICKED]: SidebarButtonClickedEvent;
92
+ [CommentEventTypes.SIDEBAR_OPEN]: SidebarOpenEvent;
93
+ [CommentEventTypes.SIDEBAR_CLOSE]: SidebarCloseEvent;
94
+ [CommentEventTypes.COMMENT_CLICK]: CommentClickEvent;
95
+ [CommentEventTypes.COMMENT_NAVIGATION_BUTTON_CLICK]: CommentNavigationButtonClickEvent;
92
96
  [CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
93
97
  [CommentEventTypes.COMMENT_SAVED]: CommentSavedEvent;
94
98
  [CommentEventTypes.COMMENT_SAVE_TRIGGERED]: CommentSaveTriggeredEvent;
@@ -347,6 +351,31 @@ export interface SidebarButtonClickEvent {
347
351
  }
348
352
  export interface SidebarButtonClickedEvent extends SidebarButtonClickEvent {
349
353
  }
354
+ /** Fired when the comment sidebar opens. Subscribe via `commentElement.on('sidebarOpen')`. */
355
+ export interface SidebarOpenEvent {
356
+ metadata?: VeltEventMetadata;
357
+ }
358
+ /** Fired when the comment sidebar closes. Subscribe via `commentElement.on('sidebarClose')`. */
359
+ export interface SidebarCloseEvent {
360
+ metadata?: VeltEventMetadata;
361
+ }
362
+ /** Fired when a comment is clicked in the sidebar list. Subscribe via `commentElement.on('commentClick')`. */
363
+ export interface CommentClickEvent {
364
+ documentId?: string | null;
365
+ location?: Location | null;
366
+ targetElementId?: string | null;
367
+ context?: {
368
+ [key: string]: any;
369
+ };
370
+ annotation?: CommentAnnotation;
371
+ metadata?: VeltEventMetadata;
372
+ }
373
+ /**
374
+ * Fired when the navigation ("go to") button on a sidebar comment is clicked.
375
+ * Subscribe via `commentElement.on('commentNavigationButtonClick')`.
376
+ */
377
+ export interface CommentNavigationButtonClickEvent extends CommentClickEvent {
378
+ }
350
379
  export interface AttachmentDownloadClickedEvent {
351
380
  annotationId: string;
352
381
  commentAnnotation: CommentAnnotation;
@@ -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') */
@@ -39,4 +39,5 @@ export interface PartialReactionAnnotation {
39
39
  metadata?: BaseMetadata;
40
40
  icon?: string;
41
41
  from?: PartialUser;
42
+ [key: string]: any;
42
43
  }
@@ -21,14 +21,16 @@ export declare class Selection {
21
21
  pageInfo: PageInfo;
22
22
  timestamp: number;
23
23
  }
24
- export declare enum UserIndicatorPosition {
25
- Start = "start",
26
- End = "end"
27
- }
28
- export declare enum UserIndicatorType {
29
- Avatar = "avatar",
30
- Label = "label"
31
- }
24
+ export declare const UserIndicatorPosition: {
25
+ readonly Start: "start";
26
+ readonly End: "end";
27
+ };
28
+ export type UserIndicatorPosition = (typeof UserIndicatorPosition)[keyof typeof UserIndicatorPosition];
29
+ export declare const UserIndicatorType: {
30
+ readonly Avatar: "avatar";
31
+ readonly Label: "label";
32
+ };
33
+ export type UserIndicatorType = (typeof UserIndicatorType)[keyof typeof UserIndicatorType];
32
34
  export declare class LiveSelectionData {
33
35
  [userIdHash: string]: Selection;
34
36
  }
@@ -61,12 +61,14 @@ export interface GetUserPermissionsResponse {
61
61
  };
62
62
  };
63
63
  }
64
- export declare enum UserPermissionAccessRole {
65
- EDITOR = "editor",
66
- VIEWER = "viewer"
67
- }
68
- export declare enum UserPermissionAccessRoleResult {
69
- DOES_NOT_EXIST = "does_not_exist",
70
- PERMISSION_DENIED = "permission_denied",
71
- SOMETHING_WENT_WRONG = "something_went_wrong"
72
- }
64
+ export declare const UserPermissionAccessRole: {
65
+ readonly EDITOR: "editor";
66
+ readonly VIEWER: "viewer";
67
+ };
68
+ export type UserPermissionAccessRole = (typeof UserPermissionAccessRole)[keyof typeof UserPermissionAccessRole];
69
+ export declare const UserPermissionAccessRoleResult: {
70
+ readonly DOES_NOT_EXIST: "does_not_exist";
71
+ readonly PERMISSION_DENIED: "permission_denied";
72
+ readonly SOMETHING_WENT_WRONG: "something_went_wrong";
73
+ };
74
+ export type UserPermissionAccessRoleResult = (typeof UserPermissionAccessRoleResult)[keyof typeof UserPermissionAccessRoleResult];
@@ -125,18 +125,20 @@ export interface VeltAuthProvider {
125
125
  generateToken?: () => Promise<string>;
126
126
  onError?: (err: unknown) => void;
127
127
  }
128
- export declare enum RevokeAccessOnType {
129
- DOCUMENT_UNSET = "document_unset",
130
- USER_LOGOUT = "user_logout"
131
- }
132
- export declare enum PermissionSource {
133
- SET_DOCUMENTS = "setDocuments",
134
- IDENTIFY = "identify",
135
- GET_NOTIFICATIONS = "getNotifications",
136
- SET_NOTIFICATIONS = "setNotifications",
137
- REVOKE_ACCESS_ON_USER_LOGOUT = "revokeAccessOnUserLogout",
138
- REVOKE_ACCESS_ON_DOCUMENT_UNSET = "revokeAccessOnDocumentUnset"
139
- }
128
+ export declare const RevokeAccessOnType: {
129
+ readonly DOCUMENT_UNSET: "document_unset";
130
+ readonly USER_LOGOUT: "user_logout";
131
+ };
132
+ export type RevokeAccessOnType = (typeof RevokeAccessOnType)[keyof typeof RevokeAccessOnType];
133
+ export declare const PermissionSource: {
134
+ readonly SET_DOCUMENTS: "setDocuments";
135
+ readonly IDENTIFY: "identify";
136
+ readonly GET_NOTIFICATIONS: "getNotifications";
137
+ readonly SET_NOTIFICATIONS: "setNotifications";
138
+ readonly REVOKE_ACCESS_ON_USER_LOGOUT: "revokeAccessOnUserLogout";
139
+ readonly REVOKE_ACCESS_ON_DOCUMENT_UNSET: "revokeAccessOnDocumentUnset";
140
+ };
141
+ export type PermissionSource = (typeof PermissionSource)[keyof typeof PermissionSource];
140
142
  export interface RevokeAccessOn {
141
143
  type: RevokeAccessOnType;
142
144
  revokeOrganizationAccess?: boolean;
@@ -192,12 +194,13 @@ export interface PermissionResolverRequest {
192
194
  requests: PermissionQuery[];
193
195
  };
194
196
  }
195
- export declare enum PermissionResourceType {
196
- FOLDER = "folder",
197
- DOCUMENT = "document",
198
- ORGANIZATION = "organization",
199
- CONTEXT = "context"
200
- }
197
+ export declare const PermissionResourceType: {
198
+ readonly FOLDER: "folder";
199
+ readonly DOCUMENT: "document";
200
+ readonly ORGANIZATION: "organization";
201
+ readonly CONTEXT: "context";
202
+ };
203
+ export type PermissionResourceType = (typeof PermissionResourceType)[keyof typeof PermissionResourceType];
201
204
  export interface PermissionQuery {
202
205
  userId: string;
203
206
  resource: {
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { ActivityRecord, ActivitySubscribeConfig, CreateActivityData } from "../data/activity.data.model";
4
3
 
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  export declare class AreaElement {
3
2
  /**
4
3
  * To enable area feature
@@ -1,10 +1,9 @@
1
- // @ts-nocheck
2
1
  export declare class ArrowElement {
3
2
  /**
4
3
  * To allow arrow in specific elements only
5
4
  * @param elementIds Element ids to be allowed for arrow
6
5
  */
7
- public allowedElementIds: (elementIds: string[]) => any;
6
+ public allowedElementIds: (elementIds: string[]) => void;
8
7
 
9
8
  constructor();
10
9
 
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { AutocompleteData, AutocompleteChipData } from "../data/autocomplete.data.model";
4
3
  export declare class AutocompleteElement {