New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@liveblocks/node

Package Overview
Dependencies
Maintainers
6
Versions
369
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liveblocks/node - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0-fsm1

40

dist/index.d.ts

@@ -5,21 +5,43 @@ import { IncomingHttpHeaders } from 'http';

/**
* The secret api provided at https://liveblocks.io/dashboard/apikeys
* The secret API key for your Liveblocks account. You can find it on
* https://liveblocks.io/dashboard/apikeys
*/
secret: string;
/**
* The room provided in the authorization request body
* The room ID for which to authorize the user. This will authorize the user
* to enter the Liveblocks room.
*/
room: string;
/**
* The id of the user that try to connect. It can be used to get information about the connected users in the room (name, avatar, etc).
* It can also be used to generate a token that gives access to a private room where the userId is configured in the room accesses.
* Liveblocks uses the userId to calculate your account's Monthly Active Users.
* Associates a user ID to the session that is being authorized. The user ID
* is typically set to the user ID from your own database.
*
* It can also be used to generate a token that gives access to a private
* room where the userId is configured in the room accesses.
*
* This user ID will be used as the unique identifier to compute your
* Liveblocks account's Monthly Active Users.
*/
userId: string;
/**
* The info associated to the user. Can be used to store the name or the profile picture to implement avatar for example. Can't exceed 1KB when serialized as JSON
* Arbitrary metadata associated to this user session.
*
* You can use it to store a small amount of static metadata for a user
* session. It is public information, that will be visible to other users in
* the same room, like name, avatar URL, etc.
*
* It's only suitable for static info that won't change during a session. If
* you want to store dynamic metadata on a user session, don't keep that in
* the session token, but use Presence instead.
*
* Can't exceed 1KB when serialized as JSON.
*/
userInfo?: unknown;
/**
* The ids of the groups to which the user belongs. It should be used to generate a token that gives access to a private room and at least one of the group is configured in the room accesses.
* Tell Liveblocks which group IDs this user belongs to. This will authorize
* the user session to access private rooms that have at least one of these
* group IDs listed in their room access configuration.
*
* See https://liveblocks.io/docs/guides/managing-rooms-users-permissions#permissions
* for how to configure your room's permissions to use this feature.
*/

@@ -34,2 +56,6 @@ groupIds?: string[];

/**
* Tells Liveblocks that a user should be allowed access to a room, which user
* this session is for, and what metadata to associate with the user (like
* name, avatar, etc.)
*
* @example

@@ -36,0 +62,0 @@ * export default async function auth(req, res) {

2

dist/index.js

@@ -65,3 +65,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __async = (__this, __arguments, generator) => {

return {
status: 403,
status: 503,
body: 'Call to "https://api.liveblocks.io/v2/rooms/:roomId/authorize" failed. See "error" for more information.',

@@ -68,0 +68,0 @@ error: er

{
"name": "@liveblocks/node",
"version": "1.0.9",
"version": "1.1.0-fsm1",
"description": "A server-side utility that lets you set up a Liveblocks authentication endpoint. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

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