@veltdev/sdk-staging 4.5.2-beta.2 → 4.5.2-beta.20
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/client/snippyly.model.d.ts +6 -1
- package/app/models/data/autocomplete.data.model.d.ts +6 -0
- package/app/models/data/comment-annotation.data.model.d.ts +6 -0
- package/app/models/data/comment-events.data.model.d.ts +8 -0
- package/app/models/data/live-state-data.data.model.d.ts +18 -0
- package/app/models/data/user-iam.data.model.d.ts +3 -0
- package/app/models/data/user-resolver.data.model.d.ts +42 -0
- package/app/models/element/comment-element.model.d.ts +41 -1
- package/app/models/element/live-state-sync-element.model.d.ts +13 -3
- package/app/models/element/recorder-element.model.d.ts +60 -0
- package/app/utils/constants.d.ts +1 -0
- package/app/utils/enums.d.ts +1 -0
- package/package.json +1 -1
- package/velt.js +180 -89
|
@@ -29,7 +29,7 @@ import { VeltEventMetadata } from "../models/data/event-metadata.data.model";
|
|
|
29
29
|
import { CoreEventTypesMap } from "../models/data/core-events.data.model";
|
|
30
30
|
import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest, UpdateDocumentsRequest, UpdateLocationsRequest } from "../models/data/document.data.model";
|
|
31
31
|
import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
|
|
32
|
-
import { UserDataProvider } from "../models/data/user-resolver.data.model";
|
|
32
|
+
import { UserDataProvider, GetUserPermissionsRequest, GetUserPermissionsResponse } from "../models/data/user-resolver.data.model";
|
|
33
33
|
import { VeltDataProvider } from "../models/data/provider.data.model";
|
|
34
34
|
import { VeltEncryptionProvider } from "../models/data/encryption-provider.data.model";
|
|
35
35
|
import { VeltResetButtonStateConfig } from "../models/data/button.data.model";
|
|
@@ -277,6 +277,11 @@ export declare class Snippyly {
|
|
|
277
277
|
*/
|
|
278
278
|
getUserRole$: () => Observable<string | null>;
|
|
279
279
|
|
|
280
|
+
/**
|
|
281
|
+
* To get user permissions.
|
|
282
|
+
*/
|
|
283
|
+
getUserPermissions: (request?: GetUserPermissionsRequest) => Promise<GetUserPermissionsResponse>;
|
|
284
|
+
|
|
280
285
|
/**
|
|
281
286
|
* To check if plan is expired or not.
|
|
282
287
|
*/
|
|
@@ -8,6 +8,7 @@ export declare class AutocompleteData {
|
|
|
8
8
|
description?: string;
|
|
9
9
|
type: 'custom' | 'contact' | 'group';
|
|
10
10
|
data: AutocompleteItem[];
|
|
11
|
+
groups?: AutocompleteGroup[];
|
|
11
12
|
}
|
|
12
13
|
export declare class AutocompleteItem {
|
|
13
14
|
id: string;
|
|
@@ -18,6 +19,7 @@ export declare class AutocompleteItem {
|
|
|
18
19
|
svg?: string;
|
|
19
20
|
};
|
|
20
21
|
link?: string;
|
|
22
|
+
groupId?: string;
|
|
21
23
|
}
|
|
22
24
|
export declare class AutocompleteReplaceData {
|
|
23
25
|
text: string;
|
|
@@ -34,6 +36,10 @@ export declare class AutocompleteUserContactReplaceData {
|
|
|
34
36
|
userId: string;
|
|
35
37
|
contact?: UserContact;
|
|
36
38
|
}
|
|
39
|
+
export declare class AutocompleteGroup {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
}
|
|
37
43
|
export declare class AutocompleteChipData extends AutocompleteItem {
|
|
38
44
|
type: 'contact' | 'custom';
|
|
39
45
|
}
|
|
@@ -17,6 +17,12 @@ export declare class CommentAnnotation {
|
|
|
17
17
|
* Auto generated.
|
|
18
18
|
*/
|
|
19
19
|
annotationId: string;
|
|
20
|
+
/**
|
|
21
|
+
* Annotation number for the comment pin annotation.
|
|
22
|
+
*
|
|
23
|
+
* Auto generated.
|
|
24
|
+
*/
|
|
25
|
+
annotationNumber?: number;
|
|
20
26
|
/**
|
|
21
27
|
* This is the list of all comments part of this annotation.
|
|
22
28
|
*
|
|
@@ -79,6 +79,7 @@ export type CommentEventTypesMap = {
|
|
|
79
79
|
[CommentEventTypes.COMMENT_SIDEBAR_DATA_UPDATE]: CommentSidebarDataUpdateEvent;
|
|
80
80
|
[CommentEventTypes.AUTOCOMPLETE_SEARCH]: AutocompleteSearchEvent;
|
|
81
81
|
[CommentEventTypes.COMPOSER_CLICKED]: ComposerClickedEvent;
|
|
82
|
+
[CommentEventTypes.LINK_CLICKED]: LinkClickedEvent;
|
|
82
83
|
};
|
|
83
84
|
export interface AddAttachmentEvent {
|
|
84
85
|
annotationId: string;
|
|
@@ -250,3 +251,10 @@ export interface ComposerClickedEvent {
|
|
|
250
251
|
commentAnnotation?: CommentAnnotation;
|
|
251
252
|
metadata?: VeltEventMetadata;
|
|
252
253
|
}
|
|
254
|
+
export interface LinkClickedEvent {
|
|
255
|
+
text: string;
|
|
256
|
+
link: string;
|
|
257
|
+
commentAnnotation: CommentAnnotation;
|
|
258
|
+
commentId: Number;
|
|
259
|
+
metadata?: VeltEventMetadata;
|
|
260
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SingleEditorState, SingleEditorStatus } from "../../utils/enums";
|
|
2
|
+
import { ErrorEvent } from "./core-events.data.model";
|
|
2
3
|
import { User } from "./user.data.model";
|
|
3
4
|
export declare class LiveStateData {
|
|
4
5
|
/**
|
|
@@ -72,3 +73,20 @@ export declare class EditorAccessTimer {
|
|
|
72
73
|
export declare class LiveStateDataConfig {
|
|
73
74
|
listenToNewChangesOnly?: boolean;
|
|
74
75
|
}
|
|
76
|
+
export interface SetUserAsEditorResponse {
|
|
77
|
+
error?: ErrorEvent;
|
|
78
|
+
}
|
|
79
|
+
export interface LiveStateSingleEditorExternalUserPresence {
|
|
80
|
+
/**
|
|
81
|
+
* True if the same user is present on different tab.
|
|
82
|
+
*/
|
|
83
|
+
sameUserPresentOnTab?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* True if the different user is present on different tab.
|
|
86
|
+
*/
|
|
87
|
+
differentUserPresentOnTab?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* User ids of the users present on different tab.
|
|
90
|
+
*/
|
|
91
|
+
userIds?: string[];
|
|
92
|
+
}
|
|
@@ -12,8 +12,11 @@ export declare class UserIAM {
|
|
|
12
12
|
*/
|
|
13
13
|
user: UserContact;
|
|
14
14
|
documentIds?: string[];
|
|
15
|
+
viewerDocumentIds?: string[];
|
|
15
16
|
folderIds?: string[];
|
|
17
|
+
viewerFolderIds?: string[];
|
|
16
18
|
organizationIds?: string[];
|
|
19
|
+
viewerOrganizationIds?: string[];
|
|
17
20
|
documentIdsCount?: number;
|
|
18
21
|
folderIdsCount?: number;
|
|
19
22
|
organizationIdsCount?: number;
|
|
@@ -5,3 +5,45 @@ export interface UserDataProvider {
|
|
|
5
5
|
config?: ResolverConfig;
|
|
6
6
|
resolveTimeout?: number;
|
|
7
7
|
}
|
|
8
|
+
export interface GetUserPermissionsRequest {
|
|
9
|
+
organizationId?: string;
|
|
10
|
+
folderIds?: string[];
|
|
11
|
+
documentIds?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface GetUserPermissionsResponse {
|
|
14
|
+
[userId: string]: {
|
|
15
|
+
folders?: {
|
|
16
|
+
[folderId: string]: {
|
|
17
|
+
accessRole?: UserPermissionAccessRole;
|
|
18
|
+
expiresAt?: number;
|
|
19
|
+
error?: string;
|
|
20
|
+
errorCode?: UserPermissionAccessRoleResult;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
organization?: {
|
|
24
|
+
[organizationId: string]: {
|
|
25
|
+
accessRole?: UserPermissionAccessRole;
|
|
26
|
+
expiresAt?: number;
|
|
27
|
+
error?: string;
|
|
28
|
+
errorCode?: UserPermissionAccessRoleResult;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
documents?: {
|
|
32
|
+
[documentId: string]: {
|
|
33
|
+
accessRole?: UserPermissionAccessRole;
|
|
34
|
+
expiresAt?: number;
|
|
35
|
+
error?: string;
|
|
36
|
+
errorCode?: UserPermissionAccessRoleResult;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export declare enum UserPermissionAccessRole {
|
|
42
|
+
EDITOR = "editor",
|
|
43
|
+
VIEWER = "viewer"
|
|
44
|
+
}
|
|
45
|
+
export declare enum UserPermissionAccessRoleResult {
|
|
46
|
+
DOES_NOT_EXIST = "does_not_exist",
|
|
47
|
+
PERMISSION_DENIED = "permission_denied",
|
|
48
|
+
SOMETHING_WENT_WRONG = "something_went_wrong"
|
|
49
|
+
}
|
|
@@ -1203,6 +1203,26 @@ export declare class CommentElement {
|
|
|
1203
1203
|
*/
|
|
1204
1204
|
public disableFilterGhostCommentsInSidebar: () => void;
|
|
1205
1205
|
|
|
1206
|
+
/**
|
|
1207
|
+
* To enable link callback
|
|
1208
|
+
*/
|
|
1209
|
+
public enableLinkCallback: () => void;
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* To disable link callback
|
|
1213
|
+
*/
|
|
1214
|
+
public disableLinkCallback: () => void;
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* To enable full screen in sidebar
|
|
1218
|
+
*/
|
|
1219
|
+
public enableFullScreenInSidebar: () => void;
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* To disable full screen in sidebar
|
|
1223
|
+
*/
|
|
1224
|
+
public disableFullScreenInSidebar: () => void;
|
|
1225
|
+
|
|
1206
1226
|
constructor();
|
|
1207
1227
|
/**
|
|
1208
1228
|
* Subscribe to comments on the current document.
|
|
@@ -2385,4 +2405,24 @@ export declare class CommentElement {
|
|
|
2385
2405
|
* To disable filter ghost comments in sidebar
|
|
2386
2406
|
*/
|
|
2387
2407
|
private _disableFilterGhostCommentsInSidebar;
|
|
2388
|
-
|
|
2408
|
+
|
|
2409
|
+
/**
|
|
2410
|
+
* To enable link callback
|
|
2411
|
+
*/
|
|
2412
|
+
private _enableLinkCallback;
|
|
2413
|
+
|
|
2414
|
+
/**
|
|
2415
|
+
* To disable link callback
|
|
2416
|
+
*/
|
|
2417
|
+
private _disableLinkCallback;
|
|
2418
|
+
|
|
2419
|
+
/**
|
|
2420
|
+
* To enable full screen in sidebar
|
|
2421
|
+
*/
|
|
2422
|
+
private _enableFullScreenInSidebar;
|
|
2423
|
+
|
|
2424
|
+
/**
|
|
2425
|
+
* To disable full screen in sidebar
|
|
2426
|
+
*/
|
|
2427
|
+
private _disableFullScreenInSidebar;
|
|
2428
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { SingleEditorConfig, UserEditorAccess, EditorAccessTimer, LiveStateDataConfig, SetLiveStateDataConfig } from '../data/live-state-data.data.model';
|
|
3
|
-
import { User } from '../data/user.data.model';
|
|
4
2
|
import { ServerConnectionState } from '../../utils/enums';
|
|
3
|
+
import { EditorAccessTimer, LiveStateDataConfig, LiveStateSingleEditorExternalUserPresence, SetLiveStateDataConfig, SetUserAsEditorResponse, SingleEditorConfig, UserEditorAccess } from '../data/live-state-data.data.model';
|
|
5
4
|
import { LiveStateEventTypesMap } from '../data/live-state-events.data.model';
|
|
5
|
+
import { User } from '../data/user.data.model';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Represents the synchronization element for live state.
|
|
@@ -54,7 +54,7 @@ export declare class LiveStateSyncElement {
|
|
|
54
54
|
/**
|
|
55
55
|
* Sets the current user as an editor.
|
|
56
56
|
*/
|
|
57
|
-
setUserAsEditor: () => void
|
|
57
|
+
setUserAsEditor: () => Promise<SetUserAsEditorResponse | void>;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Resets the user access.
|
|
@@ -142,6 +142,11 @@ export declare class LiveStateSyncElement {
|
|
|
142
142
|
*/
|
|
143
143
|
onServerConnectionStateChange: () => Observable<ServerConnectionState>;
|
|
144
144
|
|
|
145
|
+
/**
|
|
146
|
+
* To update user presence for single editor mode
|
|
147
|
+
*/
|
|
148
|
+
updateUserPresence: (userPresence: LiveStateSingleEditorExternalUserPresence) => void;
|
|
149
|
+
|
|
145
150
|
/**
|
|
146
151
|
* Subscribe to live state events
|
|
147
152
|
*/
|
|
@@ -285,6 +290,11 @@ export declare class LiveStateSyncElement {
|
|
|
285
290
|
*/
|
|
286
291
|
private _onServerConnectionStateChange;
|
|
287
292
|
|
|
293
|
+
/**
|
|
294
|
+
* To update user presence for single editor mode
|
|
295
|
+
*/
|
|
296
|
+
private _updateUserPresence;
|
|
297
|
+
|
|
288
298
|
/**
|
|
289
299
|
* Subscribe to live state events
|
|
290
300
|
*/
|
|
@@ -124,6 +124,36 @@ export declare class RecorderElement {
|
|
|
124
124
|
*/
|
|
125
125
|
askDevicePermission: (options: RecorderDevicePermissionOptions) => void;
|
|
126
126
|
|
|
127
|
+
/**
|
|
128
|
+
* To set max length
|
|
129
|
+
*/
|
|
130
|
+
setMaxLength: (seconds: number) => void;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* To open picture in picture
|
|
134
|
+
*/
|
|
135
|
+
openPictureInPicture: () => Promise<void>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* To exit picture in picture
|
|
139
|
+
*/
|
|
140
|
+
exitPictureInPicture: () => Promise<void>;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* To request screen permission
|
|
144
|
+
*/
|
|
145
|
+
requestScreenPermission: () => Promise<MediaStream | null>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* To enable picture in picture
|
|
149
|
+
*/
|
|
150
|
+
enablePictureInPicture: () => void;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* To disable picture in picture
|
|
154
|
+
*/
|
|
155
|
+
disablePictureInPicture: () => void;
|
|
156
|
+
|
|
127
157
|
constructor();
|
|
128
158
|
|
|
129
159
|
private _initRecording;
|
|
@@ -243,4 +273,34 @@ export declare class RecorderElement {
|
|
|
243
273
|
* To ask device permission
|
|
244
274
|
*/
|
|
245
275
|
private _askDevicePermission;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* To set max length
|
|
279
|
+
*/
|
|
280
|
+
private _setMaxLength;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* To open picture in picture
|
|
284
|
+
*/
|
|
285
|
+
private _openPictureInPicture;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* To exit picture in picture
|
|
289
|
+
*/
|
|
290
|
+
private _exitPictureInPicture;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* To request screen permission
|
|
294
|
+
*/
|
|
295
|
+
private _requestScreenPermission;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* To enable picture in picture
|
|
299
|
+
*/
|
|
300
|
+
private _enablePictureInPicture;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* To disable picture in picture
|
|
304
|
+
*/
|
|
305
|
+
private _disablePictureInPicture;
|
|
246
306
|
}
|
package/app/utils/constants.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export declare class Constants {
|
|
|
72
72
|
static DEFAULT_ANNOTATION_COLOR: string;
|
|
73
73
|
static REGEX_EMAIL: RegExp;
|
|
74
74
|
static REGEX_URL: RegExp;
|
|
75
|
+
static readonly REGEX_URL_FOR_USER_NAME: RegExp;
|
|
75
76
|
static REGEX_SPECIAL_CHARS: RegExp;
|
|
76
77
|
static SNIPPYLY_HIGHLIGHT: string;
|
|
77
78
|
static SNIPPYLY_HIGHLIGHT_PREVIEW: string;
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export declare const CommentEventTypes: {
|
|
|
54
54
|
readonly COMMENT_SIDEBAR_DATA_UPDATE: "commentSidebarDataUpdate";
|
|
55
55
|
readonly AUTOCOMPLETE_SEARCH: "autocompleteSearch";
|
|
56
56
|
readonly COMPOSER_CLICKED: "composerClicked";
|
|
57
|
+
readonly LINK_CLICKED: "linkClicked";
|
|
57
58
|
};
|
|
58
59
|
export declare const RecorderEventTypes: {
|
|
59
60
|
readonly TRANSCRIPTION_DONE: "transcriptionDone";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk-staging",
|
|
3
|
-
"version": "4.5.2-beta.
|
|
3
|
+
"version": "4.5.2-beta.20",
|
|
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": [
|