@veltdev/sdk 3.0.81 → 3.0.83

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,4 +1,5 @@
1
1
  import { CommentAnnotation } from "./comment-annotation.data.model";
2
+ import { UnreadCommentsMap } from "./comment-utils.data.model";
2
3
  import { Comment } from "./comment.data.model";
3
4
  import { VeltEventMetadata } from "./event-metadata.data.model";
4
5
  import { Notification } from "./notification.model";
@@ -18,9 +19,7 @@ export interface VeltButtonData {
18
19
  index?: number;
19
20
  commentAnnotations?: CommentAnnotation[];
20
21
  systemFilteredAnnotations?: CommentAnnotation[];
21
- unreadCommentAnnotationsMap?: {
22
- [commentAnnotationId: string]: number;
23
- };
22
+ unreadCommentAnnotationsMap?: UnreadCommentsMap;
24
23
  notification?: Notification;
25
24
  notifications?: Notification[];
26
25
  }
@@ -1,4 +1,5 @@
1
1
  import { CommentAnnotation } from "./comment-annotation.data.model";
2
+ import { UnreadCommentsMap } from "./comment-utils.data.model";
2
3
  import { Location } from "./location.model";
3
4
  declare class FilterTypeConfig {
4
5
  name?: string;
@@ -40,9 +41,7 @@ export interface CommentSidebarCustomActionsState {
40
41
  export interface CommentSidebarCustomActionEventData {
41
42
  actions: CommentSidebarCustomActionsState;
42
43
  data: CommentAnnotation[];
43
- unreadDataMap: {
44
- [commentAnnotationId: string]: number;
45
- };
44
+ unreadDataMap: UnreadCommentsMap;
46
45
  systemFilteredData: CommentAnnotation[];
47
46
  }
48
47
  export declare class CommentSidebarData {
@@ -0,0 +1,8 @@
1
+ export interface IUnreadCommentsMap {
2
+ [annotationId: string]: number;
3
+ }
4
+ export type UnreadCommentsMap = IUnreadCommentsMap | null;
5
+ export interface IUnreadCommentsCount {
6
+ count: number;
7
+ }
8
+ export type UnreadCommentsCount = IUnreadCommentsCount | null;
@@ -8,6 +8,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
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
+ import { UnreadCommentsCount } from "../data/comment-utils.data.model";
11
12
  export declare class CommentElement {
12
13
  /**
13
14
  * Subscribe to comments on the current document.
@@ -667,33 +668,33 @@ export declare class CommentElement {
667
668
  /**
668
669
  * Subscribe to unread comments count by annotation id
669
670
  *
670
- * Returns Observable<{count: string} | null>.
671
+ * Returns Observable<UnreadCommentsCount>.
671
672
  */
672
- public getUnreadCommentCountByAnnotationId: (commentAnnotationId: string) => Observable<{ count: number } | null>;
673
+ public getUnreadCommentCountByAnnotationId: (commentAnnotationId: string) => Observable<UnreadCommentsCount>;
673
674
  /**
674
675
  * Subscribe to unread comments annotation count on current document
675
676
  *
676
- * Returns Observable<{count: string} | null>.
677
+ * Returns Observable<UnreadCommentsCount>.
677
678
  */
678
- public getUnreadCommentAnnotationCountOnCurrentDocument: () => Observable<{ count: number } | null>;
679
+ public getUnreadCommentAnnotationCountOnCurrentDocument: () => Observable<UnreadCommentsCount>;
679
680
  /**
680
681
  * Subscribe to unread comments count on current document
681
682
  *
682
- * Returns Observable<{count: string} | null>.
683
+ * Returns Observable<UnreadCommentsCount>.
683
684
  */
684
- public getUnreadCommentCountOnCurrentDocument: () => Observable<{ count: number } | null>;
685
+ public getUnreadCommentCountOnCurrentDocument: () => Observable<UnreadCommentsCount>;
685
686
  /**
686
687
  * Subscribe to unread comments annotation count by location id
687
688
  *
688
- * Returns Observable<{count: string} | null>.
689
+ * Returns Observable<UnreadCommentsCount>.
689
690
  */
690
- public getUnreadCommentAnnotationCountByLocationId: (locationId: string) => Observable<{ count: number } | null>;
691
+ public getUnreadCommentAnnotationCountByLocationId: (locationId: string) => Observable<UnreadCommentsCount>;
691
692
  /**
692
693
  * Subscribe to unread comments count by location id
693
694
  *
694
- * Returns Observable<{count: string} | null>.
695
+ * Returns Observable<UnreadCommentsCount>.
695
696
  */
696
- public getUnreadCommentCountByLocationId: (locationId: string) => Observable<{ count: number } | null>;
697
+ public getUnreadCommentCountByLocationId: (locationId: string) => Observable<UnreadCommentsCount>;
697
698
 
698
699
  /**
699
700
  * To update comment dialog position
@@ -1711,31 +1712,31 @@ export declare class CommentElement {
1711
1712
 
1712
1713
  /**
1713
1714
  * To get unread comments count by annotation id
1714
- * @returns Observable<{count: string} | null>.
1715
+ * @returns Observable<UnreadCommentsCount>.
1715
1716
  */
1716
1717
  private _getUnreadCommentCountByAnnotationId;
1717
1718
 
1718
1719
  /**
1719
1720
  * To get unread comments annotation count on current document
1720
- * @returns Observable<{count: string} | null>.
1721
+ * @returns Observable<UnreadCommentsCount>.
1721
1722
  */
1722
1723
  private _getUnreadCommentAnnotationCountOnCurrentDocument;
1723
1724
 
1724
1725
  /**
1725
1726
  * To get unread comments count on current document
1726
- * @returns Observable<{count: string} | null>.
1727
+ * @returns Observable<UnreadCommentsCount>.
1727
1728
  */
1728
1729
  private _getUnreadCommentCountOnCurrentDocument;
1729
1730
 
1730
1731
  /**
1731
1732
  * To get unread comments annotation count by location id
1732
- * @returns Observable<{count: string} | null>.
1733
+ * @returns Observable<UnreadCommentsCount>.
1733
1734
  */
1734
1735
  private _getUnreadCommentAnnotationCountByLocationId;
1735
1736
 
1736
1737
  /**
1737
1738
  * To get unread comments count by location id
1738
- * @returns Observable<{count: string} | null>.
1739
+ * @returns Observable<UnreadCommentsCount>.
1739
1740
  */
1740
1741
  private _getUnreadCommentCountByLocationId;
1741
1742
 
package/models.d.ts CHANGED
@@ -8,6 +8,7 @@ export * from './app/models/data/comment-annotation.data.model';
8
8
  export * from './app/models/data/comment-events.data.model';
9
9
  export * from './app/models/data/comment.data.model';
10
10
  export * from './app/models/data/comment-actions.data.model';
11
+ export * from './app/models/data/comment-utils.data.model';
11
12
  export * from './app/models/data/config.data.model';
12
13
  export * from './app/models/data/core-events.data.model';
13
14
  export * from './app/models/data/cursor-position.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "3.0.81",
3
+ "version": "3.0.83",
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": [