@veltdev/sdk 4.5.0-beta.17 → 4.5.0-beta.19
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 +33 -6
- package/app/models/data/document-paths.data.model.d.ts +4 -0
- package/app/models/data/document.data.model.d.ts +1 -0
- package/app/models/data/location.model.d.ts +10 -0
- package/app/models/data/resolver.data.model.d.ts +6 -0
- package/app/models/data/user-resolver.data.model.d.ts +2 -0
- package/app/utils/enums.d.ts +1 -0
- package/package.json +1 -1
- package/velt.js +69 -69
|
@@ -31,6 +31,7 @@ import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/doc
|
|
|
31
31
|
import { UserDataProvider } from "../models/data/user-resolver.data.model";
|
|
32
32
|
import { VeltDataProvider } from "../models/data/provider.data.model";
|
|
33
33
|
import { VeltResetButtonStateConfig } from "../models/data/button.data.model";
|
|
34
|
+
import { SetLocationsRequestOptions } from "../models/data/location.model";
|
|
34
35
|
|
|
35
36
|
export declare class Snippyly {
|
|
36
37
|
constructor();
|
|
@@ -48,17 +49,22 @@ export declare class Snippyly {
|
|
|
48
49
|
* @param id unique document ID
|
|
49
50
|
* @param documentMetadata Document Metadata
|
|
50
51
|
*/
|
|
51
|
-
setDocument: (id: string, documentMetadata?: DocumentMetadata) => void
|
|
52
|
+
setDocument: (id: string, documentMetadata?: DocumentMetadata) => Promise<void>;
|
|
52
53
|
/**
|
|
53
54
|
* Tell us the unique ID of the current document/resource on which you want to enable collaboration.
|
|
54
55
|
* @param id unique document ID
|
|
55
56
|
* @deprecated This method is deprecated. Use `setDocuments` method instead.
|
|
56
57
|
*/
|
|
57
|
-
setDocumentId: (id: string) => void
|
|
58
|
+
setDocumentId: (id: string) => Promise<void>;
|
|
58
59
|
/**
|
|
59
60
|
* To set multiple documents
|
|
60
61
|
*/
|
|
61
|
-
setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void
|
|
62
|
+
setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* To set the root document
|
|
65
|
+
* @param document Document object
|
|
66
|
+
*/
|
|
67
|
+
setRootDocument: (document: Document) => Promise<void>;
|
|
62
68
|
/**
|
|
63
69
|
* To unset the document id
|
|
64
70
|
* @deprecated This method is deprecated. Use `unsetDocuments` method instead.
|
|
@@ -100,12 +106,33 @@ export declare class Snippyly {
|
|
|
100
106
|
* @param params Location
|
|
101
107
|
* @param appendLocation Append location to existing location
|
|
102
108
|
*/
|
|
103
|
-
setLocation: (params: Location, appendLocation?: boolean) => void
|
|
109
|
+
setLocation: (params: Location, appendLocation?: boolean) => Promise<void>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* To set the root location
|
|
113
|
+
* @param location Location object
|
|
114
|
+
*/
|
|
115
|
+
setRootLocation: (location: Location) => Promise<void>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* To set multiple locations
|
|
119
|
+
* @param locations Location objects
|
|
120
|
+
* @param options Set locations options
|
|
121
|
+
*/
|
|
122
|
+
setLocations: (locations: Location[], options?: SetLocationsRequestOptions) => Promise<void>;
|
|
123
|
+
|
|
104
124
|
/**
|
|
105
125
|
* To remove location from a User
|
|
106
126
|
* @param location Location
|
|
107
127
|
*/
|
|
108
128
|
removeLocation: (location?: Location) => void;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* To remove multiple locations
|
|
132
|
+
* @param locations Location objects
|
|
133
|
+
*/
|
|
134
|
+
removeLocations: (locations?: Location[]) => Promise<void>;
|
|
135
|
+
|
|
109
136
|
/**
|
|
110
137
|
* To exclude data of specific location ids
|
|
111
138
|
* @param ids Location Ids
|
|
@@ -211,7 +238,7 @@ export declare class Snippyly {
|
|
|
211
238
|
* @param location Location object
|
|
212
239
|
* @deprecated This method is deprecated and will be removed in next release. Use `setLocation` method with `appendLocation: true` instead.
|
|
213
240
|
*/
|
|
214
|
-
addLocation: (location: any) => any
|
|
241
|
+
addLocation: (location: any) => Promise<any>;
|
|
215
242
|
/**
|
|
216
243
|
* To set the dark mode of Velt components.
|
|
217
244
|
* @param value {boolean} true/false
|
|
@@ -315,5 +342,5 @@ export declare class Snippyly {
|
|
|
315
342
|
/**
|
|
316
343
|
* To reset the button toggle map.
|
|
317
344
|
*/
|
|
318
|
-
|
|
345
|
+
resetVeltButtonState: (config?: VeltResetButtonStateConfig) => void;
|
|
319
346
|
}
|
|
@@ -3,6 +3,12 @@ export interface ResolverConfig {
|
|
|
3
3
|
saveRetryConfig?: RetryConfig;
|
|
4
4
|
deleteRetryConfig?: RetryConfig;
|
|
5
5
|
getRetryConfig?: RetryConfig;
|
|
6
|
+
resolveUsersConfig?: ResolveUsersConfig;
|
|
7
|
+
}
|
|
8
|
+
export interface ResolveUsersConfig {
|
|
9
|
+
organization?: boolean;
|
|
10
|
+
folder?: boolean;
|
|
11
|
+
document?: boolean;
|
|
6
12
|
}
|
|
7
13
|
export interface ResolverResponse<T> {
|
|
8
14
|
data?: T;
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export declare const RecorderEventTypes: {
|
|
|
66
66
|
export declare const CoreEventTypes: {
|
|
67
67
|
readonly VELT_BUTTON_CLICK: "veltButtonClick";
|
|
68
68
|
readonly USER_UPDATE: "userUpdate";
|
|
69
|
+
readonly INIT_UPDATE: "initUpdate";
|
|
69
70
|
readonly DOCUMENT_INIT: "documentInit";
|
|
70
71
|
readonly ERROR: "error";
|
|
71
72
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "4.5.0-beta.
|
|
3
|
+
"version": "4.5.0-beta.19",
|
|
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": [
|