Releases: evrythng/evrythng.js
Releases · evrythng/evrythng.js
v5.8.1
v5.8.0
Features
-
ActionApp: Allow
createAction()
to target athng
orproduct
by including an ID in thedata
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
Features
- Purchase Orders: Add
purchaseOrder()
resource for Operator, TrustedApplication, and User scopes. - Shipment Notices: Add
shipmentNotice()
andshipmentNotice().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
Features
- ADI Orders: Added
adiOrder()
resources to Operator scope for creating and reading ADI Orders. Also includesevent()
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 withpageVisited()
andcreateAction()
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 asmocha
andp-retry
. The EVRYTHNG Error can be obtained withJSON.stringify(err.message)
.
v5.4.0
Changes
- redirections:
redirection()
resource now allows nominating theshortDomain
in that call, and no longer requires some templating ({shortId}
/{productId}
) as part of the URL submitted. - redirections:
settings
now includesdefaultShortDomain
to allow setting the default short domain used forredirection()
requests.
Fixes
- api: Better handle parts of the API that return non-standard empty response bodies.
v5.3.0
Features
- entities: Export
Entity
through the pluginapi
. - files: Add
upload()
method for files to upload file data. - upsert:
upsert()
can now be performed byname
in addition to an identifier object where a resource supports filtering byname
.
Fixes
- param setters: Add missing
setIds()
param setter. - permissions: Support referring to permission by name, such as
permission('global_read')
v5.1.0
v5.0.0
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 nowevrythng
. - Scope names: The
App
andTrustedApp
scopes are nowApplication
andTrustedApplication
. - 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 theinit()
method, and behaves the same way. - Request options: The
authorization
parameter forapi()
is nowapiKey
. - Iterators: The
EVT.Utils.forEachAsync()
anditerator()
resource method is nowpages()
, and is an async generator. - Reactor APIs: The Reactor APIs have been consolidated into their own methods:
reactorScript()
,reactorSchedule()
andreactorLogs()
.
Features
- Redirections: The
thng()
andproduct()
resources now have aredirection()
resource for managing redirections. - Accounts: Added a
sharedAccount()
resource withaccess()
sub-resource for reading and updating accounts. - Domains: The
sharedAccount()
resource also includesshortDomain()
anddomain()
resources for reading available short domains and domains. - Secret key: The
application()
resource now has asecretKey()
resource for reading its Trusted Application API Key as anOperator
. - Redirector: The
Operator
scope andapplication()
resource now have aredirector()
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 assetPerPage()
are available on most resources to easily build complex requests. - Resource methods: The
rescope()
,upsert()
, andfind()
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
Features
- Policies: Allow single Policy access.
v4.7.0
Features
- Policies: Add Policy resource to Roles.