@veltdev/sdk 3.0.68 → 3.0.70

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.
@@ -1,13 +1,13 @@
1
1
  // @ts-nocheck
2
2
  import { Observable } from "rxjs";
3
3
  import { CommentAnnotation, CommentOnElementConfig, CommentSelectionChangeData, ManualCommentAnnotationConfig, UpdateContextConfig } from "../data/comment-annotation.data.model";
4
- import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, GetLinkEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
4
+ import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, GetLinkEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
5
5
  import { CustomCategory, CustomPriority, CustomStatus } from "../data/custom-filter.data.model";
6
6
  import { CustomAnnotationDropdownData } from "../data/custom-chip-dropdown.data.model";
7
7
  import { AutocompleteData } from "../data/autocomplete.data.model";
8
8
  import { CommentSidebarCustomActionEventData, CommentSidebarData, CommentSidebarDataOptions } from "../data/comment-sidebar-config.model";
9
9
  export { ReactionMap } from '../data/reaction-annotation.data.model';
10
- import { AcceptCommentAnnotationConfig, AddAttachmentConfig, AddAttachmentResponse, AddCommentAnnotationConfig, AddCommentConfig, AddReactionConfig, ApproveCommentAnnotationConfig, CopyLinkConfig, DeleteAttachmentConfig, DeleteCommentAnnotationConfig, DeleteCommentConfig, DeleteReactionConfig, DeleteRecordingConfig, GetAttachmentConfig, GetCommentConfig, GetLinkConfig, GetRecordingConfig, RejectCommentAnnotationConfig, ResolveCommentAnnotationConfig, ToggleReactionConfig, UpdateAccessConfig, UpdateCommentConfig, UpdatePriorityConfig, UpdateStatusConfig } from "../data/comment-actions.data.model";
10
+ import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserRequest, AssignUserEvent, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, GetAttachmentRequest, GetCommentRequest, GetLinkRequest, GetRecordingRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationRequest, UnsubscribeCommentAnnotationRequest, ToggleReactionRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest } from "../data/comment-actions.data.model";
11
11
  export declare class CommentElement {
12
12
  /**
13
13
  * Subscribe to comments on the current document.
@@ -394,11 +394,15 @@ export declare class CommentElement {
394
394
 
395
395
  /**
396
396
  * To get documentId, location and set context data when comment is added.
397
+ *
398
+ * @deprecated Use `AddCommentAnnotationEvent` instead
397
399
  */
398
400
  public onCommentAdd: () => Observable<CommentAddEventData>;
399
401
 
400
402
  /**
401
403
  * To get data when comment is updated.
404
+ *
405
+ * @deprecated Use action specific events instead
402
406
  */
403
407
  public onCommentUpdate: () => Observable<CommentUpdateEventData>;
404
408
 
@@ -916,122 +920,137 @@ export declare class CommentElement {
916
920
  /**
917
921
  * To add comment annotation
918
922
  */
919
- public addCommentAnnotation: (config: AddCommentAnnotationConfig) => Promise<AddCommentAnnotationEvent | null>;
923
+ public addCommentAnnotation: (config: AddCommentAnnotationRequest) => Promise<AddCommentAnnotationEvent | null>;
920
924
 
921
925
  /**
922
926
  * To approve comment annotation
923
927
  */
924
- public approveCommentAnnotation: (config: ApproveCommentAnnotationConfig) => Promise<ApproveCommentAnnotationEvent | null>;
928
+ public approveCommentAnnotation: (config: ApproveCommentAnnotationRequest) => Promise<ApproveCommentAnnotationEvent | null>;
925
929
 
926
930
  /**
927
931
  * To accept comment annotation
928
932
  */
929
- public acceptCommentAnnotation: (config: AcceptCommentAnnotationConfig) => Promise<AcceptCommentAnnotationEvent | null>;
933
+ public acceptCommentAnnotation: (config: AcceptCommentAnnotationRequest) => Promise<AcceptCommentAnnotationEvent | null>;
930
934
 
931
935
  /**
932
936
  * To reject comment annotation
933
937
  */
934
- public rejectCommentAnnotation: (config: RejectCommentAnnotationConfig) => Promise<RejectCommentAnnotationEvent | null>;
938
+ public rejectCommentAnnotation: (config: RejectCommentAnnotationRequest) => Promise<RejectCommentAnnotationEvent | null>;
939
+
940
+ /**
941
+ * To subscribe comment annotation
942
+ */
943
+ public subscribeCommentAnnotation: (config: SubscribeCommentAnnotationRequest) => Promise<SubscribeCommentAnnotationEvent | null>;
944
+
945
+ /**
946
+ * To unsubscribe comment annotation
947
+ */
948
+ public unsubscribeCommentAnnotation: (config: UnsubscribeCommentAnnotationRequest) => Promise<UnsubscribeCommentAnnotationEvent | null>;
935
949
 
936
950
  /**
937
951
  * To delete comment annotation
938
952
  */
939
- public deleteCommentAnnotation: (config: DeleteCommentAnnotationConfig) => Promise<DeleteCommentAnnotationEvent | null>;
953
+ public deleteCommentAnnotation: (config: DeleteCommentAnnotationRequest) => Promise<DeleteCommentAnnotationEvent | null>;
954
+
955
+ /**
956
+ * To assign user to comment annotation
957
+ */
958
+ public assignUser: (config: AssignUserRequest) => Promise<AssignUserEvent | null>;
940
959
 
941
960
  /**
942
961
  * To update priority
943
962
  */
944
- public updatePriority: (config: UpdatePriorityConfig) => Promise<UpdatePriorityEvent | null>;
963
+ public updatePriority: (config: UpdatePriorityRequest) => Promise<UpdatePriorityEvent | null>;
945
964
 
946
965
  /**
947
966
  * To update status
948
967
  */
949
- public updateStatus: (config: UpdateStatusConfig) => Promise<UpdateStatusEvent | null>;
968
+ public updateStatus: (config: UpdateStatusRequest) => Promise<UpdateStatusEvent | null>;
950
969
 
951
970
  /**
952
971
  * To update access
953
972
  */
954
- public updateAccess: (config: UpdateAccessConfig) => Promise<UpdateAccessEvent | null>;
973
+ public updateAccess: (config: UpdateAccessRequest) => Promise<UpdateAccessEvent | null>;
955
974
 
956
975
  /**
957
976
  * To resolve comment annotation
958
977
  */
959
- public resolveCommentAnnotation: (config: ResolveCommentAnnotationConfig) => Promise<any>;
978
+ public resolveCommentAnnotation: (config: ResolveCommentAnnotationRequest) => Promise<any>;
960
979
 
961
980
  /**
962
981
  * To get link
963
982
  */
964
- public getLink: (config: GetLinkConfig) => Promise<GetLinkEvent | null>;
983
+ public getLink: (config: GetLinkRequest) => Promise<GetLinkEvent | null>;
965
984
 
966
985
  /**
967
986
  * To copy link
968
987
  */
969
- public copyLink: (config: CopyLinkConfig) => Promise<CopyLinkEvent | null>;
988
+ public copyLink: (config: CopyLinkRequest) => Promise<CopyLinkEvent | null>;
970
989
 
971
990
  /**
972
991
  * To add comment
973
992
  */
974
- public addComment: (config: AddCommentConfig) => Promise<AddCommentEvent | null>;
993
+ public addComment: (config: AddCommentRequest) => Promise<AddCommentEvent | null>;
975
994
 
976
995
  /**
977
996
  * To update comment
978
997
  */
979
- public updateComment: (config: UpdateCommentConfig) => Promise<UpdateCommentEvent | null>;
998
+ public updateComment: (config: UpdateCommentRequest) => Promise<UpdateCommentEvent | null>;
980
999
 
981
1000
  /**
982
1001
  * To delete comment
983
1002
  */
984
- public deleteComment: (config: DeleteCommentConfig) => Promise<DeleteCommentEvent | null>;
1003
+ public deleteComment: (config: DeleteCommentRequest) => Promise<DeleteCommentEvent | null>;
985
1004
 
986
1005
  /**
987
1006
  * To get comment
988
1007
  */
989
- public getComment: (config: GetCommentConfig) => Promise<Comment[]>;
1008
+ public getComment: (config: GetCommentRequest) => Promise<Comment[]>;
990
1009
 
991
1010
  /**
992
1011
  * To add attachment
993
1012
  */
994
- public addAttachment: (config: AddAttachmentConfig) => Promise<AddAttachmentResponse[]>;
1013
+ public addAttachment: (config: AddAttachmentRequest) => Promise<AddAttachmentResponse[]>;
995
1014
 
996
1015
  /**
997
1016
  * To get attachment
998
1017
  */
999
- public getAttachment: (config: GetAttachmentConfig) => Promise<Attachment[]>;
1018
+ public getAttachment: (config: GetAttachmentRequest) => Promise<Attachment[]>;
1000
1019
 
1001
1020
  /**
1002
1021
  * To delete attachment
1003
1022
  */
1004
- public deleteAttachment: (config: DeleteAttachmentConfig) => Promise<DeleteAttachmentEvent | null>;
1023
+ public deleteAttachment: (config: DeleteAttachmentRequest) => Promise<DeleteAttachmentEvent | null>;
1005
1024
 
1006
1025
  /**
1007
1026
  * To get recording
1008
1027
  */
1009
- public getRecording: (config: GetRecordingConfig) => Promise<RecordedData[]>;
1028
+ public getRecording: (config: GetRecordingRequest) => Promise<RecordedData[]>;
1010
1029
 
1011
1030
  /**
1012
1031
  * To delete recording
1013
1032
  */
1014
- public deleteRecording: (config: DeleteRecordingConfig) => Promise<DeleteRecordingEvent | null>;
1033
+ public deleteRecording: (config: DeleteRecordingRequest) => Promise<DeleteRecordingEvent | null>;
1015
1034
 
1016
1035
  /**
1017
1036
  * To add reaction
1018
1037
  */
1019
- public addReaction: (config: AddReactionConfig) => Promise<AddReactionEvent | null>;
1038
+ public addReaction: (config: AddReactionRequest) => Promise<AddReactionEvent | null>;
1020
1039
 
1021
1040
  /**
1022
1041
  * To delete reaction
1023
1042
  */
1024
- public deleteReaction: (config: DeleteReactionConfig) => Promise<DeleteReactionEvent | null>;
1043
+ public deleteReaction: (config: DeleteReactionRequest) => Promise<DeleteReactionEvent | null>;
1025
1044
 
1026
1045
  /**
1027
1046
  * To toggle reaction
1028
1047
  */
1029
- public toggleReaction: (config: ToggleReactionConfig) => Promise<ToggleReactionEvent | null>;
1048
+ public toggleReaction: (config: ToggleReactionRequest) => Promise<ToggleReactionEvent | null>;
1030
1049
 
1031
1050
  /**
1032
1051
  * Subscribe to comment actions
1033
1052
  */
1034
- public on: (action: CommentActionTypes) => Observable<any>;
1053
+ public on: <T extends keyof CommentEventTypesMap>(action: T) => Observable<CommentEventTypesMap[T]>;
1035
1054
  constructor();
1036
1055
  /**
1037
1056
  * Subscribe to comments on the current document.
@@ -1952,11 +1971,26 @@ export declare class CommentElement {
1952
1971
  */
1953
1972
  private _rejectCommentAnnotation;
1954
1973
 
1974
+ /**
1975
+ * To subscribe to comment annotation
1976
+ */
1977
+ private _subscribeCommentAnnotation;
1978
+
1979
+ /**
1980
+ * To unsubscribe to comment annotation
1981
+ */
1982
+ private _unsubscribeCommentAnnotation;
1983
+
1955
1984
  /**
1956
1985
  * To delete comment annotation
1957
1986
  */
1958
1987
  private _deleteCommentAnnotation;
1959
1988
 
1989
+ /**
1990
+ * To assign user to comment annotation
1991
+ */
1992
+ private _assignUser;
1993
+
1960
1994
  /**
1961
1995
  * To update priority
1962
1996
  */
@@ -372,7 +372,7 @@ export declare class Constants {
372
372
  static VELT_BASE_REM_UNIT: string;
373
373
  static VELT_VIEWPORT_WIDTH: string;
374
374
  static VELT_VIEWPORT_HEIGHT: string;
375
- static VELT_COLOR: string;
375
+ static VELT_SELECTION_COLOR: string;
376
376
  static VELT_MIN_ARROW_LENGTH: number;
377
377
  static VELT_ARROW_VIEWPORT_PADDING: number;
378
378
  static LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME: number;
@@ -16,29 +16,31 @@ export declare enum CommentStatus {
16
16
  SUBSCRIBED = "subscribed",
17
17
  UNSUBSCRIBED = "unsubscribed"
18
18
  }
19
- export declare enum CommentActionTypes {
20
- ADD_COMMENT_ANNOTATION = "addCommentAnnotation",
21
- UPDATE_COMMENT_ANNOTATION = "updateCommentAnnotation",
22
- DELETE_COMMENT_ANNOTATION = "deleteCommentAnnotation",
23
- APPROVE_COMMENT_ANNOTATION = "approveCommentAnnotation",
24
- ACCEPT_COMMENT_ANNOTATION = "acceptCommentAnnotation",
25
- REJECT_COMMENT_ANNOTATION = "rejectCommentAnnotation",
26
- UPDATE_STATUS = "updateStatus",
27
- UPDATE_PRIORITY = "updatePriority",
28
- UPDATE_ACCESS = "updateAccess",
29
- RESOLVE_COMMENT = "resolveComment",
30
- ADD_COMMENT = "addComment",
31
- UPDATE_COMMENT = "updateComment",
32
- DELETE_COMMENT = "deleteComment",
33
- ADD_ATTACHMENT = "addAttachment",
34
- DELETE_ATTACHMENT = "deleteAttachment",
35
- DELETE_RECORDING = "deleteRecording",
36
- GET_LINK = "getLink",
37
- COPY_LINK = "copyLink",
38
- ADD_REACTION = "addReaction",
39
- DELETE_REACTION = "deleteReaction",
40
- TOGGLE_REACTION = "toggleReaction"
41
- }
19
+ export declare const CommentEventTypes: {
20
+ readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
21
+ readonly DELETE_COMMENT_ANNOTATION: "deleteCommentAnnotation";
22
+ readonly APPROVE_COMMENT_ANNOTATION: "approveCommentAnnotation";
23
+ readonly ACCEPT_COMMENT_ANNOTATION: "acceptCommentAnnotation";
24
+ readonly REJECT_COMMENT_ANNOTATION: "rejectCommentAnnotation";
25
+ readonly SUBSCRIBE_COMMENT_ANNOTATION: "subscribeCommentAnnotation";
26
+ readonly UNSUBSCRIBE_COMMENT_ANNOTATION: "unsubscribeCommentAnnotation";
27
+ readonly ASSIGN_USER: "assignUser";
28
+ readonly UPDATE_STATUS: "updateStatus";
29
+ readonly UPDATE_PRIORITY: "updatePriority";
30
+ readonly UPDATE_ACCESS: "updateAccess";
31
+ readonly RESOLVE_COMMENT: "resolveComment";
32
+ readonly ADD_COMMENT: "addComment";
33
+ readonly UPDATE_COMMENT: "updateComment";
34
+ readonly DELETE_COMMENT: "deleteComment";
35
+ readonly ADD_ATTACHMENT: "addAttachment";
36
+ readonly DELETE_ATTACHMENT: "deleteAttachment";
37
+ readonly DELETE_RECORDING: "deleteRecording";
38
+ readonly COPY_LINK: "copyLink";
39
+ readonly ADD_REACTION: "addReaction";
40
+ readonly DELETE_REACTION: "deleteReaction";
41
+ readonly TOGGLE_REACTION: "toggleReaction";
42
+ };
43
+ export type CommentEventType = typeof CommentEventTypes[keyof typeof CommentEventTypes];
42
44
  export declare enum TagStatus {
43
45
  ADDED = "added",
44
46
  UPDATED = "updated",
package/models.d.ts CHANGED
@@ -56,3 +56,4 @@ export * from './app/models/data/reaction.data.model';
56
56
  export * from './app/models/data/organization-groups.data.model';
57
57
  export * from './app/models/data/organization-metadata.model';
58
58
  export * from './app/models/data/user-organization.data.model';
59
+ export * from './app/models/data/event-metadata.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "3.0.68",
3
+ "version": "3.0.70",
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": [