@veltdev/sdk 4.7.5 → 4.7.6

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;
@@ -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,28 @@ 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 assign to type for comment dialog
106
+ * @param type 'dropdown' | 'checkbox'
107
+ */
108
+ setAssignToType: (type: AssignToType) => void;
109
+
88
110
  /**
89
111
  * To enable moderator mode
90
112
  */
@@ -2566,4 +2588,25 @@ export declare class CommentElement {
2566
2588
  * @returns The composer data or null if not found
2567
2589
  */
2568
2590
  private _getComposerData;
2591
+
2592
+ /**
2593
+ * To enable context in page mode composer feature
2594
+ */
2595
+ private _enableContextInPageModeComposer;
2596
+
2597
+ /**
2598
+ * To disable context in page mode composer feature
2599
+ */
2600
+ private _disableContextInPageModeComposer;
2601
+
2602
+ /**
2603
+ * To clear page mode composer context
2604
+ */
2605
+ private _clearPageModeComposerContext;
2606
+
2607
+ /**
2608
+ * To set assign to type for comment dialog
2609
+ * @param type 'dropdown' | 'checkbox'
2610
+ */
2611
+ private _setAssignToType;
2569
2612
  }
@@ -186,6 +186,7 @@ export declare enum AnalyticsFeatures {
186
186
  COMMENT_SIDEBAR = "commentSidebar"
187
187
  }
188
188
  export type FeatureType = 'area' | 'arrow' | 'audioHuddle' | 'comment' | 'cursor' | 'huddle' | 'liveStateSync' | 'presence' | 'recorder' | 'rewriter' | 'tag' | 'liveSelection' | 'notification' | 'reaction' | 'multiThread';
189
+ export type AssignToType = 'dropdown' | 'checkbox';
189
190
  export declare enum DeviceType {
190
191
  DESKTOP = "Desktop",
191
192
  MOBILE = "Mobile",
@@ -278,10 +279,10 @@ export type OverlayOriginY = 'top' | 'center' | 'bottom';
278
279
  export type OverlayOriginX = 'start' | 'center' | 'end';
279
280
  export type SubtitlesMode = 'floating' | 'embed';
280
281
  export type RecorderVariant = 'default' | 'embed';
281
- export type ReactionPinType = 'timeline' | 'comment';
282
+ export type ReactionPinType = 'timeline' | 'comment' | 'standalone';
282
283
  export type SidebarPosition = 'left' | 'right';
283
284
  export type SidebarSortingCriteria = 'date' | 'unread' | null;
284
- export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'reset' | null;
285
+ export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'assignedToMe' | 'reset' | null;
285
286
  export type SidebarFilterSearchType = 'people' | 'assigned' | 'tagged' | 'involved' | 'pages' | 'documents' | 'statuses' | 'priorities' | 'categories' | 'versions' | string;
286
287
  export type InlineSortingCriteria = 'createdFirst' | 'createdLast' | 'updatedFirst' | 'updatedLast';
287
288
  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.6",
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-6"
40
40
  },
41
41
  "author": "",
42
42
  "license": "ISC",