@veltdev/sdk-staging 5.0.2-beta.35 → 5.0.2-beta.37

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.
@@ -83,4 +83,9 @@ export declare class PresenceUser {
83
83
  initial?: string;
84
84
  isTabAway?: boolean;
85
85
  isUserIdle?: boolean;
86
+ /**
87
+ * Whether this custom user is local-only (not persisted to DB).
88
+ * Only applicable to users added via addUser API.
89
+ */
90
+ localOnly?: boolean;
86
91
  }
@@ -50,6 +50,21 @@ export declare class PresenceElement {
50
50
  * Subscribe to presence events
51
51
  */
52
52
  on: <T extends keyof PresenceEventTypesMap>(action: T) => Observable<PresenceEventTypesMap[T]>;
53
+
54
+ /**
55
+ * Add a custom user to the presence list (e.g., an AI agent).
56
+ * The user will appear in presence alongside real users.
57
+ * @param request Object containing user data with at least userId required.
58
+ */
59
+ addUser: (request: { user: Partial<PresenceUser>, localOnly?: boolean }) => void;
60
+
61
+ /**
62
+ * Remove a previously added custom user from the presence list.
63
+ * @param request Object containing user data with at least userId required, and optional localOnly flag.
64
+ * @param request.localOnly If true, user is only removed locally (not removed from DB). Default: false.
65
+ */
66
+ removeUser: (request: { user: Partial<PresenceUser>, localOnly?: boolean }) => void;
67
+
53
68
  constructor();
54
69
  /**
55
70
  * Subscribe to a list of all online users who are either active or inactive on the current document.
@@ -95,4 +110,14 @@ export declare class PresenceElement {
95
110
  * Subscribe to presence events
96
111
  */
97
112
  private _on;
113
+
114
+ /**
115
+ * Add a custom user to the presence list
116
+ */
117
+ private _addUser;
118
+
119
+ /**
120
+ * Remove a custom user from the presence list
121
+ */
122
+ private _removeUser;
98
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-staging",
3
- "version": "5.0.2-beta.35",
3
+ "version": "5.0.2-beta.37",
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": [