Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncot/presence

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncot/presence - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

38

lib/presence.d.ts

@@ -12,5 +12,5 @@ import { EmitterInterface, SyncOtEmitter, Validator } from '@syncot/util';

export interface PresenceClientEvents {
localPresence: void;
online: void;
offline: void;
presence: void;
active: void;
inactive: void;
error: Error;

@@ -26,5 +26,5 @@ }

*
* @event localPresence When the local presence has changed.
* @event online The PresenceClient has connected to PresenceService.
* @event offline The PresenceClient has disconnected from PresenceService.
* @event presence When the local presence has changed.
* @event active The PresenceClient starts to synchronize presence with the PresenceService.
* @event inactive The PresenceClient stops to synchronize presence with the PresenceService.
* @event error A presence-related error has occurred.

@@ -34,8 +34,30 @@ * @event destroy The PresenceClient has been destroyed.

export interface PresenceClient extends EmitterInterface<SyncOtEmitter<PresenceClientEvents>> {
/**
* The read-only local presence `sessionId`.
* It is `undefined` if, and only if, `active` is `false`.
*/
readonly sessionId: string | undefined;
/**
* The read-only local presence `userId`.
* It is `undefined` if, and only if, `active` is `false`.
*/
readonly userId: string | undefined;
/**
* The read-write local presence `locationId`.
*/
locationId: string | undefined;
/**
* The read-write local presence `data`.
*/
data: any;
readonly localPresence: Presence | undefined;
readonly online: boolean;
/**
* The read-only local presence.
* It is `undefined` if, and only if,
* either `sessionId`, `userId` or `locationId` is `undefined`.
*/
readonly presence: Presence | undefined;
/**
* If `true`, `presence` is synchronized with the PresenceService, otherwise `false`.
*/
readonly active: boolean;
getPresenceBySessionId(sessionId: string): Promise<Presence | null>;

@@ -42,0 +64,0 @@ getPresenceByUserId(userId: string): Promise<Presence[]>;

{
"name": "@syncot/presence",
"version": "0.0.10",
"version": "0.0.11",
"description": "Interfaces and type definitions related to global presence management.",

@@ -31,3 +31,3 @@ "keywords": [

"@syncot/error": "^0.0.6",
"@syncot/util": "^0.0.7",
"@syncot/util": "^0.0.8",
"@types/readable-stream": "^2.3.1",

@@ -37,3 +37,3 @@ "readable-stream": "^3.3.0",

},
"gitHead": "f42e7403c10d1236587af99fc13d35b2a27a55ad"
"gitHead": "888dd1570ed3023173b3b5bbafad0f29271b246f"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc