@veltdev/sdk-staging 5.0.0-beta.11 → 5.0.0-beta.13

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.
@@ -81,6 +81,24 @@ export interface DeleteCommentAnnotationRequest {
81
81
  annotationId: string;
82
82
  options?: RequestOptions;
83
83
  }
84
+ /**
85
+ * Query parameters for fetching comment annotation counts.
86
+ *
87
+ * @property organizationId - Filter by organization (enables org-wide aggregation when used alone)
88
+ * @property documentIds - Filter by specific document IDs
89
+ * @property locationIds - Filter by location IDs within documents
90
+ * @property statusIds - Filter by comment status IDs (e.g., "open", "resolved")
91
+ * @property folderId - Filter by folder ID (use with allDocuments for folder-wide counts)
92
+ * @property allDocuments - When true with folderId, aggregates all documents in folder
93
+ * @property locationId - Single location filter (deprecated, use locationIds)
94
+ * @property aggregateDocuments - When true, combines all documentIds into single count
95
+ * @property filterGhostComments - When true, excludes orphaned/deleted comments from counts
96
+ * @property batchedPerDocument - When true, uses efficient batched listeners (4 instead of 100)
97
+ * but still returns per-document counts. Best for large document lists (50+).
98
+ * Trade-off: slight delay on updates due to debouncing.
99
+ * @property debounceMs - Debounce time in milliseconds for batchedPerDocument mode (default: 5000ms).
100
+ * Prevents rapid re-fetches when multiple documents update in quick succession.
101
+ */
84
102
  export interface CommentRequestQuery {
85
103
  organizationId?: string;
86
104
  documentIds?: string[];
@@ -91,6 +109,10 @@ export interface CommentRequestQuery {
91
109
  locationId?: string;
92
110
  aggregateDocuments?: boolean;
93
111
  filterGhostComments?: boolean;
112
+ /** Enable batched listeners with per-document counts. Uses 4 listeners instead of N listeners. */
113
+ batchedPerDocument?: boolean;
114
+ /** Debounce time in ms for batchedPerDocument mode (default: 5000). */
115
+ debounceMs?: number;
94
116
  }
95
117
  export interface SubscribeCommentAnnotationRequest {
96
118
  annotationId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-staging",
3
- "version": "5.0.0-beta.11",
3
+ "version": "5.0.0-beta.13",
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": [