@veltdev/sdk 5.0.1-beta.2 → 5.0.1-beta.4
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.
|
@@ -44,10 +44,10 @@ export interface CopyLinkRequest {
|
|
|
44
44
|
/**
|
|
45
45
|
* Visibility type for comment annotations.
|
|
46
46
|
* - 'public': Visible to everyone (default:velt)
|
|
47
|
-
* - '
|
|
48
|
-
* - '
|
|
47
|
+
* - 'organizationPrivate': Visible only to users in the specified organization
|
|
48
|
+
* - 'restricted': Visible only to specified users (private comments)
|
|
49
49
|
*/
|
|
50
|
-
export type CommentVisibilityType = 'public' | '
|
|
50
|
+
export type CommentVisibilityType = 'public' | 'organizationPrivate' | 'restricted';
|
|
51
51
|
/**
|
|
52
52
|
* Configuration for comment visibility/access control.
|
|
53
53
|
*/
|
|
@@ -56,11 +56,17 @@ export interface CommentVisibilityConfig {
|
|
|
56
56
|
type: CommentVisibilityType;
|
|
57
57
|
/** Annotation ID for the comment to update visibility */
|
|
58
58
|
annotationId?: string;
|
|
59
|
-
/** Organization ID for '
|
|
59
|
+
/** Organization ID for 'organizationPrivate' type visibility */
|
|
60
60
|
organizationId?: string;
|
|
61
|
-
/** User IDs for '
|
|
61
|
+
/** User IDs for 'restricted' type visibility - array of user IDs who can see the comment */
|
|
62
62
|
userIds?: string[];
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Configuration for private mode (enablePrivateMode/disablePrivateMode).
|
|
66
|
+
* Same as CommentVisibilityConfig but without annotationId and organizationId,
|
|
67
|
+
* since private mode applies to all new comments.
|
|
68
|
+
*/
|
|
69
|
+
export type PrivateModeConfig = Omit<CommentVisibilityConfig, 'annotationId' | 'organizationId'>;
|
|
64
70
|
export interface AddCommentAnnotationRequest {
|
|
65
71
|
annotation: CommentAnnotation;
|
|
66
72
|
options?: RequestOptions;
|
|
@@ -87,6 +87,7 @@ export type CommentEventTypesMap = {
|
|
|
87
87
|
[CommentEventTypes.COMMENT_TOOL_CLICK]: CommentToolClickEvent;
|
|
88
88
|
[CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
|
|
89
89
|
[CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
|
|
90
|
+
[CommentEventTypes.COMMENT_SAVED]: CommentSavedEvent;
|
|
90
91
|
};
|
|
91
92
|
export interface AddAttachmentEvent {
|
|
92
93
|
annotationId: string;
|
|
@@ -176,6 +177,11 @@ export interface AddCommentEvent {
|
|
|
176
177
|
comment: Comment;
|
|
177
178
|
metadata: VeltEventMetadata;
|
|
178
179
|
}
|
|
180
|
+
export interface CommentSavedEvent {
|
|
181
|
+
annotationId: string;
|
|
182
|
+
commentAnnotation: CommentAnnotation;
|
|
183
|
+
metadata: VeltEventMetadata;
|
|
184
|
+
}
|
|
179
185
|
export interface UpdateCommentEvent {
|
|
180
186
|
annotationId: string;
|
|
181
187
|
commentAnnotation: CommentAnnotation;
|
|
@@ -3,7 +3,7 @@ import { Observable } from "rxjs";
|
|
|
3
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, 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";
|
|
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, PrivateModeConfig, 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
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";
|
|
@@ -518,6 +518,18 @@ export declare class CommentElement {
|
|
|
518
518
|
*/
|
|
519
519
|
public disablePrivateCommentMode: () => void;
|
|
520
520
|
|
|
521
|
+
/**
|
|
522
|
+
* To enable private mode with visibility configuration.
|
|
523
|
+
* All new comments will be created with the specified visibility.
|
|
524
|
+
* @param config PrivateModeConfig with type and optional userIds
|
|
525
|
+
*/
|
|
526
|
+
public enablePrivateMode: (config: PrivateModeConfig) => void;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* To disable private mode. New comments will revert to default public visibility.
|
|
530
|
+
*/
|
|
531
|
+
public disablePrivateMode: () => void;
|
|
532
|
+
|
|
521
533
|
/**
|
|
522
534
|
* To enable scroll to comment.
|
|
523
535
|
*/
|
|
@@ -1825,6 +1837,18 @@ export declare class CommentElement {
|
|
|
1825
1837
|
*/
|
|
1826
1838
|
private _disablePrivateCommentMode;
|
|
1827
1839
|
|
|
1840
|
+
/**
|
|
1841
|
+
* To enable private mode with visibility configuration.
|
|
1842
|
+
* All new comments will be created with the specified visibility.
|
|
1843
|
+
* @param config PrivateModeConfig with type and optional userIds
|
|
1844
|
+
*/
|
|
1845
|
+
private _enablePrivateMode;
|
|
1846
|
+
|
|
1847
|
+
/**
|
|
1848
|
+
* To disable private mode. New comments will revert to default public visibility.
|
|
1849
|
+
*/
|
|
1850
|
+
private _disablePrivateMode;
|
|
1851
|
+
|
|
1828
1852
|
/**
|
|
1829
1853
|
* To enable scroll to comment.
|
|
1830
1854
|
*/
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export declare const CommentEventTypes: {
|
|
|
62
62
|
readonly COMMENT_TOOL_CLICK: "commentToolClick";
|
|
63
63
|
readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
|
|
64
64
|
readonly ATTACHMENT_DOWNLOAD_CLICKED: "attachmentDownloadClicked";
|
|
65
|
+
readonly COMMENT_SAVED: "commentSaved";
|
|
65
66
|
};
|
|
66
67
|
export declare const RecorderEventTypes: {
|
|
67
68
|
readonly TRANSCRIPTION_DONE: "transcriptionDone";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "5.0.1-beta.
|
|
3
|
+
"version": "5.0.1-beta.4",
|
|
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": [
|