lumiverse-spindle-types 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/spindle-api.ts +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
@@ -402,6 +402,22 @@ export interface SpindleAPI {
402
402
  }>;
403
403
  };
404
404
 
405
+ /**
406
+ * User presence queries (free tier — no permission needed).
407
+ * Check whether a user currently has the Lumiverse app visible/focused
408
+ * in at least one browser tab or PWA window.
409
+ */
410
+ users: {
411
+ /**
412
+ * Returns true if the user has the app visible in at least one session.
413
+ * Returns false if all sessions are hidden/backgrounded or the user has no
414
+ * active WebSocket connections.
415
+ * For user-scoped extensions, userId is inferred from the extension owner.
416
+ * For operator-scoped extensions, pass userId explicitly.
417
+ */
418
+ isVisible(userId?: string): Promise<boolean>;
419
+ };
420
+
405
421
  /** Show toast notifications in the frontend UI (free tier — no permission needed) */
406
422
  toast: {
407
423
  success(message: string, options?: { title?: string; duration?: number }): void;