@veltdev/sdk-staging 4.0.0-beta.113 → 4.0.0-beta.12

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.
@@ -26,214 +26,210 @@ import { DocumentMetadata } from "../models/data/document-metadata.model";
26
26
  import { ReactionElement } from "../models/element/reaction-element.model";
27
27
  import { VeltEventMetadata } from "../models/data/event-metadata.data.model";
28
28
  import { CoreEventTypesMap } from "../models/data/core-events.data.model";
29
- import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest } from "../models/data/document.data.model";
30
- import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
31
- import { UserDataProvider } from "../models/data/user-resolver.data.model";
32
-
29
+ import { Document, SetDocumentsRequestOptions } from "../models/data/document.data.model";
33
30
  export declare class Snippyly {
34
- constructor();
35
- initConfig: (apiKey: string, config?: Config) => void;
36
- identify: (user: User, userOptions?: UserOptions) => Promise<unknown>;
37
- /**
38
- * Tell us who the currently logged in user is.
39
- *
40
- * Call whenever the user is updated: signs in, signs out, signs up etc.
41
- * @deprecated This method is deprecated.
42
- */
43
- updateUser: (user: User) => void;
44
- /**
45
- * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
46
- * @param id unique document ID
47
- * @param documentMetadata Document Metadata
48
- */
49
- setDocument: (id: string, documentMetadata?: DocumentMetadata) => void;
50
- /**
51
- * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
52
- * @param id unique document ID
53
- * @deprecated This method is deprecated. Use `setDocuments` method instead.
54
- */
55
- setDocumentId: (id: string) => void;
56
- /**
57
- * To set multiple documents
58
- */
59
- setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
60
- /**
61
- * To unset the document id
62
- * @deprecated This method is deprecated. Use `unsetDocuments` method instead.
63
- */
64
- unsetDocumentId: () => void;
65
- /**
66
- * To unset the documents
67
- */
68
- unsetDocuments: () => void;
69
- /**
70
- * To fetch documents
71
- */
72
- fetchDocuments: (options?: FetchDocumentsRequest) => Promise<FetchDocumentsResponse>;
73
- /**
74
- * To fetch folders
75
- */
76
- fetchFolders: (options?: FetchFoldersRequest) => Promise<FetchFoldersResponse>;
77
- /**
78
- * To set the user data provider.
79
- */
80
- setUserDataProvider: (userDataProvider: UserDataProvider) => void;
81
- /**
82
- * Get Document ID
83
- */
84
- getDocumentId: () => string;
85
- /**
86
- * Tell us the custom params of the current document/resource to identify sub document inside a document.
87
- * @param params Location
88
- * @param appendLocation Append location to existing location
89
- */
90
- setLocation: (params: Location, appendLocation?: boolean) => void;
91
- /**
92
- * To remove location from a User
93
- * @param location Location
94
- */
95
- removeLocation: (location?: Location) => void;
96
- /**
97
- * To exclude data of specific location ids
98
- * @param ids Location Ids
99
- */
100
- excludeLocationIds: (ids: string[]) => void;
101
- /**
102
- * Tell us the about the scrollable document ids to keep track on its scroll changes
103
- * @param ids scrollable elements ids
104
- */
105
- setScrollableElementsIds: (ids: string[]) => void;
106
- /**
107
- * To remove document params from a User
108
- */
109
- removeScrollableElementsIds: () => void;
110
- /**
111
- * Get the Presence Element Object to access the raw presence data.
112
- *
113
- * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
114
- */
115
- getPresenceElement: () => PresenceElement;
116
- /**
117
- * Get the Cursor Element Object to access the raw cursor data.
118
- *
119
- * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
120
- */
121
- getCursorElement: () => CursorElement;
122
- /**
123
- * Get the Comment Element Object to access the raw comment data.
124
- *
125
- * This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI.
126
- */
127
- getCommentElement: () => CommentElement;
128
- /**
129
- * Get the Tag Pin Annotation Object to access the raw tag data.
130
- *
131
- * This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI.
132
- */
133
- getTagElement: () => TagElement;
134
- /**
135
- * Get the Selection Object to enable/disable the feature.
136
- */
137
- getSelectionElement: () => SelectionElement;
138
- /**
139
- * Get the Recorder Object.
140
- */
141
- getRecorderElement: () => RecorderElement;
142
- /**
143
- * Get the Contact Object.
144
- */
145
- getContactElement: () => ContactElement;
146
- /**
147
- * Get the Rewriter Object.
148
- */
149
- getRewriterElement: () => RewriterElement;
150
- /**
151
- * Get the Huddle element.
152
- */
153
- getHuddleElement: () => HuddleElement;
154
- /**
155
- * Get the LiveStateSync Object.
156
- */
157
- getLiveStateSyncElement: () => LiveStateSyncElement;
158
- /**
159
- * Get the Arrow Object.
160
- */
161
- getArrowElement: () => ArrowElement;
162
- /**
163
- * Get the Views Object.
164
- */
165
- getViewsElement: () => ViewsElement;
166
- /**
167
- * Get the Notification Object.
168
- */
169
- getNotificationElement: () => NotificationElement;
170
- /**
171
- * Get the Autocomplete Object.
172
- */
173
- getAutocompleteElement: () => AutocompleteElement;
174
- /**
175
- * Get the Area Object.
176
- */
177
- getAreaElement: () => AreaElement;
178
- /**
179
- * Get the Area Object.
180
- */
181
- getReactionElement: () => ReactionElement;
182
- /**
183
- * Get the metadata of the current resource.
184
- */
185
- getMetadata: () => Promise<VeltEventMetadata | null>;
186
- /**
187
- * To signout a user
188
- */
189
- signOutUser: () => any;
190
- /**
191
- * Provide a list of features to disable.
192
- * Provide an empty array to enable all the features.
193
- * @param features List of features
194
- */
195
- disableFeatures: (features: Array<FeatureType>) => void;
196
- /**
31
+ constructor();
32
+ initConfig: (apiKey: string, config?: Config) => void;
33
+ identify: (user: User, userOptions?: UserOptions) => Promise<unknown>;
34
+ /**
35
+ * Tell us who the currently logged in user is.
36
+ *
37
+ * Call whenever the user is updated: signs in, signs out, signs up etc.
38
+ * @deprecated This method is deprecated and will be removed in next release.
39
+ */
40
+ updateUser: (user: User) => void;
41
+ /**
42
+ * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
43
+ * @param id unique document ID
44
+ * @param documentMetadata Document Metadata
45
+ */
46
+ setDocument: (id: string, documentMetadata?: DocumentMetadata) => void;
47
+ /**
48
+ * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
49
+ * @param id unique document ID
50
+ */
51
+ setDocumentId: (id: string) => void;
52
+ /**
53
+ * To set multiple documents
54
+ */
55
+ setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
56
+ /**
57
+ * To unset the document id
58
+ */
59
+ unsetDocumentId: () => void;
60
+ /**
61
+ * Get Document ID
62
+ */
63
+ getDocumentId: () => string;
64
+ /**
65
+ * Tell us the custom params of the current document/resource to identify sub document inside a document.
66
+ * @param params Document Params
67
+ * @deprecated This method is depercated and will be removed in next release. Use `setLocation` method instead.
68
+ */
69
+ setDocumentParams: (params: Location) => void;
70
+ /**
71
+ * Tell us the custom params of the current document/resource to identify sub document inside a document.
72
+ * @param params Location
73
+ * @param appendLocation Append location to existing location
74
+ */
75
+ setLocation: (params: Location, appendLocation?: boolean) => void;
76
+ /**
77
+ * To remove document params from a User
78
+ * @deprecated This method is depercated and will be removed in next release. Use `removeLocation` method instead.
79
+ */
80
+ removeDocumentParams: () => void;
81
+ /**
82
+ * To remove location from a User
83
+ * @param location Location
84
+ */
85
+ removeLocation: (location?: Location) => void;
86
+ /**
87
+ * To exclude data of specific location ids
88
+ * @param ids Location Ids
89
+ */
90
+ excludeLocationIds: (ids: string[]) => void;
91
+ /**
92
+ * Tell us the about the scrollable document ids to keep track on its scroll changes
93
+ * @param ids scrollable elements ids
94
+ */
95
+ setScrollableElementsIds: (ids: string[]) => void;
96
+ /**
97
+ * To remove document params from a User
98
+ */
99
+ removeScrollableElementsIds: () => void;
100
+ /**
101
+ * Get the Presence Element Object to access the raw presence data.
102
+ *
103
+ * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
104
+ */
105
+ getPresenceElement: () => PresenceElement;
106
+ /**
107
+ * Get the Cursor Element Object to access the raw cursor data.
108
+ *
109
+ * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
110
+ */
111
+ getCursorElement: () => CursorElement;
112
+ /**
113
+ * Get the Comment Element Object to access the raw comment data.
114
+ *
115
+ * This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI.
116
+ */
117
+ getCommentElement: () => CommentElement;
118
+ /**
119
+ * Get the Tag Pin Annotation Object to access the raw tag data.
120
+ *
121
+ * This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI.
122
+ */
123
+ getTagElement: () => TagElement;
124
+ /**
125
+ * Get the Selection Object to enable/disable the feature.
126
+ */
127
+ getSelectionElement: () => SelectionElement;
128
+ /**
129
+ * Get the Recorder Object.
130
+ */
131
+ getRecorderElement: () => RecorderElement;
132
+ /**
133
+ * Get the Contact Object.
134
+ */
135
+ getContactElement: () => ContactElement;
136
+ /**
137
+ * Get the Rewriter Object.
138
+ */
139
+ getRewriterElement: () => RewriterElement;
140
+ /**
141
+ * Get the Huddle element.
142
+ */
143
+ getHuddleElement: () => HuddleElement;
144
+ /**
145
+ * Get the LiveStateSync Object.
146
+ */
147
+ getLiveStateSyncElement: () => LiveStateSyncElement;
148
+ /**
149
+ * Get the Arrow Object.
150
+ */
151
+ getArrowElement: () => ArrowElement;
152
+ /**
153
+ * Get the Views Object.
154
+ */
155
+ getViewsElement: () => ViewsElement;
156
+ /**
157
+ * Get the Notification Object.
158
+ */
159
+ getNotificationElement: () => NotificationElement;
160
+ /**
161
+ * Get the Autocomplete Object.
162
+ */
163
+ getAutocompleteElement: () => AutocompleteElement;
164
+ /**
165
+ * Get the Area Object.
166
+ */
167
+ getAreaElement: () => AreaElement;
168
+ /**
169
+ * Get the Area Object.
170
+ */
171
+ getReactionElement: () => ReactionElement;
172
+ /**
173
+ * Get the metadata of the current resource.
174
+ */
175
+ getMetadata: () => Promise<VeltEventMetadata | null>;
176
+ /**
177
+ * To signout a user
178
+ */
179
+ signOutUser: () => any;
180
+ /**
181
+ * Provide a list of features to disable.
182
+ * Provide an empty array to enable all the features.
183
+ * @param features List of features
184
+ */
185
+ disableFeatures: (features: Array<FeatureType>) => void;
186
+ /**
197
187
  * Add location to show comments, tags, recorders etc. for provided location also.
198
188
  * @param location Location object
199
189
  * @deprecated This method is deprecated and will be removed in next release. Use `setLocation` method with `appendLocation: true` instead.
200
190
  */
201
- addLocation: (location: any) => any;
202
- /**
203
- * To set the dark mode of Velt components.
204
- * @param value {boolean} true/false
205
- */
206
- setDarkMode: (darkMode: boolean) => void;
191
+ addLocation: (location: any) => any;
192
+ /**
193
+ * To set the dark mode of Velt components.
194
+ * @param value {boolean} true/false
195
+ */
196
+ setDarkMode: (darkMode: boolean) => void;
207
197
 
208
- /**
209
- * To check if user allowed in provided document or not.
210
- */
211
- isUserAllowed$: () => Observable<boolean>;
198
+ /**
199
+ * To check if user allowed in provided document or not.
200
+ */
201
+ isUserAllowed$: () => Observable<boolean>;
212
202
 
213
- /**
214
- * To get user.
215
- */
216
- getUser: () => User | null;
203
+ /**
204
+ * To get user role in provided document.
205
+ */
206
+ getUserRole$: () => Observable<string | null>;
217
207
 
218
- /**
219
- * To get user role in provided document.
220
- */
221
- getUserRole$: () => Observable<string | null>;
208
+ /**
209
+ * To check if plan is expired or not.
210
+ */
211
+ isPlanExpired$: () => Observable<boolean>;
222
212
 
223
- /**
224
- * To check if plan is expired or not.
225
- */
226
- isPlanExpired$: () => Observable<boolean>;
213
+ /**
214
+ * To get if the Velt is initialized or not.
215
+ * @returns Observable<boolean | undefined>
216
+ */
217
+ getVeltInitState: () => Observable<boolean | undefined>;
227
218
 
228
- /**
229
- * To get if the Velt is initialized or not.
230
- * @returns Observable<boolean | undefined>
231
- */
232
- getVeltInitState: () => Observable<boolean | undefined>;
219
+ /**
220
+ * To invite list of users to the document.
221
+ * @param documentUsers List of document users
222
+ */
223
+ inviteUsers: (documentUsers: Array<DocumentUser>) => void;
233
224
 
234
- /**
235
- * To remove velt specific content from provided html content.
236
- */
225
+ /**
226
+ * To remove snippyly specific content from provided html content.
227
+ */
228
+ removeSnippylyContent: (htmlContent: string) => string;
229
+
230
+ /**
231
+ * To remove velt specific content from provided html content.
232
+ */
237
233
  removeVeltContent: (htmlContent: string) => string;
238
234
 
239
235
  /**
@@ -267,11 +263,10 @@ export declare class Snippyly {
267
263
  /**
268
264
  * To update user contact list.
269
265
  */
270
- updateContactList: (userContacts: UserContact[], config?: { merge: boolean }) => void;
266
+ updateContactList: (userContacts: UserContact[], config?: {merge: boolean}) => void;
271
267
 
272
268
  /**
273
269
  * To get document metadata.
274
- * @deprecated This method is deprecated. Use `fetchDocuments` method instead.
275
270
  */
276
271
  getDocumentMetadata: () => Observable<DocumentMetadata | null>;
277
272
 
@@ -279,24 +274,4 @@ export declare class Snippyly {
279
274
  * To subscribe to core actions
280
275
  */
281
276
  on: <T extends keyof CoreEventTypesMap>(action: T) => Observable<CoreEventTypesMap[T]>;
282
-
283
- /**
284
- * To set the ui state.
285
- */
286
- setUiState: <T extends object>(uiState: T) => void;
287
-
288
- /**
289
- * To get the ui state.
290
- */
291
- getUiState: <T extends object>() => Observable<T>;
292
-
293
- /**
294
- * To enable logs.
295
- */
296
- enableLogs: () => void;
297
-
298
- /**
299
- * To disable logs.
300
- */
301
- disableLogs: () => void;
302
- }
277
+ }
@@ -4,6 +4,4 @@ export declare class BaseMetadata {
4
4
  clientDocumentId?: string;
5
5
  organizationId?: string;
6
6
  clientOrganizationId?: string;
7
- folderId?: string;
8
- veltFolderId?: string;
9
7
  }
@@ -9,10 +9,8 @@ import { User } from "./user.data.model";
9
9
  export interface RequestOptions {
10
10
  organizationId?: string;
11
11
  documentId?: string;
12
- folderId?: string;
13
12
  filters?: any;
14
13
  documentIds?: string[];
15
- allDocuments?: boolean;
16
14
  }
17
15
  export interface UpdatePriorityRequest {
18
16
  annotationId: string;
@@ -65,9 +63,6 @@ export interface CommentRequestQuery {
65
63
  documentIds?: string[];
66
64
  locationIds?: string[];
67
65
  statusIds?: string[];
68
- folderId?: string;
69
- allDocuments?: boolean;
70
- locationId?: string;
71
66
  }
72
67
  export interface SubscribeCommentAnnotationRequest {
73
68
  annotationId: string;
@@ -166,18 +161,3 @@ export interface ToggleReactionRequest {
166
161
  };
167
162
  options?: RequestOptions;
168
163
  }
169
- export interface FetchCommentAnnotationsRequest {
170
- createdAfter?: number;
171
- createdBefore?: number;
172
- updatedAfter?: number;
173
- updatedBefore?: number;
174
- statusIds?: string[];
175
- order?: 'asc' | 'desc';
176
- pageToken?: string;
177
- allDocuments?: boolean;
178
- pageSize?: number;
179
- organizationId?: string;
180
- locationId?: string;
181
- documentIds?: string[];
182
- folderId?: string;
183
- }
@@ -77,8 +77,6 @@ export type CommentEventTypesMap = {
77
77
  [CommentEventTypes.TOGGLE_REACTION]: ToggleReactionEvent;
78
78
  [CommentEventTypes.COMMENT_SIDEBAR_DATA_INIT]: CommentSidebarDataInitEvent;
79
79
  [CommentEventTypes.COMMENT_SIDEBAR_DATA_UPDATE]: CommentSidebarDataUpdateEvent;
80
- [CommentEventTypes.AUTOCOMPLETE_SEARCH]: AutocompleteSearchEvent;
81
- [CommentEventTypes.COMPOSER_CLICKED]: ComposerClickedEvent;
82
80
  };
83
81
  export interface AddAttachmentEvent {
84
82
  annotationId: string;
@@ -131,9 +129,6 @@ export interface DeleteCommentAnnotationEvent {
131
129
  export interface GetCommentAnnotationsResponse {
132
130
  data: Record<string, CommentAnnotation[]> | null;
133
131
  }
134
- export interface FetchCommentAnnotationsResponse extends GetCommentAnnotationsResponse {
135
- nextPageToken: string;
136
- }
137
132
  export interface GetCommentAnnotationsCountResponse {
138
133
  data: Record<string, CommentAnnotationsCount> | null;
139
134
  }
@@ -240,13 +235,3 @@ export interface CommentSidebarDataInitEvent extends VeltButtonClickEvent {
240
235
  }
241
236
  export interface CommentSidebarDataUpdateEvent extends VeltButtonClickEvent {
242
237
  }
243
- export interface AutocompleteSearchEvent {
244
- event: KeyboardEvent | InputEvent | Event;
245
- searchText: string;
246
- type?: 'contact' | 'custom' | 'group';
247
- metadata?: VeltEventMetadata;
248
- }
249
- export interface ComposerClickedEvent {
250
- commentAnnotation?: CommentAnnotation;
251
- metadata?: VeltEventMetadata;
252
- }
@@ -6,11 +6,3 @@ export interface IUnreadCommentsCount {
6
6
  count: number;
7
7
  }
8
8
  export type UnreadCommentsCount = IUnreadCommentsCount | null;
9
- export interface TransformContext {
10
- containerSelector: string;
11
- transforms: {
12
- scale: number;
13
- transformOrigin: string;
14
- inverseScale?: number;
15
- };
16
- }
@@ -52,7 +52,6 @@ export declare class Config {
52
52
  }
53
53
  export interface ExtendedFirebaseOptions extends FirebaseOptions {
54
54
  storeDbId: string;
55
- region?: string;
56
55
  }
57
56
  export interface AdvancedQueries {
58
57
  advancedQueriesEnabled: boolean;
@@ -7,19 +7,4 @@ export declare class CursorPosition {
7
7
  * Position left of cursor on viewer user's screen
8
8
  */
9
9
  left: number;
10
- /**
11
- * Scale factor of the parent element in X direction
12
- * Used for transform handling
13
- */
14
- parentScaleX?: number;
15
- /**
16
- * Scale factor of the parent element in Y direction
17
- * Used for transform handling
18
- */
19
- parentScaleY?: number;
20
- /**
21
- * Transform context information
22
- * Used to handle transforms properly
23
- */
24
- transformContext?: any;
25
10
  }
@@ -6,14 +6,6 @@ export declare class DocumentMetadata {
6
6
  * Unique document id generated from client document id
7
7
  */
8
8
  documentId?: string;
9
- /**
10
- * Folders
11
- */
12
- folderId?: string;
13
- /**
14
- * Velt folder id
15
- */
16
- veltFolderId?: string;
17
9
  /**
18
10
  * API key
19
11
  */
@@ -5,27 +5,4 @@ export interface Document {
5
5
  }
6
6
  export interface SetDocumentsRequestOptions {
7
7
  organizationId?: string;
8
- folderId?: string;
9
- allDocuments?: boolean;
10
- locationId?: string;
11
- }
12
- export interface FetchDocumentsRequest {
13
- organizationId?: string;
14
- documentIds?: string[];
15
- folderId?: string;
16
- allDocuments?: boolean;
17
- }
18
- export interface FetchFoldersRequest {
19
- organizationId?: string;
20
- folderId?: string;
21
- }
22
- export interface FolderConfig {
23
- folderId?: string;
24
- allDocuments?: boolean;
25
- locationId?: string;
26
- veltFolderId?: string;
27
- }
28
- export interface OrganizationConfig {
29
- organizationId: string;
30
- clientOrganizationId: string;
31
8
  }
@@ -88,11 +88,6 @@ export declare class NotificationRawData {
88
88
  [key: string]: any;
89
89
  };
90
90
  displayBodyMessage?: string;
91
- displayBodyMessageTemplate?: string;
92
- displayBodyMessageTemplateData?: {
93
- users?: User[];
94
- [key: string]: any;
95
- };
96
91
  customData?: any;
97
92
  notifyUsers?: {
98
93
  [email: string]: boolean;
@@ -132,17 +127,6 @@ export declare class Notification {
132
127
  * Notification body message
133
128
  */
134
129
  displayBodyMessage?: string;
135
- /**
136
- * Display body message template
137
- */
138
- displayBodyMessageTemplate?: string;
139
- /**
140
- * Display body message template data
141
- */
142
- displayBodyMessageTemplateData?: {
143
- users?: User[];
144
- [key: string]: any;
145
- };
146
130
  /**
147
131
  * Display message template
148
132
  */
@@ -164,10 +164,4 @@ export declare class RecorderData {
164
164
  assets: RecorderDataAsset[];
165
165
  transcription: RecorderDataTranscription;
166
166
  }
167
- export interface RecorderRequestQuery {
168
- recorderIds: string[];
169
- }
170
- export interface GetRecordingDataResponse {
171
- data: Record<string, RecorderData> | null;
172
- }
173
167
  export {};