Skip to content

Releases: evrythng/evrythng.js

v6.0.5

18 Feb 09:33
25bcff4
Compare
Choose a tag to compare

Fixes

  • When fullResponse is set, the full fetch 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

13 May 13:53
138fb5f
Compare
Choose a tag to compare

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

12 May 15:36
f86bf77
Compare
Choose a tag to compare

Fixes

  • TrustedApplication - Fix use of reactorLog entity on the TrustedApplication resource.

v6.0.1

29 Apr 13:02
aac412b
Compare
Choose a tag to compare

Fixes

  • api - Fix a bug that produced a rejected Promise inside a catch block, instead of an Error, in async 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)

18 Dec 14:39
e3d6a57
Compare
Choose a tag to compare

Features

  • Setup: Add apiVersion:2 as default and add URL configuration based on apiVersion and region

  • Scopes: Add Operator and AccessToken scopes for apiVersion:2

  • Access Policies: Add accessPolicies() for access policies API to Operator and AccessToken scopes for apiVersion:2

  • Operator Accesses: Add operatorAccess() for operator accesses API to Operator and AccessToken scopes for apiVersion:2

  • Me: Add me() for me API to Operator and AccessToken scopes for apiVersion:2

  • Access Tokens: Add accessToken() for access tokens API to Operator and AccessToken scopes for apiVersion:2

v5.10.1

03 Dec 14:24
5174703
Compare
Choose a tag to compare

Fixes

  • Operator - Operator scopes now store their own resource data locally.

v5.10.0

03 Dec 13:15
04ba228
Compare
Choose a tag to compare

Features

  • Operator - Add update method to Operator, allowing them to update their own data, such as customFields.

v5.9.3

19 Nov 09:44
115df4b
Compare
Choose a tag to compare

Fixes

  • geolocation: Accept cached location values up to 5 minutes old, instead of always requesting a fresh measurement. This will speed up action creation where geolocation is true and avoid adding a perceptible long delay.

v5.9.1

30 Sep 14:36
001345b
Compare
Choose a tag to compare

Fixes

  • Dependencies: Updated dependencies to resolve security advisories

v5.9.0

01 Jul 14:19
521258f
Compare
Choose a tag to compare

Features

  • Files: Added files() resources to User scope for creating and reading by file ID.