@veltdev/sdk 2.0.26 → 2.0.28

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/README.md CHANGED
@@ -0,0 +1,54 @@
1
+ # Velt Collaboration SDK
2
+
3
+ <p>
4
+ <a href="https://npmjs.org/package/@veltdev/sdk">
5
+ <img src="https://img.shields.io/npm/v/@veltdev/sdk?style=flat&label=npm&color=09f" alt="NPM" />
6
+ </a>
7
+ </p>
8
+
9
+ With Velt SDK you can add powerful collaboration features to your product extremely fast.
10
+
11
+ The SDK provides **fullstack components**:
12
+ - UI and behavior are fully customizable to match your product's needs
13
+ - fully-managed on a scalable realtime backend
14
+
15
+ Features include:
16
+ * **Comments** like Figma, Frame.io, Google Docs, Sheets and more
17
+ * **Recording** like Loom (audio, video, screen)
18
+ * **Huddle** like Slack (audio, video, screensharing)
19
+ * In-app and off-app **notifications**
20
+ * **@mentions** and assignment
21
+ * **Presence**, **Cursors**, **Live Selection**
22
+ * **Live state sync** with Single Editor mode
23
+ * **Multiplayer editing** with conflict resolution
24
+ * **Follow mode** like Figma
25
+ * ... and so much more
26
+
27
+ ## Installation
28
+
29
+ ```
30
+ npm install @veltdev/sdk
31
+ ```
32
+
33
+ ## Documentation
34
+
35
+ - Read the [documentation](https://docs.velt.dev/get-started/overview) for guides and API references.
36
+
37
+ ## Use cases
38
+
39
+ - Explore [use cases](https://velt.dev/use-case) to learn how collaboration could look like on your product.
40
+ - [Figma Template](https://www.figma.com/community/file/1402312407969730816/velt-collaboration-kit): To visualize what collaboration features could look like on your product.
41
+
42
+ ## Releases
43
+
44
+ - See the [latest changes](https://docs.velt.dev/release-notes/).
45
+
46
+ ## Security
47
+ - Velt is SOC2 Type 2 and HIPAA compliant. [Learn more](https://velt.dev/security)
48
+
49
+ ## Community
50
+
51
+ - [X](https://x.com/veltjs): To receive updates, announcements,
52
+ and general Velt tips.
53
+
54
+ - [Discord](https://discord.gg/GupvcYH27h): To ask questions and share tips. (Less active).
@@ -22,6 +22,8 @@ import { AutocompleteElement } from "../models/element/autocomplete-element.mode
22
22
  import { TagElement } from "../models/element/tag-element.model";
23
23
  import { FeatureType } from "../utils/enums";
24
24
  import { UserContact } from "../models/data/user-contact.data.model";
25
+ import { DocumentMetadata } from "../models/data/document-metadata.model";
26
+
25
27
  export declare class Snippyly {
26
28
  constructor();
27
29
  initConfig: (apiKey: string, config?: Config) => void;
@@ -33,6 +35,12 @@ export declare class Snippyly {
33
35
  * @deprecated This method is deprecated and will be removed in next release.
34
36
  */
35
37
  updateUser: (user: User) => void;
38
+ /**
39
+ * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
40
+ * @param id unique document ID
41
+ * @param documentMetadata Document Metadata
42
+ */
43
+ setDocument: (id: string, documentMetadata?: DocumentMetadata) => void;
36
44
  /**
37
45
  * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
38
46
  * @param id unique document ID
@@ -10,6 +10,10 @@ export declare class DocumentMetadata {
10
10
  * Document id provided by client
11
11
  */
12
12
  clientDocumentId?: string | number;
13
+ /**
14
+ * Document name
15
+ */
16
+ documentName?: string;
13
17
  /**
14
18
  * Page metadata
15
19
  */
@@ -24,4 +28,5 @@ export declare class DocumentMetadata {
24
28
  * Document creator
25
29
  */
26
30
  creator?: User;
31
+ [key: string]: any;
27
32
  }
@@ -200,3 +200,13 @@ export declare class NotificationMetadata {
200
200
  */
201
201
  location?: Location;
202
202
  }
203
+ export declare class NotificationTabConfigItem {
204
+ name?: string;
205
+ enable?: boolean;
206
+ }
207
+ export declare class NotificationTabConfig {
208
+ forYou?: NotificationTabConfigItem;
209
+ documents?: NotificationTabConfigItem;
210
+ all?: NotificationTabConfigItem;
211
+ people?: NotificationTabConfigItem;
212
+ }
@@ -28,6 +28,13 @@ export declare class ContactElement {
28
28
  * @param scope ContactListScopeForOrganizationUsers[]
29
29
  */
30
30
  public updateContactListScopeForOrganizationUsers: (scope: ContactListScopeForOrganizationUsers[]) => void;
31
+
32
+ /**
33
+ * Update contact list.
34
+ * @param userContacts UserContact[]
35
+ * @param config {merge: boolean}
36
+ */
37
+ public updateContactList: (userContacts: UserContact[], config?: { merge: boolean }) => void;
31
38
  constructor();
32
39
  /**
33
40
  * Get if user is part of global contact or not.
@@ -54,4 +61,11 @@ export declare class ContactElement {
54
61
  * @param scope ContactListScopeForOrganizationUsers[]
55
62
  */
56
63
  private _updateContactListScopeForOrganizationUsers;
64
+
65
+ /**
66
+ * Update contact list.
67
+ * @param userContacts UserContact[]
68
+ * @param config {merge: boolean}
69
+ */
70
+ private _updateContactList;
57
71
  }
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
 
3
- import { Notification } from "../data/notification.model";
3
+ import { Notification, NotificationTabConfig } from "../data/notification.model";
4
4
 
5
5
  export declare class NotificationElement {
6
6
  /**
@@ -27,6 +27,11 @@ export declare class NotificationElement {
27
27
  * To set max days for notification history
28
28
  */
29
29
  setMaxDays: (days: number) => void;
30
+
31
+ /**
32
+ * To set tab configuration
33
+ */
34
+ setTabConfig: (tabConfig: NotificationTabConfig) => void;
30
35
  constructor();
31
36
 
32
37
  /**
@@ -53,4 +58,9 @@ export declare class NotificationElement {
53
58
  * To set max days for notification history
54
59
  */
55
60
  private _setMaxDays;
61
+
62
+ /**
63
+ * To set tab configuration
64
+ */
65
+ private _setTabConfig;
56
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "2.0.26",
3
+ "version": "2.0.28",
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": [