@veltdev/sdk 4.5.0-beta.18 → 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.
@@ -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
- resetVeltButtonState: (config?: VeltResetButtonStateConfig) => void;
345
+ resetVeltButtonState: (config?: VeltResetButtonStateConfig) => void;
319
346
  }
@@ -3,6 +3,10 @@ export declare class DocumentPaths {
3
3
  * The document's unique identifier.
4
4
  */
5
5
  documentId?: string;
6
+ folderId?: string;
7
+ locationId?: string;
8
+ allDocuments?: boolean;
9
+ veltFolderId?: string;
6
10
  /**
7
11
  * Presence path.
8
12
  */
@@ -8,6 +8,7 @@ export interface SetDocumentsRequestOptions {
8
8
  folderId?: string;
9
9
  allDocuments?: boolean;
10
10
  locationId?: string;
11
+ rootDocumentId?: string;
11
12
  }
12
13
  export interface UpdateDocumentsRequest<T = unknown> {
13
14
  organizationId?: string;
@@ -23,3 +23,13 @@ export declare class Version {
23
23
  */
24
24
  name: string;
25
25
  }
26
+ export declare class SetLocationsRequestOptions {
27
+ /**
28
+ * Root location.
29
+ */
30
+ rootLocationId?: string;
31
+ /**
32
+ * Merge locations.
33
+ */
34
+ appendLocation?: boolean;
35
+ }
@@ -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.18",
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": [