@veltdev/types 1.0.1

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 (63) hide show
  1. package/app/client/snippyly.model.d.ts +141 -0
  2. package/app/client/velt.model.d.ts +5 -0
  3. package/app/models/data/annotation-property.data.model.d.ts +30 -0
  4. package/app/models/data/area-annotation.data.model.d.ts +74 -0
  5. package/app/models/data/attachment.model.d.ts +40 -0
  6. package/app/models/data/chatgpt.data.model.d.ts +10 -0
  7. package/app/models/data/comment-annotation.data.model.d.ts +161 -0
  8. package/app/models/data/comment.data.model.d.ts +71 -0
  9. package/app/models/data/config.data.model.d.ts +45 -0
  10. package/app/models/data/cursor-position.data.model.d.ts +10 -0
  11. package/app/models/data/cursor-user.data.model.d.ts +118 -0
  12. package/app/models/data/custom-filter.data.model.d.ts +26 -0
  13. package/app/models/data/device-info.model.d.ts +75 -0
  14. package/app/models/data/document-iam.data.model.d.ts +14 -0
  15. package/app/models/data/document-metadata.model.d.ts +22 -0
  16. package/app/models/data/document-paths.data.model.d.ts +94 -0
  17. package/app/models/data/document-user.data.model.d.ts +33 -0
  18. package/app/models/data/flock-options.model.d.ts +7 -0
  19. package/app/models/data/huddle.model.d.ts +17 -0
  20. package/app/models/data/live-state-data-map.data.model.d.ts +7 -0
  21. package/app/models/data/live-state-data.data.model.d.ts +11 -0
  22. package/app/models/data/localstorage.data.model.d.ts +4 -0
  23. package/app/models/data/location-metadata.model.d.ts +16 -0
  24. package/app/models/data/location.model.d.ts +15 -0
  25. package/app/models/data/media-preview-config.data.model.d.ts +14 -0
  26. package/app/models/data/notification.model.d.ts +41 -0
  27. package/app/models/data/page-info.model.d.ts +46 -0
  28. package/app/models/data/permission.data.model.d.ts +14 -0
  29. package/app/models/data/presence-user.data.model.d.ts +79 -0
  30. package/app/models/data/recorder-annotation.data.model.d.ts +120 -0
  31. package/app/models/data/recorder.model.d.ts +74 -0
  32. package/app/models/data/rewriter-annotation.data.model.d.ts +62 -0
  33. package/app/models/data/screen-size.data.model.d.ts +14 -0
  34. package/app/models/data/selection.model.d.ts +22 -0
  35. package/app/models/data/tag-annotation.data.model.d.ts +113 -0
  36. package/app/models/data/target-element.data.model.d.ts +18 -0
  37. package/app/models/data/target-text-range.data.model.d.ts +14 -0
  38. package/app/models/data/toast.data.model.d.ts +19 -0
  39. package/app/models/data/transcription.data.model.d.ts +35 -0
  40. package/app/models/data/user-contact-us.data.model.d.ts +3 -0
  41. package/app/models/data/user-contact.data.model.d.ts +29 -0
  42. package/app/models/data/user-feedback.data.model.d.ts +3 -0
  43. package/app/models/data/user-iam.data.model.d.ts +33 -0
  44. package/app/models/data/user-report-bug.data.model.d.ts +3 -0
  45. package/app/models/data/user-request.data.model.d.ts +37 -0
  46. package/app/models/data/user-role.data.model.d.ts +19 -0
  47. package/app/models/data/user.data.model.d.ts +60 -0
  48. package/app/models/data/workspace-iam.data.model.d.ts +14 -0
  49. package/app/models/element/area-element.model.d.ts +51 -0
  50. package/app/models/element/comment-element.model.d.ts +808 -0
  51. package/app/models/element/contact-element.model.d.ts +13 -0
  52. package/app/models/element/cursor-element.model.d.ts +60 -0
  53. package/app/models/element/presence-element.model.d.ts +53 -0
  54. package/app/models/element/recorder-element.model.d.ts +15 -0
  55. package/app/models/element/rewriter-element.model.d.ts +23 -0
  56. package/app/models/element/selection-element.model.d.ts +23 -0
  57. package/app/models/element/tag-element.model.d.ts +68 -0
  58. package/app/utils/constants.d.ts +349 -0
  59. package/app/utils/enums.d.ts +95 -0
  60. package/models.d.ts +44 -0
  61. package/package.json +12 -0
  62. package/types.d.ts +5 -0
  63. package/velt.d.ts +20 -0
@@ -0,0 +1,141 @@
1
+ // @ts-nocheck
2
+ import { Observable } from "rxjs";
3
+ import { Config } from "../models/data/config.data.model";
4
+ import { DocumentUser } from "../models/data/document-user.data.model";
5
+ import { Location } from "../models/data/location.model";
6
+ import { User } from "../models/data/user.data.model";
7
+ import { CommentElement } from "../models/element/comment-element.model";
8
+ import { ContactElement } from "../models/element/contact-element.model";
9
+ import { CursorElement } from "../models/element/cursor-element.model";
10
+ import { PresenceElement } from "../models/element/presence-element.model";
11
+ import { RecorderElement } from "../models/element/recorder-element.model";
12
+ import { RewriterElement } from "../models/element/rewriter-element.model";
13
+ import { SelectionElement } from "../models/element/selection-element.model";
14
+ import { TagElement } from "../models/element/tag-element.model";
15
+ import { FeatureType } from "../utils/enums";
16
+ export declare class Snippyly {
17
+ constructor();
18
+ initConfig: (apiKey: string, config?: Config) => void;
19
+ identify: (user: User) => Promise<unknown>;
20
+ /**
21
+ * Tell us who the currently logged in user is.
22
+ *
23
+ * Call whenever the user is updated: signs in, signs out, signs up etc.
24
+ */
25
+ updateUser: (user: User) => void;
26
+ /**
27
+ * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
28
+ * @param id unique document ID
29
+ */
30
+ setDocumentId: (id: string) => void;
31
+ /**
32
+ * Tell us the custom params of the current document/resource to identify sub document inside a document.
33
+ * @param params Document Params
34
+ * @deprecated This method is depercated and will be removed in next release. Use `setLocation` method instead.
35
+ */
36
+ setDocumentParams: (params: Location) => void;
37
+ /**
38
+ * Tell us the custom params of the current document/resource to identify sub document inside a document.
39
+ * @param params Locaion
40
+ */
41
+ setLocation: (params: Location) => void;
42
+ /**
43
+ * To remove document params from a User
44
+ * @deprecated This method is depercated and will be removed in next release. Use `removeLocation` method instead.
45
+ */
46
+ removeDocumentParams: () => void;
47
+ /**
48
+ * To remove location from a User
49
+ */
50
+ removeLocation: () => void;
51
+ /**
52
+ * Tell us the about the scrollable document ids to keep track on its scroll changes
53
+ * @param ids scrollable elements ids
54
+ */
55
+ setScrollableElementsIds: (ids: string[]) => void;
56
+ /**
57
+ * To remove document params from a User
58
+ */
59
+ removeScrollableElementsIds: () => void;
60
+ /**
61
+ * Get the Presence Element Object to access the raw presence data.
62
+ *
63
+ * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
64
+ */
65
+ getPresenceElement: () => PresenceElement;
66
+ /**
67
+ * Get the Cursor Element Object to access the raw cursor data.
68
+ *
69
+ * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
70
+ */
71
+ getCursorElement: () => CursorElement;
72
+ /**
73
+ * Get the Comment Element Object to access the raw comment data.
74
+ *
75
+ * This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI.
76
+ */
77
+ getCommentElement: () => CommentElement;
78
+ /**
79
+ * Get the Tag Pin Annotation Object to access the raw tag data.
80
+ *
81
+ * This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI.
82
+ */
83
+ getTagElement: () => TagElement;
84
+ /**
85
+ * Get the Selection Object to enable/disable the feature.
86
+ */
87
+ getSelectionElement: () => SelectionElement;
88
+ /**
89
+ * Get the Recorder Object.
90
+ */
91
+ getRecorderElement: () => RecorderElement;
92
+ /**
93
+ * Get the Contact Object.
94
+ */
95
+ getContactElement: () => ContactElement;
96
+ /**
97
+ * Get the Rewriter Object.
98
+ */
99
+ getRewriterElement: () => RewriterElement;
100
+ /**
101
+ * To signout a user
102
+ */
103
+ signOutUser: () => any;
104
+ /**
105
+ * Provide a list of features to disable.
106
+ * Provide an empty array to enable all the features.
107
+ * @param features List of features
108
+ */
109
+ disableFeatures: (features: Array<FeatureType>) => void;
110
+ /**
111
+ * Add location to show comments, tags, recorders etc. for provided location also.
112
+ * @param location Location object
113
+ */
114
+ addLocation: (location: any) => any;
115
+
116
+ /**
117
+ * To check if user allowed in provided document or not.
118
+ */
119
+ isUserAllowed$: () => Observable<boolean>;
120
+
121
+ /**
122
+ * To get user role in provided document.
123
+ */
124
+ getUserRole$: () => Observable<string | null>;
125
+
126
+ /**
127
+ * To check if plan is expired or not.
128
+ */
129
+ isPlanExpired$: () => Observable<boolean>;
130
+
131
+ /**
132
+ * To invite list of users to the document.
133
+ * @param documentUsers List of document users
134
+ */
135
+ inviteUsers: (documentUsers: Array<DocumentUser>) => void;
136
+
137
+ /**
138
+ * To remove snippyly specific content from provided html content.
139
+ */
140
+ removeSnippylyContent: (htmlContent: string) => string;
141
+ }
@@ -0,0 +1,5 @@
1
+ import { Snippyly } from './snippyly.model';
2
+
3
+ export declare class Velt extends Snippyly {
4
+
5
+ }
@@ -0,0 +1,30 @@
1
+ export declare class AnnotationProperty {
2
+ /**
3
+ * Viewport width.
4
+ */
5
+ viewportWidth?: number;
6
+ /**
7
+ * Viewport height.
8
+ */
9
+ viewportHeight?: number;
10
+ /**
11
+ * Screen width.
12
+ */
13
+ screenWidth?: number;
14
+ /**
15
+ * Screen height.
16
+ */
17
+ screenHeight?: number;
18
+ /**
19
+ * Screen scroll height.
20
+ */
21
+ screenScrollHeight?: number;
22
+ /**
23
+ * Length of the arrow.
24
+ */
25
+ arrowLength?: number;
26
+ /**
27
+ * Angle of the arrow.
28
+ */
29
+ arrowAngle?: number;
30
+ }
@@ -0,0 +1,74 @@
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";
7
+ export declare class AreaAnnotation {
8
+ /**
9
+ * Unique identifier for the area pin annotation.
10
+ *
11
+ * Auto generated.
12
+ */
13
+ annotationId: string;
14
+ /**
15
+ * The user who created this area pin annotation.
16
+ *
17
+ */
18
+ from: User;
19
+ /**
20
+ * Color used for the area pin annotation.
21
+ *
22
+ */
23
+ color?: string;
24
+ /**
25
+ * Timestamp when the area annotation was last updated.
26
+ *
27
+ * Auto generated.
28
+ */
29
+ lastUpdated?: any;
30
+ targetElement?: TargetElement | null;
31
+ /**
32
+ * Target elements of attached annotation.
33
+ */
34
+ targetElements?: (TargetElement | null)[];
35
+ position?: CursorPosition | null;
36
+ /**
37
+ * Unique location id generated from provided location
38
+ */
39
+ locationId?: number | null;
40
+ /**
41
+ * Set location to identify user on sub document
42
+ */
43
+ location?: Location | null;
44
+ type?: string;
45
+ props: AnnotationProperty;
46
+ /**
47
+ * To maintain index of current annotation in available list of annotations
48
+ * It will start from 1, so no need to add 1 in that.
49
+ */
50
+ annotationIndex?: number;
51
+ pageInfo?: PageInfo;
52
+ areaProperties?: AreaProperty;
53
+ targetAnnotations: AreaTargetAnnotation[];
54
+ }
55
+ export declare class AreaTargetAnnotation {
56
+ /**
57
+ * Type of the annotation (ex. comment, tag etc.)
58
+ */
59
+ type?: string;
60
+ /**
61
+ * Unique identifier for the annotation.
62
+ */
63
+ annotationId?: string;
64
+ /**
65
+ * Position reference to show this annotation on area annotation.
66
+ */
67
+ position?: string;
68
+ }
69
+ export declare class AreaProperty {
70
+ targetElement?: string;
71
+ handle1?: any;
72
+ handle2?: any;
73
+ coordinates?: any;
74
+ }
@@ -0,0 +1,40 @@
1
+ export declare class Attachment {
2
+ /**
3
+ * Unique identifier for the comment pin annotation.
4
+ *
5
+ * Auto generated.
6
+ */
7
+ attachmentId: number;
8
+ /**
9
+ * File name
10
+ */
11
+ name?: string;
12
+ /**
13
+ * Unique path in storage
14
+ */
15
+ bucketPath?: string;
16
+ /**
17
+ * File size
18
+ */
19
+ size?: number;
20
+ /**
21
+ * File type
22
+ */
23
+ type?: string;
24
+ /**
25
+ * Download url of a file
26
+ */
27
+ url?: string;
28
+ /**
29
+ * Thumbnail img in base64 format
30
+ */
31
+ thumbnail?: string;
32
+ /**
33
+ * Metadata of an attachment
34
+ */
35
+ metadata?: any;
36
+ /**
37
+ * Mime type of an attachment
38
+ */
39
+ mimeType?: any;
40
+ }
@@ -0,0 +1,10 @@
1
+ export declare class ChatGPT {
2
+ /**
3
+ * Role of content (like: user, assistant, system etc.)
4
+ */
5
+ role?: 'user' | 'assistant' | 'system';
6
+ /**
7
+ * Content of the message
8
+ */
9
+ content?: string;
10
+ }
@@ -0,0 +1,161 @@
1
+ import { Comment } from "./comment.data.model";
2
+ import { CursorPosition } from "./cursor-position.data.model";
3
+ import { CustomCategory, CustomPriority, CustomStatus } from "./custom-filter.data.model";
4
+ import { Location } from "./location.model";
5
+ import { PageInfo } from "./page-info.model";
6
+ import { TargetElement } from "./target-element.data.model";
7
+ import { TargetTextRange } from "./target-text-range.data.model";
8
+ import { User } from "./user.data.model";
9
+ export declare class CommentAnnotation {
10
+ /**
11
+ * Unique identifier for the comment pin annotation.
12
+ *
13
+ * Auto generated.
14
+ */
15
+ annotationId: string;
16
+ /**
17
+ * This is the list of all comments part of this annotation.
18
+ *
19
+ */
20
+ comments: Comment[];
21
+ /**
22
+ * The list of categories that this comment pin annotation belongs to.
23
+ */
24
+ commentCategories: CustomCategory[];
25
+ /**
26
+ * The user who created this comment pin annotation.
27
+ *
28
+ */
29
+ from: User;
30
+ /**
31
+ * Color used for the comment pin annotation.
32
+ *
33
+ */
34
+ color?: string;
35
+ /**
36
+ * @deprecated
37
+ * Whether the comment annotation is marked resolved.
38
+ *
39
+ */
40
+ resolved?: boolean;
41
+ /**
42
+ * @deprecated
43
+ * Whether the comment annotation is marked as in progress.
44
+ *
45
+ */
46
+ inProgress?: boolean;
47
+ /**
48
+ * Timestamp when the comment annotation was last updated.
49
+ *
50
+ * Auto generated.
51
+ */
52
+ lastUpdated?: any;
53
+ /**
54
+ * Comment annotation's position on the X axis.
55
+ *
56
+ * Auto generated.
57
+ */
58
+ positionX?: number;
59
+ /**
60
+ * Comment annotation's position on the Y axis.
61
+ *
62
+ * Auto generated.
63
+ */
64
+ positionY?: number;
65
+ /**
66
+ * User’s screen width.
67
+ *
68
+ * Auto generated.
69
+ */
70
+ screenWidth?: number;
71
+ /**
72
+ * User’s screen height.
73
+ *
74
+ * Auto generated.
75
+ */
76
+ screenHeight?: number;
77
+ /**
78
+ * User’s screen scroll height.
79
+ *
80
+ * Auto generated.
81
+ */
82
+ screenScrollHeight?: number;
83
+ /**
84
+ * User’s screen scroll height.
85
+ *
86
+ * Auto generated.
87
+ */
88
+ screenScrollTop?: number;
89
+ /**
90
+ * Xpath of the element that was clicked.
91
+ *
92
+ * Auto generated.
93
+ */
94
+ taggedElementPath?: string;
95
+ /**
96
+ * Xpath of the element that was clicked.
97
+ *
98
+ * Auto generated.
99
+ */
100
+ taggedElementRect?: any;
101
+ /**
102
+ * Target element of comment annotation
103
+ */
104
+ targetElement?: TargetElement | null;
105
+ /**
106
+ * Target element id provided by user
107
+ */
108
+ targetElementId?: string | null;
109
+ position?: CursorPosition | null;
110
+ /**
111
+ * Unique document params id generated from provided document params
112
+ * @deprecated `documentParamsId` is deprecated and will be removed in next release, use `locationId` instead.
113
+ */
114
+ documentParamsId?: number | null;
115
+ /**
116
+ * Set document params to identify user on sub document
117
+ * @deprecated `documentParams` is deprecated and will be removed in next release, use `location` instead.
118
+ */
119
+ documentParams?: Location | null;
120
+ /**
121
+ * Unique location id generated from provided location
122
+ */
123
+ locationId?: number | null;
124
+ /**
125
+ * Set location to identify user on sub document
126
+ */
127
+ location?: Location | null;
128
+ type?: string;
129
+ /**
130
+ * Selected text range of comment annotation
131
+ */
132
+ targetTextRange?: TargetTextRange | null;
133
+ approved?: boolean;
134
+ status: CustomStatus;
135
+ /**
136
+ * To maintain index of current annotation in available list of annotations
137
+ * It will start from 1, so no need to add 1 in that.
138
+ */
139
+ annotationIndex?: number;
140
+ pageInfo?: PageInfo;
141
+ assignedTo?: User;
142
+ priority?: CustomPriority;
143
+ ghostComment?: GhostComment | null;
144
+ /**
145
+ * Connected area annotation id of comment annotation
146
+ */
147
+ areaAnnotationId?: string;
148
+ /**
149
+ * Custom context data provided by the user
150
+ */
151
+ context?: any;
152
+ }
153
+ export declare class GhostComment {
154
+ targetElement?: TargetElement | null;
155
+ message?: string;
156
+ type?: string;
157
+ /**
158
+ * To check if comment is from same device group or not, device groups are ['mobile', 'tablet'] and ['desktop', 'monitor']
159
+ */
160
+ isSameGroup?: boolean;
161
+ }
@@ -0,0 +1,71 @@
1
+ import { Attachment } from "./attachment.model";
2
+ import { RecordedData } from "./recorder.model";
3
+ import { User } from "./user.data.model";
4
+ export declare class Comment {
5
+ /**
6
+ * Unique identifier for the comment pin annotation.
7
+ *
8
+ * Auto generated.
9
+ */
10
+ commentId: number;
11
+ /**
12
+ * This determines the comment content type.
13
+ *
14
+ * Default: 'text'.
15
+ */
16
+ type: 'text' | 'voice';
17
+ /**
18
+ * Comment Text.
19
+ *
20
+ */
21
+ commentText: string;
22
+ /**
23
+ * Same comment text in HTML.
24
+ *
25
+ */
26
+ commentHtml?: string;
27
+ /**
28
+ * Comment voice recording url.
29
+ *
30
+ */
31
+ commentVoiceUrl?: string;
32
+ /**
33
+ * The user who created this comment text.
34
+ *
35
+ */
36
+ from: User;
37
+ /**
38
+ * List of users that were tagged using @mentions to this comment.
39
+ *
40
+ */
41
+ to?: User[];
42
+ /**
43
+ * Timestamp when this comment content was last updated.
44
+ *
45
+ * Auto generated.
46
+ */
47
+ lastUpdated?: Date;
48
+ status: 'added' | 'updated';
49
+ /**
50
+ * List of attachments.
51
+ */
52
+ attachments: Attachment[];
53
+ /**
54
+ * List of recorded data.
55
+ */
56
+ recorders: RecordedData[];
57
+ /**
58
+ * Map of user ID to another map of emoji to count.
59
+ */
60
+ reactions: {
61
+ [key: string]: {
62
+ [key: string]: number;
63
+ };
64
+ };
65
+ /**
66
+ * Map of emoji to count to display.
67
+ */
68
+ reactionCountMap: {
69
+ [key: string]: number;
70
+ };
71
+ }
@@ -0,0 +1,45 @@
1
+ import { FeatureType } from "../../utils/enums";
2
+ export declare class Config {
3
+ /**
4
+ * Restrict Snippyly features to specific pages. You can specify partial URL strings.
5
+ *
6
+ * Default: All pages where snippyly script or snippyly web components are added.
7
+ */
8
+ urlAllowList?: string[];
9
+ /**
10
+ * Only allow the provided Snippyly features to run.
11
+ *
12
+ * Default: All features are enabled.
13
+ */
14
+ featureAllowList?: Array<FeatureType>;
15
+ /**
16
+ * Restrict Snippyly features to specific user plans.
17
+ *
18
+ * Default: All users.
19
+ */
20
+ userPlanAllowList?: string[];
21
+ /**
22
+ * Restrict Snippyly features to specific users.
23
+ *
24
+ * Default: All users.
25
+ */
26
+ userIdAllowList?: string[];
27
+ /**
28
+ * Restrict Snippyly features to specific groups/teams of users.
29
+ *
30
+ * Default: All groups/teams.
31
+ */
32
+ userGroupIdAllowList?: string[];
33
+ /**
34
+ * To enable/disable debug mode
35
+ *
36
+ * This change will be reflected after a page refresh
37
+ */
38
+ debugMode?: boolean;
39
+ /**
40
+ * To enable/disable prefers color scheme.
41
+ * If this is set to true, then we will listen to changes on the
42
+ * prefers-color-scheme media query to set the global theme of our components.
43
+ */
44
+ usePrefersColorScheme?: boolean;
45
+ }
@@ -0,0 +1,10 @@
1
+ export declare class CursorPosition {
2
+ /**
3
+ * Position top of cursor on viewer user's screen
4
+ */
5
+ top: number;
6
+ /**
7
+ * Position left of cursor on viewer user's screen
8
+ */
9
+ left: number;
10
+ }