@veltdev/sdk 4.7.5 → 4.7.7

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.
@@ -61,6 +61,24 @@ export interface DeleteCommentAnnotationRequest {
61
61
  annotationId: string;
62
62
  options?: RequestOptions;
63
63
  }
64
+ /**
65
+ * Query parameters for fetching comment annotation counts.
66
+ *
67
+ * @property organizationId - Filter by organization (enables org-wide aggregation when used alone)
68
+ * @property documentIds - Filter by specific document IDs
69
+ * @property locationIds - Filter by location IDs within documents
70
+ * @property statusIds - Filter by comment status IDs (e.g., "open", "resolved")
71
+ * @property folderId - Filter by folder ID (use with allDocuments for folder-wide counts)
72
+ * @property allDocuments - When true with folderId, aggregates all documents in folder
73
+ * @property locationId - Single location filter (deprecated, use locationIds)
74
+ * @property aggregateDocuments - When true, combines all documentIds into single count
75
+ * @property filterGhostComments - When true, excludes orphaned/deleted comments from counts
76
+ * @property batchedPerDocument - When true, uses efficient batched listeners (4 instead of 100)
77
+ * but still returns per-document counts. Best for large document lists (50+).
78
+ * Trade-off: slight delay on updates due to debouncing.
79
+ * @property debounceMs - Debounce time in milliseconds for batchedPerDocument mode (default: 5000ms).
80
+ * Prevents rapid re-fetches when multiple documents update in quick succession.
81
+ */
64
82
  export interface CommentRequestQuery {
65
83
  organizationId?: string;
66
84
  documentIds?: string[];
@@ -71,6 +89,10 @@ export interface CommentRequestQuery {
71
89
  locationId?: string;
72
90
  aggregateDocuments?: boolean;
73
91
  filterGhostComments?: boolean;
92
+ /** Enable batched listeners with per-document counts. Uses 4 listeners instead of N listeners. */
93
+ batchedPerDocument?: boolean;
94
+ /** Debounce time in ms for batchedPerDocument mode (default: 5000). */
95
+ debounceMs?: number;
74
96
  }
75
97
  export interface SubscribeCommentAnnotationRequest {
76
98
  annotationId: string;
@@ -83,6 +83,8 @@ export type CommentEventTypesMap = {
83
83
  [CommentEventTypes.COMMENT_PIN_CLICKED]: CommentPinClickedEvent;
84
84
  [CommentEventTypes.COMMENT_BUBBLE_CLICKED]: CommentBubbleClickedEvent;
85
85
  [CommentEventTypes.COMPOSER_TEXT_CHANGE]: ComposerTextChangeEvent;
86
+ [CommentEventTypes.COMMENT_TOOL_CLICK]: CommentToolClickEvent;
87
+ [CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
86
88
  };
87
89
  export interface AddAttachmentEvent {
88
90
  annotationId: string;
@@ -277,3 +279,12 @@ export interface ComposerTextChangeEvent {
277
279
  targetComposerElementId: string;
278
280
  metadata?: VeltEventMetadata;
279
281
  }
282
+ export interface CommentToolClickEvent {
283
+ context: {
284
+ [key: string]: any;
285
+ } | null;
286
+ metadata?: VeltEventMetadata;
287
+ }
288
+ export interface SidebarButtonClickEvent {
289
+ metadata?: VeltEventMetadata;
290
+ }
@@ -9,7 +9,7 @@ import { CommentSidebarCustomActionEventData, CommentSidebarData, CommentSidebar
9
9
  export { ReactionMap } from '../data/reaction-annotation.data.model';
10
10
  import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserRequest, AssignUserEvent, ClearComposerRequest, CommentRequestQuery, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, FetchCommentAnnotationsRequest, GetAttachmentRequest, GetCommentRequest, GetComposerDataRequest, GetLinkRequest, GetRecordingRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubmitCommentRequest, SubscribeCommentAnnotationRequest, ToggleReactionRequest, UnsubscribeCommentAnnotationRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest } from "../data/comment-actions.data.model";
11
11
  import { UnreadCommentsCount, TransformContext } from "../data/comment-utils.data.model";
12
- import { CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
12
+ import { AssignToType, CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
13
13
  import { UploadFileData } from "../data/attachment.model";
14
14
 
15
15
  export declare class CommentElement {
@@ -85,6 +85,39 @@ export declare class CommentElement {
85
85
  */
86
86
  toggleCommentSidebar: () => any;
87
87
 
88
+ /**
89
+ * To enable context in page mode composer feature
90
+ * When enabled, clicking comment tool will open sidebar with page mode composer and pass context
91
+ */
92
+ enableContextInPageModeComposer: () => void;
93
+
94
+ /**
95
+ * To disable context in page mode composer feature
96
+ */
97
+ disableContextInPageModeComposer: () => void;
98
+
99
+ /**
100
+ * To clear page mode composer context
101
+ */
102
+ clearPageModeComposerContext: () => void;
103
+
104
+ /**
105
+ * To set context in page mode composer
106
+ * @param context The context to set
107
+ */
108
+ setContextInPageModeComposer: (context: { [key: string]: any } | null) => void;
109
+
110
+ /**
111
+ * To focus the page mode composer input
112
+ */
113
+ focusPageModeComposer: () => void;
114
+
115
+ /**
116
+ * To set assign to type for comment dialog
117
+ * @param type 'dropdown' | 'checkbox'
118
+ */
119
+ setAssignToType: (type: AssignToType) => void;
120
+
88
121
  /**
89
122
  * To enable moderator mode
90
123
  */
@@ -2566,4 +2599,35 @@ export declare class CommentElement {
2566
2599
  * @returns The composer data or null if not found
2567
2600
  */
2568
2601
  private _getComposerData;
2602
+
2603
+ /**
2604
+ * To enable context in page mode composer feature
2605
+ */
2606
+ private _enableContextInPageModeComposer;
2607
+
2608
+ /**
2609
+ * To disable context in page mode composer feature
2610
+ */
2611
+ private _disableContextInPageModeComposer;
2612
+
2613
+ /**
2614
+ * To clear page mode composer context
2615
+ */
2616
+ private _clearPageModeComposerContext;
2617
+
2618
+ /**
2619
+ * To set context in page mode composer
2620
+ */
2621
+ private _setContextInPageModeComposer;
2622
+
2623
+ /**
2624
+ * To focus the page mode composer input
2625
+ */
2626
+ private _focusPageModeComposer;
2627
+
2628
+ /**
2629
+ * To set assign to type for comment dialog
2630
+ * @param type 'dropdown' | 'checkbox'
2631
+ */
2632
+ private _setAssignToType;
2569
2633
  }
@@ -58,6 +58,8 @@ export declare const CommentEventTypes: {
58
58
  readonly COMMENT_PIN_CLICKED: "commentPinClicked";
59
59
  readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked";
60
60
  readonly COMPOSER_TEXT_CHANGE: "composerTextChange";
61
+ readonly COMMENT_TOOL_CLICK: "commentToolClick";
62
+ readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
61
63
  };
62
64
  export declare const RecorderEventTypes: {
63
65
  readonly TRANSCRIPTION_DONE: "transcriptionDone";
@@ -186,6 +188,7 @@ export declare enum AnalyticsFeatures {
186
188
  COMMENT_SIDEBAR = "commentSidebar"
187
189
  }
188
190
  export type FeatureType = 'area' | 'arrow' | 'audioHuddle' | 'comment' | 'cursor' | 'huddle' | 'liveStateSync' | 'presence' | 'recorder' | 'rewriter' | 'tag' | 'liveSelection' | 'notification' | 'reaction' | 'multiThread';
191
+ export type AssignToType = 'dropdown' | 'checkbox';
189
192
  export declare enum DeviceType {
190
193
  DESKTOP = "Desktop",
191
194
  MOBILE = "Mobile",
@@ -278,10 +281,10 @@ export type OverlayOriginY = 'top' | 'center' | 'bottom';
278
281
  export type OverlayOriginX = 'start' | 'center' | 'end';
279
282
  export type SubtitlesMode = 'floating' | 'embed';
280
283
  export type RecorderVariant = 'default' | 'embed';
281
- export type ReactionPinType = 'timeline' | 'comment';
284
+ export type ReactionPinType = 'timeline' | 'comment' | 'standalone';
282
285
  export type SidebarPosition = 'left' | 'right';
283
286
  export type SidebarSortingCriteria = 'date' | 'unread' | null;
284
- export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'reset' | null;
287
+ export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'assignedToMe' | 'reset' | null;
285
288
  export type SidebarFilterSearchType = 'people' | 'assigned' | 'tagged' | 'involved' | 'pages' | 'documents' | 'statuses' | 'priorities' | 'categories' | 'versions' | string;
286
289
  export type InlineSortingCriteria = 'createdFirst' | 'createdLast' | 'updatedFirst' | 'updatedLast';
287
290
  export type NotificationPanelMode = 'popover' | 'sidebar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "4.7.5",
3
+ "version": "4.7.7",
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": [
@@ -36,7 +36,7 @@
36
36
  "scripts": {
37
37
  "test": "echo \"Error: no test specified\" && exit 1",
38
38
  "version:update": "node ../update-npm-package.mjs",
39
- "publish:sdk": "npm publish --access public --tag v4-7-5"
39
+ "publish:sdk": "npm publish --access public --tag v4-7-7"
40
40
  },
41
41
  "author": "",
42
42
  "license": "ISC",