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

@nrfcloud/api-client-javascript

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nrfcloud/api-client-javascript - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

3

dist/client.d.ts

@@ -31,2 +31,5 @@ import { TenantsList } from "./types/TenantsList";

* (The tenants for the authenticated user)
* - for status 201
* a TenantsList as application/json
* (A list with the the tenant which was just created.)
* - for status 400

@@ -33,0 +36,0 @@ * a HttpProblem as application/json

24

dist/client.js

@@ -39,9 +39,16 @@ "use strict";

throw new TypeError(`The content-type "${contentType}" of the response is not JSON!`);
const json = yield res.json();
if (res.status >= 400)
if (json.$context === models_1.HttpProblem.$context.toString())
throw models_1.HttpProblem.fromJSON(json);
else
throw new models_1.ApplicationError(JSON.stringify(json));
return json;
const status = res.status;
const contentLength = +(res.headers.get("content-length") || 0);
if (status >= 400) {
if (contentLength) {
const json = yield res.json();
if (json.$context === models_1.HttpProblem.$context.toString())
throw models_1.HttpProblem.fromJSON(json);
else
throw new models_1.ApplicationError(JSON.stringify(json));
}
throw new models_1.ApplicationError(`Response status code was ${status}, but not response was returned.`);
}
if (contentLength)
return yield res.json();
});

@@ -59,2 +66,5 @@ }

* (The tenants for the authenticated user)
* - for status 201
* a TenantsList as application/json
* (A list with the the tenant which was just created.)
* - for status 400

@@ -61,0 +71,0 @@ * a HttpProblem as application/json

{
"name": "@nrfcloud/api-client-javascript",
"version": "1.5.0",
"version": "1.6.0",
"description": "JavaScript API client for the nRFCloud.com REST API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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