@veltdev/sdk 4.4.0 → 4.5.0-beta.2
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.
- package/app/models/data/live-state-events.data.model.d.ts +23 -0
- package/app/models/data/presence-events.data.model.d.ts +8 -0
- package/app/models/data/presence-user.data.model.d.ts +2 -0
- package/app/models/data/recorder-annotation.data.model.d.ts +19 -0
- package/app/models/data/recorder-events.data.model.d.ts +3 -0
- package/app/models/element/live-state-sync-element.model.d.ts +11 -0
- package/app/models/element/presence-element.model.d.ts +11 -0
- package/app/utils/enums.d.ts +15 -0
- package/models.d.ts +2 -0
- package/package.json +1 -1
- package/velt.js +73 -73
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LiveStateSyncEventTypes } from "../../utils/enums";
|
|
2
|
+
import { User } from "./user.data.model";
|
|
3
|
+
export interface AccessRequestEvent {
|
|
4
|
+
viewer?: User;
|
|
5
|
+
editor?: User;
|
|
6
|
+
timestamp?: number;
|
|
7
|
+
status?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SEMEvent {
|
|
10
|
+
viewer?: User;
|
|
11
|
+
editor?: User;
|
|
12
|
+
timestamp?: number;
|
|
13
|
+
role?: string;
|
|
14
|
+
}
|
|
15
|
+
export type LiveStateEventTypesMap = {
|
|
16
|
+
[LiveStateSyncEventTypes.ACCESS_REQUESTED]: AccessRequestEvent;
|
|
17
|
+
[LiveStateSyncEventTypes.ACCESS_REQUEST_CANCELED]: AccessRequestEvent;
|
|
18
|
+
[LiveStateSyncEventTypes.ACCESS_ACCEPTED]: AccessRequestEvent;
|
|
19
|
+
[LiveStateSyncEventTypes.ACCESS_REJECTED]: AccessRequestEvent;
|
|
20
|
+
[LiveStateSyncEventTypes.EDITOR_ASSIGNED]: SEMEvent;
|
|
21
|
+
[LiveStateSyncEventTypes.VIEWER_ASSIGNED]: SEMEvent;
|
|
22
|
+
[LiveStateSyncEventTypes.EDITOR_ON_DIFFERENT_TAB_DETECTED]: SEMEvent;
|
|
23
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PresenceEventTypes } from "../../utils/enums";
|
|
2
|
+
import { PresenceUser } from "./presence-user.data.model";
|
|
3
|
+
export interface PresenceMultipleUsersOnlineEvent {
|
|
4
|
+
users: PresenceUser[];
|
|
5
|
+
}
|
|
6
|
+
export type PresenceEventTypesMap = {
|
|
7
|
+
[PresenceEventTypes.MULTIPLE_USERS_ONLINE]: PresenceMultipleUsersOnlineEvent;
|
|
8
|
+
};
|
|
@@ -163,11 +163,28 @@ export interface RecorderAnnotationEditVersion {
|
|
|
163
163
|
waveformData?: number[];
|
|
164
164
|
displayName?: string;
|
|
165
165
|
boundedTrimRanges?: RecorderBoundedTrimRange[];
|
|
166
|
+
boundedScaleRanges?: RecorderBoundedScaleRange[];
|
|
166
167
|
}
|
|
167
168
|
export interface RecorderBoundedTrimRange {
|
|
168
169
|
start: number;
|
|
169
170
|
end: number;
|
|
170
171
|
}
|
|
172
|
+
export interface RecorderBoundedScaleRange {
|
|
173
|
+
start: number;
|
|
174
|
+
end: number;
|
|
175
|
+
zoomInDuration?: number;
|
|
176
|
+
holdDuration?: number;
|
|
177
|
+
zoomOutDuration?: number;
|
|
178
|
+
zoomFactor?: number;
|
|
179
|
+
centerX?: number;
|
|
180
|
+
centerY?: number;
|
|
181
|
+
topLeftX?: number;
|
|
182
|
+
topLeftY?: number;
|
|
183
|
+
}
|
|
184
|
+
export interface RecorderEditRange {
|
|
185
|
+
trimRanges: RecorderBoundedTrimRange[];
|
|
186
|
+
scaleRanges: RecorderBoundedScaleRange[];
|
|
187
|
+
}
|
|
171
188
|
export declare class RecorderMetadata extends BaseMetadata {
|
|
172
189
|
[key: string]: any;
|
|
173
190
|
}
|
|
@@ -184,6 +201,7 @@ declare class RecorderDataTranscription {
|
|
|
184
201
|
contentSummary?: string;
|
|
185
202
|
}
|
|
186
203
|
declare class RecorderDataAsset {
|
|
204
|
+
version?: number;
|
|
187
205
|
url: string;
|
|
188
206
|
mimeType?: string;
|
|
189
207
|
fileName?: string;
|
|
@@ -201,6 +219,7 @@ export declare class RecorderData {
|
|
|
201
219
|
from?: User | null;
|
|
202
220
|
metadata?: RecorderMetadata;
|
|
203
221
|
assets: RecorderDataAsset[];
|
|
222
|
+
assetsAllVersions: RecorderDataAsset[];
|
|
204
223
|
transcription: RecorderDataTranscription;
|
|
205
224
|
}
|
|
206
225
|
export interface RecorderRequestQuery {
|
|
@@ -6,8 +6,11 @@ export interface RecordingDoneEvent extends RecorderData {
|
|
|
6
6
|
}
|
|
7
7
|
export interface RecordingDeleteEvent extends RecorderData {
|
|
8
8
|
}
|
|
9
|
+
export interface RecordingEditDoneEvent extends RecorderData {
|
|
10
|
+
}
|
|
9
11
|
export type RecorderEventTypesMap = {
|
|
10
12
|
[RecorderEventTypes.TRANSCRIPTION_DONE]: TranscriptionDoneEvent;
|
|
11
13
|
[RecorderEventTypes.RECORDING_DONE]: RecordingDoneEvent;
|
|
14
|
+
[RecorderEventTypes.RECORDING_EDIT_DONE]: RecordingEditDoneEvent;
|
|
12
15
|
[RecorderEventTypes.DELETE_RECORDING]: RecordingDeleteEvent;
|
|
13
16
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { SingleEditorConfig, UserEditorAccess, EditorAccessTimer, LiveStateDataConfig, SetLiveStateDataConfig } from '../data/live-state-data.data.model';
|
|
3
3
|
import { User } from '../data/user.data.model';
|
|
4
4
|
import { ServerConnectionState } from '../../utils/enums';
|
|
5
|
+
import { LiveStateEventTypesMap } from '../data/live-state-events.data.model';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Represents the synchronization element for live state.
|
|
@@ -141,6 +142,11 @@ export declare class LiveStateSyncElement {
|
|
|
141
142
|
*/
|
|
142
143
|
onServerConnectionStateChange: () => Observable<ServerConnectionState>;
|
|
143
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Subscribe to live state events
|
|
147
|
+
*/
|
|
148
|
+
on: <T extends keyof LiveStateEventTypesMap>(action: T) => Observable<LiveStateEventTypesMap[T]>;
|
|
149
|
+
|
|
144
150
|
/**
|
|
145
151
|
* Constructor for LiveStateSyncElement.
|
|
146
152
|
*/
|
|
@@ -278,4 +284,9 @@ export declare class LiveStateSyncElement {
|
|
|
278
284
|
* To get server connection state
|
|
279
285
|
*/
|
|
280
286
|
private _onServerConnectionStateChange;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Subscribe to live state events
|
|
290
|
+
*/
|
|
291
|
+
private _on;
|
|
281
292
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
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
5
|
export declare class PresenceElement {
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -36,6 +37,11 @@ export declare class PresenceElement {
|
|
|
36
37
|
* To disable adding self to the presence list
|
|
37
38
|
*/
|
|
38
39
|
disableSelf: () => void;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Subscribe to presence events
|
|
43
|
+
*/
|
|
44
|
+
on: <T extends keyof PresenceEventTypesMap>(action: T) => Observable<PresenceEventTypesMap[T]>;
|
|
39
45
|
constructor();
|
|
40
46
|
/**
|
|
41
47
|
* Subscribe to a list of all online users who are either active or inactive on the current document.
|
|
@@ -70,4 +76,9 @@ export declare class PresenceElement {
|
|
|
70
76
|
* To disable adding self to the presence list
|
|
71
77
|
*/
|
|
72
78
|
private _disableSelf;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Subscribe to presence events
|
|
82
|
+
*/
|
|
83
|
+
private _on;
|
|
73
84
|
}
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export declare const CommentEventTypes: {
|
|
|
58
58
|
export declare const RecorderEventTypes: {
|
|
59
59
|
readonly TRANSCRIPTION_DONE: "transcriptionDone";
|
|
60
60
|
readonly RECORDING_DONE: "recordingDone";
|
|
61
|
+
readonly RECORDING_EDIT_DONE: "recordingEditDone";
|
|
61
62
|
readonly DELETE_RECORDING: "deleteRecording";
|
|
62
63
|
};
|
|
63
64
|
export declare const CoreEventTypes: {
|
|
@@ -66,9 +67,23 @@ export declare const CoreEventTypes: {
|
|
|
66
67
|
readonly DOCUMENT_INIT: "documentInit";
|
|
67
68
|
readonly ERROR: "error";
|
|
68
69
|
};
|
|
70
|
+
export declare const LiveStateSyncEventTypes: {
|
|
71
|
+
readonly ACCESS_REQUESTED: "accessRequested";
|
|
72
|
+
readonly ACCESS_REQUEST_CANCELED: "accessRequestCanceled";
|
|
73
|
+
readonly ACCESS_ACCEPTED: "accessAccepted";
|
|
74
|
+
readonly ACCESS_REJECTED: "accessRejected";
|
|
75
|
+
readonly EDITOR_ASSIGNED: "editorAssigned";
|
|
76
|
+
readonly VIEWER_ASSIGNED: "viewerAssigned";
|
|
77
|
+
readonly EDITOR_ON_DIFFERENT_TAB_DETECTED: "editorOnDifferentTabDetected";
|
|
78
|
+
};
|
|
79
|
+
export declare const PresenceEventTypes: {
|
|
80
|
+
readonly MULTIPLE_USERS_ONLINE: "multipleUsersOnline";
|
|
81
|
+
};
|
|
69
82
|
export type CommentEventType = typeof CommentEventTypes[keyof typeof CommentEventTypes];
|
|
70
83
|
export type RecorderEventType = typeof RecorderEventTypes[keyof typeof RecorderEventTypes];
|
|
71
84
|
export type CoreEventType = typeof CoreEventTypes[keyof typeof CoreEventTypes];
|
|
85
|
+
export type LiveStateSyncEventType = typeof LiveStateSyncEventTypes[keyof typeof LiveStateSyncEventTypes];
|
|
86
|
+
export type PresenceEventType = typeof PresenceEventTypes[keyof typeof PresenceEventTypes];
|
|
72
87
|
export declare enum TagStatus {
|
|
73
88
|
ADDED = "added",
|
|
74
89
|
UPDATED = "updated",
|
package/models.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './app/models/data/document-user.data.model';
|
|
|
28
28
|
export * from './app/models/data/huddle.model';
|
|
29
29
|
export * from './app/models/data/live-state-data-map.data.model';
|
|
30
30
|
export * from './app/models/data/live-state-data.data.model';
|
|
31
|
+
export * from './app/models/data/live-state-events.data.model';
|
|
31
32
|
export * from './app/models/data/localstorage.data.model';
|
|
32
33
|
export * from './app/models/data/location-metadata.model';
|
|
33
34
|
export * from './app/models/data/location.model';
|
|
@@ -37,6 +38,7 @@ export * from './app/models/data/notification.model';
|
|
|
37
38
|
export * from './app/models/data/page-info.model';
|
|
38
39
|
export * from './app/models/data/permission.data.model';
|
|
39
40
|
export * from './app/models/data/presence-user.data.model';
|
|
41
|
+
export * from './app/models/data/presence-events.data.model';
|
|
40
42
|
export * from './app/models/data/recorder.model';
|
|
41
43
|
export * from './app/models/data/recorder-annotation.data.model';
|
|
42
44
|
export * from './app/models/data/recorder-events.data.model';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0-beta.2",
|
|
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": [
|