@veltdev/sdk 5.0.2-beta.2 → 5.0.2-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.
@@ -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
  *
@@ -234,7 +241,8 @@ export declare class CommentSelectionChangeData {
234
241
  }
235
242
  export declare class VisibilityOptionClickedData {
236
243
  annotationId: string;
237
- visibility: 'public' | 'private';
244
+ visibility: CommentVisibilityOptionType;
245
+ users?: any[];
238
246
  }
239
247
  export declare class InlineCommentSectionConfig {
240
248
  id: 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";
@@ -188,6 +188,7 @@ export interface CommentSavedEvent {
188
188
  }
189
189
  export interface CommentSaveTriggeredEvent {
190
190
  annotationId: string;
191
+ commentAnnotation: CommentAnnotation;
191
192
  metadata: VeltEventMetadata;
192
193
  }
193
194
  export interface UpdateCommentEvent {
@@ -332,6 +333,7 @@ export interface AttachmentDownloadClickedEvent {
332
333
  export interface VisibilityOptionClickedEvent {
333
334
  annotationId: string;
334
335
  commentAnnotation: CommentAnnotation;
335
- visibility: 'public' | 'private';
336
+ visibility: CommentVisibilityOptionType;
337
+ users?: any[];
336
338
  metadata?: VeltEventMetadata;
337
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[];
@@ -291,14 +291,14 @@ export declare class CommentElement {
291
291
  public disableStatus: () => any;
292
292
 
293
293
  /**
294
- * To enable visibility option dropdown on comments
294
+ * To enable visibility options on comments
295
295
  */
296
- public enableVisibilityOptionDropdown: () => any;
296
+ public enableVisibilityOptions: () => any;
297
297
 
298
298
  /**
299
- * To disable visibility option dropdown on comments
299
+ * To disable visibility options on comments
300
300
  */
301
- public disableVisibilityOptionDropdown: () => any;
301
+ public disableVisibilityOptions: () => any;
302
302
 
303
303
  /**
304
304
  * To enable feature to show resolve button
@@ -1626,14 +1626,14 @@ export declare class CommentElement {
1626
1626
  private _disableStatus;
1627
1627
 
1628
1628
  /**
1629
- * To enable visibility option dropdown on comments
1629
+ * To enable visibility options on comments
1630
1630
  */
1631
- private _enableVisibilityOptionDropdown;
1631
+ private _enableVisibilityOptions;
1632
1632
 
1633
1633
  /**
1634
- * To disable visibility option dropdown on comments
1634
+ * To disable visibility options on comments
1635
1635
  */
1636
- private _disableVisibilityOptionDropdown;
1636
+ private _disableVisibilityOptions;
1637
1637
 
1638
1638
  /**
1639
1639
  * To enable feature to show resolve button
@@ -313,3 +313,7 @@ export type NotificationSettingsItemType = 'ALL' | 'MINE' | 'NONE' | string;
313
313
  * Type for notification settings layout
314
314
  */
315
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",
3
- "version": "5.0.2-beta.2",
3
+ "version": "5.0.2-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": [