@veltdev/sdk 4.4.0-beta.1 → 4.4.0-beta.10
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 -0
- package/app/models/data/attachment-resolver.data.model.d.ts +52 -0
- package/app/models/data/attachment.model.d.ts +10 -0
- package/app/models/data/button.data.model.d.ts +6 -2
- package/app/models/data/comment-actions.data.model.d.ts +1 -0
- package/app/models/data/comment-resolver.data.model.d.ts +5 -0
- package/app/models/data/live-state-data.data.model.d.ts +6 -0
- package/app/models/data/provider.data.model.d.ts +2 -0
- package/app/models/data/reaction-resolver.data.model.d.ts +1 -0
- package/app/models/data/recorder-annotation.data.model.d.ts +1 -0
- package/app/models/data/resolver.data.model.d.ts +1 -0
- package/app/models/element/comment-element.model.d.ts +40 -0
- package/app/models/element/live-state-sync-element.model.d.ts +4 -4
- package/app/models/element/recorder-element.model.d.ts +1 -1
- package/app/utils/constants.d.ts +1 -0
- package/app/utils/enums.d.ts +23 -1
- package/models.d.ts +1 -0
- package/package.json +1 -1
- package/velt.js +438 -4
|
@@ -30,6 +30,7 @@ import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFolde
|
|
|
30
30
|
import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
|
|
31
31
|
import { UserDataProvider } from "../models/data/user-resolver.data.model";
|
|
32
32
|
import { VeltDataProvider } from "../models/data/provider.data.model";
|
|
33
|
+
import { VeltResetButtonStateConfig } from "../models/data/button.data.model";
|
|
33
34
|
|
|
34
35
|
export declare class Snippyly {
|
|
35
36
|
constructor();
|
|
@@ -310,4 +311,9 @@ export declare class Snippyly {
|
|
|
310
311
|
* To disable logs.
|
|
311
312
|
*/
|
|
312
313
|
disableLogs: (config?: DisableLogsConfig) => void;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* To reset the button toggle map.
|
|
317
|
+
*/
|
|
318
|
+
resetVeltButtonState: (config?: VeltResetButtonStateConfig) => void;
|
|
313
319
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ResolverActions } from "../../utils/enums";
|
|
2
|
+
import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
|
|
3
|
+
export interface AttachmentDataProvider {
|
|
4
|
+
save: (request: SaveAttachmentResolverRequest) => Promise<ResolverResponse<SaveAttachmentResolverData>>;
|
|
5
|
+
delete: (request: DeleteAttachmentResolverRequest) => Promise<ResolverResponse<undefined>>;
|
|
6
|
+
config?: ResolverConfig;
|
|
7
|
+
}
|
|
8
|
+
export interface DeleteAttachmentResolverRequest {
|
|
9
|
+
attachmentId: number;
|
|
10
|
+
metadata?: AttachmentResolverMetadata;
|
|
11
|
+
event?: ResolverActions;
|
|
12
|
+
}
|
|
13
|
+
export interface SaveAttachmentResolverRequest {
|
|
14
|
+
attachment: ResolverAttachment;
|
|
15
|
+
metadata?: AttachmentResolverMetadata;
|
|
16
|
+
event?: ResolverActions;
|
|
17
|
+
}
|
|
18
|
+
export interface PartialAttachment {
|
|
19
|
+
url: string;
|
|
20
|
+
name: string;
|
|
21
|
+
attachmentId: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ResolverAttachment {
|
|
24
|
+
attachmentId: number;
|
|
25
|
+
/**
|
|
26
|
+
* File to be uploaded
|
|
27
|
+
*/
|
|
28
|
+
file: File;
|
|
29
|
+
/**
|
|
30
|
+
* File name
|
|
31
|
+
*/
|
|
32
|
+
name?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Metadata of an attachment
|
|
35
|
+
*/
|
|
36
|
+
metadata?: AttachmentResolverMetadata;
|
|
37
|
+
/**
|
|
38
|
+
* Mime type of an attachment
|
|
39
|
+
*/
|
|
40
|
+
mimeType?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface AttachmentResolverMetadata {
|
|
43
|
+
organizationId: string | null;
|
|
44
|
+
documentId: string | null;
|
|
45
|
+
folderId?: string | null;
|
|
46
|
+
attachmentId: number | null;
|
|
47
|
+
commentAnnotationId: string | null;
|
|
48
|
+
apiKey: string | null;
|
|
49
|
+
}
|
|
50
|
+
export interface SaveAttachmentResolverData {
|
|
51
|
+
url: string;
|
|
52
|
+
}
|
|
@@ -6,6 +6,10 @@ export declare class Attachment {
|
|
|
6
6
|
* Auto generated.
|
|
7
7
|
*/
|
|
8
8
|
attachmentId: number;
|
|
9
|
+
/**
|
|
10
|
+
* To check if attachment resolver is used
|
|
11
|
+
*/
|
|
12
|
+
isAttachmentResolverUsed?: boolean;
|
|
9
13
|
/**
|
|
10
14
|
* File name
|
|
11
15
|
*/
|
|
@@ -40,3 +44,9 @@ export declare class Attachment {
|
|
|
40
44
|
*/
|
|
41
45
|
mimeType?: any;
|
|
42
46
|
}
|
|
47
|
+
export interface UploadFileOptions {
|
|
48
|
+
path: string;
|
|
49
|
+
file: File;
|
|
50
|
+
useAttachmentResolver?: boolean;
|
|
51
|
+
metadata?: any;
|
|
52
|
+
}
|
|
@@ -4,8 +4,8 @@ import { Comment } from "./comment.data.model";
|
|
|
4
4
|
import { VeltEventMetadata } from "./event-metadata.data.model";
|
|
5
5
|
import { Notification } from "./notification.model";
|
|
6
6
|
export interface VeltButtonClickEvent extends VeltButtonData {
|
|
7
|
-
buttonContext
|
|
8
|
-
metadata
|
|
7
|
+
buttonContext?: VeltButtonContext;
|
|
8
|
+
metadata?: VeltEventMetadata;
|
|
9
9
|
}
|
|
10
10
|
export interface VeltButtonContext {
|
|
11
11
|
type?: string;
|
|
@@ -28,3 +28,7 @@ export interface VeltButtonSelectionMap {
|
|
|
28
28
|
[buttonId: string]: boolean;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
+
export interface VeltResetButtonStateConfig {
|
|
32
|
+
id?: string;
|
|
33
|
+
group?: string;
|
|
34
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ResolverActions } from "../../utils/enums";
|
|
2
|
+
import { PartialAttachment } from "./attachment-resolver.data.model";
|
|
2
3
|
import { BaseMetadata } from "./base-metadata.data.model";
|
|
3
4
|
import { CommentAnnotation } from "./comment-annotation.data.model";
|
|
4
5
|
import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
|
|
@@ -25,12 +26,16 @@ export interface SaveCommentResolverRequest {
|
|
|
25
26
|
[key: string]: PartialCommentAnnotation;
|
|
26
27
|
};
|
|
27
28
|
event?: ResolverActions;
|
|
29
|
+
metadata?: BaseMetadata;
|
|
28
30
|
commentId?: string;
|
|
29
31
|
}
|
|
30
32
|
export interface PartialComment {
|
|
31
33
|
commentId: string | number;
|
|
32
34
|
commentHtml?: string;
|
|
33
35
|
commentText?: string;
|
|
36
|
+
attachments?: {
|
|
37
|
+
[attachmentId: number]: PartialAttachment;
|
|
38
|
+
};
|
|
34
39
|
}
|
|
35
40
|
export interface PartialCommentAnnotationResult {
|
|
36
41
|
strippedData: {
|
|
@@ -20,6 +20,12 @@ export declare class LiveStateData {
|
|
|
20
20
|
tabId?: string | null;
|
|
21
21
|
isDataStringified?: boolean;
|
|
22
22
|
}
|
|
23
|
+
export declare class SetLiveStateDataConfig {
|
|
24
|
+
/**
|
|
25
|
+
* To merge data with existing data.
|
|
26
|
+
*/
|
|
27
|
+
merge?: boolean;
|
|
28
|
+
}
|
|
23
29
|
export declare class SingleEditorLiveStateData {
|
|
24
30
|
editor?: User | null;
|
|
25
31
|
requestEditorAccess?: {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
|
|
2
|
+
import { AttachmentDataProvider } from "./attachment-resolver.data.model";
|
|
2
3
|
import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
|
|
3
4
|
import { UserDataProvider } from "./user-resolver.data.model";
|
|
4
5
|
export interface VeltDataProvider {
|
|
5
6
|
comment?: CommentAnnotationDataProvider;
|
|
6
7
|
user?: UserDataProvider;
|
|
7
8
|
reaction?: ReactionAnnotationDataProvider;
|
|
9
|
+
attachment?: AttachmentDataProvider;
|
|
8
10
|
}
|
|
@@ -1112,6 +1112,26 @@ export declare class CommentElement {
|
|
|
1112
1112
|
* To disable full expanded
|
|
1113
1113
|
*/
|
|
1114
1114
|
public disableFullExpanded: () => void;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* To enable comment to nearest allowed element
|
|
1118
|
+
*/
|
|
1119
|
+
public enableCommentToNearestAllowedElement: () => void;
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* To disable comment to nearest allowed element
|
|
1123
|
+
*/
|
|
1124
|
+
public disableCommentToNearestAllowedElement: () => void;
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* To enable draft mode
|
|
1128
|
+
*/
|
|
1129
|
+
public enableDraftMode: () => void;
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* To disable draft mode
|
|
1133
|
+
*/
|
|
1134
|
+
public disableDraftMode: () => void;
|
|
1115
1135
|
constructor();
|
|
1116
1136
|
/**
|
|
1117
1137
|
* Subscribe to comments on the current document.
|
|
@@ -2206,4 +2226,24 @@ export declare class CommentElement {
|
|
|
2206
2226
|
* To disable full expanded
|
|
2207
2227
|
*/
|
|
2208
2228
|
private _disableFullExpanded;
|
|
2229
|
+
|
|
2230
|
+
/**
|
|
2231
|
+
* To enable comment to nearest allowed element
|
|
2232
|
+
*/
|
|
2233
|
+
private _enableCommentToNearestAllowedElement;
|
|
2234
|
+
|
|
2235
|
+
/**
|
|
2236
|
+
* To disable comment to nearest allowed element
|
|
2237
|
+
*/
|
|
2238
|
+
private _disableCommentToNearestAllowedElement;
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* To enable draft mode
|
|
2242
|
+
*/
|
|
2243
|
+
private _enableDraftMode;
|
|
2244
|
+
|
|
2245
|
+
/**
|
|
2246
|
+
* To disable draft mode
|
|
2247
|
+
*/
|
|
2248
|
+
private _disableDraftMode;
|
|
2209
2249
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { SingleEditorConfig, UserEditorAccess, EditorAccessTimer, LiveStateDataConfig,
|
|
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
5
|
|
|
@@ -22,7 +22,7 @@ export declare class LiveStateSyncElement {
|
|
|
22
22
|
/**
|
|
23
23
|
* Sets live state data for the provided ID and data.
|
|
24
24
|
*/
|
|
25
|
-
setLiveStateData: (liveStateDataId: string, liveStateData: any) => any;
|
|
25
|
+
setLiveStateData: (liveStateDataId: string, liveStateData: any, config?: SetLiveStateDataConfig) => any;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Enables the single editor mode.
|
|
@@ -38,12 +38,12 @@ export declare class LiveStateSyncElement {
|
|
|
38
38
|
* Checks if the current user is an editor. Returns an observable.
|
|
39
39
|
* @deprecated Use `isUserEditor` instead
|
|
40
40
|
*/
|
|
41
|
-
isUserEditor$: () => Observable<UserEditorAccess | null>;
|
|
41
|
+
isUserEditor$: () => Observable<UserEditorAccess | null | undefined>;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Checks if the current user is an editor. Returns an observable.
|
|
45
45
|
*/
|
|
46
|
-
isUserEditor: () => Observable<UserEditorAccess | null>;
|
|
46
|
+
isUserEditor: () => Observable<UserEditorAccess | null | undefined>;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* To get editor
|
|
@@ -67,7 +67,7 @@ export declare class RecorderElement {
|
|
|
67
67
|
/**
|
|
68
68
|
* To fetch recordings
|
|
69
69
|
*/
|
|
70
|
-
fetchRecordings: (query
|
|
70
|
+
fetchRecordings: (query?: RecorderRequestQuery) => Promise<GetRecordingsResponse[]>;
|
|
71
71
|
|
|
72
72
|
constructor();
|
|
73
73
|
|
package/app/utils/constants.d.ts
CHANGED
package/app/utils/enums.d.ts
CHANGED
|
@@ -23,7 +23,9 @@ export declare enum ResolverActions {
|
|
|
23
23
|
COMMENT_DELETE = "comment.delete",
|
|
24
24
|
COMMENT_UPDATE = "comment.update",
|
|
25
25
|
REACTION_ADD = "reaction.add",
|
|
26
|
-
REACTION_DELETE = "reaction.delete"
|
|
26
|
+
REACTION_DELETE = "reaction.delete",
|
|
27
|
+
ATTACHMENT_ADD = "attachment.add",
|
|
28
|
+
ATTACHMENT_DELETE = "attachment.delete"
|
|
27
29
|
}
|
|
28
30
|
export declare const CommentEventTypes: {
|
|
29
31
|
readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
|
|
@@ -119,6 +121,26 @@ export declare enum Features {
|
|
|
119
121
|
NOTIFICATION = "notification",
|
|
120
122
|
REACTION = "reaction"
|
|
121
123
|
}
|
|
124
|
+
export declare enum AnalyticsFeatures {
|
|
125
|
+
AREA = "area",
|
|
126
|
+
ARROW = "arrow",
|
|
127
|
+
AUDIO_HUDDLE = "audioHuddle",
|
|
128
|
+
COMMENT = "comment",
|
|
129
|
+
MULTI_THREAD = "multiThread",
|
|
130
|
+
CURSOR = "cursor",
|
|
131
|
+
HUDDLE = "huddle",
|
|
132
|
+
LIVE_STATE_SYNC = "liveStateSync",
|
|
133
|
+
PRESENCE = "presence",
|
|
134
|
+
TAG = "tag",
|
|
135
|
+
RECORDER = "recorder",
|
|
136
|
+
REWRITER = "rewriter",
|
|
137
|
+
LIVE_SELECTION = "liveSelection",
|
|
138
|
+
NOTIFICATION = "notification",
|
|
139
|
+
REACTION = "reaction",
|
|
140
|
+
AREA_COMMENT = "areaComment",
|
|
141
|
+
INLINE_COMMENT = "inlineComment",
|
|
142
|
+
COMMENT_SIDEBAR = "commentSidebar"
|
|
143
|
+
}
|
|
122
144
|
export type FeatureType = 'area' | 'arrow' | 'audioHuddle' | 'comment' | 'cursor' | 'huddle' | 'liveStateSync' | 'presence' | 'recorder' | 'rewriter' | 'tag' | 'liveSelection' | 'notification' | 'reaction' | 'multiThread';
|
|
123
145
|
export declare enum DeviceType {
|
|
124
146
|
DESKTOP = "Desktop",
|
package/models.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export * from './app/models/data/views.data.model';
|
|
|
64
64
|
export * from './app/models/data/autocomplete.data.model';
|
|
65
65
|
export * from './app/models/data/reaction-annotation.data.model';
|
|
66
66
|
export * from './app/models/data/reaction-resolver.data.model';
|
|
67
|
+
export * from './app/models/data/attachment-resolver.data.model';
|
|
67
68
|
export * from './app/models/data/reaction.data.model';
|
|
68
69
|
export * from './app/models/data/organization-groups.data.model';
|
|
69
70
|
export * from './app/models/data/organization-metadata.model';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "4.4.0-beta.
|
|
3
|
+
"version": "4.4.0-beta.10",
|
|
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": [
|