@veltdev/sdk-staging 5.0.4 → 6.0.0-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.
Files changed (89) hide show
  1. package/app/client/snippyly.model.d.ts +2 -21
  2. package/app/{models/data/arrow-annotation.data.model.d.ts → features/arrow/models/arrow-annotation.model.d.ts} +6 -6
  3. package/app/features/user-request/models/user-request.data.model.d.ts +37 -0
  4. package/app/models/data/comment-events.data.model.d.ts +29 -0
  5. package/app/models/data/reaction-resolver.data.model.d.ts +1 -0
  6. package/app/models/data/selection.model.d.ts +10 -8
  7. package/app/models/data/user-contact-us.data.model.d.ts +1 -1
  8. package/app/models/data/user-feedback.data.model.d.ts +1 -1
  9. package/app/models/data/user-report-bug.data.model.d.ts +1 -1
  10. package/app/models/data/user-resolver.data.model.d.ts +11 -9
  11. package/app/models/data/user.data.model.d.ts +21 -18
  12. package/app/models/element/activity-element.model.d.ts +0 -1
  13. package/app/models/element/area-element.model.d.ts +0 -1
  14. package/app/models/element/arrow-element.model.d.ts +1 -2
  15. package/app/models/element/autocomplete-element.model.d.ts +0 -1
  16. package/app/models/element/comment-element.model.d.ts +101 -79
  17. package/app/models/element/contact-element.model.d.ts +1 -2
  18. package/app/models/element/crdt-element.model.d.ts +1 -1
  19. package/app/models/element/cursor-element.model.d.ts +1 -2
  20. package/app/models/element/huddle-element.model.d.ts +1 -2
  21. package/app/models/element/live-state-sync-element.model.d.ts +1 -1
  22. package/app/models/element/notification-element.model.d.ts +20 -3
  23. package/app/models/element/presence-element.model.d.ts +32 -11
  24. package/app/models/element/reaction-element.model.d.ts +1 -1
  25. package/app/models/element/recorder-element.model.d.ts +21 -2
  26. package/app/models/element/rewriter-element.model.d.ts +43 -1
  27. package/app/models/element/selection-element.model.d.ts +1 -1
  28. package/app/models/element/suggestion-element.model.d.ts +0 -1
  29. package/app/models/element/tag-element.model.d.ts +7 -8
  30. package/app/models/element/views-element.model.d.ts +1 -1
  31. package/app/utils/constants.d.ts +10 -1
  32. package/app/utils/enums.d.ts +102 -84
  33. package/chunk-2YJ3NBTO.js +1 -0
  34. package/chunk-3OIAZGVH.js +1 -0
  35. package/chunk-3OILJMAX.js +2 -0
  36. package/chunk-4IA5G3HQ.js +1 -0
  37. package/chunk-4QPJMZ5V.js +2 -0
  38. package/chunk-52EPUXSU.js +13 -0
  39. package/chunk-57VK6E6U.js +1 -0
  40. package/chunk-5SSUFLRQ.js +1 -0
  41. package/chunk-5W33SILU.js +1 -0
  42. package/chunk-6TORUSYX.js +93 -0
  43. package/chunk-AMBQ736A.js +1 -0
  44. package/chunk-DP4GMASO.js +1 -0
  45. package/chunk-ENIVQSM6.js +2 -0
  46. package/chunk-EWNXINED.js +1 -0
  47. package/chunk-G2POMKRC.js +1 -0
  48. package/chunk-G56O673H.js +1 -0
  49. package/chunk-GUGGWPZ7.js +1 -0
  50. package/chunk-HDABOQPS.js +1 -0
  51. package/chunk-J3FNQGWW.js +6 -0
  52. package/chunk-JSZMRBOR.js +193 -0
  53. package/chunk-LAUYCNER.js +7 -0
  54. package/chunk-MJDGHV4Y.js +2 -0
  55. package/chunk-MX66OK5A.js +1 -0
  56. package/chunk-NR3CZ6OR.js +1 -0
  57. package/chunk-QDQ2XJUX.js +1 -0
  58. package/chunk-RMV5EWSF.js +1 -0
  59. package/chunk-SQTBBRA3.js +1 -0
  60. package/chunk-TY3WZ4Q4.js +167 -0
  61. package/chunk-W4BGGBK5.js +1 -0
  62. package/chunk-XAJ4ABBW.js +10 -0
  63. package/chunk-XJWB3IUW.js +2 -0
  64. package/chunk-YSZQAETY.js +1 -0
  65. package/chunk-ZMXXM7C4.js +1 -0
  66. package/models.d.ts +1 -1
  67. package/package.json +1 -1
  68. package/types.d.ts +22 -23
  69. package/velt-activity-log.js +1 -0
  70. package/velt-area.js +1 -0
  71. package/velt-arrow.js +2 -0
  72. package/velt-comment.js +14 -0
  73. package/velt-crdt.js +1 -0
  74. package/velt-cursor.js +2 -0
  75. package/velt-huddle.js +3 -0
  76. package/velt-live-state-sync.js +2 -0
  77. package/velt-notification.js +1 -0
  78. package/velt-presence.js +1 -0
  79. package/velt-reaction.js +1 -0
  80. package/velt-recorder.js +1 -0
  81. package/velt-rewriter.js +8 -0
  82. package/velt-selection.js +1 -0
  83. package/velt-tag.js +1 -0
  84. package/velt-user-invite.js +2 -0
  85. package/velt-user-request.js +1 -0
  86. package/velt-video-player.js +1 -0
  87. package/velt-views.js +3 -0
  88. package/velt.d.ts +1 -2
  89. package/velt.js +33 -550
@@ -1,9 +1,8 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { Config, DisableLogsConfig } from "../models/data/config.data.model";
4
3
  import { DocumentUser } from "../models/data/document-user.data.model";
5
4
  import { Location } from "../models/data/location.model";
6
- import { User, UserOptions, VeltAuthProvider, VeltPermissionProvider } from "../models/data/user.data.model";
5
+ import { User, Options, VeltAuthProvider, VeltPermissionProvider } from "../models/data/user.data.model";
7
6
  import { CustomCss } from "../models/data/custom-css.data.model";
8
7
  import { ActivityElement } from "../models/element/activity-element.model";
9
8
  import { AreaElement } from "../models/element/area-element.model";
@@ -24,7 +23,6 @@ import { TagElement } from "../models/element/tag-element.model";
24
23
  import { FeatureType } from "../utils/enums";
25
24
  import { UserContact } from "../models/data/user-contact.data.model";
26
25
  import { DocumentMetadata } from "../models/data/document-metadata.model";
27
- import { PageInfo } from "../models/data/page-info.model";
28
26
  import { ReactionElement } from "../models/element/reaction-element.model";
29
27
  import { CrdtElement } from "../models/element/crdt-element.model";
30
28
  import { VeltEventMetadata, VeltDebugInfo } from "../models/data/event-metadata.data.model";
@@ -41,7 +39,7 @@ import { HeartbeatConfig, Heartbeat, GetHeartbeatResponse } from "../models/data
41
39
  export declare class Snippyly {
42
40
  constructor();
43
41
  initConfig: (apiKey: string, config?: Config) => void;
44
- identify: (user: User, userOptions?: UserOptions) => Promise<unknown>;
42
+ identify: (user: User, userOptions?: Options) => Promise<unknown>;
45
43
  setVeltAuthProvider: (veltAuthProvider: VeltAuthProvider) => Promise<User | null>;
46
44
  /**
47
45
  * Tell us who the currently logged in user is.
@@ -56,23 +54,6 @@ export declare class Snippyly {
56
54
  * @param documentMetadata Document Metadata
57
55
  */
58
56
  setDocument: (id: string, documentMetadata?: DocumentMetadata) => Promise<void>;
59
- /**
60
- * Provide custom page info that the SDK should use instead of generating it from the browser
61
- * (`window.location` / `document.title`). Newly created data (comments, reactions, recordings,
62
- * presence, cursors, etc.) will use the provided page info. Already saved/existing data is not
63
- * affected.
64
- * @param pageInfo client-provided page info
65
- * @param options optional; pass a `documentId` to scope the page info to a specific document
66
- * (per-document page info takes precedence over the global page info)
67
- */
68
- setPageInfo: (pageInfo: PageInfo, options?: { documentId?: string; }) => void;
69
- /**
70
- * Clear custom page info previously set via `setPageInfo`. The SDK will resume generating
71
- * page info from the browser.
72
- * @param options optional; pass a `documentId` to clear only that document's page info,
73
- * otherwise the global page info is cleared
74
- */
75
- clearPageInfo: (options?: { documentId?: string; }) => void;
76
57
  /**
77
58
  * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
78
59
  * @param id unique document ID
@@ -1,9 +1,9 @@
1
- import { AnnotationProperty } from "./annotation-property.data.model";
2
- import { CursorPosition } from "./cursor-position.data.model";
3
- import { Location } from "./location.model";
4
- import { PageInfo } from "./page-info.model";
5
- import { TargetElement } from "./target-element.data.model";
6
- import { User } from "./user.data.model";
1
+ import { AnnotationProperty } from "../../../models/data/annotation-property.data.model";
2
+ import { CursorPosition } from "../../../models/data/cursor-position.data.model";
3
+ import { Location } from "../../../models/data/location.model";
4
+ import { PageInfo } from "../../../models/data/page-info.model";
5
+ import { TargetElement } from "../../../models/data/target-element.data.model";
6
+ import { User } from "../../../models/data/user.data.model";
7
7
  export declare class ArrowAnnotation {
8
8
  /**
9
9
  * Unique identifier for the arrow pin annotation.
@@ -0,0 +1,37 @@
1
+ import { DocumentMetadata } from "../../../models/data/document-metadata.model";
2
+ import { PageInfo } from "../../../models/data/page-info.model";
3
+ import { User } from "../../../models/data/user.data.model";
4
+ export declare class UserRequest {
5
+ /**
6
+ * Unique id of the feedback
7
+ */
8
+ id?: string;
9
+ /**
10
+ * apiKey of the client
11
+ */
12
+ apiKey?: string | null;
13
+ /**
14
+ * Email id of the feedback giver
15
+ */
16
+ emailId?: string;
17
+ /**
18
+ * Message given by the user
19
+ */
20
+ message?: string;
21
+ /**
22
+ * User who added the feedback
23
+ */
24
+ from?: User | null;
25
+ /**
26
+ * Date when the feedback was added
27
+ */
28
+ lastUpdated?: any;
29
+ /**
30
+ * Document metadata
31
+ */
32
+ metadata?: DocumentMetadata | null;
33
+ /**
34
+ * User's page info
35
+ */
36
+ pageInfo?: PageInfo;
37
+ }
@@ -89,6 +89,10 @@ export type CommentEventTypesMap = {
89
89
  [CommentEventTypes.COMMENT_TOOL_CLICKED]: CommentToolClickedEvent;
90
90
  [CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
91
91
  [CommentEventTypes.SIDEBAR_BUTTON_CLICKED]: SidebarButtonClickedEvent;
92
+ [CommentEventTypes.SIDEBAR_OPEN]: SidebarOpenEvent;
93
+ [CommentEventTypes.SIDEBAR_CLOSE]: SidebarCloseEvent;
94
+ [CommentEventTypes.COMMENT_CLICK]: CommentClickEvent;
95
+ [CommentEventTypes.COMMENT_NAVIGATION_BUTTON_CLICK]: CommentNavigationButtonClickEvent;
92
96
  [CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
93
97
  [CommentEventTypes.COMMENT_SAVED]: CommentSavedEvent;
94
98
  [CommentEventTypes.COMMENT_SAVE_TRIGGERED]: CommentSaveTriggeredEvent;
@@ -347,6 +351,31 @@ export interface SidebarButtonClickEvent {
347
351
  }
348
352
  export interface SidebarButtonClickedEvent extends SidebarButtonClickEvent {
349
353
  }
354
+ /** Fired when the comment sidebar opens. Subscribe via `commentElement.on('sidebarOpen')`. */
355
+ export interface SidebarOpenEvent {
356
+ metadata?: VeltEventMetadata;
357
+ }
358
+ /** Fired when the comment sidebar closes. Subscribe via `commentElement.on('sidebarClose')`. */
359
+ export interface SidebarCloseEvent {
360
+ metadata?: VeltEventMetadata;
361
+ }
362
+ /** Fired when a comment is clicked in the sidebar list. Subscribe via `commentElement.on('commentClick')`. */
363
+ export interface CommentClickEvent {
364
+ documentId?: string | null;
365
+ location?: Location | null;
366
+ targetElementId?: string | null;
367
+ context?: {
368
+ [key: string]: any;
369
+ };
370
+ annotation?: CommentAnnotation;
371
+ metadata?: VeltEventMetadata;
372
+ }
373
+ /**
374
+ * Fired when the navigation ("go to") button on a sidebar comment is clicked.
375
+ * Subscribe via `commentElement.on('commentNavigationButtonClick')`.
376
+ */
377
+ export interface CommentNavigationButtonClickEvent extends CommentClickEvent {
378
+ }
350
379
  export interface AttachmentDownloadClickedEvent {
351
380
  annotationId: string;
352
381
  commentAnnotation: CommentAnnotation;
@@ -39,4 +39,5 @@ export interface PartialReactionAnnotation {
39
39
  metadata?: BaseMetadata;
40
40
  icon?: string;
41
41
  from?: PartialUser;
42
+ [key: string]: any;
42
43
  }
@@ -21,14 +21,16 @@ export declare class Selection {
21
21
  pageInfo: PageInfo;
22
22
  timestamp: number;
23
23
  }
24
- export declare enum UserIndicatorPosition {
25
- Start = "start",
26
- End = "end"
27
- }
28
- export declare enum UserIndicatorType {
29
- Avatar = "avatar",
30
- Label = "label"
31
- }
24
+ export declare const UserIndicatorPosition: {
25
+ readonly Start: "start";
26
+ readonly End: "end";
27
+ };
28
+ export type UserIndicatorPosition = (typeof UserIndicatorPosition)[keyof typeof UserIndicatorPosition];
29
+ export declare const UserIndicatorType: {
30
+ readonly Avatar: "avatar";
31
+ readonly Label: "label";
32
+ };
33
+ export type UserIndicatorType = (typeof UserIndicatorType)[keyof typeof UserIndicatorType];
32
34
  export declare class LiveSelectionData {
33
35
  [userIdHash: string]: Selection;
34
36
  }
@@ -1,3 +1,3 @@
1
- import { UserRequest } from "./user-request.data.model";
1
+ import { UserRequest } from "../../features/user-request/models/user-request.data.model";
2
2
  export declare class UserContactUs extends UserRequest {
3
3
  }
@@ -1,3 +1,3 @@
1
- import { UserRequest } from "./user-request.data.model";
1
+ import { UserRequest } from "../../features/user-request/models/user-request.data.model";
2
2
  export declare class UserFeedback extends UserRequest {
3
3
  }
@@ -1,3 +1,3 @@
1
- import { UserRequest } from "./user-request.data.model";
1
+ import { UserRequest } from "../../features/user-request/models/user-request.data.model";
2
2
  export declare class UserReportBug extends UserRequest {
3
3
  }
@@ -61,12 +61,14 @@ export interface GetUserPermissionsResponse {
61
61
  };
62
62
  };
63
63
  }
64
- export declare enum UserPermissionAccessRole {
65
- EDITOR = "editor",
66
- VIEWER = "viewer"
67
- }
68
- export declare enum UserPermissionAccessRoleResult {
69
- DOES_NOT_EXIST = "does_not_exist",
70
- PERMISSION_DENIED = "permission_denied",
71
- SOMETHING_WENT_WRONG = "something_went_wrong"
72
- }
64
+ export declare const UserPermissionAccessRole: {
65
+ readonly EDITOR: "editor";
66
+ readonly VIEWER: "viewer";
67
+ };
68
+ export type UserPermissionAccessRole = (typeof UserPermissionAccessRole)[keyof typeof UserPermissionAccessRole];
69
+ export declare const UserPermissionAccessRoleResult: {
70
+ readonly DOES_NOT_EXIST: "does_not_exist";
71
+ readonly PERMISSION_DENIED: "permission_denied";
72
+ readonly SOMETHING_WENT_WRONG: "something_went_wrong";
73
+ };
74
+ export type UserPermissionAccessRoleResult = (typeof UserPermissionAccessRoleResult)[keyof typeof UserPermissionAccessRoleResult];
@@ -125,18 +125,20 @@ export interface VeltAuthProvider {
125
125
  generateToken?: () => Promise<string>;
126
126
  onError?: (err: unknown) => void;
127
127
  }
128
- export declare enum RevokeAccessOnType {
129
- DOCUMENT_UNSET = "document_unset",
130
- USER_LOGOUT = "user_logout"
131
- }
132
- export declare enum PermissionSource {
133
- SET_DOCUMENTS = "setDocuments",
134
- IDENTIFY = "identify",
135
- GET_NOTIFICATIONS = "getNotifications",
136
- SET_NOTIFICATIONS = "setNotifications",
137
- REVOKE_ACCESS_ON_USER_LOGOUT = "revokeAccessOnUserLogout",
138
- REVOKE_ACCESS_ON_DOCUMENT_UNSET = "revokeAccessOnDocumentUnset"
139
- }
128
+ export declare const RevokeAccessOnType: {
129
+ readonly DOCUMENT_UNSET: "document_unset";
130
+ readonly USER_LOGOUT: "user_logout";
131
+ };
132
+ export type RevokeAccessOnType = (typeof RevokeAccessOnType)[keyof typeof RevokeAccessOnType];
133
+ export declare const PermissionSource: {
134
+ readonly SET_DOCUMENTS: "setDocuments";
135
+ readonly IDENTIFY: "identify";
136
+ readonly GET_NOTIFICATIONS: "getNotifications";
137
+ readonly SET_NOTIFICATIONS: "setNotifications";
138
+ readonly REVOKE_ACCESS_ON_USER_LOGOUT: "revokeAccessOnUserLogout";
139
+ readonly REVOKE_ACCESS_ON_DOCUMENT_UNSET: "revokeAccessOnDocumentUnset";
140
+ };
141
+ export type PermissionSource = (typeof PermissionSource)[keyof typeof PermissionSource];
140
142
  export interface RevokeAccessOn {
141
143
  type: RevokeAccessOnType;
142
144
  revokeOrganizationAccess?: boolean;
@@ -192,12 +194,13 @@ export interface PermissionResolverRequest {
192
194
  requests: PermissionQuery[];
193
195
  };
194
196
  }
195
- export declare enum PermissionResourceType {
196
- FOLDER = "folder",
197
- DOCUMENT = "document",
198
- ORGANIZATION = "organization",
199
- CONTEXT = "context"
200
- }
197
+ export declare const PermissionResourceType: {
198
+ readonly FOLDER: "folder";
199
+ readonly DOCUMENT: "document";
200
+ readonly ORGANIZATION: "organization";
201
+ readonly CONTEXT: "context";
202
+ };
203
+ export type PermissionResourceType = (typeof PermissionResourceType)[keyof typeof PermissionResourceType];
201
204
  export interface PermissionQuery {
202
205
  userId: string;
203
206
  resource: {
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { ActivityRecord, ActivitySubscribeConfig, CreateActivityData } from "../data/activity.data.model";
4
3
 
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  export declare class AreaElement {
3
2
  /**
4
3
  * To enable area feature
@@ -1,10 +1,9 @@
1
- // @ts-nocheck
2
1
  export declare class ArrowElement {
3
2
  /**
4
3
  * To allow arrow in specific elements only
5
4
  * @param elementIds Element ids to be allowed for arrow
6
5
  */
7
- public allowedElementIds: (elementIds: string[]) => any;
6
+ public allowedElementIds: (elementIds: string[]) => void;
8
7
 
9
8
  constructor();
10
9
 
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { AutocompleteData, AutocompleteChipData } from "../data/autocomplete.data.model";
4
3
  export declare class AutocompleteElement {