Skip to content

Releases: evrythng/evrythng.js

v5.8.1

03 Jun 15:24
9db9f8f
Compare
Choose a tag to compare

Fixes

  • api: Fix cannot read property message of undefined when a 204 or DELETE request failed.

v5.8.0

03 Feb 17:52
656fb54
Compare
Choose a tag to compare

Features

  • ActionApp: Allow createAction() to target a thng or product by including an ID in the data parameter.

  • ActionApp: Add getAnonymousUser() to allow usage of the managed anonymous Application User.

Fixes

  • ActionApp: Fix bug preventing use of built-in action types.

v5.6.0

27 Sep 13:43
0e125a2
Compare
Choose a tag to compare

Features

  • Purchase Orders: Add purchaseOrder() resource for Operator, TrustedApplication, and User scopes.
  • Shipment Notices: Add shipmentNotice() and shipmentNotice().container() for shipment notices API to Operator scope.

Fixes

  • Scopes: Prevent scopes performing more access reading calls than required.

Other

  • Tests: Replace live E2E tests with mocked API calls.

v5.5.0

30 Aug 14:09
7e86a3d
Compare
Choose a tag to compare

Features

  • ADI Orders: Added adiOrder() resources to Operator scope for creating and reading ADI Orders. Also includes event() for creating ADI Order events.
  • Commissioning: Added commissionState() to Thng resource.
  • Resources: Added stream() method to all resources, so allow easier iterative updating of large numbers of resources.
  • Scopes: Added ActionApp scope with pageVisited() and createAction() methods for easily instrumenting web apps and pages with a single anonymous Application User.

Fixes

  • Errors: Always return a native Error, to work better with testing and retry libraries such as mocha and p-retry. The EVRYTHNG Error can be obtained with JSON.stringify(err.message).

v5.4.0

07 Aug 14:57
67e58ab
Compare
Choose a tag to compare

Changes

  • redirections:redirection() resource now allows nominating the shortDomain in that call, and no longer requires some templating ({shortId}/{productId}) as part of the URL submitted.
  • redirections: settings now includes defaultShortDomain to allow setting the default short domain used for redirection() requests.

Fixes

  • api: Better handle parts of the API that return non-standard empty response bodies.

v5.3.0

29 Jul 13:29
bb8f6c0
Compare
Choose a tag to compare

Features

  • entities: Export Entity through the plugin api.
  • files: Add upload() method for files to upload file data.
  • upsert: upsert() can now be performed by name in addition to an identifier object where a resource supports filtering by name.

Fixes

  • param setters: Add missing setIds() param setter.
  • permissions: Support referring to permission by name, such as permission('global_read')

v5.1.0

30 May 09:10
310eb7f
Compare
Choose a tag to compare

Features

  • plugins: Added the use() method in order to support plugins. See src/use.js for API details.

v5.0.0

22 May 09:24
c7b887b
Compare
Choose a tag to compare

Breaking Changes

If you are updating from a previous version, please see the Migration Guide.

  • evrythng-extended.js: evrythng-extended.js is no longer required as a separate dependency.
  • Browser global: The EVT browser global is now evrythng.
  • Scope names: The App and TrustedApp scopes are now Application and TrustedApplication.
  • User scope: Manual creation of a User scope using a pre-existing API key now only requires the key as a parameter.
  • $init: The $init promise property has been formalised as the init() method, and behaves the same way.
  • Request options: The authorization parameter for api() is now apiKey.
  • Iterators: The EVT.Utils.forEachAsync() and iterator() resource method is now pages(), and is an async generator.
  • Reactor APIs: The Reactor APIs have been consolidated into their own methods: reactorScript(), reactorSchedule() and reactorLogs().

Features

  • Redirections: The thng() and product() resources now have a redirection() resource for managing redirections.
  • Accounts: Added a sharedAccount() resource with access() sub-resource for reading and updating accounts.
  • Domains: The sharedAccount() resource also includes shortDomain() and domain() resources for reading available short domains and domains.
  • Secret key: The application() resource now has a secretKey() resource for reading its Trusted Application API Key as an Operator.
  • Redirector: The Operator scope and application() resource now have a redirector() resource for reading and updating Redirector rules.
  • Resource aliases: The alias() method allows simple aliasing of existing resource types to better suit a use-case or environment, such as naming collections 'pallets'.
  • Parameter setters: Instead of creating a params object, chainable setters such as setPerPage() are available on most resources to easily build complex requests.
  • Resource methods: The rescope(), upsert(), and find() methods have been added to most resources to allow easier changing of project/user scopes, updating by key else creating, and finding by identifiers as common operations.

v4.7.1

30 Jun 13:32
Compare
Choose a tag to compare

Features

  • Policies: Allow single Policy access.

v4.7.0

30 Jun 11:31
Compare
Choose a tag to compare

Features

  • Policies: Add Policy resource to Roles.