@veltdev/types-dev 4.0.0-beta.114 → 4.0.0-beta.116

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,216 +29,216 @@ import { CoreEventTypesMap } from "../models/data/core-events.data.model";
29
29
  import { Document, SetDocumentsRequestOptions } from "../models/data/document.data.model";
30
30
  import { UserDataProvider } from "../models/data/user-resolver.data.model";
31
31
  export declare class Snippyly {
32
- constructor();
33
- initConfig: (apiKey: string, config?: Config) => void;
34
- identify: (user: User, userOptions?: UserOptions) => Promise<unknown>;
35
- /**
36
- * Tell us who the currently logged in user is.
37
- *
38
- * Call whenever the user is updated: signs in, signs out, signs up etc.
39
- * @deprecated This method is deprecated and will be removed in next release.
40
- */
41
- updateUser: (user: User) => void;
42
- /**
43
- * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
44
- * @param id unique document ID
45
- * @param documentMetadata Document Metadata
46
- */
47
- setDocument: (id: string, documentMetadata?: DocumentMetadata) => void;
48
- /**
49
- * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
50
- * @param id unique document ID
51
- */
52
- setDocumentId: (id: string) => void;
53
- /**
54
- * To set multiple documents
55
- */
56
- setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
57
- /**
58
- * To unset the document id
59
- */
60
- unsetDocumentId: () => void;
61
- /**
62
- * To unset the documents
63
- */
64
- unsetDocuments: () => void;
65
- /**
66
- * To set the user data provider.
67
- */
68
- setUserDataProvider: (userDataProvider: UserDataProvider) => void;
69
- /**
70
- * Get Document ID
71
- */
72
- getDocumentId: () => string;
73
- /**
74
- * Tell us the custom params of the current document/resource to identify sub document inside a document.
75
- * @param params Document Params
76
- * @deprecated This method is depercated and will be removed in next release. Use `setLocation` method instead.
77
- */
78
- setDocumentParams: (params: Location) => void;
79
- /**
80
- * Tell us the custom params of the current document/resource to identify sub document inside a document.
81
- * @param params Location
82
- * @param appendLocation Append location to existing location
83
- */
84
- setLocation: (params: Location, appendLocation?: boolean) => void;
85
- /**
86
- * To remove document params from a User
87
- * @deprecated This method is depercated and will be removed in next release. Use `removeLocation` method instead.
88
- */
89
- removeDocumentParams: () => void;
90
- /**
91
- * To remove location from a User
92
- * @param location Location
93
- */
94
- removeLocation: (location?: Location) => void;
95
- /**
96
- * To exclude data of specific location ids
97
- * @param ids Location Ids
98
- */
99
- excludeLocationIds: (ids: string[]) => void;
100
- /**
101
- * Tell us the about the scrollable document ids to keep track on its scroll changes
102
- * @param ids scrollable elements ids
103
- */
104
- setScrollableElementsIds: (ids: string[]) => void;
105
- /**
106
- * To remove document params from a User
107
- */
108
- removeScrollableElementsIds: () => void;
109
- /**
110
- * Get the Presence Element Object to access the raw presence data.
111
- *
112
- * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
113
- */
114
- getPresenceElement: () => PresenceElement;
115
- /**
116
- * Get the Cursor Element Object to access the raw cursor data.
117
- *
118
- * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
119
- */
120
- getCursorElement: () => CursorElement;
121
- /**
122
- * Get the Comment Element Object to access the raw comment data.
123
- *
124
- * This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI.
125
- */
126
- getCommentElement: () => CommentElement;
127
- /**
128
- * Get the Tag Pin Annotation Object to access the raw tag data.
129
- *
130
- * This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI.
131
- */
132
- getTagElement: () => TagElement;
133
- /**
134
- * Get the Selection Object to enable/disable the feature.
135
- */
136
- getSelectionElement: () => SelectionElement;
137
- /**
138
- * Get the Recorder Object.
139
- */
140
- getRecorderElement: () => RecorderElement;
141
- /**
142
- * Get the Contact Object.
143
- */
144
- getContactElement: () => ContactElement;
145
- /**
146
- * Get the Rewriter Object.
147
- */
148
- getRewriterElement: () => RewriterElement;
149
- /**
150
- * Get the Huddle element.
151
- */
152
- getHuddleElement: () => HuddleElement;
153
- /**
154
- * Get the LiveStateSync Object.
155
- */
156
- getLiveStateSyncElement: () => LiveStateSyncElement;
157
- /**
158
- * Get the Arrow Object.
159
- */
160
- getArrowElement: () => ArrowElement;
161
- /**
162
- * Get the Views Object.
163
- */
164
- getViewsElement: () => ViewsElement;
165
- /**
166
- * Get the Notification Object.
167
- */
168
- getNotificationElement: () => NotificationElement;
169
- /**
170
- * Get the Autocomplete Object.
171
- */
172
- getAutocompleteElement: () => AutocompleteElement;
173
- /**
174
- * Get the Area Object.
175
- */
176
- getAreaElement: () => AreaElement;
177
- /**
178
- * Get the Area Object.
179
- */
180
- getReactionElement: () => ReactionElement;
181
- /**
182
- * Get the metadata of the current resource.
183
- */
184
- getMetadata: () => Promise<VeltEventMetadata | null>;
185
- /**
186
- * To signout a user
187
- */
188
- signOutUser: () => any;
189
- /**
190
- * Provide a list of features to disable.
191
- * Provide an empty array to enable all the features.
192
- * @param features List of features
193
- */
194
- disableFeatures: (features: Array<FeatureType>) => void;
195
- /**
196
- * Add location to show comments, tags, recorders etc. for provided location also.
197
- * @param location Location object
198
- * @deprecated This method is deprecated and will be removed in next release. Use `setLocation` method with `appendLocation: true` instead.
199
- */
200
- addLocation: (location: any) => any;
201
- /**
202
- * To set the dark mode of Velt components.
203
- * @param value {boolean} true/false
204
- */
205
- setDarkMode: (darkMode: boolean) => void;
32
+ constructor();
33
+ initConfig: (apiKey: string, config?: Config) => void;
34
+ identify: (user: User, userOptions?: UserOptions) => Promise<unknown>;
35
+ /**
36
+ * Tell us who the currently logged in user is.
37
+ *
38
+ * Call whenever the user is updated: signs in, signs out, signs up etc.
39
+ * @deprecated This method is deprecated and will be removed in next release.
40
+ */
41
+ updateUser: (user: User) => void;
42
+ /**
43
+ * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
44
+ * @param id unique document ID
45
+ * @param documentMetadata Document Metadata
46
+ */
47
+ setDocument: (id: string, documentMetadata?: DocumentMetadata) => void;
48
+ /**
49
+ * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
50
+ * @param id unique document ID
51
+ */
52
+ setDocumentId: (id: string) => void;
53
+ /**
54
+ * To set multiple documents
55
+ */
56
+ setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
57
+ /**
58
+ * To unset the document id
59
+ */
60
+ unsetDocumentId: () => void;
61
+ /**
62
+ * To unset the documents
63
+ */
64
+ unsetDocuments: () => void;
65
+ /**
66
+ * To set the user data provider.
67
+ */
68
+ setUserDataProvider: (userDataProvider: UserDataProvider) => void;
69
+ /**
70
+ * Get Document ID
71
+ */
72
+ getDocumentId: () => string;
73
+ /**
74
+ * Tell us the custom params of the current document/resource to identify sub document inside a document.
75
+ * @param params Document Params
76
+ * @deprecated This method is depercated and will be removed in next release. Use `setLocation` method instead.
77
+ */
78
+ setDocumentParams: (params: Location) => void;
79
+ /**
80
+ * Tell us the custom params of the current document/resource to identify sub document inside a document.
81
+ * @param params Location
82
+ * @param appendLocation Append location to existing location
83
+ */
84
+ setLocation: (params: Location, appendLocation?: boolean) => void;
85
+ /**
86
+ * To remove document params from a User
87
+ * @deprecated This method is depercated and will be removed in next release. Use `removeLocation` method instead.
88
+ */
89
+ removeDocumentParams: () => void;
90
+ /**
91
+ * To remove location from a User
92
+ * @param location Location
93
+ */
94
+ removeLocation: (location?: Location) => void;
95
+ /**
96
+ * To exclude data of specific location ids
97
+ * @param ids Location Ids
98
+ */
99
+ excludeLocationIds: (ids: string[]) => void;
100
+ /**
101
+ * Tell us the about the scrollable document ids to keep track on its scroll changes
102
+ * @param ids scrollable elements ids
103
+ */
104
+ setScrollableElementsIds: (ids: string[]) => void;
105
+ /**
106
+ * To remove document params from a User
107
+ */
108
+ removeScrollableElementsIds: () => void;
109
+ /**
110
+ * Get the Presence Element Object to access the raw presence data.
111
+ *
112
+ * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
113
+ */
114
+ getPresenceElement: () => PresenceElement;
115
+ /**
116
+ * Get the Cursor Element Object to access the raw cursor data.
117
+ *
118
+ * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
119
+ */
120
+ getCursorElement: () => CursorElement;
121
+ /**
122
+ * Get the Comment Element Object to access the raw comment data.
123
+ *
124
+ * This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI.
125
+ */
126
+ getCommentElement: () => CommentElement;
127
+ /**
128
+ * Get the Tag Pin Annotation Object to access the raw tag data.
129
+ *
130
+ * This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI.
131
+ */
132
+ getTagElement: () => TagElement;
133
+ /**
134
+ * Get the Selection Object to enable/disable the feature.
135
+ */
136
+ getSelectionElement: () => SelectionElement;
137
+ /**
138
+ * Get the Recorder Object.
139
+ */
140
+ getRecorderElement: () => RecorderElement;
141
+ /**
142
+ * Get the Contact Object.
143
+ */
144
+ getContactElement: () => ContactElement;
145
+ /**
146
+ * Get the Rewriter Object.
147
+ */
148
+ getRewriterElement: () => RewriterElement;
149
+ /**
150
+ * Get the Huddle element.
151
+ */
152
+ getHuddleElement: () => HuddleElement;
153
+ /**
154
+ * Get the LiveStateSync Object.
155
+ */
156
+ getLiveStateSyncElement: () => LiveStateSyncElement;
157
+ /**
158
+ * Get the Arrow Object.
159
+ */
160
+ getArrowElement: () => ArrowElement;
161
+ /**
162
+ * Get the Views Object.
163
+ */
164
+ getViewsElement: () => ViewsElement;
165
+ /**
166
+ * Get the Notification Object.
167
+ */
168
+ getNotificationElement: () => NotificationElement;
169
+ /**
170
+ * Get the Autocomplete Object.
171
+ */
172
+ getAutocompleteElement: () => AutocompleteElement;
173
+ /**
174
+ * Get the Area Object.
175
+ */
176
+ getAreaElement: () => AreaElement;
177
+ /**
178
+ * Get the Area Object.
179
+ */
180
+ getReactionElement: () => ReactionElement;
181
+ /**
182
+ * Get the metadata of the current resource.
183
+ */
184
+ getMetadata: () => Promise<VeltEventMetadata | null>;
185
+ /**
186
+ * To signout a user
187
+ */
188
+ signOutUser: () => any;
189
+ /**
190
+ * Provide a list of features to disable.
191
+ * Provide an empty array to enable all the features.
192
+ * @param features List of features
193
+ */
194
+ disableFeatures: (features: Array<FeatureType>) => void;
195
+ /**
196
+ * Add location to show comments, tags, recorders etc. for provided location also.
197
+ * @param location Location object
198
+ * @deprecated This method is deprecated and will be removed in next release. Use `setLocation` method with `appendLocation: true` instead.
199
+ */
200
+ addLocation: (location: any) => any;
201
+ /**
202
+ * To set the dark mode of Velt components.
203
+ * @param value {boolean} true/false
204
+ */
205
+ setDarkMode: (darkMode: boolean) => void;
206
206
 
207
- /**
208
- * To check if user allowed in provided document or not.
209
- */
210
- isUserAllowed$: () => Observable<boolean>;
207
+ /**
208
+ * To check if user allowed in provided document or not.
209
+ */
210
+ isUserAllowed$: () => Observable<boolean>;
211
211
 
212
- /**
213
- * To get user role in provided document.
214
- */
215
- getUserRole$: () => Observable<string | null>;
212
+ /**
213
+ * To get user role in provided document.
214
+ */
215
+ getUserRole$: () => Observable<string | null>;
216
216
 
217
- /**
218
- * To check if plan is expired or not.
219
- */
220
- isPlanExpired$: () => Observable<boolean>;
217
+ /**
218
+ * To check if plan is expired or not.
219
+ */
220
+ isPlanExpired$: () => Observable<boolean>;
221
221
 
222
- /**
223
- * To get if the Velt is initialized or not.
224
- * @returns Observable<boolean | undefined>
225
- */
226
- getVeltInitState: () => Observable<boolean | undefined>;
222
+ /**
223
+ * To get if the Velt is initialized or not.
224
+ * @returns Observable<boolean | undefined>
225
+ */
226
+ getVeltInitState: () => Observable<boolean | undefined>;
227
227
 
228
- /**
229
- * To invite list of users to the document.
230
- * @param documentUsers List of document users
231
- */
232
- inviteUsers: (documentUsers: Array<DocumentUser>) => void;
228
+ /**
229
+ * To invite list of users to the document.
230
+ * @param documentUsers List of document users
231
+ */
232
+ inviteUsers: (documentUsers: Array<DocumentUser>) => void;
233
233
 
234
- /**
235
- * To remove snippyly specific content from provided html content.
236
- */
237
- removeSnippylyContent: (htmlContent: string) => string;
234
+ /**
235
+ * To remove snippyly specific content from provided html content.
236
+ */
237
+ removeSnippylyContent: (htmlContent: string) => string;
238
238
 
239
- /**
240
- * To remove velt specific content from provided html content.
241
- */
239
+ /**
240
+ * To remove velt specific content from provided html content.
241
+ */
242
242
  removeVeltContent: (htmlContent: string) => string;
243
243
 
244
244
  /**
@@ -272,7 +272,7 @@ export declare class Snippyly {
272
272
  /**
273
273
  * To update user contact list.
274
274
  */
275
- updateContactList: (userContacts: UserContact[], config?: {merge: boolean}) => void;
275
+ updateContactList: (userContacts: UserContact[], config?: { merge: boolean }) => void;
276
276
 
277
277
  /**
278
278
  * To get document metadata.
@@ -283,4 +283,14 @@ export declare class Snippyly {
283
283
  * To subscribe to core actions
284
284
  */
285
285
  on: <T extends keyof CoreEventTypesMap>(action: T) => Observable<CoreEventTypesMap[T]>;
286
+
287
+ /**
288
+ * To set the ui state.
289
+ */
290
+ setUiState: (uiState: { [key: string]: any }) => void;
291
+
292
+ /**
293
+ * To get the ui state.
294
+ */
295
+ getUiState: () => Observable<{ [key: string]: any }>;
286
296
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/types-dev",
3
- "version": "4.0.0-beta.114",
3
+ "version": "4.0.0-beta.116",
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": [