@veltdev/sdk 4.0.0-beta.20 → 4.0.0-beta.22
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 +15 -30
- package/app/models/data/base-metadata.data.model.d.ts +2 -0
- package/app/models/data/comment-actions.data.model.d.ts +20 -0
- package/app/models/data/comment-events.data.model.d.ts +3 -0
- package/app/models/data/document-events.data.model.d.ts +10 -0
- package/app/models/data/document-metadata.model.d.ts +8 -0
- package/app/models/data/document.data.model.d.ts +19 -0
- package/app/models/data/folder-metadata.model.d.ts +40 -0
- package/app/utils/constants.d.ts +1 -0
- package/models.d.ts +1 -0
- package/package.json +1 -1
- package/velt.js +2 -2
|
@@ -26,8 +26,10 @@ 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 } from "../models/data/document.data.model";
|
|
29
|
+
import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest } from "../models/data/document.data.model";
|
|
30
|
+
import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
|
|
30
31
|
import { UserDataProvider } from "../models/data/user-resolver.data.model";
|
|
32
|
+
|
|
31
33
|
export declare class Snippyly {
|
|
32
34
|
constructor();
|
|
33
35
|
initConfig: (apiKey: string, config?: Config) => void;
|
|
@@ -36,7 +38,7 @@ export declare class Snippyly {
|
|
|
36
38
|
* Tell us who the currently logged in user is.
|
|
37
39
|
*
|
|
38
40
|
* Call whenever the user is updated: signs in, signs out, signs up etc.
|
|
39
|
-
* @deprecated This method is deprecated
|
|
41
|
+
* @deprecated This method is deprecated.
|
|
40
42
|
*/
|
|
41
43
|
updateUser: (user: User) => void;
|
|
42
44
|
/**
|
|
@@ -48,6 +50,7 @@ export declare class Snippyly {
|
|
|
48
50
|
/**
|
|
49
51
|
* Tell us the unique ID of the current document/resource on which you want to enable collaboration.
|
|
50
52
|
* @param id unique document ID
|
|
53
|
+
* @deprecated This method is deprecated. Use `setDocuments` method instead.
|
|
51
54
|
*/
|
|
52
55
|
setDocumentId: (id: string) => void;
|
|
53
56
|
/**
|
|
@@ -56,12 +59,21 @@ export declare class Snippyly {
|
|
|
56
59
|
setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
|
|
57
60
|
/**
|
|
58
61
|
* To unset the document id
|
|
62
|
+
* @deprecated This method is deprecated. Use `unsetDocuments` method instead.
|
|
59
63
|
*/
|
|
60
64
|
unsetDocumentId: () => void;
|
|
61
65
|
/**
|
|
62
66
|
* To unset the documents
|
|
63
67
|
*/
|
|
64
68
|
unsetDocuments: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* To fetch documents
|
|
71
|
+
*/
|
|
72
|
+
fetchDocuments: (options?: FetchDocumentsRequest) => Promise<FetchDocumentsResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* To fetch folders
|
|
75
|
+
*/
|
|
76
|
+
fetchFolders: (options?: FetchFoldersRequest) => Promise<FetchFoldersResponse>;
|
|
65
77
|
/**
|
|
66
78
|
* To set the user data provider.
|
|
67
79
|
*/
|
|
@@ -70,23 +82,12 @@ export declare class Snippyly {
|
|
|
70
82
|
* Get Document ID
|
|
71
83
|
*/
|
|
72
84
|
getDocumentId: () => string;
|
|
73
|
-
/**
|
|
74
|
-
* Tell us the custom params of the current document/resource to identify sub document inside a document.
|
|
75
|
-
* @param params Document Params
|
|
76
|
-
* @deprecated This method is depercated and will be removed in next release. Use `setLocation` method instead.
|
|
77
|
-
*/
|
|
78
|
-
setDocumentParams: (params: Location) => void;
|
|
79
85
|
/**
|
|
80
86
|
* Tell us the custom params of the current document/resource to identify sub document inside a document.
|
|
81
87
|
* @param params Location
|
|
82
88
|
* @param appendLocation Append location to existing location
|
|
83
89
|
*/
|
|
84
90
|
setLocation: (params: Location, appendLocation?: boolean) => void;
|
|
85
|
-
/**
|
|
86
|
-
* To remove document params from a User
|
|
87
|
-
* @deprecated This method is depercated and will be removed in next release. Use `removeLocation` method instead.
|
|
88
|
-
*/
|
|
89
|
-
removeDocumentParams: () => void;
|
|
90
91
|
/**
|
|
91
92
|
* To remove location from a User
|
|
92
93
|
* @param location Location
|
|
@@ -192,12 +193,6 @@ export declare class Snippyly {
|
|
|
192
193
|
* @param features List of features
|
|
193
194
|
*/
|
|
194
195
|
disableFeatures: (features: Array<FeatureType>) => void;
|
|
195
|
-
/**
|
|
196
|
-
* Add location to show comments, tags, recorders etc. for provided location also.
|
|
197
|
-
* @param location Location object
|
|
198
|
-
* @deprecated This method is deprecated and will be removed in next release. Use `setLocation` method with `appendLocation: true` instead.
|
|
199
|
-
*/
|
|
200
|
-
addLocation: (location: any) => any;
|
|
201
196
|
/**
|
|
202
197
|
* To set the dark mode of Velt components.
|
|
203
198
|
* @param value {boolean} true/false
|
|
@@ -225,17 +220,6 @@ export declare class Snippyly {
|
|
|
225
220
|
*/
|
|
226
221
|
getVeltInitState: () => Observable<boolean | undefined>;
|
|
227
222
|
|
|
228
|
-
/**
|
|
229
|
-
* To invite list of users to the document.
|
|
230
|
-
* @param documentUsers List of document users
|
|
231
|
-
*/
|
|
232
|
-
inviteUsers: (documentUsers: Array<DocumentUser>) => void;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* To remove snippyly specific content from provided html content.
|
|
236
|
-
*/
|
|
237
|
-
removeSnippylyContent: (htmlContent: string) => string;
|
|
238
|
-
|
|
239
223
|
/**
|
|
240
224
|
* To remove velt specific content from provided html content.
|
|
241
225
|
*/
|
|
@@ -276,6 +260,7 @@ export declare class Snippyly {
|
|
|
276
260
|
|
|
277
261
|
/**
|
|
278
262
|
* To get document metadata.
|
|
263
|
+
* @deprecated This method is deprecated. Use `fetchDocuments` method instead.
|
|
279
264
|
*/
|
|
280
265
|
getDocumentMetadata: () => Observable<DocumentMetadata | null>;
|
|
281
266
|
|
|
@@ -9,8 +9,10 @@ import { User } from "./user.data.model";
|
|
|
9
9
|
export interface RequestOptions {
|
|
10
10
|
organizationId?: string;
|
|
11
11
|
documentId?: string;
|
|
12
|
+
folderId?: string;
|
|
12
13
|
filters?: any;
|
|
13
14
|
documentIds?: string[];
|
|
15
|
+
allDocuments?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export interface UpdatePriorityRequest {
|
|
16
18
|
annotationId: string;
|
|
@@ -63,6 +65,9 @@ export interface CommentRequestQuery {
|
|
|
63
65
|
documentIds?: string[];
|
|
64
66
|
locationIds?: string[];
|
|
65
67
|
statusIds?: string[];
|
|
68
|
+
folderId?: string;
|
|
69
|
+
allDocuments?: boolean;
|
|
70
|
+
locationId?: string;
|
|
66
71
|
}
|
|
67
72
|
export interface SubscribeCommentAnnotationRequest {
|
|
68
73
|
annotationId: string;
|
|
@@ -161,3 +166,18 @@ export interface ToggleReactionRequest {
|
|
|
161
166
|
};
|
|
162
167
|
options?: RequestOptions;
|
|
163
168
|
}
|
|
169
|
+
export interface FetchCommentAnnotationsRequest {
|
|
170
|
+
createdAfter?: number;
|
|
171
|
+
createdBefore?: number;
|
|
172
|
+
updatedAfter?: number;
|
|
173
|
+
updatedBefore?: number;
|
|
174
|
+
statusIds?: string[];
|
|
175
|
+
order?: 'asc' | 'desc';
|
|
176
|
+
pageToken?: string;
|
|
177
|
+
allDocuments?: boolean;
|
|
178
|
+
pageSize?: number;
|
|
179
|
+
organizationId?: string;
|
|
180
|
+
locationId?: string;
|
|
181
|
+
documentIds?: string[];
|
|
182
|
+
folderId?: string;
|
|
183
|
+
}
|
|
@@ -129,6 +129,9 @@ export interface DeleteCommentAnnotationEvent {
|
|
|
129
129
|
export interface GetCommentAnnotationsResponse {
|
|
130
130
|
data: Record<string, CommentAnnotation[]> | null;
|
|
131
131
|
}
|
|
132
|
+
export interface FetchCommentAnnotationsResponse extends GetCommentAnnotationsResponse {
|
|
133
|
+
nextPageToken: string;
|
|
134
|
+
}
|
|
132
135
|
export interface GetCommentAnnotationsCountResponse {
|
|
133
136
|
data: Record<string, CommentAnnotationsCount> | null;
|
|
134
137
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DocumentMetadata } from "./document-metadata.model";
|
|
2
|
+
import { FolderMetadata } from "./folder-metadata.model";
|
|
3
|
+
export interface FetchDocumentsResponse {
|
|
4
|
+
data: Record<string, DocumentMetadata> | null;
|
|
5
|
+
nextPageToken: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FetchFoldersResponse {
|
|
8
|
+
data: Record<string, FolderMetadata> | null;
|
|
9
|
+
nextPageToken: string;
|
|
10
|
+
}
|
|
@@ -6,6 +6,14 @@ export declare class DocumentMetadata {
|
|
|
6
6
|
* Unique document id generated from client document id
|
|
7
7
|
*/
|
|
8
8
|
documentId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Folders
|
|
11
|
+
*/
|
|
12
|
+
folderId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Velt folder id
|
|
15
|
+
*/
|
|
16
|
+
veltFolderId?: string;
|
|
9
17
|
/**
|
|
10
18
|
* API key
|
|
11
19
|
*/
|
|
@@ -5,4 +5,23 @@ export interface Document {
|
|
|
5
5
|
}
|
|
6
6
|
export interface SetDocumentsRequestOptions {
|
|
7
7
|
organizationId?: string;
|
|
8
|
+
folderId?: string;
|
|
9
|
+
allDocuments?: boolean;
|
|
10
|
+
locationId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface FetchDocumentsRequest {
|
|
13
|
+
organizationId?: string;
|
|
14
|
+
documentIds?: string[];
|
|
15
|
+
folderId?: string;
|
|
16
|
+
allDocuments?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface FetchFoldersRequest {
|
|
19
|
+
organizationId?: string;
|
|
20
|
+
folderId?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FolderConfig {
|
|
23
|
+
folderId?: string;
|
|
24
|
+
allDocuments?: boolean;
|
|
25
|
+
locationId?: string;
|
|
26
|
+
veltFolderId?: string;
|
|
8
27
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare class FolderMetadata {
|
|
2
|
+
folderId?: string;
|
|
3
|
+
/**
|
|
4
|
+
* Velt folder id
|
|
5
|
+
*/
|
|
6
|
+
veltFolderId?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Parent folder id
|
|
9
|
+
*/
|
|
10
|
+
parentFolderId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Velt parent folder id
|
|
13
|
+
*/
|
|
14
|
+
veltParentFolderId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Created at
|
|
17
|
+
*/
|
|
18
|
+
createdAt?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Last updated
|
|
21
|
+
*/
|
|
22
|
+
lastUpdated?: number;
|
|
23
|
+
/**
|
|
24
|
+
* API key
|
|
25
|
+
*/
|
|
26
|
+
apiKey?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Organization id
|
|
29
|
+
*/
|
|
30
|
+
organizationId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Client organization id
|
|
33
|
+
*/
|
|
34
|
+
clientOrganizationId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Folder name
|
|
37
|
+
*/
|
|
38
|
+
folderName?: string;
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}
|
package/app/utils/constants.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare class Constants {
|
|
|
10
10
|
static DEFAULT_QUERY_HASH: string;
|
|
11
11
|
static LISTENER_BATCH_SIZE: number;
|
|
12
12
|
static FIREBASE_PARTIAL_PATH_ORGANIZATIONS: string;
|
|
13
|
+
static FIREBASE_PARTIAL_PATH_FOLDERS: string;
|
|
13
14
|
static FIREBASE_PARTIAL_PATH_DOCS: string;
|
|
14
15
|
static FIREBASE_PARTIAL_PATH_PRESENCE: string;
|
|
15
16
|
static FIREBASE_PARTIAL_PATH_ORGANIZATION_USERS: string;
|
package/models.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './app/models/data/custom-css.data.model';
|
|
|
18
18
|
export * from './app/models/data/custom-chip-dropdown.data.model';
|
|
19
19
|
export * from './app/models/data/device-info.model';
|
|
20
20
|
export * from './app/models/data/document.data.model';
|
|
21
|
+
export * from './app/models/data/document-events.data.model';
|
|
21
22
|
export * from './app/models/data/document-iam.data.model';
|
|
22
23
|
export * from './app/models/data/document-metadata.model';
|
|
23
24
|
export * from './app/models/data/document-paths.data.model';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.22",
|
|
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": [
|