@veltdev/sdk 5.0.2-beta.3 → 5.0.2-beta.31

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 (45) hide show
  1. package/app/client/snippyly.model.d.ts +16 -1
  2. package/app/models/data/activity-resolver.data.model.d.ts +27 -0
  3. package/app/models/data/activity.data.model.d.ts +179 -0
  4. package/app/models/data/attachment-resolver.data.model.d.ts +2 -2
  5. package/app/models/data/attachment.model.d.ts +1 -0
  6. package/app/models/data/autocomplete.data.model.d.ts +4 -3
  7. package/app/models/data/base-metadata.data.model.d.ts +3 -0
  8. package/app/models/data/comment-actions.data.model.d.ts +4 -0
  9. package/app/models/data/comment-annotation.data.model.d.ts +11 -2
  10. package/app/models/data/comment-events.data.model.d.ts +11 -2
  11. package/app/models/data/comment-resolver.data.model.d.ts +3 -3
  12. package/app/models/data/comment-sidebar-config.model.d.ts +2 -0
  13. package/app/models/data/config.data.model.d.ts +26 -0
  14. package/app/models/data/core-events.data.model.d.ts +72 -0
  15. package/app/models/data/crdt.data.model.d.ts +51 -0
  16. package/app/models/data/document-paths.data.model.d.ts +1 -0
  17. package/app/models/data/document.data.model.d.ts +2 -0
  18. package/app/models/data/live-state-events.data.model.d.ts +6 -0
  19. package/app/models/data/notification-resolver.data.model.d.ts +39 -0
  20. package/app/models/data/notification.model.d.ts +4 -0
  21. package/app/models/data/presence-user.data.model.d.ts +5 -0
  22. package/app/models/data/provider.data.model.d.ts +6 -0
  23. package/app/models/data/reaction-resolver.data.model.d.ts +3 -3
  24. package/app/models/data/recorder-annotation.data.model.d.ts +11 -0
  25. package/app/models/data/recorder-events.data.model.d.ts +3 -0
  26. package/app/models/data/recorder-resolver.data.model.d.ts +58 -0
  27. package/app/models/data/resolver.data.model.d.ts +1 -0
  28. package/app/models/data/rewriter-events.data.model.d.ts +44 -0
  29. package/app/models/data/suggestion-events.data.model.d.ts +57 -0
  30. package/app/models/data/suggestion.data.model.d.ts +267 -0
  31. package/app/models/data/user-resolver.data.model.d.ts +2 -0
  32. package/app/models/data/user.data.model.d.ts +3 -0
  33. package/app/models/element/activity-element.model.d.ts +33 -0
  34. package/app/models/element/comment-element.model.d.ts +48 -8
  35. package/app/models/element/crdt-element.model.d.ts +88 -1
  36. package/app/models/element/presence-element.model.d.ts +25 -0
  37. package/app/models/element/rewriter-element.model.d.ts +20 -0
  38. package/app/models/element/suggestion-element.model.d.ts +180 -0
  39. package/app/utils/constants.d.ts +224 -0
  40. package/app/utils/enums.d.ts +36 -3
  41. package/models.d.ts +7 -0
  42. package/package.json +1 -1
  43. package/types.d.ts +2 -0
  44. package/velt.css +1 -1
  45. package/velt.js +131 -143
@@ -5,6 +5,7 @@ import { DocumentUser } from "../models/data/document-user.data.model";
5
5
  import { Location } from "../models/data/location.model";
6
6
  import { User, UserOptions, VeltAuthProvider, VeltPermissionProvider } from "../models/data/user.data.model";
7
7
  import { CustomCss } from "../models/data/custom-css.data.model";
8
+ import { ActivityElement } from "../models/element/activity-element.model";
8
9
  import { AreaElement } from "../models/element/area-element.model";
9
10
  import { ArrowElement } from "../models/element/arrow-element.model";
10
11
  import { CommentElement } from "../models/element/comment-element.model";
@@ -232,6 +233,10 @@ export declare class Snippyly {
232
233
  * Get the Autocomplete Object.
233
234
  */
234
235
  getAutocompleteElement: () => AutocompleteElement;
236
+ /**
237
+ * Get the Activity Element Object.
238
+ */
239
+ getActivityElement: () => ActivityElement;
235
240
  /**
236
241
  * Get the Area Object.
237
242
  */
@@ -360,7 +365,7 @@ export declare class Snippyly {
360
365
  /**
361
366
  * To update user contact list.
362
367
  */
363
- updateContactList: (userContacts: UserContact[], config?: { merge: boolean }) => void;
368
+ updateContactList: (userContacts: UserContact[], config?: { merge: boolean, filters?: boolean }) => void;
364
369
 
365
370
  /**
366
371
  * To get document metadata.
@@ -403,6 +408,16 @@ export declare class Snippyly {
403
408
  */
404
409
  disableSafeEval: () => void;
405
410
 
411
+ /**
412
+ * Enable Firestore persistent cache for offline support.
413
+ */
414
+ enableFirestorePersistentCache: (config?: { ha?: boolean }) => void;
415
+
416
+ /**
417
+ * Disable Firestore persistent cache.
418
+ */
419
+ disableFirestorePersistentCache: (config?: { ha?: boolean }) => void;
420
+
406
421
  /**
407
422
  * To reset the button toggle map.
408
423
  */
@@ -0,0 +1,27 @@
1
+ import { BaseMetadata } from './base-metadata.data.model';
2
+ import { ActivityChanges } from './activity.data.model';
3
+ import { ResolverConfig, ResolverResponse } from './resolver.data.model';
4
+ export interface PartialActivityRecord {
5
+ id: string;
6
+ metadata?: BaseMetadata;
7
+ changes?: ActivityChanges;
8
+ entityData?: unknown;
9
+ entityTargetData?: unknown;
10
+ displayMessageTemplateData?: Record<string, unknown>;
11
+ [key: string]: any;
12
+ }
13
+ export interface ActivityAnnotationDataProvider {
14
+ get?: (request: GetActivityResolverRequest) => Promise<ResolverResponse<Record<string, PartialActivityRecord>>>;
15
+ save?: (request: SaveActivityResolverRequest) => Promise<ResolverResponse<undefined>>;
16
+ config?: ResolverConfig;
17
+ }
18
+ export interface GetActivityResolverRequest {
19
+ activityIds?: string[];
20
+ documentIds?: string[];
21
+ organizationId?: string;
22
+ }
23
+ export interface SaveActivityResolverRequest {
24
+ activity: Record<string, PartialActivityRecord>;
25
+ event?: string;
26
+ metadata?: BaseMetadata;
27
+ }
@@ -0,0 +1,179 @@
1
+ import { Observable } from 'rxjs';
2
+ import { BaseMetadata } from './base-metadata.data.model';
3
+ import { User } from './user.data.model';
4
+ /**
5
+ * Feature types that can generate activities.
6
+ */
7
+ export type ActivityFeatureType = 'comment' | 'reaction' | 'recorder' | 'crdt' | 'custom';
8
+ /**
9
+ * Comment action type constants following the `entity_type.action` naming pattern.
10
+ * Annotation-level actions use `comment_annotation.*`, comment-level use `comment.*`.
11
+ */
12
+ export declare const CommentActivityActionTypes: {
13
+ readonly ANNOTATION_ADD: "comment_annotation.add";
14
+ readonly ANNOTATION_DELETE: "comment_annotation.delete";
15
+ readonly COMMENT_ADD: "comment.add";
16
+ readonly COMMENT_UPDATE: "comment.update";
17
+ readonly COMMENT_DELETE: "comment.delete";
18
+ readonly STATUS_CHANGE: "comment_annotation.status_change";
19
+ readonly PRIORITY_CHANGE: "comment_annotation.priority_change";
20
+ readonly ASSIGN: "comment_annotation.assign";
21
+ readonly ACCESS_MODE_CHANGE: "comment_annotation.access_mode_change";
22
+ readonly CUSTOM_LIST_CHANGE: "comment_annotation.custom_list_change";
23
+ readonly APPROVE: "comment_annotation.approve";
24
+ readonly ACCEPT: "comment.accept";
25
+ readonly REJECT: "comment.reject";
26
+ readonly REACTION_ADD: "comment.reaction_add";
27
+ readonly REACTION_DELETE: "comment.reaction_delete";
28
+ readonly SUBSCRIBE: "comment_annotation.subscribe";
29
+ readonly UNSUBSCRIBE: "comment_annotation.unsubscribe";
30
+ };
31
+ export type CommentActivityActionType = typeof CommentActivityActionTypes[keyof typeof CommentActivityActionTypes];
32
+ /**
33
+ * Recorder action type constants following the `recording.*` naming pattern.
34
+ */
35
+ export declare const RecorderActivityActionTypes: {
36
+ readonly RECORDING_ADD: "recording.add";
37
+ readonly RECORDING_DELETE: "recording.delete";
38
+ };
39
+ export type RecorderActivityActionType = typeof RecorderActivityActionTypes[keyof typeof RecorderActivityActionTypes];
40
+ /**
41
+ * Reaction action type constants following the `reaction.*` naming pattern.
42
+ */
43
+ export declare const ReactionActivityActionTypes: {
44
+ readonly REACTION_ADD: "reaction.add";
45
+ readonly REACTION_DELETE: "reaction.delete";
46
+ };
47
+ export type ReactionActivityActionType = typeof ReactionActivityActionTypes[keyof typeof ReactionActivityActionTypes];
48
+ /**
49
+ * CRDT action type constants following the `crdt.*` naming pattern.
50
+ */
51
+ export declare const CrdtActivityActionTypes: {
52
+ readonly EDITOR_EDIT: "crdt.editor_edit";
53
+ };
54
+ export type CrdtActivityActionType = typeof CrdtActivityActionTypes[keyof typeof CrdtActivityActionTypes];
55
+ /**
56
+ * Represents a single from/to change pair.
57
+ * `from` is always present (null for 'added' events) for uniform structure.
58
+ */
59
+ export interface ActivityChange<T = unknown> {
60
+ from?: T | null;
61
+ to?: T | null;
62
+ }
63
+ /**
64
+ * Dynamic change tracking. Keys are domain-specific (e.g., 'status', 'commentText', 'assignedTo').
65
+ * No fixed keys — activities span multiple features.
66
+ */
67
+ export interface ActivityChanges {
68
+ [key: string]: ActivityChange | undefined;
69
+ }
70
+ /**
71
+ * Metadata for activity records. Extends BaseMetadata with denormalized IDs
72
+ * for efficient querying at the organization level.
73
+ */
74
+ export declare class ActivityMetadata extends BaseMetadata {
75
+ [key: string]: any;
76
+ }
77
+ /**
78
+ * Core activity record representing a single activity event.
79
+ *
80
+ * @typeParam TEntity - Type of the parent entity snapshot (e.g., CommentAnnotation)
81
+ * @typeParam TTarget - Type of the sub-entity snapshot (e.g., Comment)
82
+ */
83
+ export declare class ActivityRecord<TEntity = unknown, TTarget = unknown> {
84
+ /** Auto-generated unique ID */
85
+ id: string;
86
+ /** Feature that generated this activity */
87
+ featureType: ActivityFeatureType;
88
+ /** Action that occurred, following `entity_type.action` pattern */
89
+ actionType: string;
90
+ /** Event type that occurred */
91
+ eventType?: string;
92
+ /** User who performed the action */
93
+ actionUser: User;
94
+ /** Server timestamp (set by backend) */
95
+ timestamp: number;
96
+ /** Denormalized IDs for querying */
97
+ metadata: ActivityMetadata;
98
+ /** ID of the parent entity (annotationId, recordingId, etc.) */
99
+ targetEntityId: string;
100
+ /** ID of the sub-entity acted on (commentId within annotation, null for entity-level actions) */
101
+ targetSubEntityId?: string | null;
102
+ /** Linear-style from/to change pairs */
103
+ changes?: ActivityChanges;
104
+ /** Full parent entity snapshot at time of action */
105
+ entityData?: TEntity;
106
+ /** Sub-entity snapshot (or user-provided data for custom activities) */
107
+ entityTargetData?: TTarget;
108
+ /** Display message template — ONLY for custom activities */
109
+ displayMessageTemplate?: string;
110
+ /** Template variable values — ONLY for custom activities */
111
+ displayMessageTemplateData?: Record<string, unknown>;
112
+ /** Computed display message (generated client-side, never stored in Firestore) */
113
+ displayMessage?: string;
114
+ /** Icon URL or identifier for display */
115
+ actionIcon?: string;
116
+ /** If true, this activity cannot be updated or deleted via REST API */
117
+ immutable?: boolean;
118
+ /** If true, this activity was stripped by the activity resolver (for UI loading states) */
119
+ isActivityResolverUsed?: boolean;
120
+ }
121
+ /**
122
+ * Configuration for subscribing to activities.
123
+ * Behavior is determined by the props passed:
124
+ * - No config → org-wide
125
+ * - documentIds → specific documents
126
+ * - currentDocumentOnly → current document only
127
+ */
128
+ export interface ActivitySubscribeConfig {
129
+ /** Subscribe to activities for a specific organization (defaults to current org) */
130
+ organizationId?: string;
131
+ /** Subscribe to activities for specific document IDs */
132
+ documentIds?: string[];
133
+ /** Subscribe to activities for the current document only (auto-switches on setDocument) */
134
+ currentDocumentOnly?: boolean;
135
+ /** Only fetch activities from the last N days (default: 30) */
136
+ maxDays?: number;
137
+ /** Allowlist: only include activities with these feature types */
138
+ featureTypes?: ActivityFeatureType[];
139
+ /** Disallowlist: exclude activities with these feature types (ignored if featureTypes is set) */
140
+ excludeFeatureTypes?: ActivityFeatureType[];
141
+ /** Allowlist: only include activities with these action types */
142
+ actionTypes?: string[];
143
+ /** Disallowlist: exclude activities with these action types (ignored if actionTypes is set) */
144
+ excludeActionTypes?: string[];
145
+ /** Allowlist: only include activities by these user IDs */
146
+ userIds?: string[];
147
+ /** Disallowlist: exclude activities by these user IDs (ignored if userIds is set) */
148
+ excludeUserIds?: string[];
149
+ }
150
+ /**
151
+ * Represents an active activity subscription.
152
+ * Returned by `activityService.subscribe()`.
153
+ */
154
+ export interface ActivitySubscription {
155
+ /** Observable stream of activities for this subscription's scope. null = not yet loaded. */
156
+ getActivities$(): Observable<ActivityRecord[] | null>;
157
+ /** Unsubscribe and clean up this subscription */
158
+ unsubscribe(): void;
159
+ }
160
+ /**
161
+ * Data required to create an activity.
162
+ * Used for all activity types: comment, reaction, recorder, custom, etc.
163
+ */
164
+ export interface CreateActivityData<TEntity = unknown, TTarget = unknown> {
165
+ featureType: ActivityFeatureType;
166
+ actionType: string;
167
+ eventType?: string;
168
+ targetEntityId: string;
169
+ targetSubEntityId?: string | null;
170
+ changes?: ActivityChanges;
171
+ entityData?: TEntity;
172
+ entityTargetData?: TTarget;
173
+ /** Icon URL or identifier — typically used for custom activities */
174
+ actionIcon?: string;
175
+ /** Display message template — only for custom activities */
176
+ displayMessageTemplate?: string;
177
+ /** Template variable values — only for custom activities */
178
+ displayMessageTemplateData?: Record<string, unknown>;
179
+ }
@@ -1,8 +1,8 @@
1
1
  import { ResolverActions } from "../../utils/enums";
2
2
  import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
3
3
  export interface AttachmentDataProvider {
4
- save: (request: SaveAttachmentResolverRequest) => Promise<ResolverResponse<SaveAttachmentResolverData>>;
5
- delete: (request: DeleteAttachmentResolverRequest) => Promise<ResolverResponse<undefined>>;
4
+ save?: (request: SaveAttachmentResolverRequest) => Promise<ResolverResponse<SaveAttachmentResolverData>>;
5
+ delete?: (request: DeleteAttachmentResolverRequest) => Promise<ResolverResponse<undefined>>;
6
6
  config?: ResolverConfig;
7
7
  }
8
8
  export interface DeleteAttachmentResolverRequest {
@@ -53,6 +53,7 @@ export interface UploadFileOptions {
53
53
  file: File;
54
54
  useAttachmentResolver?: boolean;
55
55
  metadata?: any;
56
+ attachmentScope?: string;
56
57
  }
57
58
  export interface UploadFileData {
58
59
  files: File[];
@@ -22,19 +22,20 @@ export declare class AutocompleteItem {
22
22
  groupId?: string;
23
23
  }
24
24
  export declare class AutocompleteReplaceData {
25
- text: string;
25
+ text?: string;
26
26
  custom: AutocompleteItem;
27
27
  }
28
28
  export declare class AutocompleteGroupReplaceData {
29
- text: string;
29
+ text?: string;
30
30
  groupId: string;
31
31
  clientGroupId: string;
32
32
  group?: OrganizationUserGroup;
33
33
  }
34
34
  export declare class AutocompleteUserContactReplaceData {
35
- text: string;
35
+ text?: string;
36
36
  userId: string;
37
37
  contact?: UserContact;
38
+ isEmailValid?: boolean;
38
39
  }
39
40
  export declare class AutocompleteGroup {
40
41
  id: string;
@@ -1,3 +1,4 @@
1
+ import { DocumentMetadata } from './document-metadata.model';
1
2
  export declare class BaseMetadata {
2
3
  apiKey?: string;
3
4
  documentId?: string;
@@ -6,4 +7,6 @@ export declare class BaseMetadata {
6
7
  clientOrganizationId?: string;
7
8
  folderId?: string;
8
9
  veltFolderId?: string;
10
+ documentMetadata?: DocumentMetadata;
11
+ sdkVersion?: string | null;
9
12
  }
@@ -121,6 +121,8 @@ export interface CommentRequestQuery {
121
121
  batchedPerDocument?: boolean;
122
122
  /** Debounce time in ms for batchedPerDocument mode (default: 5000). */
123
123
  debounceMs?: number;
124
+ /** Filter annotations by agent fields. Matches annotations where `agent.agentFields` array contains any of the provided values. */
125
+ agentFields?: string[];
124
126
  }
125
127
  export interface SubscribeCommentAnnotationRequest {
126
128
  annotationId: string;
@@ -141,6 +143,8 @@ export interface AddCommentRequest {
141
143
  assignedTo?: User;
142
144
  assigned?: boolean;
143
145
  options?: RequestOptions;
146
+ /** Optional visibility configuration for the comment */
147
+ visibility?: CommentVisibilityConfig;
144
148
  }
145
149
  export interface UpdateCommentRequest {
146
150
  annotationId: string;
@@ -1,4 +1,4 @@
1
- import { CommentAccessMode } from "../../utils/enums";
1
+ import { CommentAccessMode, CommentVisibilityOptionType } from "../../utils/enums";
2
2
  import { BaseMetadata } from "./base-metadata.data.model";
3
3
  import { CommentVisibilityType } from "./comment-actions.data.model";
4
4
  import { Comment } from "./comment.data.model";
@@ -7,6 +7,7 @@ import { CustomAnnotationDropdownItem } from "./custom-chip-dropdown.data.model"
7
7
  import { CustomCategory, CustomPriority, CustomStatus } from "./custom-filter.data.model";
8
8
  import { Location } from "./location.model";
9
9
  import { PageInfo } from "./page-info.model";
10
+ import { SuggestionData } from "./suggestion.data.model";
10
11
  import { TargetElement } from "./target-element.data.model";
11
12
  import { TargetTextRange } from "./target-text-range.data.model";
12
13
  import { User } from "./user.data.model";
@@ -199,6 +200,13 @@ export declare class CommentAnnotation {
199
200
  viewedByUserIds?: string[];
200
201
  viewedBy?: User[];
201
202
  unread?: boolean;
203
+ /**
204
+ * SDK-managed suggestion data. Present iff type === 'suggestion'.
205
+ * Customer code must not write to this directly — use the SuggestionElement API.
206
+ *
207
+ * See docs/suggestions-api-contract.md for the full storage model.
208
+ */
209
+ suggestion?: SuggestionData;
202
210
  }
203
211
  export declare class GhostComment {
204
212
  targetElement?: TargetElement | null;
@@ -241,7 +249,8 @@ export declare class CommentSelectionChangeData {
241
249
  }
242
250
  export declare class VisibilityOptionClickedData {
243
251
  annotationId: string;
244
- visibility: 'public' | 'private';
252
+ visibility: CommentVisibilityOptionType;
253
+ users?: any[];
245
254
  }
246
255
  export declare class InlineCommentSectionConfig {
247
256
  id: string;
@@ -1,4 +1,4 @@
1
- import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
1
+ import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus, CommentVisibilityOptionType } from "../../utils/enums";
2
2
  import { Attachment } from "./attachment.model";
3
3
  import { VeltButtonClickEvent } from "./button.data.model";
4
4
  import { AddAttachmentResponse } from "./comment-actions.data.model";
@@ -67,6 +67,7 @@ export type CommentEventTypesMap = {
67
67
  [CommentEventTypes.UPDATE_ACCESS]: UpdateAccessEvent;
68
68
  [CommentEventTypes.RESOLVE_COMMENT]: ResolveCommentEvent;
69
69
  [CommentEventTypes.ADD_COMMENT]: AddCommentEvent;
70
+ [CommentEventTypes.ADD_COMMENT_DRAFT]: AddCommentDraftEvent;
70
71
  [CommentEventTypes.UPDATE_COMMENT]: UpdateCommentEvent;
71
72
  [CommentEventTypes.DELETE_COMMENT]: DeleteCommentEvent;
72
73
  [CommentEventTypes.ADD_ATTACHMENT]: AddAttachmentEvent;
@@ -181,6 +182,12 @@ export interface AddCommentEvent {
181
182
  comment: Comment;
182
183
  metadata: VeltEventMetadata;
183
184
  }
185
+ export interface AddCommentDraftEvent {
186
+ annotationId: string;
187
+ commentAnnotation: CommentAnnotation;
188
+ comment: Comment;
189
+ metadata: VeltEventMetadata;
190
+ }
184
191
  export interface CommentSavedEvent {
185
192
  annotationId: string;
186
193
  commentAnnotation: CommentAnnotation;
@@ -188,6 +195,7 @@ export interface CommentSavedEvent {
188
195
  }
189
196
  export interface CommentSaveTriggeredEvent {
190
197
  annotationId: string;
198
+ commentAnnotation: CommentAnnotation;
191
199
  metadata: VeltEventMetadata;
192
200
  }
193
201
  export interface UpdateCommentEvent {
@@ -332,6 +340,7 @@ export interface AttachmentDownloadClickedEvent {
332
340
  export interface VisibilityOptionClickedEvent {
333
341
  annotationId: string;
334
342
  commentAnnotation: CommentAnnotation;
335
- visibility: 'public' | 'private';
343
+ visibility: CommentVisibilityOptionType;
344
+ users?: any[];
336
345
  metadata?: VeltEventMetadata;
337
346
  }
@@ -4,9 +4,9 @@ import { BaseMetadata } from "./base-metadata.data.model";
4
4
  import { CommentAnnotation } from "./comment-annotation.data.model";
5
5
  import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
6
6
  export interface CommentAnnotationDataProvider {
7
- get: (request: GetCommentResolverRequest) => Promise<ResolverResponse<Record<string, PartialCommentAnnotation>>>;
8
- save: (request: SaveCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
9
- delete: (request: DeleteCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
7
+ get?: (request: GetCommentResolverRequest) => Promise<ResolverResponse<Record<string, PartialCommentAnnotation>>>;
8
+ save?: (request: SaveCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
9
+ delete?: (request: DeleteCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
10
10
  config?: ResolverConfig;
11
11
  }
12
12
  export interface GetCommentResolverRequest {
@@ -1,3 +1,4 @@
1
+ import { CommentAccessMode } from "../../utils/enums";
1
2
  import { CommentAnnotation } from "./comment-annotation.data.model";
2
3
  import { UnreadCommentsMap } from "./comment-utils.data.model";
3
4
  import { CustomFilters } from "./custom-filter.data.model";
@@ -64,6 +65,7 @@ export declare class CommentSidebarFilters {
64
65
  priority?: string[];
65
66
  status?: string[];
66
67
  category?: string[];
68
+ accessModes?: CommentAccessMode[];
67
69
  version?: {
68
70
  id: string;
69
71
  name?: string;
@@ -51,6 +51,7 @@ export declare class Config {
51
51
  advancedQueriesDisabled?: boolean;
52
52
  /**
53
53
  * The domain of the API proxy.
54
+ * @deprecated Use `proxyConfig.apiHost` instead.
54
55
  */
55
56
  apiProxyDomain?: string;
56
57
  /**
@@ -61,6 +62,26 @@ export declare class Config {
61
62
  * Default: true
62
63
  */
63
64
  globalStyles?: boolean;
65
+ /**
66
+ * Configuration for routing all traffic through reverse proxies.
67
+ */
68
+ proxyConfig?: ProxyConfig;
69
+ }
70
+ export interface ProxyConfig {
71
+ /** Custom host for the Velt CDN (e.g., 'cdn-proxy.customer.com') */
72
+ cdnHost?: string;
73
+ /** Custom host for the Velt API (e.g., 'api-proxy.customer.com') */
74
+ apiHost?: string;
75
+ /** Custom host for Firestore (e.g., 'firestore-proxy.customer.com') */
76
+ v2DbHost?: string;
77
+ /** Custom host for Firebase RTDB (e.g., 'rtdb-proxy.customer.com'). Replaces the firebaseio.com domain in all RTDB URLs. */
78
+ v1DbHost?: string;
79
+ /** Custom host for Firebase Storage (e.g., 'storage-proxy.customer.com'). Replaces firebasestorage.googleapis.com. */
80
+ storageHost?: string;
81
+ /** Custom host for Firebase Auth (e.g., 'auth-proxy.customer.com'). Replaces identitytoolkit.googleapis.com and securetoken.googleapis.com. */
82
+ authHost?: string;
83
+ /** Force long-polling for Firestore and RTDB instead of WebSocket. Default: false (WebSocket). */
84
+ forceLongPolling?: boolean;
64
85
  }
65
86
  export interface ExtendedFirebaseOptions extends FirebaseOptions {
66
87
  storeDbId: string;
@@ -76,4 +97,9 @@ export interface DisableLogsConfig {
76
97
  }
77
98
  export interface GetProjectConfigResponse {
78
99
  isPrivateCommentsEnabled: boolean;
100
+ activityConfig?: ActivityConfig;
101
+ }
102
+ export interface ActivityConfig {
103
+ immutable: boolean;
104
+ isEnabled: boolean;
79
105
  }
@@ -7,6 +7,9 @@ export type CoreEventTypesMap = {
7
7
  [CoreEventTypes.COMMENT_RESOLVER]: CommentResolverEvent;
8
8
  [CoreEventTypes.ATTACHMENT_RESOLVER]: AttachmentResolverEvent;
9
9
  [CoreEventTypes.REACTION_RESOLVER]: ReactionResolverEvent;
10
+ [CoreEventTypes.RECORDER_RESOLVER]: RecorderResolverEvent;
11
+ [CoreEventTypes.NOTIFICATION_RESOLVER]: NotificationResolverEvent;
12
+ [CoreEventTypes.ACTIVITY_RESOLVER]: ActivityResolverEvent;
10
13
  [CoreEventTypes.VELT_BUTTON_CLICK]: VeltButtonClickEvent;
11
14
  [CoreEventTypes.USER_UPDATE]: UserUpdateEvent;
12
15
  [CoreEventTypes.DOCUMENT_INIT]: DocumentInitEvent;
@@ -147,6 +150,75 @@ export type ReactionResolverEventType = {
147
150
  REACTION_DELETE_RESULT: 'reactionDeleteResult';
148
151
  REACTION_DELETE_ERROR: 'reactionDeleteError';
149
152
  };
153
+ export declare enum RecorderResolverSource {
154
+ RESOLVE_RECORDER_ANNOTATIONS = "resolveRecorderAnnotations",
155
+ SAVE_RECORDER_ANNOTATION = "saveRecorderAnnotation",
156
+ DELETE_RECORDER_ANNOTATION = "deleteRecorderAnnotation",
157
+ FORMAT_RESPONSE = "formatResponse",
158
+ INIT_DOCUMENTS = "initDocuments",
159
+ SET_DATA = "setData",
160
+ UPDATE_DATA = "updateData",
161
+ DELETE_DATA = "deleteData"
162
+ }
163
+ export declare enum RecorderResolverModuleName {
164
+ GET_RECORDER_ANNOTATIONS = "getRecorderAnnotations"
165
+ }
166
+ export type RecorderResolverEvent = BaseResolverEvent<RecorderResolverEventType, RecorderResolverSource, RecorderResolverModuleName>;
167
+ export type RecorderResolverEventType = {
168
+ RECORDER_RESOLUTION_REQUEST_FORMED: 'recorderResolutionRequestFormed';
169
+ RECORDER_RESOLUTION_REQUEST_TRIGGERED: 'recorderResolutionRequestTriggered';
170
+ RECORDER_RESOLUTION_RESULT: 'recorderResolutionResult';
171
+ RECORDER_RESOLUTION_ERROR: 'recorderResolutionError';
172
+ RECORDER_RESOLUTION_RESULT_FROM_CACHE: 'recorderResolutionResultFromCache';
173
+ RECORDER_SAVE_REQUEST_FORMED: 'recorderSaveRequestFormed';
174
+ RECORDER_SAVE_REQUEST_TRIGGERED: 'recorderSaveRequestTriggered';
175
+ RECORDER_SAVE_RESULT: 'recorderSaveResult';
176
+ RECORDER_SAVE_ERROR: 'recorderSaveError';
177
+ RECORDER_DELETE_REQUEST_FORMED: 'recorderDeleteRequestFormed';
178
+ RECORDER_DELETE_REQUEST_TRIGGERED: 'recorderDeleteRequestTriggered';
179
+ RECORDER_DELETE_RESULT: 'recorderDeleteResult';
180
+ RECORDER_DELETE_ERROR: 'recorderDeleteError';
181
+ };
182
+ export declare enum NotificationResolverSource {
183
+ RESOLVE_NOTIFICATIONS = "resolveNotifications",
184
+ DELETE_NOTIFICATION = "deleteNotification",
185
+ DELETE_DATA = "deleteData",
186
+ FORMAT_RESPONSE = "formatResponse"
187
+ }
188
+ export declare enum NotificationResolverModuleName {
189
+ GET_NOTIFICATIONS = "getNotifications"
190
+ }
191
+ export type NotificationResolverEventType = {
192
+ NOTIFICATION_RESOLUTION_REQUEST_FORMED: 'notificationResolutionRequestFormed';
193
+ NOTIFICATION_RESOLUTION_REQUEST_TRIGGERED: 'notificationResolutionRequestTriggered';
194
+ NOTIFICATION_RESOLUTION_RESULT: 'notificationResolutionResult';
195
+ NOTIFICATION_RESOLUTION_ERROR: 'notificationResolutionError';
196
+ NOTIFICATION_DELETE_REQUEST_FORMED: 'notificationDeleteRequestFormed';
197
+ NOTIFICATION_DELETE_REQUEST_TRIGGERED: 'notificationDeleteRequestTriggered';
198
+ NOTIFICATION_DELETE_RESULT: 'notificationDeleteResult';
199
+ NOTIFICATION_DELETE_ERROR: 'notificationDeleteError';
200
+ };
201
+ export type NotificationResolverEvent = BaseResolverEvent<NotificationResolverEventType, NotificationResolverSource, NotificationResolverModuleName>;
202
+ export declare enum ActivityResolverSource {
203
+ RESOLVE_ACTIVITIES = "resolveActivities",
204
+ SAVE_ACTIVITY = "saveActivity",
205
+ FORMAT_RESPONSE = "formatResponse"
206
+ }
207
+ export declare enum ActivityResolverModuleName {
208
+ GET_ACTIVITIES = "getActivities"
209
+ }
210
+ export type ActivityResolverEventType = {
211
+ ACTIVITY_RESOLUTION_REQUEST_FORMED: 'activityResolutionRequestFormed';
212
+ ACTIVITY_RESOLUTION_REQUEST_TRIGGERED: 'activityResolutionRequestTriggered';
213
+ ACTIVITY_RESOLUTION_RESULT: 'activityResolutionResult';
214
+ ACTIVITY_RESOLUTION_ERROR: 'activityResolutionError';
215
+ ACTIVITY_RESOLUTION_RESULT_FROM_CACHE: 'activityResolutionResultFromCache';
216
+ ACTIVITY_SAVE_REQUEST_FORMED: 'activitySaveRequestFormed';
217
+ ACTIVITY_SAVE_REQUEST_TRIGGERED: 'activitySaveRequestTriggered';
218
+ ACTIVITY_SAVE_RESULT: 'activitySaveResult';
219
+ ACTIVITY_SAVE_ERROR: 'activitySaveError';
220
+ };
221
+ export type ActivityResolverEvent = BaseResolverEvent<ActivityResolverEventType, ActivityResolverSource, ActivityResolverModuleName>;
150
222
  export type ErrorEvent = {
151
223
  event?: string;
152
224
  sourceMethod?: string;
@@ -58,3 +58,54 @@ export interface CrdtDeleteVersionQuery {
58
58
  id: string;
59
59
  versionId: string;
60
60
  }
61
+ export interface CrdtPushMessageQuery {
62
+ id: string;
63
+ data: number[];
64
+ yjsClientId: number;
65
+ messageType?: 'sync' | 'awareness';
66
+ /** User-facing value for event emission only (not stored in database) */
67
+ eventData?: unknown;
68
+ /** Yjs data type: 'text' | 'map' | 'array' | 'xml' | 'xmltext' */
69
+ type?: string;
70
+ /** Content key used in Y.Doc shared types */
71
+ contentKey?: string;
72
+ /** Editor/library source: 'tiptap', 'plate', 'codemirror', etc. */
73
+ source?: string;
74
+ }
75
+ export interface CrdtOnMessageQuery {
76
+ id: string;
77
+ callback: (message: CrdtMessageData) => void;
78
+ afterTs?: number;
79
+ }
80
+ export interface CrdtMessageData {
81
+ data: number[];
82
+ yjsClientId: number;
83
+ timestamp: number;
84
+ }
85
+ export interface CrdtSnapshotData {
86
+ state?: Uint8Array | number[];
87
+ vector?: Uint8Array | number[];
88
+ timestamp?: number;
89
+ }
90
+ export interface CrdtGetSnapshotQuery {
91
+ id: string;
92
+ }
93
+ export interface CrdtSaveSnapshotQuery {
94
+ id: string;
95
+ state: Uint8Array | number[];
96
+ vector: Uint8Array | number[];
97
+ /** Yjs data type: 'text' | 'map' | 'array' | 'xml' | 'xmltext' */
98
+ type?: string;
99
+ /** Content key used in Y.Doc shared types */
100
+ contentKey?: string;
101
+ /** Editor/library source: 'tiptap', 'plate', 'codemirror', etc. */
102
+ source?: string;
103
+ }
104
+ export interface CrdtGetMessagesQuery {
105
+ id: string;
106
+ afterTs?: number;
107
+ }
108
+ export interface CrdtPruneMessagesQuery {
109
+ id: string;
110
+ beforeTs: number;
111
+ }
@@ -6,6 +6,7 @@ export declare class DocumentPaths {
6
6
  folderId?: string;
7
7
  locationId?: string;
8
8
  allDocuments?: boolean;
9
+ optimisticPermissions?: boolean;
9
10
  veltFolderId?: string;
10
11
  folder?: string;
11
12
  /**
@@ -16,6 +16,8 @@ export interface SetDocumentsRequestOptions {
16
16
  locationId?: string;
17
17
  rootDocumentId?: string;
18
18
  context?: SetDocumentsContext;
19
+ debounceTime?: number;
20
+ optimisticPermissions?: boolean;
19
21
  }
20
22
  export interface UpdateDocumentsRequest<T = unknown> {
21
23
  organizationId?: string;
@@ -5,12 +5,18 @@ export interface AccessRequestEvent {
5
5
  editor?: User;
6
6
  timestamp?: number;
7
7
  status?: string;
8
+ totalUsers?: number;
9
+ presenceSnippylyUserIds?: string[];
10
+ presenceClientUserIds?: string[];
8
11
  }
9
12
  export interface SEMEvent {
10
13
  viewer?: User;
11
14
  editor?: User;
12
15
  timestamp?: number;
13
16
  role?: string;
17
+ totalUsers?: number;
18
+ presenceSnippylyUserIds?: string[];
19
+ presenceClientUserIds?: string[];
14
20
  }
15
21
  export type LiveStateEventTypesMap = {
16
22
  [LiveStateSyncEventTypes.ACCESS_REQUESTED]: AccessRequestEvent;