@veltdev/sdk-staging 5.0.2-beta.1 → 5.0.2-beta.10

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.
@@ -29,7 +29,7 @@ import { VeltEventMetadata, VeltDebugInfo } from "../models/data/event-metadata.
29
29
  import { CoreEventTypesMap } from "../models/data/core-events.data.model";
30
30
  import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest, UpdateDocumentsRequest, UpdateLocationsRequest } from "../models/data/document.data.model";
31
31
  import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
32
- import { UserDataProvider, GetUserPermissionsRequest, GetUserPermissionsResponse } from "../models/data/user-resolver.data.model";
32
+ import { AnonymousUserDataProvider, UserDataProvider, GetUserPermissionsRequest, GetUserPermissionsResponse } from "../models/data/user-resolver.data.model";
33
33
  import { VeltDataProvider } from "../models/data/provider.data.model";
34
34
  import { VeltEncryptionProvider } from "../models/data/encryption-provider.data.model";
35
35
  import { VeltResetButtonStateConfig } from "../models/data/button.data.model";
@@ -97,6 +97,10 @@ export declare class Snippyly {
97
97
  * To set the user data provider.
98
98
  */
99
99
  setUserDataProvider: (userDataProvider: UserDataProvider) => void;
100
+ /**
101
+ * To set the anonymous user data provider.
102
+ */
103
+ setAnonymousUserDataProvider: (resolver: AnonymousUserDataProvider, config?: { ha?: boolean }) => void;
100
104
  /**
101
105
  * To set the data provider.
102
106
  */
@@ -141,6 +141,8 @@ export interface AddCommentRequest {
141
141
  assignedTo?: User;
142
142
  assigned?: boolean;
143
143
  options?: RequestOptions;
144
+ /** Optional visibility configuration for the comment */
145
+ visibility?: CommentVisibilityConfig;
144
146
  }
145
147
  export interface UpdateCommentRequest {
146
148
  annotationId: string;
@@ -1,5 +1,6 @@
1
- import { CommentAccessMode } from "../../utils/enums";
1
+ import { CommentAccessMode, CommentVisibilityOptionType } from "../../utils/enums";
2
2
  import { BaseMetadata } from "./base-metadata.data.model";
3
+ import { CommentVisibilityType } from "./comment-actions.data.model";
3
4
  import { Comment } from "./comment.data.model";
4
5
  import { CursorPosition } from "./cursor-position.data.model";
5
6
  import { CustomAnnotationDropdownItem } from "./custom-chip-dropdown.data.model";
@@ -10,6 +11,11 @@ import { TargetElement } from "./target-element.data.model";
10
11
  import { TargetTextRange } from "./target-text-range.data.model";
11
12
  import { User } from "./user.data.model";
12
13
  import { CommentAnnotationViews } from "./views.data.model";
14
+ export interface CommentAnnotationVisibilityConfig {
15
+ type: CommentVisibilityType;
16
+ organizationId?: string;
17
+ userIds?: string[];
18
+ }
13
19
  export declare class CommentAnnotation {
14
20
  /**
15
21
  * Unique identifier for the comment pin annotation.
@@ -23,6 +29,7 @@ export declare class CommentAnnotation {
23
29
  * Auto generated.
24
30
  */
25
31
  annotationNumber?: number;
32
+ visibilityConfig?: CommentAnnotationVisibilityConfig;
26
33
  /**
27
34
  * This is the list of all comments part of this annotation.
28
35
  *
@@ -232,6 +239,11 @@ export declare class CommentSelectionChangeData {
232
239
  selected: boolean;
233
240
  annotation: CommentAnnotation;
234
241
  }
242
+ export declare class VisibilityOptionClickedData {
243
+ annotationId: string;
244
+ visibility: CommentVisibilityOptionType;
245
+ users?: any[];
246
+ }
235
247
  export declare class InlineCommentSectionConfig {
236
248
  id: string;
237
249
  name?: string;
@@ -1,4 +1,4 @@
1
- import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
1
+ import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus, CommentVisibilityOptionType } 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";
@@ -85,9 +85,13 @@ export type CommentEventTypesMap = {
85
85
  [CommentEventTypes.COMMENT_PIN_CLICKED]: CommentPinClickedEvent;
86
86
  [CommentEventTypes.COMMENT_BUBBLE_CLICKED]: CommentBubbleClickedEvent;
87
87
  [CommentEventTypes.COMMENT_TOOL_CLICK]: CommentToolClickEvent;
88
+ [CommentEventTypes.COMMENT_TOOL_CLICKED]: CommentToolClickedEvent;
88
89
  [CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
90
+ [CommentEventTypes.SIDEBAR_BUTTON_CLICKED]: SidebarButtonClickedEvent;
89
91
  [CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
90
92
  [CommentEventTypes.COMMENT_SAVED]: CommentSavedEvent;
93
+ [CommentEventTypes.COMMENT_SAVE_TRIGGERED]: CommentSaveTriggeredEvent;
94
+ [CommentEventTypes.VISIBILITY_OPTION_CLICKED]: VisibilityOptionClickedEvent;
91
95
  };
92
96
  export interface AddAttachmentEvent {
93
97
  annotationId: string;
@@ -182,6 +186,11 @@ export interface CommentSavedEvent {
182
186
  commentAnnotation: CommentAnnotation;
183
187
  metadata: VeltEventMetadata;
184
188
  }
189
+ export interface CommentSaveTriggeredEvent {
190
+ annotationId: string;
191
+ commentAnnotation: CommentAnnotation;
192
+ metadata: VeltEventMetadata;
193
+ }
185
194
  export interface UpdateCommentEvent {
186
195
  annotationId: string;
187
196
  commentAnnotation: CommentAnnotation;
@@ -308,12 +317,23 @@ export interface CommentToolClickEvent {
308
317
  targetElementId?: string | null;
309
318
  metadata?: VeltEventMetadata;
310
319
  }
320
+ export interface CommentToolClickedEvent extends CommentToolClickEvent {
321
+ }
311
322
  export interface SidebarButtonClickEvent {
312
323
  metadata?: VeltEventMetadata;
313
324
  }
325
+ export interface SidebarButtonClickedEvent extends SidebarButtonClickEvent {
326
+ }
314
327
  export interface AttachmentDownloadClickedEvent {
315
328
  annotationId: string;
316
329
  commentAnnotation: CommentAnnotation;
317
330
  attachment: Attachment;
318
331
  metadata?: VeltEventMetadata;
319
332
  }
333
+ export interface VisibilityOptionClickedEvent {
334
+ annotationId: string;
335
+ commentAnnotation: CommentAnnotation;
336
+ visibility: CommentVisibilityOptionType;
337
+ users?: any[];
338
+ metadata?: VeltEventMetadata;
339
+ }
@@ -23,7 +23,8 @@ export declare enum UserResolverSource {
23
23
  SET_SINGLE_EDITOR_MODE_LIVE_STATE_DATA_FOR_DIFFERENT_USER_PRESENT_ON_TAB = "setSingleEditorModeLiveStateDataForDifferentUserPresentOnTab",
24
24
  RESOLVE_AND_MERGE_SINGLE_EDITOR_LIVE_STATE_DATA_WITH_USER = "resolveAndMergeSingleEditorLiveStateDataWithUser",
25
25
  GET_SINGLE_EDITOR_MODE_DATA = "getSingleEditorModeData",
26
- RESOLVE_USERS_FROM_HUDDLE_MESSAGES = "resolveUsersFromHuddleMessages"
26
+ RESOLVE_USERS_FROM_HUDDLE_MESSAGES = "resolveUsersFromHuddleMessages",
27
+ RESOLVE_USER_IDS_BY_EMAIL = "resolveUserIdsByEmail"
27
28
  }
28
29
  export declare enum UserResolverModuleName {
29
30
  IDENTIFY = "identify/authProvider",
@@ -1,10 +1,11 @@
1
1
  import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
2
2
  import { AttachmentDataProvider } from "./attachment-resolver.data.model";
3
3
  import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
4
- import { UserDataProvider } from "./user-resolver.data.model";
4
+ import { AnonymousUserDataProvider, UserDataProvider } from "./user-resolver.data.model";
5
5
  export interface VeltDataProvider {
6
6
  comment?: CommentAnnotationDataProvider;
7
7
  user?: UserDataProvider;
8
8
  reaction?: ReactionAnnotationDataProvider;
9
9
  attachment?: AttachmentDataProvider;
10
+ anonymousUser?: AnonymousUserDataProvider;
10
11
  }
@@ -1,10 +1,24 @@
1
- import { ResolverConfig } from "./resolver.data.model";
1
+ import { ResolverConfig, ResolverResponse, RetryConfig } from "./resolver.data.model";
2
2
  import { User } from "./user.data.model";
3
3
  export interface UserDataProvider {
4
4
  get(userIds: string[]): Promise<Record<string, User>>;
5
5
  config?: ResolverConfig;
6
6
  resolveTimeout?: number;
7
7
  }
8
+ export interface AnonymousUserDataProvider {
9
+ resolveUserIdsByEmail(request: ResolveUserIdsByEmailRequest): Promise<ResolverResponse<Record<string, string>>>;
10
+ config?: AnonymousUserDataProviderConfig;
11
+ }
12
+ export interface AnonymousUserDataProviderConfig {
13
+ resolveTimeout?: number;
14
+ getRetryConfig?: RetryConfig;
15
+ }
16
+ export interface ResolveUserIdsByEmailRequest {
17
+ organizationId: string;
18
+ documentId?: string;
19
+ folderId?: string;
20
+ emails: string[];
21
+ }
8
22
  export interface GetUserResolverRequest {
9
23
  organizationId: string;
10
24
  userIds: string[];
@@ -290,6 +290,16 @@ export declare class CommentElement {
290
290
  */
291
291
  public disableStatus: () => any;
292
292
 
293
+ /**
294
+ * To enable visibility options on comments
295
+ */
296
+ public enableVisibilityOptions: () => any;
297
+
298
+ /**
299
+ * To disable visibility options on comments
300
+ */
301
+ public disableVisibilityOptions: () => any;
302
+
293
303
  /**
294
304
  * To enable feature to show resolve button
295
305
  */
@@ -1615,6 +1625,16 @@ export declare class CommentElement {
1615
1625
  */
1616
1626
  private _disableStatus;
1617
1627
 
1628
+ /**
1629
+ * To enable visibility options on comments
1630
+ */
1631
+ private _enableVisibilityOptions;
1632
+
1633
+ /**
1634
+ * To disable visibility options on comments
1635
+ */
1636
+ private _disableVisibilityOptions;
1637
+
1618
1638
  /**
1619
1639
  * To enable feature to show resolve button
1620
1640
  */
@@ -60,9 +60,13 @@ export declare const CommentEventTypes: {
60
60
  readonly COMMENT_PIN_CLICKED: "commentPinClicked";
61
61
  readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked";
62
62
  readonly COMMENT_TOOL_CLICK: "commentToolClick";
63
+ readonly COMMENT_TOOL_CLICKED: "commentToolClicked";
63
64
  readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
65
+ readonly SIDEBAR_BUTTON_CLICKED: "sidebarButtonClicked";
64
66
  readonly ATTACHMENT_DOWNLOAD_CLICKED: "attachmentDownloadClicked";
65
67
  readonly COMMENT_SAVED: "commentSaved";
68
+ readonly COMMENT_SAVE_TRIGGERED: "commentSaveTriggered";
69
+ readonly VISIBILITY_OPTION_CLICKED: "visibilityOptionClicked";
66
70
  };
67
71
  export declare const RecorderEventTypes: {
68
72
  readonly TRANSCRIPTION_DONE: "transcriptionDone";
@@ -309,3 +313,7 @@ export type NotificationSettingsItemType = 'ALL' | 'MINE' | 'NONE' | string;
309
313
  * Type for notification settings layout
310
314
  */
311
315
  export type NotificationSettingsLayout = 'accordion' | 'dropdown';
316
+ /**
317
+ * Type for comment visibility options in the visibility banner dropdown
318
+ */
319
+ export type CommentVisibilityOptionType = 'personal' | 'selected-people' | 'org-users' | 'public';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-staging",
3
- "version": "5.0.2-beta.1",
3
+ "version": "5.0.2-beta.10",
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": [