Releases: evrythng/evrythng.js
v6.0.5
Fixes
-
When
fullResponse
is set, the fullfetch
response object should be returned so status can be examined, even in the case of an API error. -
Sometimes an unexpected error causes a useless stringified
fetch
response object to be returned to the SDK caller, such as the following examples.{"size":0,"timeout":0}
or
body already used for [...] (and similar)
v6.0.3
Fixes
- Operator - Allow creation of reactor logs for Operator scopes (but only in v2 API)
const operator = new evrythng.Operator(OPERATOR_API_KEY);
const logs = [{ message: 'Test log message', logLevel: 'info' }];
await operator.reactorLog(projectId, applicationId).create(logs);
v6.0.2
v6.0.1
Fixes
- api - Fix a bug that produced a rejected
Promise
inside acatch
block, instead of anError
, inasync
functions (restoring the same behaviour as was in v5.10). For example:
try {
await operator.thng().create(payload);
} catch (err) {
console.log(err.name); // Error
console.log(err.message); // EVRYTHNG API error
const json = JSON.parse(err.message);
console.log(json.errors[0]); // The error message as usual
}
Support of enterprise API (v2)
Features
-
Setup: Add
apiVersion:2
as default and add URL configuration based on apiVersion and region -
Scopes: Add
Operator
andAccessToken
scopes forapiVersion:2
-
Access Policies: Add
accessPolicies()
for access policies API to Operator and AccessToken scopes forapiVersion:2
-
Operator Accesses: Add
operatorAccess()
for operator accesses API to Operator and AccessToken scopes forapiVersion:2
-
Me: Add
me()
for me API to Operator and AccessToken scopes forapiVersion:2
-
Access Tokens: Add
accessToken()
for access tokens API to Operator and AccessToken scopes forapiVersion:2
v5.10.1
v5.10.0
v5.9.3
v5.9.1
v5.9.0
Features
- Files: Added
files()
resources to User scope for creating and reading by file ID.