@veltdev/sdk 1.0.156 → 1.0.158
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.
|
@@ -17,6 +17,7 @@ export declare class LiveStateData {
|
|
|
17
17
|
lastUpdated: any;
|
|
18
18
|
updatedBy: User;
|
|
19
19
|
tabId?: string | null;
|
|
20
|
+
isDataStringified?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export declare class SingleEditorLiveStateData {
|
|
22
23
|
editor?: User | null;
|
|
@@ -61,3 +62,6 @@ export declare class EditorAccessTimer {
|
|
|
61
62
|
*/
|
|
62
63
|
durationLeft?: number;
|
|
63
64
|
}
|
|
65
|
+
export declare class LiveStateDataConfig {
|
|
66
|
+
listenToNewChangesOnly?: boolean;
|
|
67
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { SingleEditorConfig, UserEditorAccess, EditorAccessTimer } from '../data/live-state-data.data.model';
|
|
2
|
+
import { SingleEditorConfig, UserEditorAccess, EditorAccessTimer, LiveStateDataConfig, LiveStateDataConfig } from '../data/live-state-data.data.model';
|
|
3
3
|
import { User } from '../data/user.data.model';
|
|
4
|
+
import { ServerConnectionState } from '../../utils/enums';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Represents the synchronization element for live state.
|
|
@@ -10,13 +11,13 @@ export declare class LiveStateSyncElement {
|
|
|
10
11
|
/**
|
|
11
12
|
* Gets live state data based on the provided ID.
|
|
12
13
|
*/
|
|
13
|
-
getLiveStateData: (liveStateDataId?: string,
|
|
14
|
+
getLiveStateData: (liveStateDataId?: string, liveStateDataConfig?: LiveStateDataConfig) => Observable<any>;
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Gets live state data as an observable based on the provided ID.
|
|
17
18
|
* @deprecated Use `getLiveStateData` instead
|
|
18
19
|
*/
|
|
19
|
-
getLiveStateData$: (liveStateDataId?: string,
|
|
20
|
+
getLiveStateData$: (liveStateDataId?: string, liveStateDataConfig?: LiveStateDataConfig) => Observable<any>;
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Sets live state data for the provided ID and data.
|
|
@@ -134,6 +135,12 @@ export declare class LiveStateSyncElement {
|
|
|
134
135
|
*/
|
|
135
136
|
getEditorAccessTimer: () => Observable<EditorAccessTimer>;
|
|
136
137
|
|
|
138
|
+
/**
|
|
139
|
+
* To get server connection state
|
|
140
|
+
* @returns Observable<ServerConnectionState>
|
|
141
|
+
*/
|
|
142
|
+
onServerConnectionStateChange: () => Observable<ServerConnectionState>;
|
|
143
|
+
|
|
137
144
|
/**
|
|
138
145
|
* Constructor for LiveStateSyncElement.
|
|
139
146
|
*/
|
|
@@ -266,4 +273,9 @@ export declare class LiveStateSyncElement {
|
|
|
266
273
|
* To get editor access timer
|
|
267
274
|
*/
|
|
268
275
|
private _getEditorAccessTimer;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* To get server connection state
|
|
279
|
+
*/
|
|
280
|
+
private _onServerConnectionStateChange;
|
|
269
281
|
}
|
package/app/utils/constants.d.ts
CHANGED
package/app/utils/enums.d.ts
CHANGED
|
@@ -102,3 +102,9 @@ export declare enum UnreadIndicatorMode {
|
|
|
102
102
|
MINIMAL = "minimal",
|
|
103
103
|
VERBOSE = "verbose"
|
|
104
104
|
}
|
|
105
|
+
export declare enum ServerConnectionState {
|
|
106
|
+
ONLINE = "online",
|
|
107
|
+
OFFLINE = "offline",
|
|
108
|
+
PENDING_INIT = "pendingInit",
|
|
109
|
+
PENDING_DATA = "pendingData"
|
|
110
|
+
}
|