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

@relaybox/rest

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@relaybox/rest - npm Package Compare versions

Comparing version 1.10.0 to 1.11.0

2

dist/relaybox.d.ts

@@ -33,3 +33,3 @@ import { ExtendedJwtPayload } from './types/jwt.types';

*/
publish(roomId: string | string[], event: string, data: any): Promise<PublishResponseData>;
publish(roomId: string | string[], event: string, data: any, clientId?: string): Promise<PublishResponseData>;
/**

@@ -36,0 +36,0 @@ * Prepares the request parameters including the request body, HMAC signature, and public key.

@@ -62,6 +62,6 @@ "use strict";

*/
publish(roomId, event, data) {
publish(roomId, event, data, clientId) {
return __awaiter(this, void 0, void 0, function* () {
(0, validation_1.validateParams)({ roomId, event, data }, ['roomId', 'event', 'data']);
const [requestBody, requestSignature, publicKey] = this.prepareRequestParams(roomId, event, data);
const { body: requestBody, signature: requestSignature, publicKey } = this.prepareRequestParams(roomId, event, data, clientId);
const requestParams = {

@@ -87,3 +87,3 @@ method: 'POST',

*/
prepareRequestParams(roomId, event, data) {
prepareRequestParams(roomId, event, data, clientId) {
const timestamp = Date.now();

@@ -94,7 +94,8 @@ const body = JSON.stringify({

data,
timestamp
timestamp,
clientId
});
const { publicKey: publicKey, secretKey } = this.apiKeyParts;
const signature = (0, signature_1.generateHmacSignature)(body, secretKey);
return [body, signature, publicKey];
return { body, signature, publicKey };
}

@@ -101,0 +102,0 @@ /**

{
"name": "@relaybox/rest",
"version": "1.10.0",
"version": "1.11.0",
"description": "RelayBox REST Services SDK. Enables seemless integration between server-side applications and RelayBox's authentication and realtime services. It provides robust functionality for generating authentication tokens, publishing events, and interacting efficiently with RelayBox's suite of services.",

@@ -5,0 +5,0 @@ "keywords": [

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