@veltdev/sdk-staging 4.2.1-beta.18 → 4.2.1-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 +9 -10
- package/app/models/data/comment-resolver.data.model.d.ts +4 -10
- package/app/models/data/document.data.model.d.ts +5 -21
- package/app/models/data/location-metadata.model.d.ts +0 -14
- package/app/models/data/media-preview-config.data.model.d.ts +0 -1
- package/app/models/data/provider.data.model.d.ts +0 -2
- package/app/models/data/reaction-annotation.data.model.d.ts +0 -1
- package/app/models/data/user-resolver.data.model.d.ts +1 -1
- package/app/models/element/comment-element.model.d.ts +0 -20
- package/app/utils/constants.d.ts +0 -2
- package/app/utils/enums.d.ts +0 -9
- package/package.json +1 -1
- package/velt.js +2 -2
- package/app/models/data/reaction-resolver.data.model.d.ts +0 -39
- package/app/models/data/resolver.data.model.d.ts +0 -21
|
@@ -26,7 +26,7 @@ import { DocumentMetadata } from "../models/data/document-metadata.model";
|
|
|
26
26
|
import { ReactionElement } from "../models/element/reaction-element.model";
|
|
27
27
|
import { VeltEventMetadata } from "../models/data/event-metadata.data.model";
|
|
28
28
|
import { CoreEventTypesMap } from "../models/data/core-events.data.model";
|
|
29
|
-
import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest, UpdateDocumentsRequest
|
|
29
|
+
import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest, UpdateDocumentsRequest } 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
32
|
import { VeltDataProvider } from "../models/data/provider.data.model";
|
|
@@ -76,8 +76,6 @@ export declare class Snippyly {
|
|
|
76
76
|
*/
|
|
77
77
|
updateDocuments: (request: UpdateDocumentsRequest) => Promise<any>;
|
|
78
78
|
|
|
79
|
-
updateLocations: (request: UpdateLocationsRequest) => Promise<any>;
|
|
80
|
-
|
|
81
79
|
/**
|
|
82
80
|
* To fetch folders
|
|
83
81
|
*/
|
|
@@ -122,25 +120,25 @@ export declare class Snippyly {
|
|
|
122
120
|
/**
|
|
123
121
|
* Get the Presence Element Object to access the raw presence data.
|
|
124
122
|
*
|
|
125
|
-
* This is for Pros who don
|
|
123
|
+
* This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
|
|
126
124
|
*/
|
|
127
125
|
getPresenceElement: () => PresenceElement;
|
|
128
126
|
/**
|
|
129
127
|
* Get the Cursor Element Object to access the raw cursor data.
|
|
130
128
|
*
|
|
131
|
-
* This is for Pros who don
|
|
129
|
+
* This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI.
|
|
132
130
|
*/
|
|
133
131
|
getCursorElement: () => CursorElement;
|
|
134
132
|
/**
|
|
135
133
|
* Get the Comment Element Object to access the raw comment data.
|
|
136
134
|
*
|
|
137
|
-
* This is for Pros who don
|
|
135
|
+
* This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI.
|
|
138
136
|
*/
|
|
139
137
|
getCommentElement: () => CommentElement;
|
|
140
138
|
/**
|
|
141
139
|
* Get the Tag Pin Annotation Object to access the raw tag data.
|
|
142
140
|
*
|
|
143
|
-
* This is for Pros who don
|
|
141
|
+
* This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI.
|
|
144
142
|
*/
|
|
145
143
|
getTagElement: () => TagElement;
|
|
146
144
|
/**
|
|
@@ -260,10 +258,11 @@ export declare class Snippyly {
|
|
|
260
258
|
setLanguage: (language: string) => void;
|
|
261
259
|
|
|
262
260
|
/**
|
|
263
|
-
* To set translations for
|
|
264
|
-
* @param
|
|
261
|
+
* To set the translations for the language.
|
|
262
|
+
* @param language Language code
|
|
263
|
+
* @param translations Translations object
|
|
265
264
|
*/
|
|
266
|
-
setTranslations: (
|
|
265
|
+
setTranslations: (language: string, translations: { [key: string]: string }) => void;
|
|
267
266
|
|
|
268
267
|
/**
|
|
269
268
|
* To enable auto translation.
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ResolverActions } from "../../utils/enums";
|
|
2
1
|
import { BaseMetadata } from "./base-metadata.data.model";
|
|
3
2
|
import { CommentAnnotation } from "./comment-annotation.data.model";
|
|
4
|
-
import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
|
|
5
3
|
export interface CommentAnnotationDataProvider {
|
|
6
|
-
get: (request: GetCommentRequest) => Promise<
|
|
7
|
-
save: (request: SaveCommentRequest) => Promise<
|
|
8
|
-
delete: (request: DeleteCommentRequest) => Promise<
|
|
9
|
-
|
|
4
|
+
get: (request: GetCommentRequest) => Promise<Record<string, PartialCommentAnnotation>>;
|
|
5
|
+
save: (request: SaveCommentRequest) => Promise<void>;
|
|
6
|
+
delete: (request: DeleteCommentRequest) => Promise<void>;
|
|
7
|
+
resolveTimeout?: number;
|
|
10
8
|
}
|
|
11
9
|
export interface GetCommentRequest {
|
|
12
10
|
organizationId: string;
|
|
@@ -18,14 +16,11 @@ export interface GetCommentRequest {
|
|
|
18
16
|
export interface DeleteCommentRequest {
|
|
19
17
|
commentAnnotationId: string;
|
|
20
18
|
metadata?: BaseMetadata;
|
|
21
|
-
event?: ResolverActions;
|
|
22
19
|
}
|
|
23
20
|
export interface SaveCommentRequest {
|
|
24
21
|
commentAnnotation: {
|
|
25
22
|
[key: string]: PartialCommentAnnotation;
|
|
26
23
|
};
|
|
27
|
-
event?: ResolverActions;
|
|
28
|
-
commentId?: string;
|
|
29
24
|
}
|
|
30
25
|
export interface PartialComment {
|
|
31
26
|
commentId: string | number;
|
|
@@ -37,7 +32,6 @@ export interface PartialCommentAnnotationResult {
|
|
|
37
32
|
[annotationId: string]: PartialCommentAnnotation;
|
|
38
33
|
} | null;
|
|
39
34
|
originalData: CommentAnnotation | null;
|
|
40
|
-
eventType?: ResolverActions;
|
|
41
35
|
}
|
|
42
36
|
export interface PartialCommentAnnotation {
|
|
43
37
|
annotationId: string;
|
|
@@ -9,22 +9,12 @@ export interface SetDocumentsRequestOptions {
|
|
|
9
9
|
allDocuments?: boolean;
|
|
10
10
|
locationId?: string;
|
|
11
11
|
}
|
|
12
|
-
export interface UpdateDocumentsRequest
|
|
12
|
+
export interface UpdateDocumentsRequest {
|
|
13
13
|
organizationId?: string;
|
|
14
|
-
documents?:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[key: string]: T | string;
|
|
19
|
-
}
|
|
20
|
-
export interface UpdateLocationsRequest<T = unknown> {
|
|
21
|
-
organizationId?: string;
|
|
22
|
-
documentIds?: string[];
|
|
23
|
-
locations?: UpdateLocationMetadata<T>[];
|
|
24
|
-
}
|
|
25
|
-
export interface UpdateLocationMetadata<T = unknown> {
|
|
26
|
-
id: string;
|
|
27
|
-
[key: string]: T | string;
|
|
14
|
+
documents?: {
|
|
15
|
+
documentId: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}[];
|
|
28
18
|
}
|
|
29
19
|
export interface FetchDocumentsRequest {
|
|
30
20
|
organizationId?: string;
|
|
@@ -32,12 +22,6 @@ export interface FetchDocumentsRequest {
|
|
|
32
22
|
folderId?: string;
|
|
33
23
|
allDocuments?: boolean;
|
|
34
24
|
}
|
|
35
|
-
export interface FetchLocationsRequest {
|
|
36
|
-
organizationId?: string;
|
|
37
|
-
documentIds?: string[];
|
|
38
|
-
folderId?: string;
|
|
39
|
-
allDocuments?: boolean;
|
|
40
|
-
}
|
|
41
25
|
export interface FetchFoldersRequest {
|
|
42
26
|
organizationId?: string;
|
|
43
27
|
folderId?: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BaseMetadata } from "./base-metadata.data.model";
|
|
2
1
|
import { Location } from "./location.model";
|
|
3
2
|
import { PageInfo } from "./page-info.model";
|
|
4
3
|
export declare class LocationMetadata {
|
|
@@ -6,10 +5,6 @@ export declare class LocationMetadata {
|
|
|
6
5
|
* Unique location id generated from client location information
|
|
7
6
|
*/
|
|
8
7
|
locationId?: number;
|
|
9
|
-
/**
|
|
10
|
-
* Location id generated from velt location information
|
|
11
|
-
*/
|
|
12
|
-
veltLocationId?: string;
|
|
13
8
|
/**
|
|
14
9
|
* Location object provided by a client
|
|
15
10
|
*/
|
|
@@ -18,13 +13,4 @@ export declare class LocationMetadata {
|
|
|
18
13
|
* Page metadata
|
|
19
14
|
*/
|
|
20
15
|
pageInfo?: PageInfo;
|
|
21
|
-
/**
|
|
22
|
-
* Location metadata
|
|
23
|
-
*/
|
|
24
|
-
metadata?: BaseMetadata;
|
|
25
|
-
}
|
|
26
|
-
export interface LocationMetadatas {
|
|
27
|
-
[documentId: string]: {
|
|
28
|
-
[locationId: string]: LocationMetadata;
|
|
29
|
-
};
|
|
30
16
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
|
|
2
|
-
import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
|
|
3
2
|
import { UserDataProvider } from "./user-resolver.data.model";
|
|
4
3
|
export interface VeltDataProvider {
|
|
5
4
|
comment?: CommentAnnotationDataProvider;
|
|
6
5
|
user?: UserDataProvider;
|
|
7
|
-
reaction?: ReactionAnnotationDataProvider;
|
|
8
6
|
}
|
|
@@ -1093,16 +1093,6 @@ export declare class CommentElement {
|
|
|
1093
1093
|
*/
|
|
1094
1094
|
public fetchCommentAnnotations: (fetchCommentAnnotationsRequest: FetchCommentAnnotationsRequest) => Promise<FetchCommentAnnotationsResponse>;
|
|
1095
1095
|
|
|
1096
|
-
/**
|
|
1097
|
-
* To enable svg as img
|
|
1098
|
-
*/
|
|
1099
|
-
public enableSvgAsImg: () => void;
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* To disable svg as img
|
|
1103
|
-
*/
|
|
1104
|
-
public disableSvgAsImg: () => void;
|
|
1105
|
-
|
|
1106
1096
|
constructor();
|
|
1107
1097
|
/**
|
|
1108
1098
|
* Subscribe to comments on the current document.
|
|
@@ -2177,14 +2167,4 @@ export declare class CommentElement {
|
|
|
2177
2167
|
* To fetch comment annotations
|
|
2178
2168
|
*/
|
|
2179
2169
|
private _fetchCommentAnnotations;
|
|
2180
|
-
|
|
2181
|
-
/**
|
|
2182
|
-
* To enable svg as img
|
|
2183
|
-
*/
|
|
2184
|
-
private _enableSvgAsImg;
|
|
2185
|
-
|
|
2186
|
-
/**
|
|
2187
|
-
* To disable svg as img
|
|
2188
|
-
*/
|
|
2189
|
-
private _disableSvgAsImg;
|
|
2190
2170
|
}
|
package/app/utils/constants.d.ts
CHANGED
|
@@ -250,7 +250,6 @@ export declare class Constants {
|
|
|
250
250
|
VELT_SHADOW_DOM_INTERNAL: string;
|
|
251
251
|
};
|
|
252
252
|
static ATTRIBUTES: {
|
|
253
|
-
VELT_COMMENT_CONTAINER: string;
|
|
254
253
|
VELT_TARGET_COMMENT_ELEMENT_ID: string;
|
|
255
254
|
VELT_COMMENT_TYPE: string;
|
|
256
255
|
TARGET_INLINE_COMMENT_ELEMENT_ID: string;
|
|
@@ -317,7 +316,6 @@ export declare class Constants {
|
|
|
317
316
|
VELT_COMMENT_DIALOG_PORTAL_INTERNAL: string;
|
|
318
317
|
ANNOTATION_ID: string;
|
|
319
318
|
MULTI_THREAD_ANNOTATION_ID: string;
|
|
320
|
-
SLATE_EDITOR: string;
|
|
321
319
|
};
|
|
322
320
|
static INJECTION_STYLE_PROPS: {
|
|
323
321
|
/**
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -16,15 +16,6 @@ export declare enum CommentStatus {
|
|
|
16
16
|
SUBSCRIBED = "subscribed",
|
|
17
17
|
UNSUBSCRIBED = "unsubscribed"
|
|
18
18
|
}
|
|
19
|
-
export declare enum ResolverActions {
|
|
20
|
-
COMMENT_ANNOTATION_ADD = "comment_annotation.add",
|
|
21
|
-
COMMENT_ANNOTATION_DELETE = "comment_annotation.delete",
|
|
22
|
-
COMMENT_ADD = "comment.add",
|
|
23
|
-
COMMENT_DELETE = "comment.delete",
|
|
24
|
-
COMMENT_UPDATE = "comment.update",
|
|
25
|
-
REACTION_ADD = "reaction.add",
|
|
26
|
-
REACTION_DELETE = "reaction.delete"
|
|
27
|
-
}
|
|
28
19
|
export declare const CommentEventTypes: {
|
|
29
20
|
readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
|
|
30
21
|
readonly DELETE_COMMENT_ANNOTATION: "deleteCommentAnnotation";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk-staging",
|
|
3
|
-
"version": "4.2.1-beta.
|
|
3
|
+
"version": "4.2.1-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": [
|