@veltdev/sdk 5.0.0-beta.12 → 5.0.0-beta.14

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.
@@ -184,6 +184,7 @@ export declare class CommentAnnotation {
184
184
  unsubscribedUsers?: CommentAnnotationUnsubscribedUsers;
185
185
  subscribedGroups?: CommentAnnotationSubscribedGroups;
186
186
  resolvedByUserId?: string | null;
187
+ resolvedByUser?: User | null;
187
188
  multiThreadAnnotationId?: string;
188
189
  isDraft?: boolean;
189
190
  sourceId?: string;
@@ -1,4 +1,4 @@
1
- import { CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
1
+ import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus } 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";
@@ -84,6 +84,8 @@ export type CommentEventTypesMap = {
84
84
  [CommentEventTypes.LINK_CLICKED]: LinkClickedEvent;
85
85
  [CommentEventTypes.COMMENT_PIN_CLICKED]: CommentPinClickedEvent;
86
86
  [CommentEventTypes.COMMENT_BUBBLE_CLICKED]: CommentBubbleClickedEvent;
87
+ [CommentEventTypes.COMMENT_TOOL_CLICK]: CommentToolClickEvent;
88
+ [CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
87
89
  };
88
90
  export interface AddAttachmentEvent {
89
91
  annotationId: string;
@@ -280,3 +282,22 @@ export interface ComposerTextChangeEvent {
280
282
  text: string;
281
283
  metadata?: VeltEventMetadata;
282
284
  }
285
+ export interface AssignToConfig {
286
+ type: AssignToType;
287
+ }
288
+ export interface PageModeComposerConfig {
289
+ context?: {
290
+ [key: string]: any;
291
+ } | null;
292
+ targetElementId?: string | null;
293
+ }
294
+ export interface CommentToolClickEvent {
295
+ context: {
296
+ [key: string]: any;
297
+ } | null;
298
+ targetElementId?: string | null;
299
+ metadata?: VeltEventMetadata;
300
+ }
301
+ export interface SidebarButtonClickEvent {
302
+ metadata?: VeltEventMetadata;
303
+ }
@@ -1,11 +1,11 @@
1
1
  // @ts-nocheck
2
2
  import { Observable } from "rxjs";
3
- import { CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
3
+ import { AssignToType, CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
4
4
  import { UploadFileData } from "../data/attachment.model";
5
5
  import { AutocompleteData } from "../data/autocomplete.data.model";
6
- import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserEvent, AssignUserRequest, CommentRequestQuery, CommentVisibilityConfig, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, FetchCommentAnnotationsRequest, GetAttachmentRequest, GetCommentRequest, GetLinkRequest, GetRecordingRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationRequest, ToggleReactionRequest, UnsubscribeCommentAnnotationRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest } from "../data/comment-actions.data.model";
6
+ import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserEvent, AssignUserRequest, CommentRequestQuery, CommentVisibilityConfig, ClearComposerRequest, 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";
7
7
  import { CommentAnnotation, CommentOnElementConfig, CommentSelectionChangeData, ManualCommentAnnotationConfig, UpdateContextConfig } from "../data/comment-annotation.data.model";
8
- import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, FetchCommentAnnotationsResponse, GetCommentAnnotationsCountResponse, GetCommentAnnotationsResponse, GetLinkEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
8
+ import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, AssignToConfig, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, ComposerTextChangeEvent, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, FetchCommentAnnotationsResponse, GetCommentAnnotationsCountResponse, GetCommentAnnotationsResponse, GetLinkEvent, PageModeComposerConfig, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
9
9
  import { CommentSidebarCustomActionEventData, CommentSidebarData, CommentSidebarDataOptions } from "../data/comment-sidebar-config.model";
10
10
  import { CommentContextProvider, TransformContext, UnreadCommentsCount } from "../data/comment-utils.data.model";
11
11
  import { CustomAnnotationDropdownData } from "../data/custom-chip-dropdown.data.model";
@@ -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 config The page mode composer config containing context and targetElementId
107
+ */
108
+ setContextInPageModeComposer: (config: PageModeComposerConfig | 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 config The assign to config containing type
118
+ */
119
+ setAssignToType: (config: AssignToConfig) => void;
120
+
88
121
  /**
89
122
  * To enable moderator mode
90
123
  */
@@ -1271,13 +1304,6 @@ export declare class CommentElement {
1271
1304
  */
1272
1305
  public disableScreenshot: () => void;
1273
1306
 
1274
- /**
1275
- * To programmatically submit a comment from a velt-comment-composer.
1276
- * Finds the composer within the element identified by referenceId and submits its content.
1277
- * @param referenceId The ID of the HTML element containing the velt-comment-composer
1278
- */
1279
- public submitComment: (referenceId: string) => void;
1280
-
1281
1307
  /**
1282
1308
  * To enable paginated contact list
1283
1309
  */
@@ -1288,6 +1314,26 @@ export declare class CommentElement {
1288
1314
  */
1289
1315
  public disablePaginatedContactList: () => void;
1290
1316
 
1317
+ /**
1318
+ * Programmatically trigger comment submission for a composer with the given targetComposerElementId
1319
+ * @param request SubmitCommentRequest containing targetComposerElementId
1320
+ */
1321
+ public submitComment: (request: SubmitCommentRequest) => void;
1322
+
1323
+ /**
1324
+ * Programmatically clear the composer state for the given targetComposerElementId
1325
+ * @param request ClearComposerRequest containing targetComposerElementId
1326
+ */
1327
+ public clearComposer: (request: ClearComposerRequest) => void;
1328
+
1329
+ /**
1330
+ * Get the current composer data for a given targetComposerElementId
1331
+ * Returns the same data as COMPOSER_TEXT_CHANGE event but as a one-time fetch
1332
+ * @param request GetComposerDataRequest containing targetComposerElementId
1333
+ * @returns The composer data or null if not found
1334
+ */
1335
+ public getComposerData: (request: GetComposerDataRequest) => ComposerTextChangeEvent | null;
1336
+
1291
1337
  constructor();
1292
1338
  /**
1293
1339
  * Subscribe to comments on the current document.
@@ -2550,9 +2596,53 @@ export declare class CommentElement {
2550
2596
  private _disablePaginatedContactList;
2551
2597
 
2552
2598
  /**
2553
- * To programmatically submit a comment from a velt-comment-composer.
2554
- * Finds the composer within the element identified by referenceId and submits its content.
2555
- * @param referenceId The ID of the HTML element containing the velt-comment-composer
2599
+ * Programmatically trigger comment submission for a composer with the given targetComposerElementId
2600
+ * @param request SubmitCommentRequest containing targetComposerElementId
2556
2601
  */
2557
2602
  private _submitComment;
2603
+
2604
+ /**
2605
+ * Programmatically clear the composer state for the given targetComposerElementId
2606
+ * @param request ClearComposerRequest containing targetComposerElementId
2607
+ */
2608
+ private _clearComposer;
2609
+
2610
+ /**
2611
+ * Get the current composer data for a given targetComposerElementId
2612
+ * Returns the same data as COMPOSER_TEXT_CHANGE event but as a one-time fetch
2613
+ * @param request GetComposerDataRequest containing targetComposerElementId
2614
+ * @returns The composer data or null if not found
2615
+ */
2616
+ private _getComposerData;
2617
+
2618
+ /**
2619
+ * To enable context in page mode composer feature
2620
+ */
2621
+ private _enableContextInPageModeComposer;
2622
+
2623
+ /**
2624
+ * To disable context in page mode composer feature
2625
+ */
2626
+ private _disableContextInPageModeComposer;
2627
+
2628
+ /**
2629
+ * To clear page mode composer context
2630
+ */
2631
+ private _clearPageModeComposerContext;
2632
+
2633
+ /**
2634
+ * To set context in page mode composer
2635
+ */
2636
+ private _setContextInPageModeComposer;
2637
+
2638
+ /**
2639
+ * To focus the page mode composer input
2640
+ */
2641
+ private _focusPageModeComposer;
2642
+
2643
+ /**
2644
+ * To set assign to type for comment dialog
2645
+ * @param type 'dropdown' | 'checkbox'
2646
+ */
2647
+ private _setAssignToType;
2558
2648
  }
@@ -68,6 +68,16 @@ export declare class NotificationElement {
68
68
  */
69
69
  getSettings: () => Observable<NotificationSettingsConfig | null>;
70
70
 
71
+ /**
72
+ * To enable settings config by organization
73
+ */
74
+ enableSettingsAtOrganizationLevel: () => void;
75
+
76
+ /**
77
+ * To disable settings config by organization
78
+ */
79
+ disableSettingsAtOrganizationLevel: () => void;
80
+
71
81
  /**
72
82
  * To mute all notifications
73
83
  */
@@ -200,6 +210,16 @@ export declare class NotificationElement {
200
210
  */
201
211
  private _disableSettings;
202
212
 
213
+ /**
214
+ * To enable settings config by organization
215
+ */
216
+ private _enableSettingsAtOrganizationLevel;
217
+
218
+ /**
219
+ * To disable settings config by organization
220
+ */
221
+ private _disableSettingsAtOrganizationLevel;
222
+
203
223
  /**
204
224
  * To enable self notifications
205
225
  */
@@ -59,6 +59,8 @@ export declare const CommentEventTypes: {
59
59
  readonly LINK_CLICKED: "linkClicked";
60
60
  readonly COMMENT_PIN_CLICKED: "commentPinClicked";
61
61
  readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked";
62
+ readonly COMMENT_TOOL_CLICK: "commentToolClick";
63
+ readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
62
64
  };
63
65
  export declare const RecorderEventTypes: {
64
66
  readonly TRANSCRIPTION_DONE: "transcriptionDone";
@@ -187,6 +189,7 @@ export declare enum AnalyticsFeatures {
187
189
  COMMENT_SIDEBAR = "commentSidebar"
188
190
  }
189
191
  export type FeatureType = 'area' | 'arrow' | 'audioHuddle' | 'comment' | 'cursor' | 'huddle' | 'liveStateSync' | 'presence' | 'recorder' | 'rewriter' | 'tag' | 'liveSelection' | 'notification' | 'reaction' | 'multiThread';
192
+ export type AssignToType = 'dropdown' | 'checkbox';
190
193
  export declare enum DeviceType {
191
194
  DESKTOP = "Desktop",
192
195
  MOBILE = "Mobile",
@@ -279,10 +282,10 @@ export type OverlayOriginY = 'top' | 'center' | 'bottom';
279
282
  export type OverlayOriginX = 'start' | 'center' | 'end';
280
283
  export type SubtitlesMode = 'floating' | 'embed';
281
284
  export type RecorderVariant = 'default' | 'embed';
282
- export type ReactionPinType = 'timeline' | 'comment';
285
+ export type ReactionPinType = 'timeline' | 'comment' | 'standalone';
283
286
  export type SidebarPosition = 'left' | 'right';
284
287
  export type SidebarSortingCriteria = 'date' | 'unread' | null;
285
- export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'reset' | null;
288
+ export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'assignedToMe' | 'reset' | null;
286
289
  export type SidebarFilterSearchType = 'people' | 'assigned' | 'tagged' | 'involved' | 'pages' | 'documents' | 'statuses' | 'priorities' | 'categories' | 'versions' | string;
287
290
  export type InlineSortingCriteria = 'createdFirst' | 'createdLast' | 'updatedFirst' | 'updatedLast';
288
291
  export type NotificationPanelMode = 'popover' | 'sidebar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "5.0.0-beta.12",
3
+ "version": "5.0.0-beta.14",
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": [