commerce-sdk-isomorphic 1.5.1 → 1.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.7.0
4
+
5
+ * Export API type definitions. They are available as top-level exports, following the pattern `<API Name>Types`.
6
+
7
+ Example usage:
8
+
9
+ ```typescript
10
+ import {ShopperBaskets, ShopperBasketsTypes} from "commerce-sdk-isomorphic"
11
+
12
+ const basketsClient = new ShopperBaskets(config)
13
+ const basket: ShopperBasketsTypes.Basket = await basketsClient.getBasket({ basketId: "some-basket" })
14
+ ```
15
+
16
+ ## v1.6.0
17
+
18
+ #### API Changes
19
+
20
+ *Shopper Login*
21
+
22
+ * New Endpoints
23
+
24
+ | **Endpoint Name** | **Description** |
25
+ | ------------- |-------------|
26
+ | getPasswordResetToken | Request a reset password token |
27
+ | resetPassword | Creates a new password |
28
+
29
+ #### Enchancements
30
+
31
+ * More error handling has been added in the SLAS helpers
32
+
33
+ #### Bug fixes
34
+
35
+ * SLAS helper `loginRegisteredUserB2C` no longer calls `redirectURI` when running server side
36
+
37
+ #### Documentation
38
+
39
+ * `README` updated to explicitly note lack of CORS support for SCAPI
40
+
41
+ ## v1.5.2
42
+
43
+ ### New Features
44
+
45
+ * If the `throwOnBadResponse` flag is set, the error thrown now includes the full HTTP response object.
46
+
47
+ ### Bug Fixes
48
+
49
+ * An error about invalid user-agent is no longer printed to console when making requests in a browser.
50
+
3
51
  ## v1.5.1
4
52
 
5
53
  #### Documentation
@@ -35,7 +83,8 @@
35
83
  #### Bug Fixes
36
84
 
37
85
  * Added support for `application/x-www-form-urlencoded` request bodies.
38
- - SLAS endpoints now work out of the box
86
+ * SLAS endpoints now work out of the box
87
+
39
88
  ## v1.4.0
40
89
 
41
90
  #### New Features
package/README.md CHANGED
@@ -65,6 +65,10 @@ const searchResult = await shopperSearch.productSearch({
65
65
  });
66
66
  ```
67
67
 
68
+ #### CORS
69
+
70
+ The Salesforce Commerce API (SCAPI) does not support CORS, so a proxy must be used to be able to use the SDK. Code example on SDK usage with a proxy can be seen above.
71
+
68
72
  ### Advanced options
69
73
 
70
74
  Commerce SDK Isomorphic supports Fetch API options for [node-fetch](https://github.com/node-fetch/node-fetch/1#api) on server and [whatwg-fetch](https://github.github.io/fetch/) on browser with a simple configuration.
@@ -108,7 +112,7 @@ _throwOnBadResponse:_ Default value is false. When set to true, the SDK throws a
108
112
 
109
113
  A collection of helper functions are available in this SDK to simplify [Public
110
114
  Client Shopper Login OAuth
111
- flows](https://developer.salesforce.com/docs/commerce/commerce-api/references#shopper-login-and-api-access:Summary). See sample code above for guest login.
115
+ flows](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary). See sample code above for guest login.
112
116
 
113
117
  ## License Information
114
118