@veltdev/sdk 4.1.0 → 4.2.0-beta.1
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 -0
- package/app/models/data/comment-resolver.data.model.d.ts +41 -0
- package/app/models/data/comment.data.model.d.ts +6 -1
- package/app/models/data/notification.model.d.ts +5 -1
- package/app/models/data/provider.data.model.d.ts +6 -0
- package/models.d.ts +1 -0
- package/package.json +1 -1
- package/velt.js +2 -2
|
@@ -29,6 +29,7 @@ import { CoreEventTypesMap } from "../models/data/core-events.data.model";
|
|
|
29
29
|
import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest } from "../models/data/document.data.model";
|
|
30
30
|
import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
|
|
31
31
|
import { UserDataProvider } from "../models/data/user-resolver.data.model";
|
|
32
|
+
import { IVeltDataProvider } from "../models/data/provider.data.model";
|
|
32
33
|
|
|
33
34
|
export declare class Snippyly {
|
|
34
35
|
constructor();
|
|
@@ -78,6 +79,10 @@ export declare class Snippyly {
|
|
|
78
79
|
* To set the user data provider.
|
|
79
80
|
*/
|
|
80
81
|
setUserDataProvider: (userDataProvider: UserDataProvider) => void;
|
|
82
|
+
/**
|
|
83
|
+
* To set the data provider.
|
|
84
|
+
*/
|
|
85
|
+
setDataProviders: (dataProvider: IVeltDataProvider) => void;
|
|
81
86
|
/**
|
|
82
87
|
* Get Document ID
|
|
83
88
|
*/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BaseMetadata } from "./base-metadata.data.model";
|
|
2
|
+
import { CommentAnnotation } from "./comment-annotation.data.model";
|
|
3
|
+
export interface CommentAnnotationDataProvider {
|
|
4
|
+
get: (request: CommentAnnotationRequest) => Promise<Record<string, IStrippedCommentAnnotation>>;
|
|
5
|
+
save: (request: ISaveAnnotationRequest) => Promise<IStrippedCommentAnnotation>;
|
|
6
|
+
delete: ({ commentAnnotationId, metadata }: {
|
|
7
|
+
commentAnnotationId: string | number;
|
|
8
|
+
metadata?: BaseMetadata;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
resolveTimeout?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface CommentAnnotationRequest {
|
|
13
|
+
organizationId: string;
|
|
14
|
+
commentAnnotationIds?: string[];
|
|
15
|
+
documentIds?: string[];
|
|
16
|
+
folderId?: string;
|
|
17
|
+
allDocuments?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ISaveAnnotationRequest {
|
|
20
|
+
commentAnnotation: {
|
|
21
|
+
[key: string]: IStrippedCommentAnnotation;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface StrippedComment {
|
|
25
|
+
commentId: string | number;
|
|
26
|
+
commentHtml?: string;
|
|
27
|
+
commentText?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface StrippedCommentAnnotationResult {
|
|
30
|
+
strippedData: {
|
|
31
|
+
[annotationId: string]: IStrippedCommentAnnotation;
|
|
32
|
+
} | null;
|
|
33
|
+
originalData: CommentAnnotation | null;
|
|
34
|
+
}
|
|
35
|
+
export interface IStrippedCommentAnnotation {
|
|
36
|
+
annotationId: string;
|
|
37
|
+
metadata?: any;
|
|
38
|
+
comments: {
|
|
39
|
+
[commentId: string]: StrippedComment;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -19,7 +19,12 @@ export declare class Comment {
|
|
|
19
19
|
* Comment Text.
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
|
-
commentText
|
|
22
|
+
commentText?: string;
|
|
23
|
+
/**
|
|
24
|
+
* To check if comment text is available.
|
|
25
|
+
*/
|
|
26
|
+
isCommentTextAvailable?: boolean;
|
|
27
|
+
isCommentResolverUsed?: boolean;
|
|
23
28
|
/**
|
|
24
29
|
* Same comment text in HTML.
|
|
25
30
|
*
|
|
@@ -133,7 +133,11 @@ export declare class Notification {
|
|
|
133
133
|
*/
|
|
134
134
|
displayBodyMessage?: string;
|
|
135
135
|
/**
|
|
136
|
-
|
|
136
|
+
* Is comment text available
|
|
137
|
+
*/
|
|
138
|
+
isCommentResolverUsed?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Display body message template
|
|
137
141
|
*/
|
|
138
142
|
displayBodyMessageTemplate?: string;
|
|
139
143
|
/**
|
package/models.d.ts
CHANGED
|
@@ -67,3 +67,4 @@ export * from './app/models/data/organization-metadata.model';
|
|
|
67
67
|
export * from './app/models/data/user-organization.data.model';
|
|
68
68
|
export * from './app/models/data/event-metadata.data.model';
|
|
69
69
|
export * from './app/models/data/user-resolver.data.model';
|
|
70
|
+
export * from './app/models/data/provider.data.model';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0-beta.1",
|
|
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": [
|