@smartcar/auth 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,7 +24,7 @@ npm install @smartcar/auth
24
24
  ### Smartcar CDN
25
25
 
26
26
  ```html
27
- <script src="https://javascript-sdk.smartcar.com/2.10.0/sdk.js"></script>
27
+ <script src="https://javascript-sdk.smartcar.com/2.11.0/sdk.js"></script>
28
28
  ```
29
29
 
30
30
  ## SDK reference
@@ -178,4 +178,4 @@ https://application-backend.com/page?error=access_denied&error_description=User+
178
178
  [tag-image]: https://img.shields.io/github/tag/smartcar/javascript-sdk.svg
179
179
 
180
180
  <!-- Please do not modify or remove this, it is used by the build process -->
181
- [version]: 2.10.0
181
+ [version]: 2.11.0
package/dist/npm/sdk.js CHANGED
@@ -264,6 +264,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
264
264
  * for more information.
265
265
  * @param {String[]} [options.flags] - An optional space-separated list of feature
266
266
  * flags that your application has early access to.
267
+ * @param {String} [options.user] - An optional unique identifier for a vehicle owner.
268
+ * This identifier is used to aggregate analytics across Connect sessions for each vehicle owner.
267
269
  *
268
270
  * @return {String} Connect URL to redirect user to.
269
271
  *
@@ -278,6 +280,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
278
280
  * &single_select=true
279
281
  * &single_select_vin=5YJSA1E14FF101307
280
282
  * &flags=country:DE color:00819D
283
+ * &user=2dad4eaf-9094-4bff-bb0f-ffbbdde8b562
281
284
  */
282
285
  function getAuthUrl(options) {
283
286
  options = options || {};
@@ -350,6 +353,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
350
353
  link += "&flags=".concat(encodeURIComponent(options.flags.join(' ')));
351
354
  }
352
355
 
356
+ if (options.user) {
357
+ link += "&user=".concat(encodeURIComponent(options.user));
358
+ }
359
+
353
360
  return link;
354
361
  }
355
362
  /**
package/doc/README.md CHANGED
@@ -72,6 +72,7 @@ Generates Smartcar OAuth URL.
72
72
  | [options.vehicleInfo.make] | <code>String</code> | | `vehicleInfo` is an object with an optional property `make`, which allows users to bypass the car brand selection screen. For a complete list of supported brands, please see our [API Reference](https://smartcar.com/docs/api#authorization) documentation. |
73
73
  | [options.singleSelect] | <code>Boolean</code> \| <code>Object</code> | | An optional value that sets the behavior of the grant dialog displayed to the user. If set to `true`, `single_select` limits the user to selecting only one vehicle. If `single_select` is passed in as an object with the property `vin`, Smartcar will only authorize the vehicle with the specified VIN. See the [API reference](https://smartcar.com/docs/api/#connect-match) for more information. |
74
74
  | [options.flags] | <code>Array.&lt;String&gt;</code> | | An optional space-separated list of feature flags that your application has early access to. |
75
+ | [options.user] | <code>String</code> | | An optional unique identifier for a vehicle owner. This identifier is used to aggregate analytics across Connect sessions for each vehicle owner. |
75
76
 
76
77
  **Example**
77
78
  ```js
@@ -85,6 +86,7 @@ response_type=code
85
86
  &single_select=true
86
87
  &single_select_vin=5YJSA1E14FF101307
87
88
  &flags=country:DE color:00819D
89
+ &user=2dad4eaf-9094-4bff-bb0f-ffbbdde8b562
88
90
  ```
89
91
  <a name="Smartcar+openDialog"></a>
90
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartcar/auth",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "javascript auth sdk for the smartcar",
5
5
  "main": "dist/npm/sdk.js",
6
6
  "license": "MIT",