@veltdev/sdk-dev 5.0.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
  */
@@ -1,5 +1,6 @@
1
1
  import { CommentAccessMode } 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,10 @@ export declare class CommentSelectionChangeData {
232
239
  selected: boolean;
233
240
  annotation: CommentAnnotation;
234
241
  }
242
+ export declare class VisibilityOptionClickedData {
243
+ annotationId: string;
244
+ visibility: 'public' | 'private';
245
+ }
235
246
  export declare class InlineCommentSectionConfig {
236
247
  id: string;
237
248
  name?: string;
@@ -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;
@@ -187,6 +191,11 @@ export interface CommentSavedEvent {
187
191
  commentAnnotation: CommentAnnotation;
188
192
  metadata: VeltEventMetadata;
189
193
  }
194
+ export interface CommentSaveTriggeredEvent {
195
+ annotationId: string;
196
+ commentAnnotation: CommentAnnotation;
197
+ metadata: VeltEventMetadata;
198
+ }
190
199
  export interface UpdateCommentEvent {
191
200
  annotationId: string;
192
201
  commentAnnotation: CommentAnnotation;
@@ -313,12 +322,28 @@ export interface CommentToolClickEvent {
313
322
  targetElementId?: string | null;
314
323
  metadata?: VeltEventMetadata;
315
324
  }
325
+ export interface CommentToolClickedEvent {
326
+ context: {
327
+ [key: string]: any;
328
+ } | null;
329
+ targetElementId?: string | null;
330
+ metadata?: VeltEventMetadata;
331
+ }
316
332
  export interface SidebarButtonClickEvent {
317
333
  metadata?: VeltEventMetadata;
318
334
  }
335
+ export interface SidebarButtonClickedEvent {
336
+ metadata?: VeltEventMetadata;
337
+ }
319
338
  export interface AttachmentDownloadClickedEvent {
320
339
  annotationId: string;
321
340
  commentAnnotation: CommentAnnotation;
322
341
  attachment: Attachment;
323
342
  metadata?: VeltEventMetadata;
324
343
  }
344
+ export interface VisibilityOptionClickedEvent {
345
+ annotationId: string;
346
+ commentAnnotation: CommentAnnotation;
347
+ visibility: 'public' | 'private';
348
+ metadata?: VeltEventMetadata;
349
+ }
@@ -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 option dropdown on comments
295
+ */
296
+ public enableVisibilityOptionDropdown: () => any;
297
+
298
+ /**
299
+ * To disable visibility option dropdown on comments
300
+ */
301
+ public disableVisibilityOptionDropdown: () => any;
302
+
293
303
  /**
294
304
  * To enable feature to show resolve button
295
305
  */
@@ -1620,6 +1630,16 @@ export declare class CommentElement {
1620
1630
  */
1621
1631
  private _disableStatus;
1622
1632
 
1633
+ /**
1634
+ * To enable visibility option dropdown on comments
1635
+ */
1636
+ private _enableVisibilityOptionDropdown;
1637
+
1638
+ /**
1639
+ * To disable visibility option dropdown on comments
1640
+ */
1641
+ private _disableVisibilityOptionDropdown;
1642
+
1623
1643
  /**
1624
1644
  * To enable feature to show resolve button
1625
1645
  */
@@ -62,9 +62,13 @@ export declare const CommentEventTypes: {
62
62
  readonly COMMENT_PIN_CLICKED: "commentPinClicked";
63
63
  readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked";
64
64
  readonly COMMENT_TOOL_CLICK: "commentToolClick";
65
+ readonly COMMENT_TOOL_CLICKED: "commentToolClicked";
65
66
  readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
67
+ readonly SIDEBAR_BUTTON_CLICKED: "sidebarButtonClicked";
66
68
  readonly ATTACHMENT_DOWNLOAD_CLICKED: "attachmentDownloadClicked";
67
69
  readonly COMMENT_SAVED: "commentSaved";
70
+ readonly COMMENT_SAVE_TRIGGERED: "commentSaveTriggered";
71
+ readonly VISIBILITY_OPTION_CLICKED: "visibilityOptionClicked";
68
72
  };
69
73
  export declare const RecorderEventTypes: {
70
74
  readonly TRANSCRIPTION_DONE: "transcriptionDone";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-dev",
3
- "version": "5.0.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": [