Skip to content

Releases: smartcar/node-sdk

v9.4.0

11 Apr 13:43
0b18b9c
Compare
Choose a tag to compare

9.4.0 (2023-04-11)

Features

v9.3.0

03 Apr 23:13
230e41e
Compare
Choose a tag to compare

9.3.0 (2023-04-03)

Features

v9.2.1

20 Jan 01:37
72e06d7
Compare
Choose a tag to compare

9.2.1 (2023-01-20)

Bug Fixes

v9.2.0

21 Jul 07:52
06ff733
Compare
Choose a tag to compare

9.2.0 (2022-07-21)

Features

  • smartcar: added support for simulated mode and feature flags (#154) (06ff733)

v9.1.1

03 Feb 00:07
02879ae
Compare
Choose a tag to compare

9.1.1 (2022-02-03)

Bug Fixes

v9.1.0

28 Jan 00:50
d3a8a67
Compare
Choose a tag to compare

9.1.0 (2022-01-28)

Features

  • vehicle: add general purpose request method to Vehicle prototype (#143) (d3a8a67)

v9.0.0

26 Jan 02:53
75d31c3
Compare
Choose a tag to compare

Maintenance release

  • Updating the NPM version to 8.3
  • Dropping node v10 from supported versions
  • Adding node v16 to supported versions

v8.0.1

27 Jul 19:38
aba91fe
Compare
Choose a tag to compare

8.0.1 (2021-07-27)

Bug Fixes

v8.0.0

12 Jul 18:15
Compare
Choose a tag to compare

This is a major release consisting of multiple usability improvements and additional features.

We have aimed to streamline the SDK with the Smartcar API interfaces in a way that the objects returned are closer to the API interface documented in API Docs. For ex. vehicle.odometer() will now return an object that looks like the response in the documentation and additionally the body will contain response headers defined in the documentation as a part of a meta attribute.

The methods to be used are broadly divided into three namespaces :

  • AuthClient - This class is used for all OAuth related operations
  • Smartcar - This class is used for all application level operations
  • Vehicle - This class is used for all vehicle operations/actions.

NOTE - According to the changes made to the terms of nodejs versions support, NodeJS 6 and 8 are no longer supported.

Features

  • Environment variables - The SDK now supports usage of environment variables for client id (SMARTCAR_CLIENT_ID), client secret(SMARTCAR_CLIENT_SECRET) and redirect URL(SMARTCAR_REDIRECT_URL). These can be used instead of having to pass these as arguments.
  • hashChallenge - Additional utility method defined in Smartcar namespace to generate hash challenge for webhooks.
  • verifyPayload - Additional utility method defined in Smartcar namespace to verify the payload returned by webhooks.
  • getApiVersion - Method defined in Smartcar namespace to return the api version set globally.
  • subscribe - Additional method defined in Vehicle namespace to subscribe to a webhook.
  • unsubscribe - Additional method defined in Vehicle namespace to unsubscribe from a webhook.
  • Default API version to 2.0 - The default version for the APIs is now 2.0 instead of 1.0 . This can be overridden globally by using the setApiVersion method or by using optional arguments in different methods.

Improvements

Following are the improvements made to the interfaces by namespace. For in-depth details of the interface please refer to the SDK documentation.

AuthClient

  • Constructor - This only requires the set of parameters required by all of the functions defined in the class. Previously this was also taking in all the arguments used for generating auth URL. This has not been separated and streamlined.
  • getAuthUrl - Takes in scope as required argument and all the other optional arguments required to generate the Smartcar Connect URL as defined in the docs
  • exchangeCode - Added additional support for optional flags parameter for future usage.
  • exchangeRefreshToken - Added additional support for optional flags parameter for future usage.

Smartcar

  • getVehicles - Renamed from getVehicleIds and changes in interface.
  • getUser - Moved and renamed from Vehicle#getUserIds and changes in interface.
  • getCompatibility - Moved and renamed from AuthClient#isCompatible and changes in interface.

Vehicle

  • Constructor - Updated to now support a version parameter. Look at the interface for more details.
  • attributes - Renamed from info .
  • batch - The return value of the method has been changed. This now returns a function for each attributes requested that either returns an object of the requested attribute OR throws an error if the attribute returned an error.

SmartcarError

All the errors have been converged to a single SmartcarError class. This class can now support the error fields returned by v2.0 and v1.0. For detailed breakdown of both the error types, refer to the to the API Reference Errors section.

v7.8.1

24 Apr 03:02
ad46f07
Compare
Choose a tag to compare

7.8.1 (2021-04-24)

This release adds support for v2.0 of Smartcar's API by introducing the smartcar.setApiVersion method.

We have also introduced a SmartcarErrorV2 class whose fields match the error fields returned by v2.0 of the API as documented on the API Reference. This class extends the SmartcarError class to ease the migration process.

For a detailed breakdown of the changes and how to migrate see our API Changelog for v2.0 and our v2.0 Error Guides.