@veltdev/sdk 4.5.0-beta.37 → 4.5.0-beta.39

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.
@@ -24,6 +24,7 @@ import { FeatureType } from "../utils/enums";
24
24
  import { UserContact } from "../models/data/user-contact.data.model";
25
25
  import { DocumentMetadata } from "../models/data/document-metadata.model";
26
26
  import { ReactionElement } from "../models/element/reaction-element.model";
27
+ import { CrdtElement } from "../models/element/crdt-element.model";
27
28
  import { VeltEventMetadata } from "../models/data/event-metadata.data.model";
28
29
  import { CoreEventTypesMap } from "../models/data/core-events.data.model";
29
30
  import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest, UpdateDocumentsRequest, UpdateLocationsRequest } from "../models/data/document.data.model";
@@ -225,6 +226,10 @@ export declare class Snippyly {
225
226
  * Get the Area Object.
226
227
  */
227
228
  getReactionElement: () => ReactionElement;
229
+ /**
230
+ * Get the CRDT Element Object.
231
+ */
232
+ getCrdtElement: () => CrdtElement;
228
233
  /**
229
234
  * Get the metadata of the current resource.
230
235
  */
@@ -72,6 +72,10 @@ export declare class DocumentPaths {
72
72
  * User login path.
73
73
  */
74
74
  logins?: string;
75
+ /**
76
+ * CRDT path.
77
+ */
78
+ crdt?: string;
75
79
  /**
76
80
  * Selection path.
77
81
  */
@@ -126,7 +126,7 @@ export declare class CommentElement {
126
126
 
127
127
  /**
128
128
  * Subscribe to comment mode change.
129
- *
129
+ *
130
130
  * Returns Observable<boolean>.
131
131
  */
132
132
  onCommentModeChange: () => Observable<boolean>;
@@ -278,7 +278,7 @@ export declare class CommentElement {
278
278
 
279
279
  /**
280
280
  * @description Sets custom status filters
281
- * @param statuses
281
+ * @param statuses
282
282
  */
283
283
  setCustomStatus: (statuses: CustomStatus[]) => void;
284
284
 
@@ -326,7 +326,7 @@ export declare class CommentElement {
326
326
 
327
327
  /**
328
328
  * @description Sets the comment context provider
329
- * @param provider
329
+ * @param provider
330
330
  */
331
331
  public setContextProvider: (provider: (documentId: string, location?: any) => any) => void;
332
332
 
@@ -397,14 +397,14 @@ export declare class CommentElement {
397
397
 
398
398
  /**
399
399
  * To get documentId, location and set context data when comment is added.
400
- *
400
+ *
401
401
  * @legacy Use `AddCommentAnnotationEvent` instead
402
402
  */
403
403
  public onCommentAdd: () => Observable<CommentAddEventData>;
404
404
 
405
405
  /**
406
406
  * To get data when comment is updated.
407
- *
407
+ *
408
408
  * @legacy Use action specific events instead
409
409
  */
410
410
  public onCommentUpdate: () => Observable<CommentUpdateEventData>;
@@ -1173,6 +1173,21 @@ export declare class CommentElement {
1173
1173
  */
1174
1174
  public disableFilterCommentsOnDom: () => void;
1175
1175
 
1176
+ /**
1177
+ * To enable reply avatars
1178
+ */
1179
+ public enableReplyAvatars: () => void;
1180
+
1181
+ /**
1182
+ * To disable reply avatars
1183
+ */
1184
+ public disableReplyAvatars: () => void;
1185
+
1186
+ /**
1187
+ * To set max reply avatars
1188
+ */
1189
+ public setMaxReplyAvatars: (maxReplyAvatars: number) => void;
1190
+
1176
1191
  constructor();
1177
1192
  /**
1178
1193
  * Subscribe to comments on the current document.
@@ -1288,7 +1303,7 @@ export declare class CommentElement {
1288
1303
 
1289
1304
  /**
1290
1305
  * Subscribe to comment mode change.
1291
- *
1306
+ *
1292
1307
  * Returns Observable<boolean>.
1293
1308
  */
1294
1309
  private _onCommentModeChange;
@@ -1435,7 +1450,7 @@ export declare class CommentElement {
1435
1450
 
1436
1451
  /**
1437
1452
  * @description Sets custom status filters
1438
- * @param statuses
1453
+ * @param statuses
1439
1454
  */
1440
1455
  private _setCustomStatus;
1441
1456
 
@@ -1483,7 +1498,7 @@ export declare class CommentElement {
1483
1498
 
1484
1499
  /**
1485
1500
  * @description Sets the comment context provider
1486
- * @param provider
1501
+ * @param provider
1487
1502
  */
1488
1503
  private _setContextProvider;
1489
1504
 
@@ -1728,7 +1743,7 @@ export declare class CommentElement {
1728
1743
  */
1729
1744
  private _disableRecordingSummary;
1730
1745
 
1731
- /**
1746
+ /**
1732
1747
  * To enable recording transcription
1733
1748
  */
1734
1749
  private _enableRecordingTranscription;
@@ -2023,7 +2038,7 @@ export declare class CommentElement {
2023
2038
  */
2024
2039
  private _disableQueryParamsComments;
2025
2040
 
2026
- /**
2041
+ /**
2027
2042
  * To enable comment sidebar action button click
2028
2043
  */
2029
2044
  private _onCommentSidebarActionButtonClick;
@@ -2325,4 +2340,19 @@ export declare class CommentElement {
2325
2340
  * To disable filter comments on dom
2326
2341
  */
2327
2342
  private _disableFilterCommentsOnDom;
2343
+
2344
+ /**
2345
+ * To enable reply avatars
2346
+ */
2347
+ private _enableReplyAvatars;
2348
+
2349
+ /**
2350
+ * To disable reply avatars
2351
+ */
2352
+ private _disableReplyAvatars;
2353
+
2354
+ /**
2355
+ * To set max reply avatars
2356
+ */
2357
+ private _setMaxReplyAvatars;
2328
2358
  }
@@ -0,0 +1,116 @@
1
+ // @ts-nocheck
2
+ export declare class CrdtElement {
3
+ /**
4
+ * Update data for a specific CRDT document
5
+ * @param id Document ID
6
+ * @param state State data as Uint8Array or number array
7
+ */
8
+ updateData: ({ id, state }: { id: string, state: Uint8Array | number[] }) => Promise<any>;
9
+
10
+ /**
11
+ * Subscribe to data changes for a specific CRDT document
12
+ * @param id Document ID
13
+ * @param callback Callback function to handle data changes
14
+ * @returns Unsubscribe function
15
+ */
16
+ onDataChange: ({ id, callback }: { id: string, callback: (data: any) => void }) => () => void;
17
+
18
+ /**
19
+ * Get data for a specific CRDT document
20
+ * @param id Document ID
21
+ */
22
+ getData: ({ id }: { id: string }) => Promise<any>;
23
+
24
+ /**
25
+ * Subscribe to state changes for a specific CRDT document
26
+ * @param id Document ID
27
+ * @param callback Callback function to handle state changes
28
+ * @returns Unsubscribe function
29
+ */
30
+ onStateChange: ({ id, callback }: { id: string, callback: (data: any) => void }) => () => void;
31
+
32
+ /**
33
+ * Update state for a specific CRDT document
34
+ * @param id Document ID
35
+ * @param state State data as Uint8Array or number array
36
+ */
37
+ updateState: ({ id, state }: { id: string, state: Uint8Array | number[] }) => Promise<any>;
38
+
39
+ /**
40
+ * Register a user for synchronization on a specific CRDT document
41
+ * @param id Document ID
42
+ */
43
+ registerSyncUser: ({ id }: { id: string }) => Promise<void>;
44
+
45
+ /**
46
+ * Set presence for a specific CRDT document
47
+ * @param id Document ID
48
+ */
49
+ setPresence: ({ id }: { id: string }) => Promise<void>;
50
+
51
+ /**
52
+ * Subscribe to presence changes for a specific CRDT document
53
+ * @param id Document ID
54
+ * @param callback Callback function to handle presence changes
55
+ * @returns Unsubscribe function
56
+ */
57
+ onPresenceChange: ({ id, callback }: { id: string, callback: (data: any) => void }) => () => void;
58
+
59
+ constructor();
60
+
61
+ /**
62
+ * Update data for a specific CRDT document
63
+ * @param id Document ID
64
+ * @param state State data as Uint8Array or number array
65
+ */
66
+ private _updateData;
67
+
68
+ /**
69
+ * Subscribe to data changes for a specific CRDT document
70
+ * @param id Document ID
71
+ * @param callback Callback function to handle data changes
72
+ * @returns Unsubscribe function
73
+ */
74
+ private _onDataChange;
75
+
76
+ /**
77
+ * Get data for a specific CRDT document
78
+ * @param id Document ID
79
+ */
80
+ private _getData;
81
+
82
+ /**
83
+ * Subscribe to state changes for a specific CRDT document
84
+ * @param id Document ID
85
+ * @param callback Callback function to handle state changes
86
+ * @returns Unsubscribe function
87
+ */
88
+ private _onStateChange;
89
+
90
+ /**
91
+ * Update state for a specific CRDT document
92
+ * @param id Document ID
93
+ * @param state State data as Uint8Array or number array
94
+ */
95
+ private _updateState;
96
+
97
+ /**
98
+ * Register a user for synchronization on a specific CRDT document
99
+ * @param id Document ID
100
+ */
101
+ private _registerSyncUser;
102
+
103
+ /**
104
+ * Set presence for a specific CRDT document
105
+ * @param id Document ID
106
+ */
107
+ private _setPresence;
108
+
109
+ /**
110
+ * Subscribe to presence changes for a specific CRDT document
111
+ * @param id Document ID
112
+ * @param callback Callback function to handle presence changes
113
+ * @returns Unsubscribe function
114
+ */
115
+ private _onPresenceChange;
116
+ }
@@ -89,6 +89,16 @@ export declare class RecorderElement {
89
89
  */
90
90
  downloadLatestVideo: (recorderId: string) => Promise<boolean>;
91
91
 
92
+ /**
93
+ * To enable recording mic
94
+ */
95
+ enableRecordingMic: () => void;
96
+
97
+ /**
98
+ * To disable recording mic
99
+ */
100
+ disableRecordingMic: () => void;
101
+
92
102
  constructor();
93
103
 
94
104
  private _initRecording;
@@ -173,4 +183,14 @@ export declare class RecorderElement {
173
183
  * To download latest video
174
184
  */
175
185
  private _downloadLatestVideo;
186
+
187
+ /**
188
+ * To enable recording mic
189
+ */
190
+ private _enableRecordingMic;
191
+
192
+ /**
193
+ * To disable recording mic
194
+ */
195
+ private _disableRecordingMic;
176
196
  }
@@ -45,6 +45,7 @@ export declare class Constants {
45
45
  static FIREBASE_PARTIAL_PATH_LIVE_STATE: string;
46
46
  static FIREBASE_PARTIAL_PATH_IAM: string;
47
47
  static FIREBASE_PARTIAL_PATH_REACTION: string;
48
+ static FIREBASE_PARTIAL_PATH_CRDT: string;
48
49
  static FIREBASE_PARTIAL_PATH_VIEWS: string;
49
50
  static FIREBASE_PARTIAL_PATH_COMMENT_VIEWS: string;
50
51
  static FIREBASE_PARTIAL_PATH_NOTIFICATION_VIEWS: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "4.5.0-beta.37",
3
+ "version": "4.5.0-beta.39",
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": [
package/types.d.ts CHANGED
@@ -16,4 +16,5 @@ export * from './app/models/element/views-element.model';
16
16
  export * from './app/models/element/notification-element.model';
17
17
  export * from './app/models/element/autocomplete-element.model';
18
18
  export * from './app/models/element/reaction-element.model';
19
+ export * from './app/models/element/crdt-element.model';
19
20
  export * from './models';