@veltdev/sdk 4.5.0-beta.4 → 4.5.0-beta.41

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 (30) hide show
  1. package/app/client/snippyly.model.d.ts +44 -6
  2. package/app/models/data/button.data.model.d.ts +2 -0
  3. package/app/models/data/comment-annotation.data.model.d.ts +7 -0
  4. package/app/models/data/comment-sidebar-config.model.d.ts +20 -0
  5. package/app/models/data/core-events.data.model.d.ts +9 -0
  6. package/app/models/data/custom-filter.data.model.d.ts +8 -0
  7. package/app/models/data/document-paths.data.model.d.ts +12 -0
  8. package/app/models/data/document.data.model.d.ts +2 -0
  9. package/app/models/data/location.model.d.ts +10 -0
  10. package/app/models/data/multi-thread.data.model.d.ts +2 -0
  11. package/app/models/data/notification.model.d.ts +20 -1
  12. package/app/models/data/notifications-events.data.model.d.ts +9 -0
  13. package/app/models/data/presence-actions.data.model.d.ts +5 -0
  14. package/app/models/data/presence-events.data.model.d.ts +8 -0
  15. package/app/models/data/recorder-annotation.data.model.d.ts +3 -0
  16. package/app/models/data/recorder-events.data.model.d.ts +10 -0
  17. package/app/models/data/recorder.model.d.ts +6 -8
  18. package/app/models/data/resolver.data.model.d.ts +6 -0
  19. package/app/models/data/user-resolver.data.model.d.ts +2 -0
  20. package/app/models/element/comment-element.model.d.ts +105 -10
  21. package/app/models/element/crdt-element.model.d.ts +116 -0
  22. package/app/models/element/notification-element.model.d.ts +81 -1
  23. package/app/models/element/presence-element.model.d.ts +15 -1
  24. package/app/models/element/recorder-element.model.d.ts +30 -0
  25. package/app/utils/constants.d.ts +2 -0
  26. package/app/utils/enums.d.ts +17 -1
  27. package/models.d.ts +2 -0
  28. package/package.json +1 -1
  29. package/types.d.ts +1 -0
  30. package/velt.js +112 -101
@@ -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
+ }
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
 
3
- import { Notification, NotificationTabConfig } from "../data/notification.model";
3
+ import { Notification, NotificationTabConfig, NotificationSettingsConfig, NotificationInitialSettingsConfig } from "../data/notification.model";
4
4
 
5
5
  export declare class NotificationElement {
6
6
  /**
@@ -58,6 +58,46 @@ export declare class NotificationElement {
58
58
  */
59
59
  markNotificationAsReadById: (notificationId: string) => void;
60
60
 
61
+ /**
62
+ * To set settings
63
+ */
64
+ setSettings: (config: NotificationSettingsConfig) => void;
65
+
66
+ /**
67
+ * To get settings
68
+ */
69
+ getSettings: () => Observable<NotificationSettingsConfig | null>;
70
+
71
+ /**
72
+ * To mute all notifications
73
+ */
74
+ muteAllNotifications: () => void;
75
+
76
+ /**
77
+ * To enable settings
78
+ */
79
+ enableSettings: () => void;
80
+
81
+ /**
82
+ * To disable settings
83
+ */
84
+ disableSettings: () => void;
85
+
86
+ /**
87
+ * To enable self notifications
88
+ */
89
+ enableSelfNotifications: () => void;
90
+
91
+ /**
92
+ * To disable self notifications
93
+ */
94
+ disableSelfNotifications: () => void;
95
+
96
+ /**
97
+ * To set settings initial config
98
+ */
99
+ setSettingsInitialConfig: (settings: NotificationInitialSettingsConfig[]) => void;
100
+
61
101
  constructor();
62
102
 
63
103
  /**
@@ -114,4 +154,44 @@ export declare class NotificationElement {
114
154
  * To mark notification as read by id
115
155
  */
116
156
  private _markNotificationAsReadById;
157
+
158
+ /**
159
+ * To set settings
160
+ */
161
+ private _setSettings;
162
+
163
+ /**
164
+ * To get settings
165
+ */
166
+ private _getSettings;
167
+
168
+ /**
169
+ * To mute all notifications
170
+ */
171
+ private _muteAllNotifications;
172
+
173
+ /**
174
+ * To enable settings
175
+ */
176
+ private _enableSettings;
177
+
178
+ /**
179
+ * To disable settings
180
+ */
181
+ private _disableSettings;
182
+
183
+ /**
184
+ * To enable self notifications
185
+ */
186
+ private _enableSelfNotifications;
187
+
188
+ /**
189
+ * To disable self notifications
190
+ */
191
+ private _disableSelfNotifications;
192
+
193
+ /**
194
+ * To set settings initial config
195
+ */
196
+ private _setSettingsInitialConfig;
117
197
  }
@@ -1,13 +1,16 @@
1
1
  // @ts-nocheck
2
2
  import { Observable } from "rxjs";
3
3
  import { PresenceUser } from "../data/presence-user.data.model";
4
- import { PresenceEventTypesMap } from "../data/presence-events.data.model";
4
+ import { GetPresenceDataResponse, PresenceEventTypesMap } from "../data/presence-events.data.model";
5
+ import { PresenceRequestQuery } from "../data/presence-actions.data.model";
6
+
5
7
  export declare class PresenceElement {
6
8
 
7
9
  /**
8
10
  * Subscribe to a list of all online users who are either active or inactive on the current document.
9
11
  *
10
12
  * Returns Observable<PresenceUser[] | null>.
13
+ * @deprecated This method is deprecated. Use `getData` method instead.
11
14
  */
12
15
  getOnlineUsersOnCurrentDocument: () => Observable<PresenceUser[] | null>;
13
16
 
@@ -38,6 +41,11 @@ export declare class PresenceElement {
38
41
  */
39
42
  disableSelf: () => void;
40
43
 
44
+ /**
45
+ * To get the presence data
46
+ */
47
+ getData: (query?: PresenceRequestQuery) => Observable<GetPresenceDataResponse>;
48
+
41
49
  /**
42
50
  * Subscribe to presence events
43
51
  */
@@ -47,6 +55,7 @@ export declare class PresenceElement {
47
55
  * Subscribe to a list of all online users who are either active or inactive on the current document.
48
56
  *
49
57
  * Returns Observable<PresenceUser[] | null>.
58
+ * @deprecated This method is deprecated. Use `getData` method instead.
50
59
  */
51
60
  private _getOnlineUsersOnCurrentDocument;
52
61
 
@@ -77,6 +86,11 @@ export declare class PresenceElement {
77
86
  */
78
87
  private _disableSelf;
79
88
 
89
+ /**
90
+ * To get the presence data
91
+ */
92
+ private _getData;
93
+
80
94
  /**
81
95
  * Subscribe to presence events
82
96
  */
@@ -84,6 +84,21 @@ export declare class RecorderElement {
84
84
  */
85
85
  setRecordingEncodingOptions: (options: RecorderEncodingOptions) => void;
86
86
 
87
+ /**
88
+ * To download latest video
89
+ */
90
+ downloadLatestVideo: (recorderId: string) => Promise<boolean>;
91
+
92
+ /**
93
+ * To enable recording mic
94
+ */
95
+ enableRecordingMic: () => void;
96
+
97
+ /**
98
+ * To disable recording mic
99
+ */
100
+ disableRecordingMic: () => void;
101
+
87
102
  constructor();
88
103
 
89
104
  private _initRecording;
@@ -163,4 +178,19 @@ export declare class RecorderElement {
163
178
  * To set recording encoding options
164
179
  */
165
180
  private _setRecordingEncodingOptions;
181
+
182
+ /**
183
+ * To download latest video
184
+ */
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;
166
196
  }
@@ -12,6 +12,7 @@ export declare class Constants {
12
12
  static FIREBASE_PARTIAL_PATH_ORGANIZATIONS: string;
13
13
  static FIREBASE_PARTIAL_PATH_FOLDERS: string;
14
14
  static FIREBASE_PARTIAL_PATH_DOCS: string;
15
+ static FIREBASE_PARTIAL_PATH_DOCUMENT_CONFIGURATIONS: string;
15
16
  static FIREBASE_PARTIAL_PATH_PRESENCE: string;
16
17
  static FIREBASE_PARTIAL_PATH_ORGANIZATION_USERS: string;
17
18
  static FIREBASE_PARTIAL_PATH_FOLDER_USERS: string;
@@ -44,6 +45,7 @@ export declare class Constants {
44
45
  static FIREBASE_PARTIAL_PATH_LIVE_STATE: string;
45
46
  static FIREBASE_PARTIAL_PATH_IAM: string;
46
47
  static FIREBASE_PARTIAL_PATH_REACTION: string;
48
+ static FIREBASE_PARTIAL_PATH_CRDT: string;
47
49
  static FIREBASE_PARTIAL_PATH_VIEWS: string;
48
50
  static FIREBASE_PARTIAL_PATH_COMMENT_VIEWS: string;
49
51
  static FIREBASE_PARTIAL_PATH_NOTIFICATION_VIEWS: string;
@@ -60,10 +60,13 @@ export declare const RecorderEventTypes: {
60
60
  readonly RECORDING_DONE: "recordingDone";
61
61
  readonly RECORDING_EDIT_DONE: "recordingEditDone";
62
62
  readonly DELETE_RECORDING: "deleteRecording";
63
+ readonly ERROR: "error";
64
+ readonly RECORDING_SAVE_INITIATED: "recordingSaveInitiated";
63
65
  };
64
66
  export declare const CoreEventTypes: {
65
67
  readonly VELT_BUTTON_CLICK: "veltButtonClick";
66
68
  readonly USER_UPDATE: "userUpdate";
69
+ readonly INIT_UPDATE: "initUpdate";
67
70
  readonly DOCUMENT_INIT: "documentInit";
68
71
  readonly ERROR: "error";
69
72
  };
@@ -78,12 +81,17 @@ export declare const LiveStateSyncEventTypes: {
78
81
  };
79
82
  export declare const PresenceEventTypes: {
80
83
  readonly MULTIPLE_USERS_ONLINE: "multipleUsersOnline";
84
+ readonly USER_STATE_CHANGE: "userStateChange";
85
+ };
86
+ export declare const NotificationEventTypes: {
87
+ readonly SETTINGS_UPDATED: "settingsUpdated";
81
88
  };
82
89
  export type CommentEventType = typeof CommentEventTypes[keyof typeof CommentEventTypes];
83
90
  export type RecorderEventType = typeof RecorderEventTypes[keyof typeof RecorderEventTypes];
84
91
  export type CoreEventType = typeof CoreEventTypes[keyof typeof CoreEventTypes];
85
92
  export type LiveStateSyncEventType = typeof LiveStateSyncEventTypes[keyof typeof LiveStateSyncEventTypes];
86
93
  export type PresenceEventType = typeof PresenceEventTypes[keyof typeof PresenceEventTypes];
94
+ export type NotificationEventType = typeof NotificationEventTypes[keyof typeof NotificationEventTypes];
87
95
  export declare enum TagStatus {
88
96
  ADDED = "added",
89
97
  UPDATED = "updated",
@@ -253,7 +261,7 @@ export type ReactionPinType = 'timeline' | 'comment';
253
261
  export type SidebarPosition = 'left' | 'right';
254
262
  export type SidebarSortingCriteria = 'date' | 'unread' | null;
255
263
  export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved';
256
- export type SidebarFilterSearchType = 'people' | 'assigned' | 'tagged' | 'pages' | 'statuses' | 'priorities' | 'categories' | 'versions';
264
+ export type SidebarFilterSearchType = 'people' | 'assigned' | 'tagged' | 'pages' | 'documents' | 'statuses' | 'priorities' | 'categories' | 'versions' | string;
257
265
  export type InlineSortingCriteria = 'createdFirst' | 'createdLast' | 'updatedFirst' | 'updatedLast';
258
266
  export type NotificationPanelMode = 'popover' | 'sidebar';
259
267
  export type SidebarActionButtonType = 'default' | 'toggle';
@@ -261,3 +269,11 @@ export declare enum CommentSidebarSystemFiltersOperator {
261
269
  AND = "and",
262
270
  OR = "or"
263
271
  }
272
+ /**
273
+ * Type for notification settings accordion types
274
+ */
275
+ export type NotificationSettingsAccordionType = 'inbox' | 'email' | string;
276
+ /**
277
+ * Type for notification settings item options
278
+ */
279
+ export type NotificationSettingsItemType = 'ALL' | 'MINE' | 'NONE' | string;
package/models.d.ts CHANGED
@@ -35,9 +35,11 @@ export * from './app/models/data/location.model';
35
35
  export * from './app/models/data/media-preview-config.data.model';
36
36
  export * from './app/models/data/multi-thread.data.model';
37
37
  export * from './app/models/data/notification.model';
38
+ export * from './app/models/data/notifications-events.data.model';
38
39
  export * from './app/models/data/page-info.model';
39
40
  export * from './app/models/data/permission.data.model';
40
41
  export * from './app/models/data/presence-user.data.model';
42
+ export * from './app/models/data/presence-actions.data.model';
41
43
  export * from './app/models/data/presence-events.data.model';
42
44
  export * from './app/models/data/recorder.model';
43
45
  export * from './app/models/data/recorder-annotation.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "4.5.0-beta.4",
3
+ "version": "4.5.0-beta.41",
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';