@relaybox/rest
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -10,3 +10,3 @@ import { ExtendedJwtPayload } from './types/jwt.types'; | ||
private apiKeyParts; | ||
private uwsServiceUrl; | ||
private coreServiceUrl; | ||
/** | ||
@@ -17,3 +17,3 @@ * Creates an instance of RelayBox. | ||
*/ | ||
constructor({ apiKey, uwsServiceUrl }: RelayBoxOptions); | ||
constructor({ apiKey, coreServiceUrl }: RelayBoxOptions); | ||
/** | ||
@@ -20,0 +20,0 @@ * Generates a token response with a JWT based on the provided parameters. |
@@ -17,3 +17,3 @@ "use strict"; | ||
const validation_1 = require("./validation"); | ||
const DEFAULT_UWS_SERVICE_URL = `https://gnet.prod.relaybox-services.net`; | ||
const DEFAULT_CORE_SERVICE_URL = `https://gnet.prod.relaybox-services.net`; | ||
const DEFAULT_TOKEN_EXPIRY_SECS = 900; | ||
@@ -31,6 +31,6 @@ const DEFAULT_TOKEN_TYPE = 'id_token'; | ||
*/ | ||
constructor({ apiKey, uwsServiceUrl }) { | ||
constructor({ apiKey, coreServiceUrl }) { | ||
(0, validation_1.validateParams)({ apiKey }, ['apiKey']); | ||
this.apiKeyParts = this.getApiKeyParts(apiKey); | ||
this.uwsServiceUrl = uwsServiceUrl || DEFAULT_UWS_SERVICE_URL; | ||
this.coreServiceUrl = coreServiceUrl || DEFAULT_CORE_SERVICE_URL; | ||
} | ||
@@ -77,3 +77,3 @@ /** | ||
}; | ||
const response = yield (0, request_1.request)(`${this.uwsServiceUrl}/events`, requestParams); | ||
const response = yield (0, request_1.request)(`${this.coreServiceUrl}/events`, requestParams); | ||
return response.data; | ||
@@ -80,0 +80,0 @@ }); |
export interface RelayBoxOptions { | ||
apiKey: string; | ||
uwsServiceUrl?: string; | ||
coreServiceUrl?: string; | ||
} | ||
@@ -5,0 +5,0 @@ export interface ApiKeyParts { |
{ | ||
"name": "@relaybox/rest", | ||
"version": "1.5.0", | ||
"version": "1.6.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": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30494