@veltdev/sdk 5.0.2-beta.1 → 5.0.2-beta.3
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 +5 -1
- package/app/models/data/comment-annotation.data.model.d.ts +7 -0
- package/app/models/data/comment-events.data.model.d.ts +11 -0
- package/app/models/data/core-events.data.model.d.ts +2 -1
- package/app/models/data/provider.data.model.d.ts +2 -1
- package/app/models/data/user-resolver.data.model.d.ts +15 -1
- package/app/utils/enums.d.ts +3 -0
- package/package.json +1 -1
- package/velt.js +78 -78
|
@@ -29,7 +29,7 @@ import { VeltEventMetadata, VeltDebugInfo } from "../models/data/event-metadata.
|
|
|
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, GetUserPermissionsRequest, GetUserPermissionsResponse } from "../models/data/user-resolver.data.model";
|
|
32
|
+
import { AnonymousUserDataProvider, 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";
|
|
@@ -97,6 +97,10 @@ export declare class Snippyly {
|
|
|
97
97
|
* To set the user data provider.
|
|
98
98
|
*/
|
|
99
99
|
setUserDataProvider: (userDataProvider: UserDataProvider) => void;
|
|
100
|
+
/**
|
|
101
|
+
* To set the anonymous user data provider.
|
|
102
|
+
*/
|
|
103
|
+
setAnonymousUserDataProvider: (resolver: AnonymousUserDataProvider, config?: { ha?: boolean }) => void;
|
|
100
104
|
/**
|
|
101
105
|
* To set the data provider.
|
|
102
106
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommentAccessMode } from "../../utils/enums";
|
|
2
2
|
import { BaseMetadata } from "./base-metadata.data.model";
|
|
3
|
+
import { CommentVisibilityType } from "./comment-actions.data.model";
|
|
3
4
|
import { Comment } from "./comment.data.model";
|
|
4
5
|
import { CursorPosition } from "./cursor-position.data.model";
|
|
5
6
|
import { CustomAnnotationDropdownItem } from "./custom-chip-dropdown.data.model";
|
|
@@ -10,6 +11,11 @@ import { TargetElement } from "./target-element.data.model";
|
|
|
10
11
|
import { TargetTextRange } from "./target-text-range.data.model";
|
|
11
12
|
import { User } from "./user.data.model";
|
|
12
13
|
import { CommentAnnotationViews } from "./views.data.model";
|
|
14
|
+
export interface CommentAnnotationVisibilityConfig {
|
|
15
|
+
type: CommentVisibilityType;
|
|
16
|
+
organizationId?: string;
|
|
17
|
+
userIds?: string[];
|
|
18
|
+
}
|
|
13
19
|
export declare class CommentAnnotation {
|
|
14
20
|
/**
|
|
15
21
|
* Unique identifier for the comment pin annotation.
|
|
@@ -23,6 +29,7 @@ export declare class CommentAnnotation {
|
|
|
23
29
|
* Auto generated.
|
|
24
30
|
*/
|
|
25
31
|
annotationNumber?: number;
|
|
32
|
+
visibilityConfig?: CommentAnnotationVisibilityConfig;
|
|
26
33
|
/**
|
|
27
34
|
* This is the list of all comments part of this annotation.
|
|
28
35
|
*
|
|
@@ -85,9 +85,12 @@ export type CommentEventTypesMap = {
|
|
|
85
85
|
[CommentEventTypes.COMMENT_PIN_CLICKED]: CommentPinClickedEvent;
|
|
86
86
|
[CommentEventTypes.COMMENT_BUBBLE_CLICKED]: CommentBubbleClickedEvent;
|
|
87
87
|
[CommentEventTypes.COMMENT_TOOL_CLICK]: CommentToolClickEvent;
|
|
88
|
+
[CommentEventTypes.COMMENT_TOOL_CLICKED]: CommentToolClickedEvent;
|
|
88
89
|
[CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
|
|
90
|
+
[CommentEventTypes.SIDEBAR_BUTTON_CLICKED]: SidebarButtonClickedEvent;
|
|
89
91
|
[CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
|
|
90
92
|
[CommentEventTypes.COMMENT_SAVED]: CommentSavedEvent;
|
|
93
|
+
[CommentEventTypes.COMMENT_SAVE_TRIGGERED]: CommentSaveTriggeredEvent;
|
|
91
94
|
[CommentEventTypes.VISIBILITY_OPTION_CLICKED]: VisibilityOptionClickedEvent;
|
|
92
95
|
};
|
|
93
96
|
export interface AddAttachmentEvent {
|
|
@@ -183,6 +186,10 @@ export interface CommentSavedEvent {
|
|
|
183
186
|
commentAnnotation: CommentAnnotation;
|
|
184
187
|
metadata: VeltEventMetadata;
|
|
185
188
|
}
|
|
189
|
+
export interface CommentSaveTriggeredEvent {
|
|
190
|
+
annotationId: string;
|
|
191
|
+
metadata: VeltEventMetadata;
|
|
192
|
+
}
|
|
186
193
|
export interface UpdateCommentEvent {
|
|
187
194
|
annotationId: string;
|
|
188
195
|
commentAnnotation: CommentAnnotation;
|
|
@@ -309,9 +316,13 @@ export interface CommentToolClickEvent {
|
|
|
309
316
|
targetElementId?: string | null;
|
|
310
317
|
metadata?: VeltEventMetadata;
|
|
311
318
|
}
|
|
319
|
+
export interface CommentToolClickedEvent extends CommentToolClickEvent {
|
|
320
|
+
}
|
|
312
321
|
export interface SidebarButtonClickEvent {
|
|
313
322
|
metadata?: VeltEventMetadata;
|
|
314
323
|
}
|
|
324
|
+
export interface SidebarButtonClickedEvent extends SidebarButtonClickEvent {
|
|
325
|
+
}
|
|
315
326
|
export interface AttachmentDownloadClickedEvent {
|
|
316
327
|
annotationId: string;
|
|
317
328
|
commentAnnotation: CommentAnnotation;
|
|
@@ -23,7 +23,8 @@ export declare enum UserResolverSource {
|
|
|
23
23
|
SET_SINGLE_EDITOR_MODE_LIVE_STATE_DATA_FOR_DIFFERENT_USER_PRESENT_ON_TAB = "setSingleEditorModeLiveStateDataForDifferentUserPresentOnTab",
|
|
24
24
|
RESOLVE_AND_MERGE_SINGLE_EDITOR_LIVE_STATE_DATA_WITH_USER = "resolveAndMergeSingleEditorLiveStateDataWithUser",
|
|
25
25
|
GET_SINGLE_EDITOR_MODE_DATA = "getSingleEditorModeData",
|
|
26
|
-
RESOLVE_USERS_FROM_HUDDLE_MESSAGES = "resolveUsersFromHuddleMessages"
|
|
26
|
+
RESOLVE_USERS_FROM_HUDDLE_MESSAGES = "resolveUsersFromHuddleMessages",
|
|
27
|
+
RESOLVE_USER_IDS_BY_EMAIL = "resolveUserIdsByEmail"
|
|
27
28
|
}
|
|
28
29
|
export declare enum UserResolverModuleName {
|
|
29
30
|
IDENTIFY = "identify/authProvider",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
|
|
2
2
|
import { AttachmentDataProvider } from "./attachment-resolver.data.model";
|
|
3
3
|
import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
|
|
4
|
-
import { UserDataProvider } from "./user-resolver.data.model";
|
|
4
|
+
import { AnonymousUserDataProvider, UserDataProvider } from "./user-resolver.data.model";
|
|
5
5
|
export interface VeltDataProvider {
|
|
6
6
|
comment?: CommentAnnotationDataProvider;
|
|
7
7
|
user?: UserDataProvider;
|
|
8
8
|
reaction?: ReactionAnnotationDataProvider;
|
|
9
9
|
attachment?: AttachmentDataProvider;
|
|
10
|
+
anonymousUser?: AnonymousUserDataProvider;
|
|
10
11
|
}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import { ResolverConfig } from "./resolver.data.model";
|
|
1
|
+
import { ResolverConfig, ResolverResponse, RetryConfig } from "./resolver.data.model";
|
|
2
2
|
import { User } from "./user.data.model";
|
|
3
3
|
export interface UserDataProvider {
|
|
4
4
|
get(userIds: string[]): Promise<Record<string, User>>;
|
|
5
5
|
config?: ResolverConfig;
|
|
6
6
|
resolveTimeout?: number;
|
|
7
7
|
}
|
|
8
|
+
export interface AnonymousUserDataProvider {
|
|
9
|
+
resolveUserIdsByEmail(request: ResolveUserIdsByEmailRequest): Promise<ResolverResponse<Record<string, string>>>;
|
|
10
|
+
config?: AnonymousUserDataProviderConfig;
|
|
11
|
+
}
|
|
12
|
+
export interface AnonymousUserDataProviderConfig {
|
|
13
|
+
resolveTimeout?: number;
|
|
14
|
+
getRetryConfig?: RetryConfig;
|
|
15
|
+
}
|
|
16
|
+
export interface ResolveUserIdsByEmailRequest {
|
|
17
|
+
organizationId: string;
|
|
18
|
+
documentId?: string;
|
|
19
|
+
folderId?: string;
|
|
20
|
+
emails: string[];
|
|
21
|
+
}
|
|
8
22
|
export interface GetUserResolverRequest {
|
|
9
23
|
organizationId: string;
|
|
10
24
|
userIds: string[];
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -60,9 +60,12 @@ export declare const CommentEventTypes: {
|
|
|
60
60
|
readonly COMMENT_PIN_CLICKED: "commentPinClicked";
|
|
61
61
|
readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked";
|
|
62
62
|
readonly COMMENT_TOOL_CLICK: "commentToolClick";
|
|
63
|
+
readonly COMMENT_TOOL_CLICKED: "commentToolClicked";
|
|
63
64
|
readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
|
|
65
|
+
readonly SIDEBAR_BUTTON_CLICKED: "sidebarButtonClicked";
|
|
64
66
|
readonly ATTACHMENT_DOWNLOAD_CLICKED: "attachmentDownloadClicked";
|
|
65
67
|
readonly COMMENT_SAVED: "commentSaved";
|
|
68
|
+
readonly COMMENT_SAVE_TRIGGERED: "commentSaveTriggered";
|
|
66
69
|
readonly VISIBILITY_OPTION_CLICKED: "visibilityOptionClicked";
|
|
67
70
|
};
|
|
68
71
|
export declare const RecorderEventTypes: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "5.0.2-beta.
|
|
3
|
+
"version": "5.0.2-beta.3",
|
|
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": [
|