- Workaround for Firefox failing to open multiple event streams
- Re-add
deleteAccessToken
method, but with basic auth removed
- Remove
listAccessTokens
anddeleteAccessToken
methods that relied on HTTP basic auth - Update EventStream to send access_token in the Authorization header instead. No functional change
- Add DeviceOS versions endpoints
- Don't add an empty query string to the URL
- Add
unprotectDevice
- Remove
changeProduct
- Add
utm
paramater tocreateUser
- Add
setMode
arg tosetLedgerInstance
- Fix a few incorrect logic function JSDocs
- Fix
setLedgerInstance
taking wrong argument and passing a bad request body to the API
- Add
listLedgerInstanceVersions
function - Add
getLedgerInstanceVersion
function
- Add
todayStats
query option to listLogicFunctions - Add
scope
,archived
,page
, andperPage
query options to listLedgers - Add
page
andperPage
query options to listLedgerInstances - Add JSDocs for constructor
- Fix JSDocs across most functions in the library to be more accurate
- Add support for sandbox accounts on all logic/ledger APIs by allowing the omission of the
org
property - Add
executeLogic
function for testing logic functions before deploying them
- Migrate LogicBlocks methods to LogicFunctions, LogicTriggers, and LogicRuns
- Use wepback to bundle for browser use
- Remove babel, browserify and their related dependencies
- Adds support for checkJS loose type/docs validations
- Change library to handle requests from
superagent
tofetch
/node-fetch
- Fixes incompatible versions of
eslint
,chai
,sinon-chai
andchai-as-promised
.
- Adds
.setDefaultAuth(auth)
so token authenticated methods don't need to pass their own auth token. - Adds support for
auth
option in Particle constructor, calls.setDefaultAuth()
if provided - Fixes bug where
.setBaseUrl(baseUrl)
was not honored for.getEventStream()
method (sc-105035)
- Adds
.setBaseUrl(baseUrl)
to override backend api endpoint
- Move to
node@16
andnpm@8
for local development
- Fix library download
- Use unforked copy of
stream-http
dependency
.listAccessTokens()
acceptsotp
option to support users with MFA enabled
- Add
.deleteActiveAccessTokens()
method - Add
invalidateTokens
arguments to.confirmMfa()
and.changeUsername()
methods
- Add
.getProductDeviceConfiguration()
and.getProductDeviceConfigurationSchema()
methods
- Add support for configuration and location services
- All top-level api methods optionally accept a
headers
option object - Breaking: Base http methods (
.get()
,.put()
, etc) on agent and particle classes accept options object vs. positional arguments (see here) - Breaking:
.downloadFile()
method usesuri
option (vs.url
) (docs) - Breaking: Refactored options object for the
.createWebhook()
method - hook-related options are now passed in viaoptions.hook
(docs)
- Allow invalidating access tokens when changing password
- Add delete user
- fix file download methods
.downloadFile()
,.downloadFirmwareBinary()
, and.downloadProductFirmware()
PR #112
.addDeviceToProduct()
acceptsfile
option to facillitate bulk importing of devices PR #109
- Add support for
groups
query parameter when listing product devices via.listDevices()
PR #108 - Update
eslint
and related configuration PR #107
- Update to latest superagent to fix deprecation warnings in Node v12
- EventStream returned by getEventStream handles errors better PR #99.
Breaking changes for EventStream:
- Only emits a single event named 'event' for each Particle event received instead of 2 events, one named 'event' and another named after the Particle event name. This behavior caused EventStream to disconnects if a Particle event named 'error' was published.
- Does not emit the 'error' event when a network error happens. Instead it emits 'disconnect' and automatically reconnects.
- Do not require network ID to remove a device from its network PR #103
- Add support for mesh network management PR #98
- Support flashing product devices PR #97
- Add sendOtp method to allow users enrolled in MFA/Two-Step Auth to login PR #92
- Fix npm api key for publishing to registry
- Support enrolling user in MFA/Two-step authentication
- Support changing user's username(i.e., email) and password PR #84
- Fix country parameter for activate sim PR #81
- Update jsDelivr link PR #66. Thanks @LukasDrgon!
- Stop auto reconnecting when event stream is intentionally disconnected PR #69. Thanks @spacetc62!
- Add createCustomer PR #78. Thanks @monkeytronics!
- Fix event stream exception when it is an HTML response PR #64. Thanks @spacetc62!
- Update links after GitHub organization rename to
particle-iot
PR #79
- Add loginAsClientOwner method
- Update to latest superagent with support for nested directory. Drops support for Node versions earlier than 4.
- Add serial number endpoint
- Fix nested directories bug
- Update form-data to v1.0.0-relativepath.2
- Add support for deleting current token
- Add support for all product API endpoints.
- Add support for sending additional context with each call.
- Create a wrapper for
listBuildTargets
inClient.js
. - Marked
compileCode
,signalDevice
,listDevices
andlistBuildTargets
as deprecated. Those methods will be removed in 6.5
- Create a wrapper for
listDevices
inClient.js
.
- Add scopes to library listing
- Create a wrapper for
signalDevice
inClient.js
.
- Add support for account verification endpoint via verifyUser function
- Change account_info input parameter in createUser and setUserInfo to be camel case - accountInfo
- Add support for account information fields in createUser and setUserInfo
- Add "shortErrorDescription" in response body to contain English description only
- Add library publish
- Rename library publish to library contribute
- Add library versions endpoint
- Add library delete
- Add library publish
- Use only HTTP dependencies to be able to install on computers without git
- Support nested directories when compiling sources
- Add compile code to client
- Fix the login method content type
- Add libraries endpoints
- Add stateful client
- Add object interface for libraries
- Handle empty event names in the event stream.
- Add details to README
- Adding responseTemplate and responseTopic to webhook creation. Thanks @acasas! #20
- Add password reset route #27
- Make event stream compatible with new product routes #28
- Fix files parameter default name to be
file
and notfile1
.
- Don't double publish event stream events if the event is named
event
.
- Handle
JSON.parse
exceptions when parsing event stream
flashDevice
latest
also needs to be a string, not a boolean. #12
- Remove setting of
User-Agent
header because that is not allowed in browsers. #10
- Fix named event streams by encoding event name.
- Move access token to query string to eliminate preflight CORS request.
- Use fork of
stream-http
that prevents usage offetch
because it does not abort. - Use correct streaming mode of
stream-http
.
- Improve cleanup on
abort
.
- Add support for organization and product slugs to
getEventStream
.
JSON.parse
HTTP response body forgetEventStream
error case.
- Fix event stream. #8
- Add
downloadFirmwareBinary
- Add ability to intercept requests for debugging
- Use library version for User-Agent
- Allow request transfer for
claimDevice
signalDevice
needs to use strings, not numbers.compileCode
latest
should be a string, not a boolean.
- Remove trailing slash from
baseUrl
. #7
- Remove need for
require('particle-api-js').default
in CommonJS usage. It is now justrequire('particle-api-js')
.
- Removed need for
babel-runtime
. - Add
flashDevice
,compileCode
, andlistAccessTokens
. - Add missing options to
createWebhook
. - Remove
downloadFirmwareBinary
.
- Update contributors.
- Add
downloadFirmwareBinary
.
- Add
validatePromoCode
. activateSIM
now requirespromo_code
andaction
.
- Fix old
code
reference.
- Change
code
tostatusCode
in rejection.
- Add
statusCode
to Promise fulfillment.
- Add
listBuildTargets
.
- Add
countryCode
toactivateSIM
.
- Fix
activateSIM
.
- Replace
request
withsuperagent
. - Add
iccid
togetClaimCode
. - Only use form encoding on
login
andsignup
.
- Removed browser entry in package.json. This makes it possible to bundle the module with other apps that use browserify without causing relative pathing issues.
- Improved error handling and reporting. Network errors and HTTP errors now both return
code
property that can be more easily used to programmatically detect error types.